From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 00:13:51 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BA4F1065675; Sun, 21 Dec 2008 00:13:51 +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 2A9608FC14; Sun, 21 Dec 2008 00:13:51 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBL0DpD0017777; Sun, 21 Dec 2008 00:13:51 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBL0Dpgs017776; Sun, 21 Dec 2008 00:13:51 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812210013.mBL0Dpgs017776@svn.freebsd.org> From: Tim Kientzle Date: Sun, 21 Dec 2008 00:13: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: r186366 - head/lib/libarchive/test X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 00:13:51 -0000 Author: kientzle Date: Sun Dec 21 00:13:50 2008 New Revision: 186366 URL: http://svn.freebsd.org/changeset/base/186366 Log: Teach get_refdir() about FreeBSD's /usr/obj convention. In development, I run libarchive_test frequently by hand and it gets tedious having to specify a suitable -r path all of the time. Modified: head/lib/libarchive/test/main.c Modified: head/lib/libarchive/test/main.c ============================================================================== --- head/lib/libarchive/test/main.c Sat Dec 20 22:11:31 2008 (r186365) +++ head/lib/libarchive/test/main.c Sun Dec 21 00:13:50 2008 (r186366) @@ -846,48 +846,59 @@ extract_reference_file(const char *name) static char * get_refdir(const char *tmpdir) { - char *ref, *p; + char tried[512] = { '\0' }; + char buff[128]; + char *pwd, *p; /* Get the current dir. */ systemf("/bin/pwd > %s/refdir", tmpdir); - ref = slurpfile(NULL, "%s/refdir", tmpdir); - p = ref + strlen(ref); - while (p[-1] == '\n') { - --p; - *p = '\0'; - } + pwd = slurpfile(NULL, "%s/refdir", tmpdir); + while (pwd[strlen(pwd) - 1] == '\n') + pwd[strlen(pwd) - 1] = '\0'; + printf("PWD: %s\n", pwd); systemf("rm %s/refdir", tmpdir); + /* Look for a known file. */ - p = slurpfile(NULL, "%s/%s", ref, KNOWNREF); - if (p != NULL) { - free(p); - return (ref); - } - p = slurpfile(NULL, "%s/test/%s", ref, KNOWNREF); - if (p != NULL) { - free(p); - p = malloc(strlen(ref) + strlen("/test") + 1); - strcpy(p, ref); - strcat(p, "/test"); - free(ref); - return (p); - } - p = slurpfile(NULL, "%s/%s/test/%s", ref, LIBRARY, KNOWNREF); - if (p != NULL) { - free(p); - p = malloc(strlen(ref) + 1 + strlen(LIBRARY) + strlen("/test") + 1); - strcpy(p, ref); - strcat(p, "/"); - strcat(p, LIBRARY); - strcat(p, "/test"); - free(ref); - return (p); + snprintf(buff, sizeof(buff), "%s", pwd); + p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); + if (p != NULL) goto success; + strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); + strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + + snprintf(buff, sizeof(buff), "%s/test", pwd); + p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); + if (p != NULL) goto success; + strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); + strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + + snprintf(buff, sizeof(buff), "%s/%s/test", pwd, LIBRARY); + p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); + if (p != NULL) goto success; + strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); + strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + + if (memcmp(pwd, "/usr/obj", 8) == 0) { + snprintf(buff, sizeof(buff), "%s", pwd + 8); + p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); + if (p != NULL) goto success; + strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); + strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); + + snprintf(buff, sizeof(buff), "%s/test", pwd + 8); + p = slurpfile(NULL, "%s/%s", buff, KNOWNREF); + if (p != NULL) goto success; + strncat(tried, buff, sizeof(tried) - strlen(tried) - 1); + strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); } + printf("Unable to locate known reference file %s\n", KNOWNREF); - printf(" Checked directory %s\n", ref); - printf(" Checked directory %s/test\n", ref); - printf(" Checked directory %s/%s/test\n", ref, LIBRARY); + printf(" Checked following directories:\n%s\n", tried); exit(1); + +success: + free(p); + free(pwd); + return strdup(buff); } int main(int argc, char **argv) From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 06:20:11 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3A5F1065670; Sun, 21 Dec 2008 06:20:11 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91ACE8FC1C; Sun, 21 Dec 2008 06:20:11 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBL6KB59025424; Sun, 21 Dec 2008 06:20:11 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBL6KBUC025421; Sun, 21 Dec 2008 06:20:11 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200812210620.mBL6KBUC025421@svn.freebsd.org> From: Scott Long Date: Sun, 21 Dec 2008 06:20: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: r186371 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 06:20:11 -0000 Author: scottl Date: Sun Dec 21 06:20:11 2008 New Revision: 186371 URL: http://svn.freebsd.org/changeset/base/186371 Log: Fix refcount locking in cd, pass, and sg periphs. Modified: head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Sun Dec 21 04:40:02 2008 (r186370) +++ head/sys/cam/scsi/scsi_cd.c Sun Dec 21 06:20:11 2008 (r186371) @@ -996,12 +996,6 @@ cdopen(struct disk *dp) return (error); } - /* Closes aren't symmetrical with opens, so fix up the refcounting. */ - if (softc->flags & CD_FLAG_OPEN) - cam_periph_release(periph); - else - softc->flags |= CD_FLAG_OPEN; - /* * Check for media, and set the appropriate flags. We don't bail * if we don't have media, but then we don't allow anything but the @@ -1011,7 +1005,15 @@ cdopen(struct disk *dp) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("leaving cdopen\n")); cam_periph_unhold(periph); - cam_periph_unlock(periph); + + /* Closes aren't symmetrical with opens, so fix up the refcounting. */ + if ((softc->flags & CD_FLAG_OPEN) == 0) { + softc->flags |= CD_FLAG_OPEN; + cam_periph_unlock(periph); + } else { + cam_periph_unlock(periph); + cam_periph_release(periph); + } return (0); } Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Sun Dec 21 04:40:02 2008 (r186370) +++ head/sys/cam/scsi/scsi_pass.c Sun Dec 21 06:20:11 2008 (r186371) @@ -346,13 +346,13 @@ passopen(struct cdev *dev, int flags, in if ((softc->flags & PASS_FLAG_OPEN) == 0) { softc->flags |= PASS_FLAG_OPEN; + cam_periph_unlock(periph); } else { /* Device closes aren't symmertical, so fix up the refcount */ + cam_periph_unlock(periph); cam_periph_release(periph); } - cam_periph_unlock(periph); - return (error); } Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Sun Dec 21 04:40:02 2008 (r186370) +++ head/sys/cam/scsi/scsi_sg.c Sun Dec 21 06:20:11 2008 (r186371) @@ -399,13 +399,13 @@ sgopen(struct cdev *dev, int flags, int if ((softc->flags & SG_FLAG_OPEN) == 0) { softc->flags |= SG_FLAG_OPEN; + cam_periph_unlock(periph); } else { /* Device closes aren't symmetrical, fix up the refcount. */ + cam_periph_unlock(periph); cam_periph_release(periph); } - cam_periph_unlock(periph); - return (error); } From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 07:22:46 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9EB21065670; Sun, 21 Dec 2008 07:22:46 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id 8D3478FC08; Sun, 21 Dec 2008 07:22:46 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.21.166] (helo=devil.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LEIe3-0002VT-Dc; Sun, 21 Dec 2008 15:22:35 +0800 Message-ID: <494DEEC4.4010902@micom.mng.net> Date: Sun, 21 Dec 2008 15:22:44 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.17 (X11/20081020) MIME-Version: 1.0 To: Scott Long References: <200812210620.mBL6KBUC025421@svn.freebsd.org> In-Reply-To: <200812210620.mBL6KBUC025421@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=78F6425E 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: r186371 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 07:22:47 -0000 Scott Long wrote: > Author: scottl > Date: Sun Dec 21 06:20:11 2008 > New Revision: 186371 > URL: http://svn.freebsd.org/changeset/base/186371 > > Log: > Fix refcount locking in cd, pass, and sg periphs. > > Modified: > head/sys/cam/scsi/scsi_cd.c > head/sys/cam/scsi/scsi_pass.c > head/sys/cam/scsi/scsi_sg.c > > Modified: head/sys/cam/scsi/scsi_cd.c > ============================================================================== > --- head/sys/cam/scsi/scsi_cd.c Sun Dec 21 04:40:02 2008 (r186370) > +++ head/sys/cam/scsi/scsi_cd.c Sun Dec 21 06:20:11 2008 (r186371) > @@ -996,12 +996,6 @@ cdopen(struct disk *dp) > return (error); > } > > - /* Closes aren't symmetrical with opens, so fix up the refcounting. */ > - if (softc->flags & CD_FLAG_OPEN) > - cam_periph_release(periph); > - else > - softc->flags |= CD_FLAG_OPEN; > - > /* > * Check for media, and set the appropriate flags. We don't bail > * if we don't have media, but then we don't allow anything but the > @@ -1011,7 +1005,15 @@ cdopen(struct disk *dp) > > CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("leaving cdopen\n")); > cam_periph_unhold(periph); > - cam_periph_unlock(periph); > + > + /* Closes aren't symmetrical with opens, so fix up the refcounting. */ > + if ((softc->flags & CD_FLAG_OPEN) == 0) { > + softc->flags |= CD_FLAG_OPEN; > + cam_periph_unlock(periph); > + } else { > + cam_periph_unlock(periph); > + cam_periph_release(periph); > + } > > return (0); > } > > Modified: head/sys/cam/scsi/scsi_pass.c > ============================================================================== > --- head/sys/cam/scsi/scsi_pass.c Sun Dec 21 04:40:02 2008 (r186370) > +++ head/sys/cam/scsi/scsi_pass.c Sun Dec 21 06:20:11 2008 (r186371) > @@ -346,13 +346,13 @@ passopen(struct cdev *dev, int flags, in > > if ((softc->flags & PASS_FLAG_OPEN) == 0) { > softc->flags |= PASS_FLAG_OPEN; > + cam_periph_unlock(periph); > } else { > /* Device closes aren't symmertical, so fix up the refcount */ > + cam_periph_unlock(periph); > cam_periph_release(periph); > } > > - cam_periph_unlock(periph); > - > return (error); > } > > > Modified: head/sys/cam/scsi/scsi_sg.c > ============================================================================== > --- head/sys/cam/scsi/scsi_sg.c Sun Dec 21 04:40:02 2008 (r186370) > +++ head/sys/cam/scsi/scsi_sg.c Sun Dec 21 06:20:11 2008 (r186371) > @@ -399,13 +399,13 @@ sgopen(struct cdev *dev, int flags, int > > if ((softc->flags & SG_FLAG_OPEN) == 0) { > softc->flags |= SG_FLAG_OPEN; > + cam_periph_unlock(periph); > } else { > /* Device closes aren't symmetrical, fix up the refcount. */ > + cam_periph_unlock(periph); > cam_periph_release(periph); > } > > - cam_periph_unlock(periph); > - > return (error); > } > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > Thanks a lot. Ganbold > > -- Writing is easy; all you do is sit staring at the blank sheet of paper until drops of blood form on your forehead. -- Gene Fowler From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 09:01:00 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8536A106564A; Sun, 21 Dec 2008 09:01: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 739E88FC12; Sun, 21 Dec 2008 09:01:00 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBL910AU028358; Sun, 21 Dec 2008 09:01:00 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBL910un028357; Sun, 21 Dec 2008 09:01:00 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200812210901.mBL910un028357@svn.freebsd.org> From: Takahashi Yoshihiro Date: Sun, 21 Dec 2008 09:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186372 - head/sys/pc98/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 09:01:00 -0000 Author: nyan Date: Sun Dec 21 09:01:00 2008 New Revision: 186372 URL: http://svn.freebsd.org/changeset/base/186372 Log: Disable the pccard, parallel, GbE and wireless lan related devices and some options by default to decrease a kernel size. Because PC98 does not have so much memory. MFC after: 3 days Modified: head/sys/pc98/conf/GENERIC Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Sun Dec 21 06:20:11 2008 (r186371) +++ head/sys/pc98/conf/GENERIC Sun Dec 21 09:01:00 2008 (r186372) @@ -32,7 +32,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 @@ -40,13 +40,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) @@ -60,9 +60,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 _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) @@ -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,11 +161,11 @@ 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 @@ -173,9 +173,9 @@ device ppi # Parallel port interface d # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') -device em # Intel PRO/1000 adapter Gigabit Ethernet Card +#device em # Intel PRO/1000 adapter Gigabit Ethernet Card device le # AMD Am7900 LANCE and Am79C9xx PCnet -device ti # Alteon Networks Tigon I/II gigabit Ethernet +#device ti # Alteon Networks Tigon I/II gigabit Ethernet device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') @@ -183,21 +183,21 @@ device vx # 3Com 3c590, 3c595 (``Vorte # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device bfe # Broadcom BCM440x 10/100 Ethernet -device bge # Broadcom BCM570xx Gigabit Ethernet +#device bge # Broadcom BCM570xx Gigabit Ethernet device dc # DEC/Intel 21143 and various workalikes device fxp # Intel EtherExpress PRO/100B (82557, 82558) -device lge # Level 1 LXT1001 gigabit Ethernet -device nge # NatSemi DP83820 gigabit Ethernet +#device lge # Level 1 LXT1001 gigabit Ethernet +#device nge # NatSemi DP83820 gigabit Ethernet device pcn # AMD Am79C97x PCI 10/100 (precedence over 'le') device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sf # Adaptec AIC-6915 (``Starfire'') device sis # Silicon Integrated Systems SiS 900/SiS 7016 -device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet +#device sk # SysKonnect SK-984x & SK-982x gigabit Ethernet device ste # Sundance ST201 (D-Link DFE-550TX) device tl # Texas Instruments ThunderLAN device tx # SMC EtherPower II (83c170 ``EPIC'') -device vge # VIA VT612x gigabit Ethernet +#device vge # VIA VT612x gigabit Ethernet device vr # VIA Rhine, Rhine II device wb # Winbond W89C840F device xl # 3Com 3c90x (``Boomerang'', ``Cyclone'') @@ -212,20 +212,20 @@ device snc device xe # Xircom pccard Ethernet # Wireless NIC cards -device wlan # 802.11 support -options IEEE80211_DEBUG # enable debug msgs -options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm -device an # Aironet 4500/4800 802.11 wireless NICs. -device ath # Atheros pci/cardbus NIC's -device ath_hal # pci/cardbus chip support -options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors -device ath_rate_sample # SampleRate tx rate control for ath -device ral # Ralink Technology RT2500 wireless NICs. -device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. +#device wlan # 802.11 support +#options IEEE80211_DEBUG # enable debug msgs +#options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +#device wlan_wep # 802.11 WEP support +#device wlan_ccmp # 802.11 CCMP support +#device wlan_tkip # 802.11 TKIP support +#device wlan_amrr # AMRR transmit rate control algorithm +#device an # Aironet 4500/4800 802.11 wireless NICs. +#device ath # Atheros pci/cardbus NIC's +#device ath_hal # pci/cardbus chip support +#options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors +#device ath_rate_sample # SampleRate tx rate control for ath +#device ral # Ralink Technology RT2500 wireless NICs. +#device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs. #device wl # Older non 802.11 Wavelan wireless NIC. # Pseudo devices. From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 12:15:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 140B31065679; Sun, 21 Dec 2008 12:15:24 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 0324C8FC12; Sun, 21 Dec 2008 12:15:22 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by bwz12 with SMTP id 12so4677085bwz.19 for ; Sun, 21 Dec 2008 04:15:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Dw3k8c2pObopnxgnyVqSMsnoO4LXi+nNuTyL9kreFtw=; b=tA0QvMkuMm+JuMe2TdwX0MR7XM/Gq7e1LvbCP/btgQ0f3DANc7vyexiXqP702+dhKY MPeOPjQUKZi3JXaV+14xud+sFTmewQzdOfNz8Z0iGAhSNvgQZ583BK0NyS8D3vhHn+1a yGQZfw5Dj6oM8Ltcj+ZKuTLlxbQgUzCoOHSKk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=w9S5JLuWUmkcwdrGQZFBs8kQz36CWuJJO7x9ps7F8k272opzqBPmGAHdNub2trawPe 94XfXqo5ootQwwQNVIjQvhY3cEGp8U8rk6e6bRjP+ALFOQ5HmYpJ/F1jGV1lrYreF050 4TrnVcosfPfWw/X+nwcfrFj0lcFwn59PRQ3Hw= Received: by 10.103.248.17 with SMTP id a17mr1906807mus.97.1229861721494; Sun, 21 Dec 2008 04:15:21 -0800 (PST) Received: by 10.103.137.8 with HTTP; Sun, 21 Dec 2008 04:15:21 -0800 (PST) Message-ID: Date: Sun, 21 Dec 2008 10:15:21 -0200 From: "Carlos A. M. dos Santos" To: "David E. O'Brien" In-Reply-To: <200812192020.mBJKKEIo081792@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812192020.mBJKKEIo081792@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 12:15:24 -0000 On Fri, Dec 19, 2008 at 6:20 PM, David E. O'Brien wrote: > Author: obrien > Date: Fri Dec 19 20:20:14 2008 > New Revision: 186337 > URL: http://svn.freebsd.org/changeset/base/186337 > > Log: > burncd(8) doesn't handle signals and interrupting burncd during operation. > For example, ^C (SIGINT) may leave the drive spinning and locked. > This may also happen if you try to write a too-large image to a disc > and burncd(8) exits with an I/O error. > > Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave > burner in a sane state when burning is interrupted with SIGHUP, SIGINT, > SIGTERM, or in case an I/O error occurs during write. > Note, that blanking will still continue after interrupt but it seems to > finish correctly even after burncd(8) has quit. > > Also, while I'm here bump WARNS to "6". > > PR: 48730 > Submitted by: Jaakko Heinonen While you are here, would you mind taking a look at bin/123693, either committing the proposed patch or closing the PR if my proposition is not acceptable? Thanks in advance. -- cd /usr/ports/sysutils/life make clean From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 16:56:13 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D1F1065674; Sun, 21 Dec 2008 16:56:13 +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 77A3C8FC22; Sun, 21 Dec 2008 16:56:13 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBLGuDt1037455; Sun, 21 Dec 2008 16:56:13 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBLGuDqF037454; Sun, 21 Dec 2008 16:56:13 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812211656.mBLGuDqF037454@svn.freebsd.org> From: Robert Noland Date: Sun, 21 Dec 2008 16:56: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: r186374 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 16:56:13 -0000 Author: rnoland Date: Sun Dec 21 16:56:13 2008 New Revision: 186374 URL: http://svn.freebsd.org/changeset/base/186374 Log: Fix printing of KASSERT message missed in r163604. Approved by: kib Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sun Dec 21 14:04:10 2008 (r186373) +++ head/sys/vm/vm_object.c Sun Dec 21 16:56:13 2008 (r186374) @@ -672,7 +672,7 @@ vm_object_terminate(vm_object_t object) while ((p = TAILQ_FIRST(&object->memq)) != NULL) { KASSERT(!p->busy && (p->oflags & VPO_BUSY) == 0, ("vm_object_terminate: freeing busy page %p " - "p->busy = %d, p->flags %x\n", p, p->busy, p->flags)); + "p->busy = %d, p->oflags %x\n", p, p->busy, p->oflags)); if (p->wire_count == 0) { vm_page_free(p); cnt.v_pfree++; From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 21:16:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74F691065674; Sun, 21 Dec 2008 21:16:57 +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 6500A8FC08; Sun, 21 Dec 2008 21:16:57 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBLLGvXk042567; Sun, 21 Dec 2008 21:16:57 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBLLGvPj042566; Sun, 21 Dec 2008 21:16:57 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812212116.mBLLGvPj042566@svn.freebsd.org> From: Ed Schouten Date: Sun, 21 Dec 2008 21:16: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: r186382 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 21:16:57 -0000 Author: ed Date: Sun Dec 21 21:16:57 2008 New Revision: 186382 URL: http://svn.freebsd.org/changeset/base/186382 Log: Set PTS_FINISHED before waking up any threads. Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any kevent(2) users. Because the kqueue handlers are executed synchronously, we must set PTS_FINISHED before calling ptsdrv_{in,out}wakeup(). Discovered by: nork Modified: head/sys/kern/tty_pts.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sun Dec 21 20:30:14 2008 (r186381) +++ head/sys/kern/tty_pts.c Sun Dec 21 21:16:57 2008 (r186382) @@ -630,10 +630,9 @@ ptsdrv_close(struct tty *tp) struct pts_softc *psc = tty_softc(tp); /* Wake up any blocked readers/writers. */ + psc->pts_flags |= PTS_FINISHED; ptsdrv_outwakeup(tp); ptsdrv_inwakeup(tp); - - psc->pts_flags |= PTS_FINISHED; } static void From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 21:54:02 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C570106564A; Sun, 21 Dec 2008 21:54:02 +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 1B6F38FC17; Sun, 21 Dec 2008 21:54:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBLLs16w043240; Sun, 21 Dec 2008 21:54:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBLLs1Vx043239; Sun, 21 Dec 2008 21:54:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812212154.mBLLs1Vx043239@svn.freebsd.org> From: Ed Schouten Date: Sun, 21 Dec 2008 21:54: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: r186383 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 21:54:02 -0000 Author: ed Date: Sun Dec 21 21:54:01 2008 New Revision: 186383 URL: http://svn.freebsd.org/changeset/base/186383 Log: Revert r185891. In r185891 I removed the newlines from messages written to /dev/console, because it made startup messages from rc-scripts harder to read. This, unfortunately, causes the kernel message that is printed after a non-terminated log message to be concatenated. This could be fixed, but on short term it's better to just revert the change. Reported by: Jaakko Heinonen Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Sun Dec 21 21:16:57 2008 (r186382) +++ head/sys/kern/subr_prf.c Sun Dec 21 21:54:01 2008 (r186383) @@ -257,7 +257,7 @@ log(int level, const char *fmt, ...) void log_console(struct uio *uio) { - int c, i, error; + int c, i, error, nl; char *consbuffer; int pri; @@ -268,14 +268,22 @@ log_console(struct uio *uio) uio = cloneuio(uio); consbuffer = malloc(CONSCHUNK, M_TEMP, M_WAITOK); + nl = 0; while (uio->uio_resid > 0) { c = imin(uio->uio_resid, CONSCHUNK); error = uiomove(consbuffer, c, uio); if (error != 0) break; - for (i = 0; i < c; i++) + for (i = 0; i < c; i++) { msglogchar(consbuffer[i], pri); + if (consbuffer[i] == '\n') + nl = 1; + else + nl = 0; + } } + if (!nl) + msglogchar('\n', pri); msgbuftrigger = 1; free(uio, M_IOV); free(consbuffer, M_TEMP); From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 22:00:39 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DF3C1065670; Sun, 21 Dec 2008 22:00:39 +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 6D69E8FC21; Sun, 21 Dec 2008 22:00:39 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBLM0dDW043428; Sun, 21 Dec 2008 22:00:39 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBLM0d7q043427; Sun, 21 Dec 2008 22:00:39 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812212200.mBLM0d7q043427@svn.freebsd.org> From: Robert Noland Date: Sun, 21 Dec 2008 22:00: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: r186384 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 22:00:39 -0000 Author: rnoland Date: Sun Dec 21 22:00:39 2008 New Revision: 186384 URL: http://svn.freebsd.org/changeset/base/186384 Log: Fix AGP_DEBUG macro to use c99 __VA_ARGS__ and build if enabled. Approved by: kib Modified: head/sys/dev/agp/agppriv.h Modified: head/sys/dev/agp/agppriv.h ============================================================================== --- head/sys/dev/agp/agppriv.h Sun Dec 21 21:54:01 2008 (r186383) +++ head/sys/dev/agp/agppriv.h Sun Dec 21 22:00:39 2008 (r186384) @@ -36,15 +36,12 @@ #include #include -#define AGP_DEBUGxx - #ifdef AGP_DEBUG -#define AGP_DPF(x...) do { \ - printf("agp: "); \ - printf(##x); \ +#define AGP_DPF(fmt, ...) do { \ + printf("agp: " fmt, __VA_ARGS__); \ } while (0) #else -#define AGP_DPF(x...) do {} while (0) +#define AGP_DPF(fmt, ...) do {} while (0) #endif #include "agp_if.h" From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 22:10:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B1C1065670; Sun, 21 Dec 2008 22:10:20 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id D0AC68FC08; Sun, 21 Dec 2008 22:10:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LEWV8-0002nb-KG; Mon, 22 Dec 2008 00:10:18 +0200 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 mBLMAFVi039187 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 22 Dec 2008 00:10:15 +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 mBLMAFUL022820; Mon, 22 Dec 2008 00:10:15 +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 mBLMAErl022819; Mon, 22 Dec 2008 00:10:14 +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: Mon, 22 Dec 2008 00:10:14 +0200 From: Kostik Belousov To: Ed Schouten Message-ID: <20081221221014.GJ2038@deviant.kiev.zoral.com.ua> References: <200812212116.mBLLGvPj042566@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="B3dAGXc5YVwcSxdz" Content-Disposition: inline In-Reply-To: <200812212116.mBLLGvPj042566@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on 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 X-Virus-Scanned: mail.terabit.net.ua 1LEWV8-0002nb-KG 45bc878977a629a23c85d8fa14d131ae X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186382 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 22:10:20 -0000 --B3dAGXc5YVwcSxdz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 21, 2008 at 09:16:57PM +0000, Ed Schouten wrote: > Author: ed > Date: Sun Dec 21 21:16:57 2008 > New Revision: 186382 > URL: http://svn.freebsd.org/changeset/base/186382 >=20 > Log: > Set PTS_FINISHED before waking up any threads. > =20 > Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any > kevent(2) users. Because the kqueue handlers are executed synchronously, > we must set PTS_FINISHED before calling ptsdrv_{in,out}wakeup(). > =20 > Discovered by: nork >=20 > Modified: > head/sys/kern/tty_pts.c >=20 > Modified: head/sys/kern/tty_pts.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/kern/tty_pts.c Sun Dec 21 20:30:14 2008 (r186381) > +++ head/sys/kern/tty_pts.c Sun Dec 21 21:16:57 2008 (r186382) > @@ -630,10 +630,9 @@ ptsdrv_close(struct tty *tp) > struct pts_softc *psc =3D tty_softc(tp); > =20 > /* Wake up any blocked readers/writers. */ > + psc->pts_flags |=3D PTS_FINISHED; > ptsdrv_outwakeup(tp); > ptsdrv_inwakeup(tp); > - > - psc->pts_flags |=3D PTS_FINISHED; > } > =20 > static void I was always curious whether our cv code guarantees that there is no a spurious wakeup. If the spurious wakeup can happen, then setting PTS_FINISHED before calling cv_broadcast() still does not solve the possible race. Assume that waiting thread is woken up, and ptsdrv_close() still did not set PTS_FINISHED. The ptsdev_read() locked the mutex, rechecked the condition (that is false still), and preempted for the ptsdrv_close() thread. This thread sets flag and issues broadcast. Then, the ptsdrv_read() thread is put to sleep, having lost a wakeup. I think that mutex shall be acquired around setting flag and wakeups. scheduled, it=20 --B3dAGXc5YVwcSxdz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklOvsYACgkQC3+MBN1Mb4hbWACeJQqGDApaXHqwG0sJadHZQxpa XHMAn1cDnBcINM391qHSoNY+oMr3kwio =OvVb -----END PGP SIGNATURE----- --B3dAGXc5YVwcSxdz-- From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 22:30:37 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90BC71065674; Sun, 21 Dec 2008 22:30:37 +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 804C98FC1E; Sun, 21 Dec 2008 22:30:37 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBLMUbCk043963; Sun, 21 Dec 2008 22:30:37 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBLMUbbt043962; Sun, 21 Dec 2008 22:30:37 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812212230.mBLMUbbt043962@svn.freebsd.org> From: Robert Noland Date: Sun, 21 Dec 2008 22:30: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: r186385 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 22:30:37 -0000 Author: rnoland Date: Sun Dec 21 22:30:37 2008 New Revision: 186385 URL: http://svn.freebsd.org/changeset/base/186385 Log: Deal with 0 length args... Approved by: kib Modified: head/sys/dev/agp/agppriv.h Modified: head/sys/dev/agp/agppriv.h ============================================================================== --- head/sys/dev/agp/agppriv.h Sun Dec 21 22:00:39 2008 (r186384) +++ head/sys/dev/agp/agppriv.h Sun Dec 21 22:30:37 2008 (r186385) @@ -38,7 +38,7 @@ #ifdef AGP_DEBUG #define AGP_DPF(fmt, ...) do { \ - printf("agp: " fmt, __VA_ARGS__); \ + printf("agp: " fmt, ##__VA_ARGS__); \ } while (0) #else #define AGP_DPF(fmt, ...) do {} while (0) From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 22:32:02 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F45A106567D; Sun, 21 Dec 2008 22:32:02 +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 1EE7B8FC1A; Sun, 21 Dec 2008 22:32:02 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBLMW2l3044022; Sun, 21 Dec 2008 22:32:02 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBLMW29j044021; Sun, 21 Dec 2008 22:32:02 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812212232.mBLMW29j044021@svn.freebsd.org> From: Robert Noland Date: Sun, 21 Dec 2008 22:32: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: r186386 - head/sys/dev/drm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 22:32:02 -0000 Author: rnoland Date: Sun Dec 21 22:32:01 2008 New Revision: 186386 URL: http://svn.freebsd.org/changeset/base/186386 Log: Convert DRM_[DEBUG,ERROR,INFO] macros to c99 __VA_ARGS__. Approved by: kib Modified: head/sys/dev/drm/drmP.h Modified: head/sys/dev/drm/drmP.h ============================================================================== --- head/sys/dev/drm/drmP.h Sun Dec 21 22:30:37 2008 (r186385) +++ head/sys/dev/drm/drmP.h Sun Dec 21 22:32:01 2008 (r186386) @@ -300,16 +300,16 @@ for ( ret = 0 ; !ret && !(condition) ; ) DRM_LOCK(); \ } -#define DRM_ERROR(fmt, arg...) \ +#define DRM_ERROR(fmt, ...) \ printf("error: [" DRM_NAME ":pid%d:%s] *ERROR* " fmt, \ - DRM_CURRENTPID, __func__ , ## arg) + DRM_CURRENTPID, __func__ , ##__VA_ARGS__) -#define DRM_INFO(fmt, arg...) printf("info: [" DRM_NAME "] " fmt , ## arg) +#define DRM_INFO(fmt, ...) printf("info: [" DRM_NAME "] " fmt , ##__VA_ARGS__) -#define DRM_DEBUG(fmt, arg...) do { \ +#define DRM_DEBUG(fmt, ...) do { \ if (drm_debug_flag) \ printf("[" DRM_NAME ":pid%d:%s] " fmt, DRM_CURRENTPID, \ - __func__ , ## arg); \ + __func__ , ##__VA_ARGS__); \ } while (0) typedef struct drm_pci_id_list From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 22:50:25 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30341065673; Sun, 21 Dec 2008 22:50:25 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from viefep18-int.chello.at (viefep22-int.chello.at [62.179.121.42]) by mx1.freebsd.org (Postfix) with ESMTP id 76FE68FC19; Sun, 21 Dec 2008 22:50:24 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from edge01.upc.biz ([192.168.13.236]) by viefep20-int.chello.at (InterMail vM.7.09.01.00 201-2219-108-20080618) with ESMTP id <20081221223354.FEVG12903.viefep20-int.chello.at@edge01.upc.biz>; Sun, 21 Dec 2008 23:33:54 +0100 Received: from lizard.fafoe.narf.at ([213.47.85.26]) by edge01.upc.biz with edge id tyZs1a04i0a5KZh01yZtZ8; Sun, 21 Dec 2008 23:33:54 +0100 X-SourceIP: 213.47.85.26 Received: by lizard.fafoe.narf.at (Postfix, from userid 1001) id 93219BC84; Sun, 21 Dec 2008 23:33:40 +0100 (CET) Date: Sun, 21 Dec 2008 23:33:40 +0100 From: Stefan Farfeleder To: Robert Noland Message-ID: <20081221223339.GA1359@lizard.fafoe.narf.at> References: <200812212230.mBLMUbbt043962@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812212230.mBLMUbbt043962@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186385 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 22:50:25 -0000 On Sun, Dec 21, 2008 at 10:30:37PM +0000, Robert Noland wrote: > Author: rnoland > Date: Sun Dec 21 22:30:37 2008 > New Revision: 186385 > URL: http://svn.freebsd.org/changeset/base/186385 > > Log: > Deal with 0 length args... > > Approved by: kib > > Modified: > head/sys/dev/agp/agppriv.h > > Modified: head/sys/dev/agp/agppriv.h > ============================================================================== > --- head/sys/dev/agp/agppriv.h Sun Dec 21 22:00:39 2008 (r186384) > +++ head/sys/dev/agp/agppriv.h Sun Dec 21 22:30:37 2008 (r186385) > @@ -38,7 +38,7 @@ > > #ifdef AGP_DEBUG > #define AGP_DPF(fmt, ...) do { \ > - printf("agp: " fmt, __VA_ARGS__); \ > + printf("agp: " fmt, ##__VA_ARGS__); \ > } while (0) > #else > #define AGP_DPF(fmt, ...) do {} while (0) > This is a GCC extension and kind of defeats the point of using the C99 syntax. From owner-svn-src-head@FreeBSD.ORG Sun Dec 21 22:52:34 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1704106564A; Sun, 21 Dec 2008 22:52:34 +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 7F9128FC1C; Sun, 21 Dec 2008 22:52:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id B48391CE1E; Sun, 21 Dec 2008 23:52:33 +0100 (CET) Date: Sun, 21 Dec 2008 23:52:33 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20081221225233.GV1176@hoeg.nl> References: <200812212116.mBLLGvPj042566@svn.freebsd.org> <20081221221014.GJ2038@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="5QcriFbbFkKgT3aH" Content-Disposition: inline In-Reply-To: <20081221221014.GJ2038@deviant.kiev.zoral.com.ua> 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: r186382 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Dec 2008 22:52:35 -0000 --5QcriFbbFkKgT3aH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Kostik, * Kostik Belousov wrote: > I was always curious whether our cv code guarantees that there is no > a spurious wakeup. If the spurious wakeup can happen, then setting > PTS_FINISHED before calling cv_broadcast() still does not solve > the possible race. >=20 > Assume that waiting thread is woken up, and ptsdrv_close() still did > not set PTS_FINISHED. The ptsdev_read() locked the mutex, rechecked > the condition (that is false still), and preempted for the > ptsdrv_close() thread. This thread sets flag and issues broadcast. > Then, the ptsdrv_read() thread is put to sleep, having lost a wakeup. >=20 > I think that mutex shall be acquired around setting flag and wakeups. > scheduled, it=20 Everything was already done correctly with respect to locking. All the routines that use `pts_flags' already hold the per-TTY lock. The actual problem is that KNOTE_LOCKED() (inside ptsdrv_*wakeup()) calls pts_kqops_read_event() synchronously. This means that we must set PTS_FINISHED on beforehand. --=20 Ed Schouten WWW: http://80386.nl/ --5QcriFbbFkKgT3aH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklOyLEACgkQ52SDGA2eCwWGxgCeLeE1EjUXUIcQJVjATJ33rl8q 3zUAmweHAbe/WCkGRwIB/UXJfKQ/igYn =otm5 -----END PGP SIGNATURE----- --5QcriFbbFkKgT3aH-- From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 00:46:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62A6E106564A; Mon, 22 Dec 2008 00:46: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 512718FC12; Mon, 22 Dec 2008 00:46:22 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBM0kMmX046576; Mon, 22 Dec 2008 00:46:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBM0kMBp046575; Mon, 22 Dec 2008 00:46:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812220046.mBM0kMBp046575@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 22 Dec 2008 00:46: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: r186389 - head/sys/dev/re X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 00:46:22 -0000 Author: yongari Date: Mon Dec 22 00:46:22 2008 New Revision: 186389 URL: http://svn.freebsd.org/changeset/base/186389 Log: Since we don't request reset for rlphy(4), the link state 'UP' event from mii(4) may not be delivered if valid link was already established. To address the issue, check current link state after driving MII_TICK. This should fix a regression introduced in r185753 on fast ethernet controllers. Reported by: csjp, Bruce Cran < bruce <> cran DOT org DOT uk > Tested by: csjp, Bruce Cran (initial version) Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Dec 22 00:39:33 2008 (r186388) +++ head/sys/dev/re/if_re.c Mon Dec 22 00:46:22 2008 (r186389) @@ -2068,6 +2068,8 @@ re_tick(void *xsc) mii = device_get_softc(sc->rl_miibus); mii_tick(mii); + if ((sc->rl_flags & RL_FLAG_LINK) == 0) + re_miibus_statchg(sc->rl_dev); re_watchdog(sc); callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 00:53:47 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ED92106564A; Mon, 22 Dec 2008 00:53:47 +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 8DB688FC19; Mon, 22 Dec 2008 00:53:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBM0rlt2046736; Mon, 22 Dec 2008 00:53:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBM0rlr2046735; Mon, 22 Dec 2008 00:53:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812220053.mBM0rlr2046735@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 22 Dec 2008 00:53: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: r186390 - head/sys/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 00:53:47 -0000 Author: yongari Date: Mon Dec 22 00:53:47 2008 New Revision: 186390 URL: http://svn.freebsd.org/changeset/base/186390 Log: Since we don't request reset for rlphy(4), the link state 'UP' event from mii(4) may not be delivered if valid link was already established. To address the issue, check current link state after driving MII_TICK. This should fix a regression introduced in r184245. PR: kern/129647 Modified: head/sys/pci/if_rl.c Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Mon Dec 22 00:46:22 2008 (r186389) +++ head/sys/pci/if_rl.c Mon Dec 22 00:53:47 2008 (r186390) @@ -1518,6 +1518,8 @@ rl_tick(void *xsc) */ mii = device_get_softc(sc->rl_miibus); mii_tick(mii); + if ((sc->rl_flags & RL_FLAG_LINK) == 0) + rl_miibus_statchg(sc->rl_dev); if (sc->rl_twister_enable) { if (sc->rl_twister == DONE) rl_watchdog(sc); From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 01:56:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C8B71065670; Mon, 22 Dec 2008 01:56:57 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDF048FC12; Mon, 22 Dec 2008 01:56:56 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBM1uuka047909; Mon, 22 Dec 2008 01:56:56 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBM1uutQ047908; Mon, 22 Dec 2008 01:56:56 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200812220156.mBM1uutQ047908@svn.freebsd.org> From: Qing Li Date: Mon, 22 Dec 2008 01:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186391 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 01:56:57 -0000 Author: qingli Date: Mon Dec 22 01:56:56 2008 New Revision: 186391 URL: http://svn.freebsd.org/changeset/base/186391 Log: Provide a condition variable to delay the cloned interface destroy operation until the referenced clone device has been closed by the process properly. The behavior is now consistently with the previous release. Reviewed by: Kip Macy Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Mon Dec 22 00:53:47 2008 (r186390) +++ head/sys/net/if_tun.c Mon Dec 22 01:56:56 2008 (r186391) @@ -57,6 +57,7 @@ #include #include +#include #include @@ -93,6 +94,7 @@ struct tun_softc { struct sigio *tun_sigio; /* information for async I/O */ struct selinfo tun_rsel; /* read select */ struct mtx tun_mtx; /* protect mutable softc fields */ + struct cv tun_cv; /* protect against ref'd dev destroy */ }; #define TUN2IFP(sc) ((sc)->tun_ifp) @@ -253,8 +255,9 @@ tun_destroy(struct tun_softc *tp) struct cdev *dev; /* Unlocked read. */ - KASSERT((tp->tun_flags & TUN_OPEN) == 0, - ("tununits is out of sync - unit %d", TUN2IFP(tp)->if_dunit)); + mtx_lock(&tp->tun_mtx); + if ((tp->tun_flags & TUN_OPEN) != 0) + cv_wait_unlock(&tp->tun_cv, &tp->tun_mtx); CURVNET_SET(TUN2IFP(tp)->if_vnet); dev = tp->tun_dev; @@ -264,6 +267,7 @@ tun_destroy(struct tun_softc *tp) destroy_dev(dev); knlist_destroy(&tp->tun_rsel.si_note); mtx_destroy(&tp->tun_mtx); + cv_destroy(&tp->tun_cv); free(tp, M_TUN); CURVNET_RESTORE(); } @@ -365,6 +369,7 @@ tuncreate(const char *name, struct cdev sc = malloc(sizeof(*sc), M_TUN, M_WAITOK | M_ZERO); mtx_init(&sc->tun_mtx, "tun_mtx", NULL, MTX_DEF); + cv_init(&sc->tun_cv, "tun_condvar"); sc->tun_flags = TUN_INITED; sc->tun_dev = dev; mtx_lock(&tunmtx); @@ -449,6 +454,7 @@ tunclose(struct cdev *dev, int foo, int mtx_lock(&tp->tun_mtx); tp->tun_flags &= ~TUN_OPEN; tp->tun_pid = 0; + mtx_unlock(&tp->tun_mtx); /* * junk all pending output @@ -457,7 +463,6 @@ tunclose(struct cdev *dev, int foo, int s = splimp(); IFQ_PURGE(&ifp->if_snd); splx(s); - mtx_unlock(&tp->tun_mtx); if (ifp->if_flags & IFF_UP) { s = splimp(); @@ -486,10 +491,14 @@ tunclose(struct cdev *dev, int foo, int if_link_state_change(ifp, LINK_STATE_DOWN); CURVNET_RESTORE(); + mtx_lock(&tp->tun_mtx); funsetown(&tp->tun_sigio); selwakeuppri(&tp->tun_rsel, PZERO + 1); KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); TUNDEBUG (ifp, "closed\n"); + + cv_broadcast(&tp->tun_cv); + mtx_unlock(&tp->tun_mtx); return (0); } From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 07:11:16 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18E7F1065674; Mon, 22 Dec 2008 07:11:16 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 08BCB8FC17; Mon, 22 Dec 2008 07:11:16 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBM7BFxa054405; Mon, 22 Dec 2008 07:11:15 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBM7BFCq054404; Mon, 22 Dec 2008 07:11:15 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200812220711.mBM7BFCq054404@svn.freebsd.org> From: Qing Li Date: Mon, 22 Dec 2008 07:11: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: r186392 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 07:11:16 -0000 Author: qingli Date: Mon Dec 22 07:11:15 2008 New Revision: 186392 URL: http://svn.freebsd.org/changeset/base/186392 Log: Similar to the INET case, do not destroy the nd6 entries for interface addresses until those addresses are removed. I already made the patch in INET but forgot to bring the code over for INET6. Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Mon Dec 22 01:56:56 2008 (r186391) +++ head/sys/netinet6/in6.c Mon Dec 22 07:11:15 2008 (r186392) @@ -2204,12 +2204,14 @@ in6_lltable_lookup(struct lltable *llt, lle->lle_head = lleh; LIST_INSERT_HEAD(lleh, lle, lle_next); } else if (flags & LLE_DELETE) { - LLE_WLOCK(lle); - lle->la_flags = LLE_DELETED; - LLE_WUNLOCK(lle); + if (!(lle->la_flags & LLE_IFADDR) || (flags & LLE_IFADDR)) { + LLE_WLOCK(lle); + lle->la_flags = LLE_DELETED; + LLE_WUNLOCK(lle); #ifdef DIAGNOSTICS - log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); + log(LOG_INFO, "ifaddr cache = %p is deleted\n", lle); #endif + } lle = (void *)-1; } if (LLE_IS_VALID(lle)) { From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 12:54:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B0071065670; Mon, 22 Dec 2008 12:54: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 29C0E8FC1F; Mon, 22 Dec 2008 12:54:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMCsrII061759; Mon, 22 Dec 2008 12:54:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMCsr67061758; Mon, 22 Dec 2008 12:54:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812221254.mBMCsr67061758@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 22 Dec 2008 12:54: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: r186393 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 12:54:53 -0000 Author: bz Date: Mon Dec 22 12:54:52 2008 New Revision: 186393 URL: http://svn.freebsd.org/changeset/base/186393 Log: Correct variable name in comment. MFC after: 4 weeks Modified: head/sys/netinet6/ip6_input.c Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Mon Dec 22 07:11:15 2008 (r186392) +++ head/sys/netinet6/ip6_input.c Mon Dec 22 12:54:52 2008 (r186393) @@ -248,7 +248,7 @@ ip6_init(void) if (pr == 0) panic("ip6_init"); - /* Initialize the entire ip_protox[] array to IPPROTO_RAW. */ + /* Initialize the entire ip6_protox[] array to IPPROTO_RAW. */ for (i = 0; i < IPPROTO_MAX; i++) ip6_protox[i] = pr - inet6sw; /* From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 13:36:15 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675D71065670; Mon, 22 Dec 2008 13:36:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 562BC8FC17; Mon, 22 Dec 2008 13:36:15 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMDaFeN062654; Mon, 22 Dec 2008 13:36:15 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMDaF9C062653; Mon, 22 Dec 2008 13:36:15 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200812221336.mBMDaF9C062653@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 22 Dec 2008 13: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: r186394 - head/usr.sbin/nscd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 13:36:15 -0000 Author: maxim Date: Mon Dec 22 13:36:15 2008 New Revision: 186394 URL: http://svn.freebsd.org/changeset/base/186394 Log: o Correct a database name: "group" not "groups". PR: docs/129853 Submitted by: Denis Barov MFC after: 1 week Modified: head/usr.sbin/nscd/nscd.conf.5 Modified: head/usr.sbin/nscd/nscd.conf.5 ============================================================================== --- head/usr.sbin/nscd/nscd.conf.5 Mon Dec 22 12:54:52 2008 (r186393) +++ head/usr.sbin/nscd/nscd.conf.5 Mon Dec 22 13:36:15 2008 (r186394) @@ -53,7 +53,7 @@ and a .Ar value . Usual cachenames are .Dq Li passwd , -.Dq Li groups , +.Dq Li group , .Dq Li hosts , .Dq Li services , .Dq Li protocols @@ -125,7 +125,7 @@ will act similarly to the NSCD. .Sy NOTE : this feature is currently experimental \[em] it supports only .Dq Li passwd , -.Dq Li groups +.Dq Li group and .Dq Li services cachenames. From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 15:34:06 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A49A6106564A; Mon, 22 Dec 2008 15:34:06 +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 922A38FC19; Mon, 22 Dec 2008 15:34:06 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMFY6V6064751; Mon, 22 Dec 2008 15:34:06 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMFY6lm064750; Mon, 22 Dec 2008 15:34:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200812221534.mBMFY6lm064750@svn.freebsd.org> From: Marius Strobl Date: Mon, 22 Dec 2008 15:34: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: r186395 - head/sys/sparc64/sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 15:34:06 -0000 Author: marius Date: Mon Dec 22 15:34:06 2008 New Revision: 186395 URL: http://svn.freebsd.org/changeset/base/186395 Log: - According to comments in OpenBSD, E{2,4}50 tend to have fragile firmware versions which wedge when using the OFW test service, so given that we don't really depend on SUNW,stop-self just nuke it altogether instead of risking problems. - At least Fire V880 have a small hardware glitch which causes the reception of IDR_NACKs for CPUs we actually haven't tried to send an IPI to, even not as part of the initial try. According to tests this apparently can be safely ignored though, so just return if checking for the individual IDR_NACKs indicates no outstanding dispatch. Serializing the sending of IPIs between MD and MI code by the combined usage of smp_ipi_mtx makes no difference to this phenomenon. [1] - Provide relevant debugging bits already with the initial panic in case of problems with the IPI dispatch, which would have allowed to diagnose the above problem without a specially built kernel. - In case of cheetah_ipi_selected() base the delay we wait for other CPUs which also might want to dispatch IPIs on the total amount of CPUs instead of just the number of CPUs we let this CPU send IPIs to because in the worst case all CPUs also want to IPI us at the same time. Reported and access for extensive tests provided by: Beat Gaetzi [1] Modified: head/sys/sparc64/sparc64/mp_machdep.c Modified: head/sys/sparc64/sparc64/mp_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/mp_machdep.c Mon Dec 22 13:36:15 2008 (r186394) +++ head/sys/sparc64/sparc64/mp_machdep.c Mon Dec 22 15:34:06 2008 (r186395) @@ -116,14 +116,12 @@ cpu_ipi_selected_t *cpu_ipi_selected; static vm_offset_t mp_tramp; static u_int cpuid_to_mid[MAXCPU]; -static int has_stopself; static int isjbus; static volatile u_int shutdown_cpus; static void cpu_mp_unleash(void *v); static void spitfire_ipi_send(u_int mid, u_long d0, u_long d1, u_long d2); static void sun4u_startcpu(phandle_t cpu, void *func, u_long arg); -static void sun4u_stopself(void); static cpu_ipi_selected_t cheetah_ipi_selected; static cpu_ipi_selected_t spitfire_ipi_selected; @@ -225,24 +223,6 @@ sun4u_startcpu(phandle_t cpu, void *func } /* - * Stop the calling CPU. - */ -static void -sun4u_stopself(void) -{ - static struct { - cell_t name; - cell_t nargs; - cell_t nreturns; - } args = { - (cell_t)SUNW_STOPSELF, - }; - - ofw_exit(&args); - panic("%s: failed.", __func__); -} - -/* * Fire up any non-boot processors. */ void @@ -260,9 +240,6 @@ cpu_mp_start(void) mtx_init(&ipi_mtx, "ipi", NULL, MTX_SPIN); - if (OF_test(SUNW_STOPSELF) == 0) - has_stopself = 1; - intr_setup(PIL_AST, cpu_ipi_ast, -1, NULL, NULL); intr_setup(PIL_RENDEZVOUS, (ih_func_t *)smp_rendezvous_action, -1, NULL, NULL); @@ -457,8 +434,6 @@ cpu_ipi_stop(struct trapframe *tf) while ((started_cpus & PCPU_GET(cpumask)) == 0) { if ((shutdown_cpus & PCPU_GET(cpumask)) != 0) { atomic_clear_int(&shutdown_cpus, PCPU_GET(cpumask)); - if (has_stopself != 0) - sun4u_stopself(); (void)intr_disable(); for (;;) ; @@ -538,7 +513,8 @@ spitfire_ipi_send(u_int mid, u_long d0, printf("%s: couldn't send IPI to module 0x%u\n", __func__, mid); else - panic("%s: couldn't send IPI", __func__); + panic("%s: couldn't send IPI to module 0x%u", + __func__, mid); } static void @@ -592,11 +568,18 @@ cheetah_ipi_selected(u_int cpus, u_long } } /* + * On at least Fire V880 we may receive IDR_NACKs for + * CPUs we actually haven't tried to send an IPI to, + * but which apparently can be safely ignored. + */ + if (cpus == 0) + return; + /* * Leave interrupts enabled for a bit before retrying * in order to avoid deadlocks if the other CPUs are * also trying to send IPIs. */ - DELAY(2 * bnp); + DELAY(2 * mp_ncpus); } if ( #ifdef KDB @@ -606,5 +589,6 @@ cheetah_ipi_selected(u_int cpus, u_long printf("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)\n", __func__, cpus, ids); else - panic("%s: couldn't send IPI", __func__); + panic("%s: couldn't send IPI (cpus=0x%u ids=0x%lu)", + __func__, cpus, ids); } From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 16:58:47 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B461065676; Mon, 22 Dec 2008 16:58:47 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED668FC12; Mon, 22 Dec 2008 16:58:47 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMGwlY9066312; Mon, 22 Dec 2008 16:58:47 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMGwlPN066311; Mon, 22 Dec 2008 16:58:47 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200812221658.mBMGwlPN066311@svn.freebsd.org> From: Scott Long Date: Mon, 22 Dec 2008 16:58: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: r186396 - head/sys/cam X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 16:58:47 -0000 Author: scottl Date: Mon Dec 22 16:58:47 2008 New Revision: 186396 URL: http://svn.freebsd.org/changeset/base/186396 Log: Fix a comment to reflect what really happens. Modified: head/sys/cam/cam_sim.h Modified: head/sys/cam/cam_sim.h ============================================================================== --- head/sys/cam/cam_sim.h Mon Dec 22 15:34:06 2008 (r186395) +++ head/sys/cam/cam_sim.h Mon Dec 22 16:58:47 2008 (r186396) @@ -109,7 +109,7 @@ struct cam_sim { struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ - /* "Pool" of inactive ccbs managed by xpt_alloc_ccb and xpt_free_ccb */ + /* "Pool" of inactive ccbs managed by xpt_get_ccb and xpt_release_ccb */ SLIST_HEAD(,ccb_hdr) ccb_freeq; /* * Maximum size of ccb pool. Modified as devices are added/removed From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 17:32:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0632B1065677; Mon, 22 Dec 2008 17:32:53 +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 E85928FC17; Mon, 22 Dec 2008 17:32:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMHWqqP066915; Mon, 22 Dec 2008 17:32:52 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMHWqRD066914; Mon, 22 Dec 2008 17:32:52 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200812221732.mBMHWqRD066914@svn.freebsd.org> From: Alan Cox Date: Mon, 22 Dec 2008 17:32: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: r186397 - head/sys/security/mac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 17:32:53 -0000 Author: alc Date: Mon Dec 22 17:32:52 2008 New Revision: 186397 URL: http://svn.freebsd.org/changeset/base/186397 Log: Make preparations for resurrecting shared/read locks on vm maps: mac_proc_vm_revoke_recurse() requests a read lock on the vm map at the start but does not handle failure by vm_map_lock_upgrade() when it seeks to modify the vm map. At present, this works because all lock request on a vm map are implemented as exclusive locks. Thus, vm_map_lock_upgrade() is a no-op that always reports success. However, that is about to change, and proc_vm_revoke_recurse() will require substantial modifications to handle vm_map_lock_upgrade() failures. For the time being, I am changing mac_proc_vm_revoke_recurse() to request a write lock on the vm map at the start. Approved by: rwatson MFC after: 3 months Modified: head/sys/security/mac/mac_process.c Modified: head/sys/security/mac/mac_process.c ============================================================================== --- head/sys/security/mac/mac_process.c Mon Dec 22 16:58:47 2008 (r186396) +++ head/sys/security/mac/mac_process.c Mon Dec 22 17:32:52 2008 (r186397) @@ -260,7 +260,7 @@ mac_proc_vm_revoke_recurse(struct thread if (!mac_mmap_revocation) return; - vm_map_lock_read(map); + vm_map_lock(map); for (vme = map->header.next; vme != &map->header; vme = vme->next) { if (vme->eflags & MAP_ENTRY_IS_SUB_MAP) { mac_proc_vm_revoke_recurse(td, cred, @@ -315,7 +315,6 @@ mac_proc_vm_revoke_recurse(struct thread prot2str(revokeperms), (u_long)vme->start, (long)(vme->end - vme->start), prot2str(vme->max_protection), prot2str(vme->protection)); - vm_map_lock_upgrade(map); /* * This is the really simple case: if a map has more * max_protection than is allowed, but it's not being @@ -369,10 +368,9 @@ mac_proc_vm_revoke_recurse(struct thread vme->protection & ~revokeperms); vm_map_simplify_entry(map, vme); } - vm_map_lock_downgrade(map); VFS_UNLOCK_GIANT(vfslocked); } - vm_map_unlock_read(map); + vm_map_unlock(map); } int From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 19:52:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 057601065676; Mon, 22 Dec 2008 19:52: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 E79E78FC0C; Mon, 22 Dec 2008 19:52:21 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMJqLM8069391; Mon, 22 Dec 2008 19:52:21 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMJqLQe069390; Mon, 22 Dec 2008 19:52:21 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812221952.mBMJqLQe069390@svn.freebsd.org> From: Andrew Thompson Date: Mon, 22 Dec 2008 19:52: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: r186398 - head/sbin/kldstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 19:52:22 -0000 Author: thompsa Date: Mon Dec 22 19:52:21 2008 New Revision: 186398 URL: http://svn.freebsd.org/changeset/base/186398 Log: Only show the pathname in verbose output as intended in the last commit (r172862). Modified: head/sbin/kldstat/kldstat.c Modified: head/sbin/kldstat/kldstat.c ============================================================================== --- head/sbin/kldstat/kldstat.c Mon Dec 22 17:32:52 2008 (r186397) +++ head/sbin/kldstat/kldstat.c Mon Dec 22 19:52:21 2008 (r186398) @@ -60,17 +60,19 @@ static void printfile(int fileid, int ve if (kldstat(fileid, &stat) < 0) warn("can't stat file id %d", fileid); else - printf("%2d %4d %p %-8jx %s (%s)\n", + printf("%2d %4d %p %-8jx %s", stat.id, stat.refs, stat.address, (uintmax_t)stat.size, - stat.name, stat.pathname); + stat.name); if (verbose) { + printf(" (%s)\n", stat.pathname); printf("\tContains modules:\n"); printf("\t\tId Name\n"); for (modid = kldfirstmod(fileid); modid > 0; modid = modfnext(modid)) printmod(modid); - } + } else + printf("\n"); } static void From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 21:22:43 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CA9B1065689; Mon, 22 Dec 2008 21:22:43 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0018FC1B; Mon, 22 Dec 2008 21:22:43 +0000 (UTC) (envelope-from wollman@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMLMhqM071273; Mon, 22 Dec 2008 21:22:43 GMT (envelope-from wollman@svn.freebsd.org) Received: (from wollman@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMLMh93071271; Mon, 22 Dec 2008 21:22:43 GMT (envelope-from wollman@svn.freebsd.org) Message-Id: <200812222122.mBMLMh93071271@svn.freebsd.org> From: Garrett Wollman Date: Mon, 22 Dec 2008 21:22: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: r186401 - head/usr.bin/ncal X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 21:22:43 -0000 Author: wollman Date: Mon Dec 22 21:22:42 2008 New Revision: 186401 URL: http://svn.freebsd.org/changeset/base/186401 Log: Implement a new feature for the "-m" option: if the month number is followed by 'f' or 'p', use the following or preceding month of that number, respectively. Document this. Also includes other minor grammatical and punctuation fixes to the manual page (capitalize Easter, etc.). MFC after: 1 month Modified: head/usr.bin/ncal/ncal.1 head/usr.bin/ncal/ncal.c Modified: head/usr.bin/ncal/ncal.1 ============================================================================== --- head/usr.bin/ncal/ncal.1 Mon Dec 22 20:38:00 2008 (r186400) +++ head/usr.bin/ncal/ncal.1 Mon Dec 22 21:22:42 2008 (r186401) @@ -30,7 +30,7 @@ .Sh NAME .Nm cal , .Nm ncal -.Nd displays a calendar and the date of easter +.Nd displays a calendar and the date of Easter .Sh SYNOPSIS .Nm .Op Fl jy @@ -57,7 +57,7 @@ The .Nm utility displays a simple calendar in traditional format and .Nm ncal -offers an alternative layout, more options and the date of easter. +offers an alternative layout, more options and the date of Easter. The new format is a little cramped but it makes a year fit on a 25x80 terminal. If arguments are not specified, @@ -68,16 +68,24 @@ The options are as follows: .It Fl J Display Julian Calendar, if combined with the .Fl e -option, display date of easter according to the Julian Calendar. +option, display date of Easter according to the Julian Calendar. .It Fl e -Display date of easter (for western churches). +Display date of Easter (for western churches). .It Fl j Display Julian days (days one-based, numbered from January 1). .It Fl m Ar month Display the specified .Ar month . +If +.Ar month +is specified as a decimal number, it may be followed by the letter +.Ql f +or +.Ql p +to indicate the following or preceding month of that number, +respectively. .It Fl o -Display date of orthodox easter (Greek and Russian +Display date of Orthodox Easter (Greek and Russian Orthodox Churches). .It Fl p Print the country codes and switching days from Julian to Gregorian @@ -101,7 +109,7 @@ Print the number of the week below each Display a calendar for the specified year. .El .Pp -A single parameter specifies the year (1 - 9999) to be displayed; +A single parameter specifies the year (1\(en9999) to be displayed; note the year must be fully specified: .Dq Li cal 89 will @@ -113,7 +121,7 @@ Month and year default to those of the c .Dq Li cal -m 8 will display a calendar for the month of August in the current year). .Pp -A year starts on Jan 1. +A year starts on January 1. .Sh SEE ALSO .Xr calendar 3 , .Xr strftime 3 @@ -132,7 +140,7 @@ The command and manual were written by .An Wolfgang Helbig Aq helbig@FreeBSD.org . .Sh BUGS -The assignment of Julian\(emGregorian switching dates to +The assignment of Julian\(enGregorian switching dates to country codes is historically naive for many countries. .Pp The Modified: head/usr.bin/ncal/ncal.c ============================================================================== --- head/usr.bin/ncal/ncal.c Mon Dec 22 20:38:00 2008 (r186400) +++ head/usr.bin/ncal/ncal.c Mon Dec 22 21:22:42 2008 (r186401) @@ -162,7 +162,7 @@ char *center(char *s, char *t, int w); void mkmonth(int year, int month, int jd_flag, struct monthlines * monthl); void mkmonthb(int year, int month, int jd_flag, struct monthlines * monthl); void mkweekdays(struct weekdays * wds); -int parsemonth(const char *s); +int parsemonth(const char *s, int *m, int *y); void printcc(void); void printeaster(int year, int julian, int orthodox); void printmonth(int year, int month, int jd_flag); @@ -322,11 +322,11 @@ main(int argc, char *argv[]) } if (flag_month != NULL) { - m = parsemonth(flag_month); - if (m < 1 || m > 12) + if (parsemonth(flag_month, &m, &y)) { errx(EX_USAGE, "%s is neither a month number (1..12) nor a name", flag_month); + } } if (flag_easter) @@ -859,18 +859,34 @@ center(char *s, char *t, int w) } int -parsemonth(const char *s) +parsemonth(const char *s, int *m, int *y) { - int v; + int nm, ny; char *cp; struct tm tm; - v = (int)strtol(s, &cp, 10); - if (cp != s) - return (v); - if (strptime(s, "%B", &tm) != NULL) - return (tm.tm_mon + 1); - if (strptime(s, "%b", &tm) != NULL) - return (tm.tm_mon + 1); - return (0); + nm = (int)strtol(s, &cp, 10); + if (cp != s) { + ny = *y; + if (*cp == '\0') { + ; /* no special action */ + } else if (*cp == 'f' || *cp == 'F') { + if (nm <= *m) + ny++; + } else if (*cp == 'p' || *cp == 'P') { + if (nm >= *m) + ny--; + } else + return (1); + if (nm < 1 || nm > 12) + return 1; + *m = nm; + *y = ny; + return (0); + } + if (strptime(s, "%B", &tm) != NULL || strptime(s, "%b", &tm) != NULL) { + *m = tm.tm_mon + 1; + return (0); + } + return (1); } From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 21:37:06 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DD771065674; Mon, 22 Dec 2008 21:37:06 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB078FC1D; Mon, 22 Dec 2008 21:37:06 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMLb6PW071555; Mon, 22 Dec 2008 21:37:06 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMLb6ss071554; Mon, 22 Dec 2008 21:37:06 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <200812222137.mBMLb6ss071554@svn.freebsd.org> From: Alfred Perlstein Date: Mon, 22 Dec 2008 21:37: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: r186402 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 21:37:06 -0000 Author: alfred Date: Mon Dec 22 21:37:06 2008 New Revision: 186402 URL: http://svn.freebsd.org/changeset/base/186402 Log: Fix typo for udav include. Add link to the u3g2 driver. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Dec 22 21:22:42 2008 (r186401) +++ head/sys/conf/files Mon Dec 22 21:37:06 2008 (r186402) @@ -1594,7 +1594,7 @@ dev/usb2/ethernet/if_cdce2.c optional u dev/usb2/ethernet/if_cue2.c optional usb2_core usb2_ethernet usb2_ethernet_cue dev/usb2/ethernet/if_kue2.c optional usb2_core usb2_ethernet usb2_ethernet_kue dev/usb2/ethernet/if_rue2.c optional usb2_core usb2_ethernet usb2_ethernet_rue -dev/usb2/ethernet/if_udav2.c optional usb2_core usb2_ethernet usb2_ethernet_udav +dev/usb2/ethernet/if_udav2.c optional usb2_core usb2_ethernet usb2_ethernet_dav dev/usb2/ethernet/usb2_ethernet.c optional usb2_core usb2_ethernet # # USB2 WLAN drivers @@ -1623,6 +1623,7 @@ dev/usb2/serial/uplcom2.c optional usb2_ dev/usb2/serial/usb2_serial.c optional usb2_core usb2_serial dev/usb2/serial/uvisor2.c optional usb2_core usb2_serial usb2_serial_visor dev/usb2/serial/uvscom2.c optional usb2_core usb2_serial usb2_serial_vscom +dev/usb2/serial/u3g2.c optional usb2_core usb2_serial usb2_serial_3g # # USB2 bluetooth drivers # From owner-svn-src-head@FreeBSD.ORG Mon Dec 22 22:40:18 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E27B1065673; Mon, 22 Dec 2008 22:40:18 +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 5B6CC8FC23; Mon, 22 Dec 2008 22:40:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBMMeIeO072740; Mon, 22 Dec 2008 22:40:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBMMeIta072739; Mon, 22 Dec 2008 22:40:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812222240.mBMMeIta072739@svn.freebsd.org> From: Alexander Motin Date: Mon, 22 Dec 2008 22:40: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: r186403 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2008 22:40:18 -0000 Author: mav Date: Mon Dec 22 22:40:17 2008 New Revision: 186403 URL: http://svn.freebsd.org/changeset/base/186403 Log: Add 9 more Analog Devices codec names. 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 Mon Dec 22 21:37:06 2008 (r186402) +++ head/sys/dev/sound/pci/hda/hdac.c Mon Dec 22 22:40:17 2008 (r186403) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081219_0119" +#define HDA_DRV_TEST_REV "20081223_0120" SND_DECLARE_FILE("$FreeBSD$"); @@ -568,12 +568,21 @@ static const struct { /* Analog Devices */ #define ANALOGDEVICES_VENDORID 0x11d4 +#define HDA_CODEC_AD1884A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a) +#define HDA_CODEC_AD1882 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882) +#define HDA_CODEC_AD1883 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883) +#define HDA_CODEC_AD1884 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884) +#define HDA_CODEC_AD1984A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a) +#define HDA_CODEC_AD1984B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b) #define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981) #define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983) #define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984) #define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986) +#define HDA_CODEC_AD1987 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987) #define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988) #define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b) +#define HDA_CODEC_AD1882A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a) +#define HDA_CODEC_AD1989B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b) #define HDA_CODEC_ADXXXX HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0xffff) /* CMedia */ @@ -722,12 +731,21 @@ static const struct { { HDA_CODEC_ALC885, "Realtek ALC885" }, { HDA_CODEC_ALC888, "Realtek ALC888" }, { HDA_CODEC_ALC889, "Realtek ALC889" }, + { HDA_CODEC_AD1882, "Analog Devices AD1882" }, + { HDA_CODEC_AD1882A, "Analog Devices AD1882A" }, + { HDA_CODEC_AD1883, "Analog Devices AD1883" }, + { HDA_CODEC_AD1884, "Analog Devices AD1884" }, + { HDA_CODEC_AD1884A, "Analog Devices AD1884A" }, { HDA_CODEC_AD1981HD, "Analog Devices AD1981HD" }, { HDA_CODEC_AD1983, "Analog Devices AD1983" }, { HDA_CODEC_AD1984, "Analog Devices AD1984" }, + { HDA_CODEC_AD1984A, "Analog Devices AD1984A" }, + { HDA_CODEC_AD1984B, "Analog Devices AD1984B" }, { HDA_CODEC_AD1986A, "Analog Devices AD1986A" }, - { HDA_CODEC_AD1988, "Analog Devices AD1988" }, + { HDA_CODEC_AD1987, "Analog Devices AD1987" }, + { HDA_CODEC_AD1988, "Analog Devices AD1988A" }, { HDA_CODEC_AD1988B, "Analog Devices AD1988B" }, + { HDA_CODEC_AD1989B, "Analog Devices AD1989B" }, { HDA_CODEC_CMI9880, "CMedia CMI9880" }, { HDA_CODEC_STAC9200D, "Sigmatel STAC9200D" }, { HDA_CODEC_STAC9204X, "Sigmatel STAC9204X" }, From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 00:45:40 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21CB81065670; Tue, 23 Dec 2008 00:45:40 +0000 (UTC) (envelope-from 20080111.freebsd.org@ab.ote.we.lv) Received: from mx2.nttmcl.com (MX2.nttmcl.com [216.69.68.200]) by mx1.freebsd.org (Postfix) with ESMTP id F1E6E8FC12; Tue, 23 Dec 2008 00:45:39 +0000 (UTC) (envelope-from 20080111.freebsd.org@ab.ote.we.lv) Received: from localhost (localhost [127.0.0.1]) by mx2.nttmcl.com (Postfix) with ESMTP id 958414DD4E; Mon, 22 Dec 2008 16:13:22 -0800 (PST) X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-999 required=5 tests=[ALL_TRUSTED=-1.8, BAYES_00=-2.599, FROM_STARTS_WITH_NUMS=1.499] Received: from mx2.nttmcl.com ([127.0.0.1]) by localhost (mx2.nttmcl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nsaoH66P7+9E; Mon, 22 Dec 2008 16:13:21 -0800 (PST) Received: from [216.69.69.252] (dhcp252.nttmcl.com [216.69.69.252]) by mx2.nttmcl.com (Postfix) with ESMTP id E771A4DD4D; Mon, 22 Dec 2008 16:13:21 -0800 (PST) Message-ID: <49502D21.5040604@ab.ote.we.lv> Date: Mon, 22 Dec 2008 16:13:21 -0800 From: "Eugene M. Kim" <20080111.freebsd.org@ab.ote.we.lv> User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: Luigi Rizzo References: <200812071942.mB7JgK94034137@svn.freebsd.org> In-Reply-To: <200812071942.mB7JgK94034137@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185746 - head/sys/boot/forth X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 00:45:40 -0000 Luigi Rizzo wrote: > Author: luigi > Date: Sun Dec 7 19:42:20 2008 > New Revision: 185746 > URL: http://svn.freebsd.org/changeset/base/185746 > > Log: > PROBLEM: putting in a loader config file a line of the form > > loader_conf_files="foo bar baz" > > should cause loading the files listed, and then resume with the > remaining config files (from previous values of the variable). > Unfortunately, sometimes the line was ignored -- actually even > modifying the line in /boot/default/loader.conf sometimes doesn't work. > > ANALYSIS: After much investigation, turned out to be a bug in the logic. > The existing code detected a new assignment by looking at the address > of the the variable containing the string. This only worked by pure > chance, i.e. if the new string is longer than the previous value > then the memory allocator may return a different address > to store the string hence triggering the detection. > > SOLUTION: This commit contains a minimal change to fix the problem, > without altering too much the existing structure of the code. > However, as a step towards improving the quality and reliability of > this code, I have introduced a handful of one-line functions > (strget, strset, strfree, string= ) that could be used in dozens > of places in the existing code. > > HOWEVER: > There is a much bigger problem here. Even though I am no Forth > expert (as most fellow src committers) I can tell that much of the > forth code (in support.4th at least) is in severe need of a > review/refactoring: > > + pieces of code are replicated multiple times instead of writing > functions (see e.g. set_module_*); > > + a lot of stale code (e.g. "structure" definitions for > preloaded_files, kernel_module, pnp stuff) which is not used > or at least belongs elsewhere. > The code bload is extremely bad as the loader runs with very small > memory constraints, and we already hit the limit once (see > > http://svn.freebsd.org/viewvc/base?view=revision&revision=185132 > Reducing the footprint of the forth files is critical. > > + two different styles of coding, one using pure stack functions > (maybe beautiful but surely highly unreadable), one using > high level mechanisms to give names to arguments and local > variables (which leads to readable code). > > Note that this code is used by default by all FreeBSD installations, > so the fragility and the code bloat are extremely damaging. > I will try to work fixing the three items above, but if others have > time, please have a look at these issues. > > MFC after: 4 weeks > > Modified: > head/sys/boot/forth/support.4th > > Modified: head/sys/boot/forth/support.4th > ============================================================================== > --- head/sys/boot/forth/support.4th Sun Dec 7 19:29:11 2008 (r185745) > +++ head/sys/boot/forth/support.4th Sun Dec 7 19:42:20 2008 (r185746) > @@ -288,6 +288,17 @@ only forth also support-functions defini > > : free-memory free if free_error throw then ; > > +: strget { var -- addr len } var .addr @ var .len @ ; > + > +\ assign addr len to variable. > +: strset { addr len var -- } addr var .addr ! len var .len ! ; > + > +\ free memory and reset fields > +: strfree { var -- } var .addr @ ?dup if free-memory 0 0 var strset then ; > + > +\ free old content, make a copy of the string and assign to variable > +: string= { addr len var -- } var strfree addr len strdup var strset ; > + > \ Assignment data temporary storage > > string name_buffer > @@ -712,19 +723,6 @@ only forth also support-functions also f > module_loaderror_suffix suffix_type? > ; > > -: set_conf_files > - conf_files .addr @ ?dup if > - free-memory > - then > - value_buffer .addr @ c@ [char] " = if > - value_buffer .addr @ char+ value_buffer .len @ 2 chars - > - else > - value_buffer .addr @ value_buffer .len @ > - then > - strdup > - conf_files .len ! conf_files .addr ! > -; > - > : set_nextboot_conf > nextboot_conf_file .addr @ ?dup if > free-memory > @@ -888,6 +886,11 @@ only forth also support-functions also f > then > ; > > +: set_conf_files > + set_environment_variable > + s" loader_conf_files" getenv conf_files string= > +; > + > : set_nextboot_flag > yes_value? to nextboot? > ; > @@ -1045,7 +1048,6 @@ only forth also support-functions defini > \ Variables used for processing multiple conf files > > string current_file_name > -variable current_conf_files > > \ Indicates if any conf file was succesfully read > > @@ -1053,16 +1055,8 @@ variable current_conf_files > > \ loader_conf_files processing support functions > > -: set_current_conf_files > - conf_files .addr @ current_conf_files ! > -; > - > -: get_conf_files > - conf_files .addr @ conf_files .len @ strdup > -; > - > -: recurse_on_conf_files? > - current_conf_files @ conf_files .addr @ <> > +: get_conf_files ( -- addr len ) \ put addr/len on stack, reset var > + conf_files strget 0 0 conf_files strset > ; > > : skip_leading_spaces { addr len pos -- addr len pos' } > @@ -1133,7 +1127,6 @@ variable current_conf_files > \ Interface to loader_conf_files processing > > : include_conf_files > - set_current_conf_files > get_conf_files 0 > begin > get_next_file ?dup > @@ -1141,7 +1134,7 @@ variable current_conf_files > set_current_file_name > ['] load_conf catch > process_conf_errors > - recurse_on_conf_files? if recurse then > + conf_files .addr @ if recurse then > repeat > ; > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > I believe this fixes bin/120084. I will test this soon (my -CURRENT machine runs Windows for the time being :-p). Cheers, Eugene From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 01:22:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B88B81065673; Tue, 23 Dec 2008 01:22:57 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9804E8FC18; Tue, 23 Dec 2008 01:22:57 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN1MvBO076558; Tue, 23 Dec 2008 01:22:57 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN1MvlI076556; Tue, 23 Dec 2008 01:22:57 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812230122.mBN1MvlI076556@svn.freebsd.org> From: Tom Rhodes Date: Tue, 23 Dec 2008 01:22: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: r186404 - head/usr.bin/elf2aout X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 01:22:57 -0000 Author: trhodes Date: Tue Dec 23 01:22:57 2008 New Revision: 186404 URL: http://svn.freebsd.org/changeset/base/186404 Log: Add a basic manual page for elf2aout. Alter Makefile and remove NO_MAN. PR: 109975 Added: head/usr.bin/elf2aout/elf2aout.1 (contents, props changed) Modified: head/usr.bin/elf2aout/Makefile Modified: head/usr.bin/elf2aout/Makefile ============================================================================== --- head/usr.bin/elf2aout/Makefile Mon Dec 22 22:40:17 2008 (r186403) +++ head/usr.bin/elf2aout/Makefile Tue Dec 23 01:22:57 2008 (r186404) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= elf2aout -NO_MAN= + NO_WERROR= WARNS?= 5 Added: head/usr.bin/elf2aout/elf2aout.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/elf2aout/elf2aout.1 Tue Dec 23 01:22:57 2008 (r186404) @@ -0,0 +1,64 @@ +.\" Copyright (c) 2008 Tom Rhodes +.\" 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 December 23, 2008 +.Dt ELF2AOUT 1 +.Os +.Sh NAME +.Nm elf2aout +.Nd "Convert ELF binary to a.out format" +.Sh SYNOPSIS +.Nm +.Op Fl o outfile +.Ar infile +.Sh DESCRIPTION +The +.Nm +utility is used to convert an ELF formatted binary, +namely a kernel, to an a.out formatted one. +Most +.Tn OpenBoot +firmware require an a.out format or FCode boot image +and this utility is designed to accommodate. +If +.Ar infile +is not in ELF format, an error message will be presented. +.Sh SEE ALSO +.Xr elf 3 , +.Xr a.out 5 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 4.6 . +.Sh AUTHORS +.An -nosplit +The +.Nm +utility was written by +.An Jake Burkholder Aq jake@FreeBSD.org . +This manual page was written by +.An Tom Rhodes Aq trhodes@FreeBSD.org . From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 01:23:10 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 785481065670; Tue, 23 Dec 2008 01:23:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61A618FC1D; Tue, 23 Dec 2008 01:23:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN1NArv076614; Tue, 23 Dec 2008 01:23:10 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN1NADt076609; Tue, 23 Dec 2008 01:23:10 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200812230123.mBN1NADt076609@svn.freebsd.org> From: Colin Percival Date: Tue, 23 Dec 2008 01:23: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: r186405 - head/libexec/ftpd head/sys/kern releng/6.3 releng/6.3/libexec/ftpd releng/6.3/sys/conf releng/6.3/sys/kern releng/6.4 releng/6.4/libexec/ftpd releng/6.4/sys/conf releng/6.4/sy... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 01:23:10 -0000 Author: cperciva Date: Tue Dec 23 01:23:09 2008 New Revision: 186405 URL: http://svn.freebsd.org/changeset/base/186405 Log: Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Avoid calling uninitialized function pointers in protocol switch code. [08:13] Merry Christmas everybody... Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Modified: head/libexec/ftpd/extern.h head/libexec/ftpd/ftpcmd.y head/libexec/ftpd/ftpd.c head/sys/kern/uipc_domain.c Changes in other areas also in this revision: Modified: releng/6.3/UPDATING releng/6.3/libexec/ftpd/extern.h releng/6.3/libexec/ftpd/ftpcmd.y releng/6.3/libexec/ftpd/ftpd.c releng/6.3/sys/conf/newvers.sh releng/6.3/sys/kern/uipc_domain.c releng/6.4/UPDATING releng/6.4/libexec/ftpd/extern.h releng/6.4/libexec/ftpd/ftpcmd.y releng/6.4/libexec/ftpd/ftpd.c releng/6.4/sys/conf/newvers.sh releng/6.4/sys/kern/uipc_domain.c releng/7.0/UPDATING releng/7.0/libexec/ftpd/extern.h releng/7.0/libexec/ftpd/ftpcmd.y releng/7.0/libexec/ftpd/ftpd.c releng/7.0/sys/conf/newvers.sh releng/7.0/sys/kern/uipc_domain.c releng/7.1/UPDATING releng/7.1/libexec/ftpd/extern.h releng/7.1/libexec/ftpd/ftpcmd.y releng/7.1/libexec/ftpd/ftpd.c releng/7.1/sys/kern/uipc_domain.c stable/6/libexec/ftpd/extern.h stable/6/libexec/ftpd/ftpcmd.y stable/6/libexec/ftpd/ftpd.c stable/6/sys/kern/uipc_domain.c stable/7/libexec/ftpd/extern.h stable/7/libexec/ftpd/ftpcmd.y stable/7/libexec/ftpd/ftpd.c stable/7/sys/kern/uipc_domain.c Modified: head/libexec/ftpd/extern.h ============================================================================== --- head/libexec/ftpd/extern.h Tue Dec 23 01:22:57 2008 (r186404) +++ head/libexec/ftpd/extern.h Tue Dec 23 01:23:09 2008 (r186405) @@ -46,7 +46,7 @@ void fatalerror(char *); void ftpd_logwtmp(char *, char *, struct sockaddr *addr); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *, char *); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void lreply(int, const char *, ...) __printflike(2, 3); void makedir(char *); void nack(char *); Modified: head/libexec/ftpd/ftpcmd.y ============================================================================== --- head/libexec/ftpd/ftpcmd.y Tue Dec 23 01:22:57 2008 (r186404) +++ head/libexec/ftpd/ftpcmd.y Tue Dec 23 01:23:09 2008 (r186405) @@ -1191,7 +1191,7 @@ lookup(struct tab *p, char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1207,7 +1207,7 @@ getline(char *s, int n, FILE *iop) if (ftpdebug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1244,13 +1244,24 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + while (c != '\n' && (c = getc(iop)) != EOF) + ; + return (-2); + } + if (c == '\n') break; } got_eof: sigprocmask(SIG_SETMASK, &osset, NULL); if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpdebug) { if (!guest && strncasecmp("pass ", s, 5) == 0) { @@ -1270,7 +1281,7 @@ got_eof: syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } static void @@ -1300,9 +1311,14 @@ yylex(void) case CMD: (void) signal(SIGALRM, toolong); (void) alarm(timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + n = getline(cbuf, sizeof(cbuf)-1, stdin); + if (n == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (n == -2) { + reply(500, "Command too long."); + (void) alarm(0); + continue; } (void) alarm(0); #ifdef SETPROCTITLE Modified: head/libexec/ftpd/ftpd.c ============================================================================== --- head/libexec/ftpd/ftpd.c Tue Dec 23 01:22:57 2008 (r186404) +++ head/libexec/ftpd/ftpd.c Tue Dec 23 01:23:09 2008 (r186405) @@ -2794,15 +2794,20 @@ static int myoob(void) { char *cp; + int ret; if (!transflag) { syslog(LOG_ERR, "Internal: myoob() while no transfer"); return (0); } cp = tmpline; - if (getline(cp, 7, stdin) == NULL) { + ret = getline(cp, 7, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command. */ + return (0); } upper(cp); if (strcmp(cp, "ABOR\r\n") == 0) { Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Tue Dec 23 01:22:57 2008 (r186404) +++ head/sys/kern/uipc_domain.c Tue Dec 23 01:23:09 2008 (r186405) @@ -112,13 +112,18 @@ protosw_init(struct protosw *pr) #define DEFAULT(foo, bar) if ((foo) == NULL) (foo) = (bar) DEFAULT(pu->pru_accept, pru_accept_notsupp); + DEFAULT(pu->pru_bind, pru_bind_notsupp); DEFAULT(pu->pru_connect, pru_connect_notsupp); DEFAULT(pu->pru_connect2, pru_connect2_notsupp); DEFAULT(pu->pru_control, pru_control_notsupp); + DEFAULT(pu->pru_disconnect, pru_disconnect_notsupp); DEFAULT(pu->pru_listen, pru_listen_notsupp); + DEFAULT(pu->pru_peeraddr, pru_peeraddr_notsupp); DEFAULT(pu->pru_rcvd, pru_rcvd_notsupp); DEFAULT(pu->pru_rcvoob, pru_rcvoob_notsupp); DEFAULT(pu->pru_sense, pru_sense_null); + DEFAULT(pu->pru_shutdown, pru_shutdown_notsupp); + DEFAULT(pu->pru_sockaddr, pru_sockaddr_notsupp); DEFAULT(pu->pru_sosend, sosend_generic); DEFAULT(pu->pru_soreceive, soreceive_generic); DEFAULT(pu->pru_sopoll, sopoll_generic); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 03:33:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A421106564A; Tue, 23 Dec 2008 03:33:33 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 68BB58FC16; Tue, 23 Dec 2008 03:33:33 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN3XXNq079471; Tue, 23 Dec 2008 03:33:33 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN3XX3D079470; Tue, 23 Dec 2008 03:33:33 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200812230333.mBN3XX3D079470@svn.freebsd.org> From: Qing Li Date: Tue, 23 Dec 2008 03: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: r186411 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 03:33:33 -0000 Author: qingli Date: Tue Dec 23 03:33:32 2008 New Revision: 186411 URL: http://svn.freebsd.org/changeset/base/186411 Log: Don't create a bogus ARP entry for 0.0.0.0. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Tue Dec 23 02:19:14 2008 (r186410) +++ head/sys/netinet/if_ether.c Tue Dec 23 03:33:32 2008 (r186411) @@ -758,23 +758,24 @@ arp_ifinit(struct ifnet *ifp, struct ifa { struct llentry *lle; - if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) + if (ntohl(IA_SIN(ifa)->sin_addr.s_addr) != INADDR_ANY) { arprequest(ifp, &IA_SIN(ifa)->sin_addr, &IA_SIN(ifa)->sin_addr, IF_LLADDR(ifp)); - /* - * interface address is considered static entry - * because the output of the arp utility shows - * that L2 entry as permanent - */ - IF_AFDATA_LOCK(ifp); - lle = lla_lookup(LLTABLE(ifp), (LLE_CREATE | LLE_IFADDR | LLE_STATIC), - (struct sockaddr *)IA_SIN(ifa)); - IF_AFDATA_UNLOCK(ifp); - if (lle == NULL) - log(LOG_INFO, "arp_ifinit: cannot create arp " - "entry for interface address\n"); - else - LLE_RUNLOCK(lle); + /* + * interface address is considered static entry + * because the output of the arp utility shows + * that L2 entry as permanent + */ + IF_AFDATA_LOCK(ifp); + lle = lla_lookup(LLTABLE(ifp), (LLE_CREATE | LLE_IFADDR | LLE_STATIC), + (struct sockaddr *)IA_SIN(ifa)); + IF_AFDATA_UNLOCK(ifp); + if (lle == NULL) + log(LOG_INFO, "arp_ifinit: cannot create arp " + "entry for interface address\n"); + else + LLE_RUNLOCK(lle); + } ifa->ifa_rtrequest = NULL; } From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 04:42:11 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48BC5106564A; Tue, 23 Dec 2008 04:42:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36E008FC1A; Tue, 23 Dec 2008 04:42:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN4gBN1080930; Tue, 23 Dec 2008 04:42:11 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN4gBmV080928; Tue, 23 Dec 2008 04:42:11 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812230442.mBN4gBmV080928@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 04:42: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: r186415 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 04:42:11 -0000 Author: sam Date: Tue Dec 23 04:42:10 2008 New Revision: 186415 URL: http://svn.freebsd.org/changeset/base/186415 Log: o add Transaction Translator support (still missing ISOC xfers) o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be set in USBMODE o split reset work into new public routine ehci_reset so bus shim drivers can force big-endian byte-select before ehci_init Modified: head/sys/dev/usb/ehci.c head/sys/dev/usb/ehcivar.h Modified: head/sys/dev/usb/ehci.c ============================================================================== --- head/sys/dev/usb/ehci.c Tue Dec 23 04:36:11 2008 (r186414) +++ head/sys/dev/usb/ehci.c Tue Dec 23 04:42:10 2008 (r186415) @@ -310,33 +310,18 @@ static struct usbd_pipe_methods ehci_dev ehci_device_isoc_done, }; -static usbd_status -ehci_hcreset(ehci_softc_t *sc) +usbd_status +ehci_reset(ehci_softc_t *sc) { u_int32_t hcr; u_int i; - EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ - for (i = 0; i < 100; i++) { - usb_delay_ms(&sc->sc_bus, 1); - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (hcr) - break; - } - if (!hcr) - /* - * Fall through and try reset anyway even though - * Table 2-9 in the EHCI spec says this will result - * in undefined behavior. - */ - device_printf(sc->sc_bus.bdev, "stop timeout\n"); - EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); for (i = 0; i < 100; i++) { usb_delay_ms(&sc->sc_bus, 1); hcr = EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_HCRESET; if (!hcr) { - if (sc->sc_flags & EHCI_SCFLG_SETMODE) { + if (sc->sc_flags & (EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEMMIO)) { /* * Force USBMODE as requested. Controllers * may have multiple operating modes. @@ -347,6 +332,11 @@ ehci_hcreset(ehci_softc_t *sc) device_printf(sc->sc_bus.bdev, "set host controller mode\n"); } + if (sc->sc_flags & EHCI_SCFLG_BIGEMMIO) { + usbmode = (usbmode &~ EHCI_UM_ES) | EHCI_UM_ES_BE; + device_printf(sc->sc_bus.bdev, + "set big-endian mode\n"); + } EOWRITE4(sc, EHCI_USBMODE, usbmode); } return (USBD_NORMAL_COMPLETION); @@ -356,6 +346,30 @@ ehci_hcreset(ehci_softc_t *sc) return (USBD_IOERROR); } +static usbd_status +ehci_hcreset(ehci_softc_t *sc) +{ + u_int32_t hcr; + u_int i; + + EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ + for (i = 0; i < 100; i++) { + usb_delay_ms(&sc->sc_bus, 1); + hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; + if (hcr) + break; + } + if (!hcr) + /* + * Fall through and try reset anyway even though + * Table 2-9 in the EHCI spec says this will result + * in undefined behavior. + */ + device_printf(sc->sc_bus.bdev, "stop timeout\n"); + + return ehci_reset(sc); +} + usbd_status ehci_init(ehci_softc_t *sc) { @@ -2008,7 +2022,7 @@ ehci_root_ctrl_start(usbd_xfer_handle xf i = UPS_HIGH_SPEED; - if (sc->sc_flags & EHCI_SCFLG_FORCESPEED) { + if (sc->sc_flags & (EHCI_SCFLG_FORCESPEED | EHCI_SCFLG_TT)) { if ((v & 0xc000000) == 0x8000000) i = UPS_HIGH_SPEED; else if ((v & 0xc000000) == 0x4000000) @@ -2056,7 +2070,8 @@ ehci_root_ctrl_start(usbd_xfer_handle xf case UHF_PORT_RESET: DPRINTFN(5,("ehci_root_ctrl_start: reset port %d\n", index)); - if (EHCI_PS_IS_LOWSPEED(v)) { + if (EHCI_PS_IS_LOWSPEED(v) && + (sc->sc_flags & EHCI_SCFLG_TT) == 0) { /* Low speed device, give up ownership. */ ehci_disown(sc, index, 1); break; @@ -2089,7 +2104,8 @@ ehci_root_ctrl_start(usbd_xfer_handle xf device_get_nameunit(sc->sc_bus.bdev)); return (USBD_TIMEOUT); } - if (!(v & EHCI_PS_PE)) { + if (!(v & EHCI_PS_PE) && + (sc->sc_flags & EHCI_SCFLG_TT) == 0) { /* Not a high speed device, give up ownership.*/ ehci_disown(sc, index, 0); break; Modified: head/sys/dev/usb/ehcivar.h ============================================================================== --- head/sys/dev/usb/ehcivar.h Tue Dec 23 04:36:11 2008 (r186414) +++ head/sys/dev/usb/ehcivar.h Tue Dec 23 04:42:10 2008 (r186415) @@ -126,6 +126,8 @@ struct ehci_soft_islot { #define EHCI_SCFLG_FORCESPEED 0x0008 /* force speed (Marvell) */ #define EHCI_SCFLG_NORESTERM 0x0010 /* don't terminate reset sequence (Marvell) */ #define EHCI_SCFLG_BIGEDESC 0x0020 /* big-endian byte order descriptors */ +#define EHCI_SCFLG_BIGEMMIO 0x0040 /* big-endian byte order MMIO */ +#define EHCI_SCFLG_TT 0x0080 /* transaction translator present */ typedef struct ehci_softc { struct usbd_bus sc_bus; /* base device */ @@ -257,6 +259,7 @@ hc16toh(const struct ehci_softc *sc, con } #endif +usbd_status ehci_reset(ehci_softc_t *); usbd_status ehci_init(ehci_softc_t *); int ehci_intr(void *); int ehci_detach(ehci_softc_t *, int); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 04:44:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 267D51065674; Tue, 23 Dec 2008 04:44:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15B6C8FC16; Tue, 23 Dec 2008 04:44:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN4iN9Q081019; Tue, 23 Dec 2008 04:44:23 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN4iNBi081018; Tue, 23 Dec 2008 04:44:23 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812230444.mBN4iNBi081018@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 04:44: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: r186416 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 04:44:24 -0000 Author: sam Date: Tue Dec 23 04:44:23 2008 New Revision: 186416 URL: http://svn.freebsd.org/changeset/base/186416 Log: o enable TT and big-endian MMIO o force a reset before ehci_init to get byte-select setup LS, FS, and HS devices now work on the Cambria board Modified: head/sys/arm/xscale/ixp425/ixp435_ehci.c Modified: head/sys/arm/xscale/ixp425/ixp435_ehci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp435_ehci.c Tue Dec 23 04:42:10 2008 (r186415) +++ head/sys/arm/xscale/ixp425/ixp435_ehci.c Tue Dec 23 04:44:23 2008 (r186416) @@ -225,11 +225,14 @@ ehci_ixp_attach(device_t self) * which means port speed must be read from the Port Status * register following a port enable. */ - sc->sc_flags |= EHCI_SCFLG_SETMODE - | EHCI_SCFLG_NORESTERM - | EHCI_SCFLG_FORCESPEED + sc->sc_flags |= EHCI_SCFLG_TT + | EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEDESC + | EHCI_SCFLG_BIGEMMIO + | EHCI_SCFLG_NORESTERM ; + (void) ehci_reset(sc); + err = ehci_init(sc); if (!err) { sc->sc_flags |= EHCI_SCFLG_DONEINIT; From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 04:46:14 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41E2E1065670; Tue, 23 Dec 2008 04:46:14 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 314BD8FC0C; Tue, 23 Dec 2008 04:46:14 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN4kEtu081097; Tue, 23 Dec 2008 04:46:14 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN4kEkM081096; Tue, 23 Dec 2008 04:46:14 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812230446.mBN4kEkM081096@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 04: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: r186417 - head/sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 04:46:14 -0000 Author: sam Date: Tue Dec 23 04:46:13 2008 New Revision: 186417 URL: http://svn.freebsd.org/changeset/base/186417 Log: add IXP465 and generic IXP425 definition Modified: head/sys/arm/include/armreg.h Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Tue Dec 23 04:44:23 2008 (r186416) +++ head/sys/arm/include/armreg.h Tue Dec 23 04:46:13 2008 (r186417) @@ -171,10 +171,12 @@ #define CPU_ID_80219_400 0x69052e20 /* A0 stepping/revision. */ #define CPU_ID_80219_600 0x69052e30 /* A0 stepping/revision. */ #define CPU_ID_81342 0x69056810 +#define CPU_ID_IXP425 0x690541c0 #define CPU_ID_IXP425_533 0x690541c0 #define CPU_ID_IXP425_400 0x690541d0 #define CPU_ID_IXP425_266 0x690541f0 #define CPU_ID_IXP435 0x69054040 +#define CPU_ID_IXP465 0x69054200 /* ARM3-specific coprocessor 15 registers */ #define ARM3_CP15_FLUSH 1 From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 04:48:28 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BEBE1065674; Tue, 23 Dec 2008 04:48:28 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE6D8FC13; Tue, 23 Dec 2008 04:48:28 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN4mSSY081174; Tue, 23 Dec 2008 04:48:28 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN4mSTY081171; Tue, 23 Dec 2008 04:48:28 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812230448.mBN4mSTY081171@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 04:48: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: r186418 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 04:48:28 -0000 Author: sam Date: Tue Dec 23 04:48:27 2008 New Revision: 186418 URL: http://svn.freebsd.org/changeset/base/186418 Log: Fill in feature control support: o add definitions for more bits, for masking out IXP465-specific bits, and %b format string o add ixp4xx_read_feature_bits to retrieve the mask of valid features (aka fuse bits) o add cpu_is_ixp42x() macro o print feature bits at boot Modified: head/sys/arm/xscale/ixp425/ixp425.c head/sys/arm/xscale/ixp425/ixp425reg.h head/sys/arm/xscale/ixp425/ixp425var.h Modified: head/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425.c Tue Dec 23 04:46:13 2008 (r186417) +++ head/sys/arm/xscale/ixp425/ixp425.c Tue Dec 23 04:48:27 2008 (r186418) @@ -68,6 +68,21 @@ static int ixp425_probe(device_t); static void ixp425_identify(driver_t *, device_t); static int ixp425_attach(device_t); +/* + * Return a mask of the "fuse" bits that identify + * which h/w features are present. + * NB: assumes the expansion bus is mapped. + */ +uint32_t +ixp4xx_read_feature_bits(void) +{ + uint32_t bits = ~IXPREG(IXP425_EXP_VBASE + EXP_FCTRL_OFFSET); + bits &= ~EXP_FCTRL_RESVD; + if (!cpu_is_ixp46x()) + bits &= ~EXP_FCTRL_IXP46X_ONLY; + return bits; +} + struct arm32_dma_range * bus_dma_get_range(void) { @@ -190,6 +205,8 @@ ixp425_attach(device_t dev) { struct ixp425_softc *sc; + device_printf(dev, "%b\n", ixp4xx_read_feature_bits(), EXP_FCTRL_BITS); + sc = device_get_softc(dev); sc->sc_iot = &ixp425_bs_tag; KASSERT(ixp425_softc == NULL, ("%s called twice?", __func__)); Modified: head/sys/arm/xscale/ixp425/ixp425reg.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425reg.h Tue Dec 23 04:46:13 2008 (r186417) +++ head/sys/arm/xscale/ixp425/ixp425reg.h Tue Dec 23 04:48:27 2008 (r186418) @@ -397,7 +397,7 @@ #define EXP_CNFG1_SW_INT1 (1 << 1) #define EXP_FCTRL_RCOMP (1<<0) -#define EXP_FCTRL_USB (1<<1) +#define EXP_FCTRL_USB_DEVICE (1<<1) #define EXP_FCTRL_HASH (1<<2) #define EXP_FCTRL_AES (1<<3) #define EXP_FCTRL_DES (1<<4) @@ -407,11 +407,26 @@ #define EXP_FCTRL_UTOPIA (1<<8) #define EXP_FCTRL_ETH0 (1<<9) #define EXP_FCTRL_ETH1 (1<<10) -#define EXP_FCTRL_NPEA (1<<11) -#define EXP_FCTRL_NPEB (1<<12) -#define EXP_FCTRL_NPEC (1<<13) +#define EXP_FCTRL_NPEA (1<<11) /* reset */ +#define EXP_FCTRL_NPEB (1<<12) /* reset */ +#define EXP_FCTRL_NPEC (1<<13) /* reset */ #define EXP_FCTRL_PCI (1<<14) -/* XXX more stuff we don't care about */ +#define EXP_FCTRL_ECC_TIMESYNC (1<<15) +#define EXP_FCTRL_UTOPIA_PHY (3<<16) /* PHY limit */ +#define EXP_FCTRL_USB_HOST (1<<18) +#define EXP_FCTRL_NPEA_ETH (1<<19) +#define EXP_FCTRL_NPEB_ETH (1<<20) +#define EXP_FCTRL_RSA (1<<21) +#define EXP_FCTRL_MAXFREQ (3<<22) /* XScale frequency */ +#define EXP_FCTRL_RESVD (0xff<<24) + +#define EXP_FCTRL_IXP46X_ONLY \ + (EXP_FCTRL_ECC_TIMESYNC | EXP_FCTRL_USB_HOST | EXP_FCTRL_NPEA_ETH | \ + EXP_FCTRL_NPEB_ETH | EXP_FCTRL_RSA | EXP_FCTRL_MAXFREQ) + +#define EXP_FCTRL_BITS \ + "\20\1RCOMP\2USB\3HASH\4AES\5DES\6HDLC\7AAL\10HSS\11UTOPIA\12ETH0" \ + "\13ETH1\17PCI\20ECC\23USB_HOST\24NPEA_ETH\25NPEB_ETH\26RSA" /* * PCI Modified: head/sys/arm/xscale/ixp425/ixp425var.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425var.h Tue Dec 23 04:46:13 2008 (r186417) +++ head/sys/arm/xscale/ixp425/ixp425var.h Tue Dec 23 04:48:27 2008 (r186418) @@ -48,6 +48,7 @@ #include /* NB: cputype is setup by set_cpufuncs */ +#define cpu_is_ixp42x() (cputype == CPU_ID_IXP425) #define cpu_is_ixp43x() (cputype == CPU_ID_IXP435) #define cpu_is_ixp46x() (cputype == CPU_ID_IXP465) @@ -99,6 +100,7 @@ void ixp425_mem_bs_init(bus_space_tag_t, uint32_t ixp425_sdram_size(void); uint32_t ixp435_ddram_size(void); +uint32_t ixp4xx_read_feature_bits(void); int ixp425_md_route_interrupt(device_t, device_t, int); void ixp425_md_attach(device_t); @@ -115,5 +117,4 @@ enum { IXP425_IVAR_ADDR, /* base physical address */ IXP425_IVAR_IRQ /* irq/gpio pin assignment */ }; - #endif /* _IXP425VAR_H_ */ From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 04:49:02 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5197A1065678; Tue, 23 Dec 2008 04:49:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 410618FC1A; Tue, 23 Dec 2008 04:49:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN4n2Ri081221; Tue, 23 Dec 2008 04:49:02 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN4n2Aq081220; Tue, 23 Dec 2008 04:49:02 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812230449.mBN4n2Aq081220@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 04:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186419 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 04:49:02 -0000 Author: sam Date: Tue Dec 23 04:49:01 2008 New Revision: 186419 URL: http://svn.freebsd.org/changeset/base/186419 Log: kill NPE_PORTS_MAX, it's not used and likely will not be Modified: head/sys/arm/xscale/ixp425/if_npereg.h Modified: head/sys/arm/xscale/ixp425/if_npereg.h ============================================================================== --- head/sys/arm/xscale/ixp425/if_npereg.h Tue Dec 23 04:48:27 2008 (r186418) +++ head/sys/arm/xscale/ixp425/if_npereg.h Tue Dec 23 04:49:01 2008 (r186419) @@ -84,7 +84,6 @@ struct npehwbuf { } ix_ne[NPE_MAXSEG]; }; -#define NPE_PORTS_MAX 2 /* logical ports */ #define NPE_FRAME_SIZE_DEFAULT 1536 #define NPE_FRAME_SIZE_MAX (65536-64) #define NPE_FRAME_SIZE_MIN 64 From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 04:51:47 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AFC1106564A; Tue, 23 Dec 2008 04:51:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 188958FC13; Tue, 23 Dec 2008 04:51:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN4pkaJ081311; Tue, 23 Dec 2008 04:51:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN4pkL7081308; Tue, 23 Dec 2008 04:51:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812230451.mBN4pkL7081308@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 04:51: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: r186420 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 04:51:47 -0000 Author: sam Date: Tue Dec 23 04:51:46 2008 New Revision: 186420 URL: http://svn.freebsd.org/changeset/base/186420 Log: NPE cleanups needed for ancillary drivers (e.g. crypto acceleration): o check feature bits when probing NPE ethernet support o move firmware loading logic from if_npe to core npe support o allow multiple refs to core NPE driver o while here fix hw.npe.debug tunable path Modified: head/sys/arm/xscale/ixp425/if_npe.c head/sys/arm/xscale/ixp425/ixp425_npe.c head/sys/arm/xscale/ixp425/ixp425_npevar.h Modified: head/sys/arm/xscale/ixp425/if_npe.c ============================================================================== --- head/sys/arm/xscale/ixp425/if_npe.c Tue Dec 23 04:49:01 2008 (r186419) +++ head/sys/arm/xscale/ixp425/if_npe.c Tue Dec 23 04:51:46 2008 (r186420) @@ -157,7 +157,6 @@ struct npe_softc { * assumptions probably need to be handled through hints. */ static const struct { - uint32_t imageid; /* default fw image */ uint32_t macbase; uint32_t miibase; int phy; /* phy id */ @@ -167,7 +166,6 @@ static const struct { uint8_t tx_doneqid; } npeconfig[NPE_MAX] = { [NPE_A] = { - .imageid = IXP425_NPE_A_IMAGEID, .macbase = IXP435_MAC_A_HWBASE, .miibase = IXP425_MAC_C_HWBASE, .phy = 2, @@ -177,7 +175,6 @@ static const struct { .tx_doneqid = 31 }, [NPE_B] = { - .imageid = IXP425_NPE_B_IMAGEID, .macbase = IXP425_MAC_B_HWBASE, .miibase = IXP425_MAC_C_HWBASE, .phy = 0, @@ -187,7 +184,6 @@ static const struct { .tx_doneqid = 31 }, [NPE_C] = { - .imageid = IXP425_NPE_C_IMAGEID, .macbase = IXP425_MAC_C_HWBASE, .miibase = IXP425_MAC_C_HWBASE, .phy = 1, @@ -258,7 +254,7 @@ SYSCTL_NODE(_hw, OID_AUTO, npe, CTLFLAG_ static int npe_debug = 0; SYSCTL_INT(_hw_npe, OID_AUTO, debug, CTLFLAG_RW, &npe_debug, 0, "IXP4XX NPE network interface debug msgs"); -TUNABLE_INT("hw.npe.npe", &npe_debug); +TUNABLE_INT("hw.npe.debug", &npe_debug); #define DPRINTF(sc, fmt, ...) do { \ if (sc->sc_debug) device_printf(sc->sc_dev, fmt, __VA_ARGS__); \ } while (0) @@ -301,16 +297,21 @@ npe_probe(device_t dev) [NPE_B] = "IXP NPE-B", [NPE_C] = "IXP NPE-C" }; + int unit = device_get_unit(dev); int npeid; + if (unit > 2 || + (ixp4xx_read_feature_bits() & + (unit == 0 ? EXP_FCTRL_ETH0 : EXP_FCTRL_ETH1)) == 0) + return EINVAL; + npeid = -1; if (!override_npeid(dev, "npeid", &npeid)) - npeid = unit2npeid(device_get_unit(dev)); + npeid = unit2npeid(unit); if (npeid == -1) { - device_printf(dev, "unit not supported\n"); + device_printf(dev, "unit %d not supported\n", unit); return EINVAL; } - /* XXX check feature register to see if enabled */ device_set_desc(dev, desc[npeid]); return 0; } @@ -644,22 +645,6 @@ override_unit(device_t dev, const char * return 1; } -static int -override_imageid(device_t dev, const char *resname, uint32_t *val) -{ - int unit = device_get_unit(dev); - int resval; - - if (resource_int_value("npe", unit, resname, &resval) != 0) - return 0; - /* XXX validate */ - if (bootverbose) - device_printf(dev, "using npe.%d.%s=0x%x override\n", - unit, resname, resval); - *val = resval; - return 1; -} - static void npe_mac_reset(struct npe_softc *sc) { @@ -677,7 +662,6 @@ npe_activate(device_t dev) { struct npe_softc * sc = device_get_softc(dev); int error, i, macbase, miibase; - uint32_t imageid, msg[2]; /* * Setup NEP ID, MAC, and MII bindings. We allow override @@ -722,35 +706,12 @@ npe_activate(device_t dev) sc->sc_miih = sc->sc_ioh; /* - * Load NPE firmware and start it running. We assume - * that minor version bumps remain compatible so probe - * the firmware image starting with the expected version - * and then bump the minor version up to the max. + * Load NPE firmware and start it running. */ - if (!override_imageid(dev, "imageid", &imageid)) - imageid = npeconfig[sc->sc_npeid].imageid; - for (;;) { - error = ixpnpe_init(sc->sc_npe, "npe_fw", imageid); - if (error == 0) - break; - /* ESRCH is returned when the requested image is not present */ - if (error != ESRCH) { - device_printf(dev, "cannot init NPE (error %d)\n", - error); - return error; - } - /* bump the minor version up to the max possible */ - if (NPEIMAGE_MINOR(imageid) == 0xff) { - device_printf(dev, "cannot locate firmware " - "(imageid 0x%08x)\n", imageid); - return error; - } - imageid++; - } - /* NB: firmware should respond with a status msg */ - if (ixpnpe_recvmsg_sync(sc->sc_npe, msg) != 0) { - device_printf(dev, "firmware did not respond as expected\n"); - return EIO; + error = ixpnpe_init(sc->sc_npe); + if (error != 0) { + device_printf(dev, "cannot init NPE (error %d)\n", error); + return error; } /* probe for PHY */ @@ -984,7 +945,6 @@ npe_setmac(struct npe_softc *sc, u_char WR4(sc, NPE_MAC_UNI_ADDR_4, eaddr[3]); WR4(sc, NPE_MAC_UNI_ADDR_5, eaddr[4]); WR4(sc, NPE_MAC_UNI_ADDR_6, eaddr[5]); - } static void Modified: head/sys/arm/xscale/ixp425/ixp425_npe.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_npe.c Tue Dec 23 04:49:01 2008 (r186419) +++ head/sys/arm/xscale/ixp425/ixp425_npe.c Tue Dec 23 04:51:46 2008 (r186420) @@ -112,6 +112,8 @@ struct ixpnpe_softc { struct mtx sc_mtx; /* mailbox lock */ uint32_t sc_msg[2]; /* reply msg collected in ixpnpe_intr */ int sc_msgwaiting; /* sc_msg holds valid data */ + int sc_npeid; + int sc_nrefs; /* # of references */ int validImage; /* valid ucode image loaded */ int started; /* NPE is started */ @@ -121,6 +123,7 @@ struct ixpnpe_softc { uint32_t savedExecCount; uint32_t savedEcsDbgCtxtReg2; }; +static struct ixpnpe_softc *npes[NPE_MAX]; #define IX_NPEDL_NPEIMAGE_FIELD_MASK 0xff @@ -287,6 +290,11 @@ ixpnpe_attach(device_t dev, int npeid) device_printf(dev, "%s: bad npeid %d\n", __func__, npeid); return NULL; } + sc = npes[npeid]; + if (sc != NULL) { + sc->sc_nrefs++; + return sc; + } config = &npeconfigs[npeid]; /* XXX M_BUS */ @@ -294,6 +302,8 @@ ixpnpe_attach(device_t dev, int npeid) sc->sc_dev = dev; sc->sc_iot = sa->sc_iot; mtx_init(&sc->sc_mtx, device_get_nameunit(dev), "npe driver", MTX_DEF); + sc->sc_npeid = npeid; + sc->sc_nrefs = 1; sc->sc_size = config->size; sc->insMemSize = config->ins_memsize; /* size of instruction memory */ @@ -320,20 +330,26 @@ ixpnpe_attach(device_t dev, int npeid) npe_reg_write(sc, IX_NPECTL, npe_reg_read(sc, IX_NPECTL) | (IX_NPECTL_OFE | IX_NPECTL_OFWE)); + npes[npeid] = sc; + return sc; } void ixpnpe_detach(struct ixpnpe_softc *sc) { - /* disable output fifo interrupts */ - npe_reg_write(sc, IX_NPECTL, - npe_reg_read(sc, IX_NPECTL) &~ (IX_NPECTL_OFE | IX_NPECTL_OFWE)); + if (--sc->sc_nrefs == 0) { + npes[sc->sc_npeid] = NULL; - bus_teardown_intr(sc->sc_dev, sc->sc_irq, sc->sc_ih); - bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_size); - mtx_destroy(&sc->sc_mtx); - free(sc, M_TEMP); + /* disable output fifo interrupts */ + npe_reg_write(sc, IX_NPECTL, + npe_reg_read(sc, IX_NPECTL) &~ (IX_NPECTL_OFE | IX_NPECTL_OFWE)); + + bus_teardown_intr(sc->sc_dev, sc->sc_irq, sc->sc_ih); + bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_size); + mtx_destroy(&sc->sc_mtx); + free(sc, M_TEMP); + } } int @@ -361,7 +377,7 @@ ixpnpe_start_locked(struct ixpnpe_softc if (!sc->started) { error = npe_cpu_start(sc); if (error == 0) - sc->started = 1; + sc->started = 1; } else error = 0; @@ -442,8 +458,9 @@ npe_findimage(struct ixpnpe_softc *sc, return ESRCH; } -int -ixpnpe_init(struct ixpnpe_softc *sc, const char *imageName, uint32_t imageId) +static int +ixpnpe_load_firmware(struct ixpnpe_softc *sc, const char *imageName, + uint32_t imageId) { static const char *devname[4] = { "IXP425", "IXP435/IXP465", "DeviceID#2", "DeviceID#3" }; @@ -504,6 +521,73 @@ done: return error; } +static int +override_imageid(device_t dev, const char *resname, uint32_t *val) +{ + int unit = device_get_unit(dev); + int resval; + + if (resource_int_value("npe", unit, resname, &resval) != 0) + return 0; + /* XXX validate */ + if (bootverbose) + device_printf(dev, "using npe.%d.%s=0x%x override\n", + unit, resname, resval); + *val = resval; + return 1; +} + +int +ixpnpe_init(struct ixpnpe_softc *sc) +{ + static const uint32_t npeconfig[NPE_MAX] = { + [NPE_A] = IXP425_NPE_A_IMAGEID, + [NPE_B] = IXP425_NPE_B_IMAGEID, + [NPE_C] = IXP425_NPE_C_IMAGEID, + }; + uint32_t imageid, msg[2]; + int error; + + if (sc->started) + return 0; + /* + * Load NPE firmware and start it running. We assume + * that minor version bumps remain compatible so probe + * the firmware image starting with the expected version + * and then bump the minor version up to the max. + */ + if (!override_imageid(sc->sc_dev, "imageid", &imageid)) + imageid = npeconfig[sc->sc_npeid]; + for (;;) { + error = ixpnpe_load_firmware(sc, "npe_fw", imageid); + if (error == 0) + break; + /* + * ESRCH is returned when the requested image + * is not present + */ + if (error != ESRCH) { + device_printf(sc->sc_dev, + "cannot init NPE (error %d)\n", error); + return error; + } + /* bump the minor version up to the max possible */ + if (NPEIMAGE_MINOR(imageid) == 0xff) { + device_printf(sc->sc_dev, "cannot locate firmware " + "(imageid 0x%08x)\n", imageid); + return error; + } + imageid++; + } + /* NB: firmware should respond with a status msg */ + if (ixpnpe_recvmsg_sync(sc, msg) != 0) { + device_printf(sc->sc_dev, + "firmware did not respond as expected\n"); + return EIO; + } + return 0; +} + int ixpnpe_getfunctionality(struct ixpnpe_softc *sc) { Modified: head/sys/arm/xscale/ixp425/ixp425_npevar.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_npevar.h Tue Dec 23 04:49:01 2008 (r186419) +++ head/sys/arm/xscale/ixp425/ixp425_npevar.h Tue Dec 23 04:51:46 2008 (r186420) @@ -111,8 +111,7 @@ void ixpnpe_detach(struct ixpnpe_softc * int ixpnpe_stopandreset(struct ixpnpe_softc *); int ixpnpe_start(struct ixpnpe_softc *); int ixpnpe_stop(struct ixpnpe_softc *); -int ixpnpe_init(struct ixpnpe_softc *, - const char *imageName, uint32_t imageId); +int ixpnpe_init(struct ixpnpe_softc *); int ixpnpe_getfunctionality(struct ixpnpe_softc *sc); int ixpnpe_sendmsg_async(struct ixpnpe_softc *, const uint32_t msg[2]); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 05:01:43 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C39351065674; Tue, 23 Dec 2008 05:01:43 +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 B24288FC19; Tue, 23 Dec 2008 05:01:43 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN51h1r081613; Tue, 23 Dec 2008 05:01:43 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN51hrM081612; Tue, 23 Dec 2008 05:01:43 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812230501.mBN51hrM081612@svn.freebsd.org> From: Tim Kientzle Date: Tue, 23 Dec 2008 05:01: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: r186422 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 05:01:43 -0000 Author: kientzle Date: Tue Dec 23 05:01:43 2008 New Revision: 186422 URL: http://svn.freebsd.org/changeset/base/186422 Log: If conversion from UTF8 fails, don't mark Unicode text as available. Submitted by: Michihiro NAKAJIMA MFC after: 30 days Modified: head/lib/libarchive/archive_entry.c Modified: head/lib/libarchive/archive_entry.c ============================================================================== --- head/lib/libarchive/archive_entry.c Tue Dec 23 05:00:00 2008 (r186421) +++ head/lib/libarchive/archive_entry.c Tue Dec 23 05:01:43 2008 (r186422) @@ -239,7 +239,8 @@ aes_get_wcs(struct aes *aes) if (aes->aes_set & AES_SET_UTF8) { /* Try converting UTF8 to WCS. */ aes->aes_wcs = __archive_string_utf8_w(&(aes->aes_utf8)); - aes->aes_set |= AES_SET_WCS; + if (aes->aes_wcs != NULL) + aes->aes_set |= AES_SET_WCS; return (aes->aes_wcs); } return (NULL); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 09:11:06 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3929F106567E; Tue, 23 Dec 2008 09:11:06 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27CAD8FC1C; Tue, 23 Dec 2008 09:11:06 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBN9B67e094168; Tue, 23 Dec 2008 09:11:06 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBN9B61i094167; Tue, 23 Dec 2008 09:11:06 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200812230911.mBN9B61i094167@svn.freebsd.org> From: Remko Lodder Date: Tue, 23 Dec 2008 09:11: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: r186424 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 09:11:06 -0000 Author: remko Date: Tue Dec 23 09:11:05 2008 New Revision: 186424 URL: http://svn.freebsd.org/changeset/base/186424 Log: Add quirk for the Storcase InfoStation 12bay SATA to FC SAN. PR: 129858 Submitted by: Nick Triantos MFC after: 1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Dec 23 05:10:05 2008 (r186423) +++ head/sys/cam/scsi/scsi_da.c Tue Dec 23 09:11:05 2008 (r186424) @@ -537,6 +537,14 @@ static struct da_quirk_entry da_quirk_ta }, { /* + * Storcase (Kingston) InfoStation IFS FC2/SATA-R 201A + * PR: 129858 + */ + {T_DIRECT, SIP_MEDIA_FIXED, "IFS", "FC2/SATA-R*", + "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE + }, + { + /* * Samsung YP-U3 mp3-player * PR: 125398 */ From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 12:03:13 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 917AD106567E; Tue, 23 Dec 2008 12:03:13 +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 6CBD58FC1B; Tue, 23 Dec 2008 12:03:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id 2495B46B32; Tue, 23 Dec 2008 07:03:13 -0500 (EST) Date: Tue, 23 Dec 2008 12:03:13 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Bjoern A. Zeeb" In-Reply-To: <200812221254.mBMCsr67061758@svn.freebsd.org> Message-ID: References: <200812221254.mBMCsr67061758@svn.freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) 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: r186393 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 12:03:13 -0000 On Mon, 22 Dec 2008, Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Dec 22 12:54:52 2008 > New Revision: 186393 > URL: http://svn.freebsd.org/changeset/base/186393 > > Log: > Correct variable name in comment. In IPv4 we've eliminated use of ipprotosw, although we still have ipprotosw.h, which should go away as it's unused; I'd like to see ip6protosw go away as well. The domain registration code assumes that when an array of protocols are registered, the size of the array entry is sizeof(struct protosw), which happens currently to be true for ip6protosw. At least, I think. :-) Robert N M Watson Computer Laboratory University of Cambridge > > MFC after: 4 weeks > > Modified: > head/sys/netinet6/ip6_input.c > > Modified: head/sys/netinet6/ip6_input.c > ============================================================================== > --- head/sys/netinet6/ip6_input.c Mon Dec 22 07:11:15 2008 (r186392) > +++ head/sys/netinet6/ip6_input.c Mon Dec 22 12:54:52 2008 (r186393) > @@ -248,7 +248,7 @@ ip6_init(void) > if (pr == 0) > panic("ip6_init"); > > - /* Initialize the entire ip_protox[] array to IPPROTO_RAW. */ > + /* Initialize the entire ip6_protox[] array to IPPROTO_RAW. */ > for (i = 0; i < IPPROTO_MAX; i++) > ip6_protox[i] = pr - inet6sw; > /* > From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 12:08:07 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD1FD1065686; Tue, 23 Dec 2008 12:08:07 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF05B8FC66; Tue, 23 Dec 2008 12:08:06 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNC86Ta099362; Tue, 23 Dec 2008 12:08:06 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNC86QR099361; Tue, 23 Dec 2008 12:08:06 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812231208.mBNC86QR099361@svn.freebsd.org> From: Joseph Koshy Date: Tue, 23 Dec 2008 12:08: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: r186425 - head/usr.sbin/pmcstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 12:08:08 -0000 Author: jkoshy Date: Tue Dec 23 12:08:06 2008 New Revision: 186425 URL: http://svn.freebsd.org/changeset/base/186425 Log: Close the read side of the pipe to self when exiting. Modified: head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Tue Dec 23 09:11:05 2008 (r186424) +++ head/usr.sbin/pmcstat/pmcstat.c Tue Dec 23 12:08:06 2008 (r186425) @@ -1264,6 +1264,9 @@ main(int argc, char **argv) /* Kill the child process if we started it */ if (args.pa_flags & FLAG_HAS_COMMANDLINE) pmcstat_kill_process(&args); + /* Close the pipe to self, if present. */ + if (args.pa_flags & FLAG_HAS_PIPE) + (void) close(pipefd[READPIPEFD]); runstate = PMCSTAT_FINISHED; } else if (kev.ident == SIGWINCH) { if (ioctl(fileno(args.pa_printfile), From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 12:15:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D0D2106567B; Tue, 23 Dec 2008 12:15:22 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A76B08FC19; Tue, 23 Dec 2008 12:15:21 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNCFLjs099589; Tue, 23 Dec 2008 12:15:21 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNCFLk4099588; Tue, 23 Dec 2008 12:15:21 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200812231215.mBNCFLk4099588@svn.freebsd.org> From: Remko Lodder Date: Tue, 23 Dec 2008 12:15: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: r186426 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 12:15:22 -0000 Author: remko Date: Tue Dec 23 12:15:21 2008 New Revision: 186426 URL: http://svn.freebsd.org/changeset/base/186426 Log: Add support for 2 EVDO devices. PR: 119150 Submitted by: lioux MFC after: 1 week Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Dec 23 12:08:06 2008 (r186425) +++ head/sys/dev/usb/usbdevs Tue Dec 23 12:15:21 2008 (r186426) @@ -526,6 +526,7 @@ vendor HAWKING 0x0e66 Hawking vendor FOSSIL 0x0e67 Fossil, Inc vendor GMATE 0x0e7e G.Mate, Inc vendor OTI 0x0ea0 Ours Technology +vendor YISO 0x0eab Yiso Wireless Co. vendor PILOTECH 0x0eaf Pilotech vendor NOVATECH 0x0eb0 NovaTech vendor ITEGNO 0x0eba iTegno @@ -2001,6 +2002,7 @@ product QUALCOMM2 RWT_FCT 0x3100 RWT FCT product QUALCOMM2 CDMA_MSM 0x3196 CDMA Technologies MSM modem product QUALCOMMINC CDMA_MSM 0x0001 CDMA Technologies MSM modem product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage +product QUALCOMMINC AC8700 0xfffe CDMA 1xEVDO USB modem /* Qtronix products */ product QTRONIX 980N 0x2011 Scorpion-980N keyboard @@ -2462,6 +2464,9 @@ product YAMAHA RTW65I 0x4002 NetVolante product YANO U640MO 0x0101 U640MO-03 product YANO FW800HD 0x05fc METALWEAR-HDD +/* Yiso Wireless Co. products */ +product YISO C893 0xc893 CDMA 2000 1xEVDO PC Card + /* Z-Com products */ product ZCOM M4Y750 0x0001 M4Y-750 product ZCOM XI725 0x0002 XI-725/726 From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 12:44:19 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08BCE1065678; Tue, 23 Dec 2008 12:44:19 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB9898FC1D; Tue, 23 Dec 2008 12:44:18 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNCiIvv000907; Tue, 23 Dec 2008 12:44:18 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNCiINB000905; Tue, 23 Dec 2008 12:44:18 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200812231244.mBNCiINB000905@svn.freebsd.org> From: Remko Lodder Date: Tue, 23 Dec 2008 12:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186427 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 12:44:19 -0000 Author: remko Date: Tue Dec 23 12:44:18 2008 New Revision: 186427 URL: http://svn.freebsd.org/changeset/base/186427 Log: Add support for the MaxSream USB test carrier. PR: 117546 Submitted by: Daniel J. O'Connor MFC after: 1 week Modified: head/sys/dev/usb/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/uftdi.c ============================================================================== --- head/sys/dev/usb/uftdi.c Tue Dec 23 12:15:21 2008 (r186426) +++ head/sys/dev/usb/uftdi.c Tue Dec 23 12:44:18 2008 (r186427) @@ -170,7 +170,8 @@ uftdi_match(device_t self) uaa->product == USB_PRODUCT_FTDI_UOPTBR || uaa->product == USB_PRODUCT_FTDI_EMCU2D || uaa->product == USB_PRODUCT_FTDI_PCMSFU || - uaa->product == USB_PRODUCT_FTDI_EMCU2H )) + uaa->product == USB_PRODUCT_FTDI_EMCU2H || + uaa->product == USB_PRODUCT_FTDI_MAXSTREAM )) return (UMATCH_VENDOR_PRODUCT); if (uaa->vendor == USB_VENDOR_SIIG2 && (uaa->product == USB_PRODUCT_SIIG2_US2308)) @@ -256,6 +257,7 @@ uftdi_attach(device_t self) case USB_PRODUCT_FTDI_EMCU2D: case USB_PRODUCT_FTDI_PCMSFU: case USB_PRODUCT_FTDI_EMCU2H: + case USB_PRODUCT_FTDI_MAXSTREAM: sc->sc_type = UFTDI_TYPE_8U232AM; sc->sc_hdrlen = 0; break; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Dec 23 12:15:21 2008 (r186426) +++ head/sys/dev/usb/usbdevs Tue Dec 23 12:44:18 2008 (r186427) @@ -1280,6 +1280,7 @@ product FTDI UOPTBR 0xe889 USB-RS232 Op product FTDI EMCU2D 0xe88a Expert mouseCLOCK USB II product FTDI PCMSFU 0xe88b Precision Clock MSF USB product FTDI EMCU2H 0xe88c Expert mouseCLOCK USB II HBG +product FTDI MAXSTREAM 0xee18 Maxstream PKG-U product FTDI USBSERIAL 0xfa00 Matrix Orbital USB Serial product FTDI MX2_3 0xfa01 Matrix Orbital MX2 or MX3 product FTDI MX4_5 0xfa02 Matrix Orbital MX4 or MX5 From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 13:09:17 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F5C71065678; Tue, 23 Dec 2008 13:09:17 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5DC5F8FC1C; Tue, 23 Dec 2008 13:09:17 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBND9HA0003114; Tue, 23 Dec 2008 13:09:17 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBND9Hax003111; Tue, 23 Dec 2008 13:09:17 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200812231309.mBND9Hax003111@svn.freebsd.org> From: Remko Lodder Date: Tue, 23 Dec 2008 13:09: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: r186428 - in head: share/man/man4 sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 13:09:17 -0000 Author: remko Date: Tue Dec 23 13:09:17 2008 New Revision: 186428 URL: http://svn.freebsd.org/changeset/base/186428 Log: Add support for the HP 4470C scanner. Note that there is no working backend (or at least that is mentioned in the PR ticket) but the device is now supported on our end. PR: 117205 Submitted by: Artem Naluzhnyy MFC after: 1 week Modified: head/share/man/man4/uscanner.4 head/sys/dev/usb/usbdevs head/sys/dev/usb/uscanner.c Modified: head/share/man/man4/uscanner.4 ============================================================================== --- head/share/man/man4/uscanner.4 Tue Dec 23 12:44:18 2008 (r186427) +++ head/share/man/man4/uscanner.4 Tue Dec 23 13:09:17 2008 (r186428) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 28, 2008 +.Dd December 23, 2008 .Dt USCANNER 4 .Os .Sh NAME @@ -112,6 +112,7 @@ Hewlett Packard: Photosmart S20 Hewlett Packard Scanjet: 2200C, 3300C, 3400CSE, 4100C, 4200C, 4300C, +4470C, 5200C, 5300C, 5400C, 6200C, 6300C, 8200C, 8250C, 8290C; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Dec 23 12:44:18 2008 (r186427) +++ head/sys/dev/usb/usbdevs Tue Dec 23 13:09:17 2008 (r186428) @@ -1418,6 +1418,7 @@ product HP 840C 0x0604 DeskJet 840c product HP 2200C 0x0605 ScanJet 2200C product HP 5300C 0x0701 Scanjet 5300C product HP 4400C 0x0705 Scanjet 4400C +product HP 4470C 0x0805 Scanjet 4470C product HP 82x0C 0x0b01 Scanjet 82x0C product HP 2300D 0x0b17 Laserjet 2300d product HP 970CSE 0x1004 Deskjet 970Cse Modified: head/sys/dev/usb/uscanner.c ============================================================================== --- head/sys/dev/usb/uscanner.c Tue Dec 23 12:44:18 2008 (r186427) +++ head/sys/dev/usb/uscanner.c Tue Dec 23 13:09:17 2008 (r186428) @@ -132,6 +132,7 @@ static const struct uscan_info uscanner_ {{ USB_VENDOR_HP, USB_PRODUCT_HP_4100C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4200C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4300C }, 0 }, + {{ USB_VENDOR_HP, USB_PRODUCT_HP_4470C }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_4670V }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_S20 }, 0 }, {{ USB_VENDOR_HP, USB_PRODUCT_HP_5200C }, 0 }, From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 13:35:27 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CF101065678; Tue, 23 Dec 2008 13:35:27 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BBE38FC0C; Tue, 23 Dec 2008 13:35:27 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNDZRvI003694; Tue, 23 Dec 2008 13:35:27 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNDZRBZ003693; Tue, 23 Dec 2008 13:35:27 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812231335.mBNDZRBZ003693@svn.freebsd.org> From: Tom Rhodes Date: Tue, 23 Dec 2008 13:35: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: r186429 - head/sbin/mount_msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 13:35:27 -0000 Author: trhodes Date: Tue Dec 23 13:35:26 2008 New Revision: 186429 URL: http://svn.freebsd.org/changeset/base/186429 Log: Document the "-o large" option. PR: 129792 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:09:17 2008 (r186428) +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:35:26 2008 (r186429) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 7, 1994 +.Dd December 23, 2008 .Dt MOUNT_MSDOSFS 8 .Os .Sh NAME @@ -73,6 +73,11 @@ as described in .Xr mount 8 . The following MSDOS file system-specific options are available: .Bl -tag -width indent +.It Cm large +Support file systems larger than 128 gigabytes at the expense +of 32 bytes of kernel memory. +This memory will not be reclaimed until the file system has +been unmounted. .It Cm longnames Force Windows 95 long filenames to be visible. .It Cm shortnames From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 14:58:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 180991065677; Tue, 23 Dec 2008 14:58:09 +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 0724E8FC28; Tue, 23 Dec 2008 14:58:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNEw8L2005234; Tue, 23 Dec 2008 14:58:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNEw86t005233; Tue, 23 Dec 2008 14:58:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812231458.mBNEw86t005233@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Dec 2008 14:58: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: r186430 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 14:58:09 -0000 Author: mav Date: Tue Dec 23 14:58:08 2008 New Revision: 186430 URL: http://svn.freebsd.org/changeset/base/186430 Log: Organize Conexant codecs. Add CX20561 (Hermosa) codec ID. 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 Tue Dec 23 13:35:26 2008 (r186429) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Dec 23 14:58:08 2008 (r186430) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081223_0120" +#define HDA_DRV_TEST_REV "20081223_0121" SND_DECLARE_FILE("$FreeBSD$"); @@ -658,19 +658,11 @@ static const struct { #define AGERE_VENDORID 0x11c1 #define HDA_CODEC_AGEREXXXX HDA_CODEC_CONSTRUCT(AGERE, 0xffff) -/* - * Conexant - * - * Ok, the truth is, I don't have any idea at all whether - * it is "Venice" or "Waikiki" or other unnamed CXyadayada. The only - * place that tell me it is "Venice" is from its Windows driver INF. - * - * Venice - CX????? - * Waikiki - CX20551-22 - */ +/* Conexant */ #define CONEXANT_VENDORID 0x14f1 -#define HDA_CODEC_CXVENICE HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045) -#define HDA_CODEC_CXWAIKIKI HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) +#define HDA_CODEC_CX20549 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045) +#define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) +#define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051) #define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff) /* VIA */ @@ -798,8 +790,9 @@ static const struct { { HDA_CODEC_IDT92HD81B1X, "IDT 92HD81B1X" }, { HDA_CODEC_IDT92HD83C1C, "IDT 92HD83C1C" }, { HDA_CODEC_IDT92HD83C1X, "IDT 92HD83C1X" }, - { HDA_CODEC_CXVENICE, "Conexant Venice" }, - { HDA_CODEC_CXWAIKIKI, "Conexant Waikiki" }, + { HDA_CODEC_CX20549, "Conexant CX20549 (Venice)" }, + { HDA_CODEC_CX20551, "Conexant CX20551 (Waikiki)" }, + { HDA_CODEC_CX20561, "Conexant CX20561 (Hermosa)" }, { HDA_CODEC_VT1708_8, "VIA VT1708_8" }, { HDA_CODEC_VT1708_9, "VIA VT1708_9" }, { HDA_CODEC_VT1708_A, "VIA VT1708_A" }, @@ -2269,7 +2262,7 @@ hdac_widget_pin_getconfig(struct hdac_wi HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); break; } - } else if (id == HDA_CODEC_CXVENICE && sc->pci_subvendor == + } else if (id == HDA_CODEC_CX20549 && sc->pci_subvendor == HP_V3000_SUBVENDOR) { switch (nid) { case 18: @@ -2289,7 +2282,7 @@ hdac_widget_pin_getconfig(struct hdac_wi HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); break; } - } else if (id == HDA_CODEC_CXWAIKIKI && sc->pci_subvendor == + } else if (id == HDA_CODEC_CX20551 && sc->pci_subvendor == HP_DV5000_SUBVENDOR) { switch (nid) { case 20: @@ -4494,7 +4487,7 @@ static const struct { HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 }, { HDA_MATCH_ALL, HDA_CODEC_AD1988B, HDA_QUIRK_IVREF80, HDA_QUIRK_IVREF50 | HDA_QUIRK_IVREF100 }, - { HDA_MATCH_ALL, HDA_CODEC_CXVENICE, + { HDA_MATCH_ALL, HDA_CODEC_CX20549, 0, HDA_QUIRK_FORCESTEREO } }; #define HDAC_QUIRKS_LEN (sizeof(hdac_quirks) / sizeof(hdac_quirks[0])) From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 15:00:03 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4AC01065675; Tue, 23 Dec 2008 15:00:03 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 943A38FC16; Tue, 23 Dec 2008 15:00:03 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNF03no005338; Tue, 23 Dec 2008 15:00:03 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNF03UY005337; Tue, 23 Dec 2008 15:00:03 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812231500.mBNF03UY005337@svn.freebsd.org> From: Tom Rhodes Date: Tue, 23 Dec 2008 15:00: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: r186431 - head/sbin/shutdown X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 15:00:03 -0000 Author: trhodes Date: Tue Dec 23 15:00:03 2008 New Revision: 186431 URL: http://svn.freebsd.org/changeset/base/186431 Log: Note that when shutdown is run without options, it will place the system into single user mode at the time specified. PR: 129765 Modified: head/sbin/shutdown/shutdown.8 Modified: head/sbin/shutdown/shutdown.8 ============================================================================== --- head/sbin/shutdown/shutdown.8 Tue Dec 23 14:58:08 2008 (r186430) +++ head/sbin/shutdown/shutdown.8 Tue Dec 23 15:00:03 2008 (r186431) @@ -28,7 +28,7 @@ .\" @(#)shutdown.8 8.2 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd December 11, 1998 +.Dd December 23, 2008 .Dt SHUTDOWN 8 .Os .Sh NAME @@ -167,6 +167,12 @@ The file that .Nm created will be removed automatically. +.Pp +When run without options, the +.Nm +utility will place the system into single user mode at the +.Ar time +specified. .Sh FILES .Bl -tag -width /var/run/nologin -compact .It Pa /var/run/nologin From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 15:47:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA2DF1065678; Tue, 23 Dec 2008 15:47:31 +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 B98158FC22; Tue, 23 Dec 2008 15:47:31 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNFlV21006257; Tue, 23 Dec 2008 15:47:31 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNFlVhT006255; Tue, 23 Dec 2008 15:47:31 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812231547.mBNFlVhT006255@svn.freebsd.org> From: Andrew Thompson Date: Tue, 23 Dec 2008 15:47: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: r186432 - in head/etc: . devd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 15:47:31 -0000 Author: thompsa Date: Tue Dec 23 15:47:31 2008 New Revision: 186432 URL: http://svn.freebsd.org/changeset/base/186432 Log: Move another block of ASUS events to devd/asus.conf that were missed in r186249 Modified: head/etc/devd.conf head/etc/devd/asus.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Tue Dec 23 15:00:03 2008 (r186431) +++ head/etc/devd.conf Tue Dec 23 15:47:31 2008 (r186432) @@ -255,28 +255,6 @@ notify 10 { action "/etc/rc.resume acpi $notify"; }; -# The next blocks enable volume hotkeys that can be found on the Asus laptops -notify 0 { - match "system" "ACPI"; - match "subsystem" "ASUS"; - match "notify" "0x32"; - action "mixer 0"; -}; - -notify 0 { - match "system" "ACPI"; - match "subsystem" "ASUS"; - match "notify" "0x31"; - action "mixer vol -10"; -}; - -notify 0 { - match "system" "ACPI"; - match "subsystem" "ASUS"; - match "notify" "0x30"; - action "mixer vol +10"; -}; - /* EXAMPLES TO END OF FILE # The following might be an example of something that a vendor might Modified: head/etc/devd/asus.conf ============================================================================== --- head/etc/devd/asus.conf Tue Dec 23 15:00:03 2008 (r186431) +++ head/etc/devd/asus.conf Tue Dec 23 15:47:31 2008 (r186432) @@ -2,6 +2,28 @@ # # ASUS specific devd events +# The next blocks enable volume hotkeys that can be found on the Asus laptops +notify 0 { + match "system" "ACPI"; + match "subsystem" "ASUS"; + match "notify" "0x32"; + action "mixer 0"; +}; + +notify 0 { + match "system" "ACPI"; + match "subsystem" "ASUS"; + match "notify" "0x31"; + action "mixer vol -10"; +}; + +notify 0 { + match "system" "ACPI"; + match "subsystem" "ASUS"; + match "notify" "0x30"; + action "mixer vol +10"; +}; + # The next blocks enable volume hotkeys that can be found on the Asus EeePC notify 0 { match "system" "ACPI"; From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:04:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B2671065687; Tue, 23 Dec 2008 16:04:33 +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 4AA6C8FC19; Tue, 23 Dec 2008 16:04:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNG4Xm6006630; Tue, 23 Dec 2008 16:04:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNG4X91006629; Tue, 23 Dec 2008 16:04:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812231604.mBNG4X91006629@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 23 Dec 2008 16:04: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: r186433 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 16:04:33 -0000 Author: kib Date: Tue Dec 23 16:04:33 2008 New Revision: 186433 URL: http://svn.freebsd.org/changeset/base/186433 Log: Clear busy state on the pages which are after the one that failed the bind attempt. Reported and tested by: ganbold Reviewed by: rnoland MFC after: 2 weeks Modified: head/sys/dev/agp/agp.c Modified: head/sys/dev/agp/agp.c ============================================================================== --- head/sys/dev/agp/agp.c Tue Dec 23 15:47:31 2008 (r186432) +++ head/sys/dev/agp/agp.c Tue Dec 23 16:04:33 2008 (r186433) @@ -564,6 +564,7 @@ agp_generic_bind_memory(device_t dev, st device_printf(dev, "memory already bound\n"); error = EINVAL; VM_OBJECT_LOCK(mem->am_obj); + i = 0; goto bad; } @@ -592,7 +593,6 @@ agp_generic_bind_memory(device_t dev, st * Bail out. Reverse all the mappings * and unwire the pages. */ - vm_page_wakeup(m); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); goto bad; @@ -622,8 +622,10 @@ agp_generic_bind_memory(device_t dev, st bad: mtx_unlock(&sc->as_lock); VM_OBJECT_LOCK_ASSERT(mem->am_obj, MA_OWNED); - for (i = 0; i < mem->am_size; i += PAGE_SIZE) { - m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(i)); + for (k = 0; k < mem->am_size; k += PAGE_SIZE) { + m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); + if (k >= i) + vm_page_wakeup(m); vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_unlock_queues(); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:16:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CD5E1065670; Tue, 23 Dec 2008 16:16:31 +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 1BB528FC14; Tue, 23 Dec 2008 16:16:31 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNGGUuR006875; Tue, 23 Dec 2008 16:16:30 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNGGU9Z006874; Tue, 23 Dec 2008 16:16:30 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812231616.mBNGGU9Z006874@svn.freebsd.org> From: Robert Noland Date: Tue, 23 Dec 2008 16:16: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: r186434 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 16:16:31 -0000 Author: rnoland Date: Tue Dec 23 16:16:30 2008 New Revision: 186434 URL: http://svn.freebsd.org/changeset/base/186434 Log: Fix up handling of Intel G4X chips some more. Note that you need at least xf86-video-intel 2.4.3 for this to work. The G4X doesn't put the GATT into the same area of stolen memory as all the other chips and older versions of the driver didn't handle that properly. Tested by: ganbold Approved by: kib MFC after: 2 weeks Modified: head/sys/dev/agp/agp_i810.c Modified: head/sys/dev/agp/agp_i810.c ============================================================================== --- head/sys/dev/agp/agp_i810.c Tue Dec 23 16:04:33 2008 (r186433) +++ head/sys/dev/agp/agp_i810.c Tue Dec 23 16:16:30 2008 (r186434) @@ -167,7 +167,7 @@ static const struct agp_i810_match { "Intel GM965 SVGA controller"}, {0x2A128086, CHIP_I965, 0x00020000, "Intel GME965 SVGA controller"}, - {0x2A428086, CHIP_I965, 0x00020000, + {0x2A428086, CHIP_G4X, 0x00020000, "Intel GM45 SVGA controller"}, {0x2E028086, CHIP_G4X, 0x00020000, "Intel 4 Series SVGA controller"}, @@ -284,6 +284,7 @@ agp_i810_probe(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); if ((deven & AGP_I915_DEVEN_D2F0) == AGP_I915_DEVEN_D2F0_DISABLED) { @@ -348,6 +349,7 @@ agp_i810_dump_regs(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); device_printf(dev, "AGP_I915_MSAC: 0x%02x\n", @@ -397,7 +399,7 @@ agp_i810_attach(device_t dev) return error; if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && - ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) + sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) { device_printf(dev, "agp_i810.c does not support physical " "memory above 4GB.\n"); @@ -659,8 +661,7 @@ agp_i810_attach(device_t dev) return EINVAL; } - if (sc->chiptype != CHIP_G4X) - gtt_size += 4; + gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; if (sc->stolen > 0) @@ -780,6 +781,7 @@ agp_i810_set_aperture(device_t dev, u_in case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: return agp_generic_set_aperture(dev, aperture); } @@ -798,7 +800,8 @@ agp_i810_write_gtt_entry(device_t dev, i u_int32_t pte; pte = (u_int32_t)physical | 1; - if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) { + if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { pte |= (physical & 0x0000000f00000000ull) >> 28; } else { /* If we do actually have memory above 4GB on an older system, @@ -825,6 +828,10 @@ agp_i810_write_gtt_entry(device_t dev, i bus_write_4(sc->sc_res[0], (offset >> AGP_PAGE_SHIFT) * 4 + (512 * 1024), pte); break; + case CHIP_G4X: + bus_write_4(sc->sc_res[0], + (offset >> AGP_PAGE_SHIFT) * 4 + (2 * 1024 * 1024), pte); + break; } } From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:20:00 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3567F1065675; Tue, 23 Dec 2008 16:20:00 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 24BD28FC24; Tue, 23 Dec 2008 16:20:00 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNGJxQM006992; Tue, 23 Dec 2008 16:19:59 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNGJxMq006991; Tue, 23 Dec 2008 16:19:59 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <200812231619.mBNGJxMq006991@svn.freebsd.org> From: Ivan Voras Date: Tue, 23 Dec 2008 16:19: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: r186435 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 16:20:00 -0000 Author: ivoras Date: Tue Dec 23 16:19:59 2008 New Revision: 186435 URL: http://svn.freebsd.org/changeset/base/186435 Log: Add missing newlines to flags tags of CPU topology, for prettier output. Reviewed by: jeff (original version) Approved by: gnn (mentor) (original version) Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Tue Dec 23 16:16:30 2008 (r186434) +++ head/sys/kern/sched_ule.c Tue Dec 23 16:19:59 2008 (r186435) @@ -2636,9 +2636,9 @@ sysctl_kern_sched_topology_spec_internal sbuf_printf(sb, "%*s ", indent, ""); if (cg->cg_flags != 0) { if ((cg->cg_flags & CG_FLAG_HTT) != 0) - sbuf_printf(sb, "HTT group"); + sbuf_printf(sb, "HTT group\n"); if ((cg->cg_flags & CG_FLAG_THREAD) != 0) - sbuf_printf(sb, "SMT group"); + sbuf_printf(sb, "SMT group\n"); } sbuf_printf(sb, "\n"); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:49:07 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB3831065674; Tue, 23 Dec 2008 16:49: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 A9C008FC21; Tue, 23 Dec 2008 16:49:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNGn7M8007592; Tue, 23 Dec 2008 16:49:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNGn7nO007591; Tue, 23 Dec 2008 16:49:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812231649.mBNGn7nO007591@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 23 Dec 2008 16:49: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: r186436 - head/sys/contrib/ipfilter/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 16:49:07 -0000 Author: bz Date: Tue Dec 23 16:49:07 2008 New Revision: 186436 URL: http://svn.freebsd.org/changeset/base/186436 Log: Check for ipprotosw.h more precisely. It hasn't been needed for more than 5 years, since r120386. MFC after: 4 weeks Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Dec 23 16:19:59 2008 (r186435) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Dec 23 16:49:07 2008 (r186436) @@ -156,7 +156,9 @@ struct selinfo ipfselwait[IPL_LOGSIZE]; # include # if defined(NETBSD_PF) # include -# include +# if (__FreeBSD_version < 501108) +# include +# endif /* * We provide the fr_checkp name just to minimize changes later. */ From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:52:03 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D14A3106564A; Tue, 23 Dec 2008 16:52:03 +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 C04748FC17; Tue, 23 Dec 2008 16:52:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNGq3Ga007680; Tue, 23 Dec 2008 16:52:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNGq3Bo007677; Tue, 23 Dec 2008 16:52:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812231652.mBNGq3Bo007677@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 23 Dec 2008 16:52: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: r186437 - in head: . sys/netinet sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 16:52:03 -0000 Author: bz Date: Tue Dec 23 16:52:03 2008 New Revision: 186437 URL: http://svn.freebsd.org/changeset/base/186437 Log: Remove long unused netinet/ipprotosw.h (basically since r82884). Discussed with: rwatson MFC after: 4 weeks Deleted: head/sys/netinet/ipprotosw.h Modified: head/ObsoleteFiles.inc head/sys/netipsec/vipsec.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Dec 23 16:49:07 2008 (r186436) +++ head/ObsoleteFiles.inc Tue Dec 23 16:52:03 2008 (r186437) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20081223: ipprotosw.h removed +OLD_FILES+=usr/include/netinet/ipprotosw.h # 20081123: vfs_mountedon.9 removed OLD_FILES+=usr/share/man/man9/vfs_mountedon.9.gz # 20081023: FREE.9 and MALLOC.9 removed Modified: head/sys/netipsec/vipsec.h ============================================================================== --- head/sys/netipsec/vipsec.h Tue Dec 23 16:49:07 2008 (r186436) +++ head/sys/netipsec/vipsec.h Tue Dec 23 16:52:03 2008 (r186437) @@ -38,8 +38,6 @@ #include #include -#include - #include #include #include From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 16:54:00 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1DF1106567A; Tue, 23 Dec 2008 16:54:00 +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 D06F18FC1D; Tue, 23 Dec 2008 16:54:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNGs0Hc007749; Tue, 23 Dec 2008 16:54:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNGs0oi007748; Tue, 23 Dec 2008 16:54:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812231654.mBNGs0oi007748@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 23 Dec 2008 16:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186438 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 16:54:01 -0000 Author: bz Date: Tue Dec 23 16:54:00 2008 New Revision: 186438 URL: http://svn.freebsd.org/changeset/base/186438 Log: pr_pfh has been gone from protosw since r120386 (more than 5 years ago). MFC after: 4 weeks Modified: head/share/man/man9/domain.9 Modified: head/share/man/man9/domain.9 ============================================================================== --- head/share/man/man9/domain.9 Tue Dec 23 16:52:03 2008 (r186437) +++ head/share/man/man9/domain.9 Tue Dec 23 16:54:00 2008 (r186438) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 7, 2001 +.Dd December 23, 2008 .Dt DOMAIN 9 .Os .Sh NAME @@ -103,7 +103,6 @@ struct protosw { pr_drain_t *pr_drain; /* flush any excess space possible */ struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ - struct pfil_head pr_pfh; }; .Ed .Pp From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 17:02:51 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6C601065673; Tue, 23 Dec 2008 17:02:51 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 981898FC13; Tue, 23 Dec 2008 17:02:51 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id mBNH2iqa024891; Tue, 23 Dec 2008 09:02:44 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id mBNH2hnL024890; Tue, 23 Dec 2008 09:02:43 -0800 (PST) (envelope-from obrien) Date: Tue, 23 Dec 2008 09:02:43 -0800 From: "David O'Brien" To: "M. Warner Losh" Message-ID: <20081223170243.GA24817@dragon.NUXI.org> References: <200812181844.mBIIikVF049455@svn.freebsd.org> <20081218.131330.63052780.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081218.131330.63052780.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186291 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 17:02:51 -0000 On Thu, Dec 18, 2008 at 01:13:30PM -0700, M. Warner Losh wrote: > In message: <200812181844.mBIIikVF049455@svn.freebsd.org> > : Log: > : Be a little bit more pestimistic in argument handling - check if .. > : + if (MAX_ARGS <= argc ) > : + errx(1, "Cannot process more than %d mount arguments", > : + MAX_ARGS); > : + > > This is useless. Once you've overflowed the buffer, your stack is > potentially shot, and all kinds of fun can happen downstream from > there. In particular, there's no guarantee that argc isn't corrupted > as well... s/useless/almost useless/. I fully admit its a very thin safety belt (thus the "little bit" in the commit log). The test does catches small overflows, but yes argc could also be easily damaged. I missed pulling out the change to make 'argc' static (thus avoiding the that corruption issue), I also have another patch for you (I'll send privately). > Also, the style of the check is inconsistent with other parts of the > system: > > : + if (argc > MAX_ARGS) > > would be more consistent, and not suffer from the space before the > paren problem as well :) The space before the paren was a typo :-( Actually the only other test against 'argc' is "for (i = 1; i < argc; i++)" so there is consistancy. ;-) -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 17:36:25 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2EF1065670; Tue, 23 Dec 2008 17:36:25 +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 AA5488FC14; Tue, 23 Dec 2008 17:36:25 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNHaPT5008623; Tue, 23 Dec 2008 17:36:25 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNHaPh3008614; Tue, 23 Dec 2008 17:36:25 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812231736.mBNHaPh3008614@svn.freebsd.org> From: Andrew Thompson Date: Tue, 23 Dec 2008 17:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186439 - head/sys/dev/usb2/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 17:36:25 -0000 Author: thompsa Date: Tue Dec 23 17:36:25 2008 New Revision: 186439 URL: http://svn.freebsd.org/changeset/base/186439 Log: Name the bus mutex by the controller name, this allows each bus to be distinguished in lock profiling, etc. Modified: head/sys/dev/usb2/controller/at91dci_atmelarm.c head/sys/dev/usb2/controller/ehci2_pci.c head/sys/dev/usb2/controller/musb2_otg_atmelarm.c head/sys/dev/usb2/controller/ohci2_atmelarm.c head/sys/dev/usb2/controller/ohci2_pci.c head/sys/dev/usb2/controller/uhci2_pci.c head/sys/dev/usb2/controller/usb2_bus.h head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/uss820dci_atmelarm.c Modified: head/sys/dev/usb2/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/at91dci_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -147,6 +147,7 @@ at91_udp_attach(device_t dev) /* get all DMA memory */ + sc->sc_dci.sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_dci.sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); Modified: head/sys/dev/usb2/controller/ehci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2_pci.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/ehci2_pci.c Tue Dec 23 17:36:25 2008 (r186439) @@ -234,6 +234,7 @@ ehci_pci_attach(device_t self) } /* get all DMA memory */ + sc->sc_bus.parent = self; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ehci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/musb2_otg_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/musb2_otg_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -104,6 +104,7 @@ musbotg_attach(device_t dev) /* get all DMA memory */ + sc->sc_otg.sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_otg.sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); Modified: head/sys/dev/usb2/controller/ohci2_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/ohci2_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -75,6 +75,7 @@ ohci_atmelarm_attach(device_t dev) } /* get all DMA memory */ + sc->sc_ohci.sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_ohci.sc_bus, USB_GET_DMA_TAG(dev), &ohci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/ohci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_pci.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/ohci2_pci.c Tue Dec 23 17:36:25 2008 (r186439) @@ -202,6 +202,7 @@ ohci_pci_attach(device_t self) } /* get all DMA memory */ + sc->sc_bus.parent = self; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &ohci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/uhci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/uhci2_pci.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/uhci2_pci.c Tue Dec 23 17:36:25 2008 (r186439) @@ -253,6 +253,7 @@ uhci_pci_attach(device_t self) } /* get all DMA memory */ + sc->sc_bus.parent = self; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(self), &uhci_iterate_hw_softc)) { return ENOMEM; Modified: head/sys/dev/usb2/controller/usb2_bus.h ============================================================================== --- head/sys/dev/usb2/controller/usb2_bus.h Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/usb2_bus.h Tue Dec 23 17:36:25 2008 (r186439) @@ -59,6 +59,7 @@ struct usb2_bus { struct usb2_perm perm; struct usb2_xfer_queue intr_q; + device_t parent; device_t bdev; /* filled by HC driver */ struct usb2_dma_parent_tag dma_parent_tag[1]; Modified: head/sys/dev/usb2/controller/usb2_controller.c ============================================================================== --- head/sys/dev/usb2/controller/usb2_controller.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/usb2_controller.c Tue Dec 23 17:36:25 2008 (r186439) @@ -430,7 +430,7 @@ usb2_bus_mem_alloc_all(struct usb2_bus * bus->devices_max = USB_MAX_DEVICES; - mtx_init(&bus->bus_mtx, "USB bus lock", + mtx_init(&bus->bus_mtx, device_get_nameunit(bus->parent), NULL, MTX_DEF | MTX_RECURSE); TAILQ_INIT(&bus->intr_q.head); Modified: head/sys/dev/usb2/controller/uss820dci_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/uss820dci_atmelarm.c Tue Dec 23 16:54:00 2008 (r186438) +++ head/sys/dev/usb2/controller/uss820dci_atmelarm.c Tue Dec 23 17:36:25 2008 (r186439) @@ -140,6 +140,7 @@ uss820_atmelarm_attach(device_t dev) } /* get all DMA memory */ + sc->sc_bus.parent = dev; if (usb2_bus_mem_alloc_all(&sc->sc_bus, USB_GET_DMA_TAG(dev), NULL)) { return (ENOMEM); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 17:39:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8F0E1065673; Tue, 23 Dec 2008 17:39:24 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96BC98FC14; Tue, 23 Dec 2008 17:39:24 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNHdO7u008726; Tue, 23 Dec 2008 17:39:24 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNHdOex008725; Tue, 23 Dec 2008 17:39:24 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812231739.mBNHdOex008725@svn.freebsd.org> From: Tom Rhodes Date: Tue, 23 Dec 2008 17:39: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: r186440 - head/usr.sbin/syslogd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 17:39:24 -0000 Author: trhodes Date: Tue Dec 23 17:39:24 2008 New Revision: 186440 URL: http://svn.freebsd.org/changeset/base/186440 Log: Add "crit" to the list of keywords. PR: 126934 Modified: head/usr.sbin/syslogd/syslog.conf.5 Modified: head/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- head/usr.sbin/syslogd/syslog.conf.5 Tue Dec 23 17:36:25 2008 (r186439) +++ head/usr.sbin/syslogd/syslog.conf.5 Tue Dec 23 17:39:24 2008 (r186440) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd December 23, 2008 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -137,7 +137,7 @@ The .Em level describes the severity of the message, and is a keyword from the following ordered list (higher to lower): -.Cm emerg , alert , err , warning , notice , info +.Cm emerg , crit , alert , err , warning , notice , info and .Cm debug . These keywords correspond to @@ -446,7 +446,7 @@ A configuration file might appear as fol # level notice or higher, and anything of level err or # higher to the console. # Don't log private authentication messages! -*.err;kern.*;auth.notice;authpriv.none /dev/console +*.err;kern.*;auth.notice;authpriv.none;mail.crit /dev/console # Log anything (except mail) of level info or higher. # Don't log private authentication messages! From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 17:40:02 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94E881065677; Tue, 23 Dec 2008 17:40:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 816D98FC1F; Tue, 23 Dec 2008 17:40:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNHe2fU008782; Tue, 23 Dec 2008 17:40:02 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNHe2g6008780; Tue, 23 Dec 2008 17:40:02 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812231740.mBNHe2g6008780@svn.freebsd.org> From: Sam Leffler Date: Tue, 23 Dec 2008 17:40: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: r186441 - in head/sys: arm/xscale/ixp425 dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 17:40:02 -0000 Author: sam Date: Tue Dec 23 17:40:02 2008 New Revision: 186441 URL: http://svn.freebsd.org/changeset/base/186441 Log: move IXP4XX EHCI bus shim to the usb directory and rename Added: head/sys/dev/usb/ehci_ixp4xx.c (props changed) - copied unchanged from r186438, head/sys/arm/xscale/ixp425/ixp435_ehci.c Deleted: head/sys/arm/xscale/ixp425/ixp435_ehci.c Modified: head/sys/arm/xscale/ixp425/files.ixp425 Modified: head/sys/arm/xscale/ixp425/files.ixp425 ============================================================================== --- head/sys/arm/xscale/ixp425/files.ixp425 Tue Dec 23 17:39:24 2008 (r186440) +++ head/sys/arm/xscale/ixp425/files.ixp425 Tue Dec 23 17:40:02 2008 (r186441) @@ -45,4 +45,4 @@ IxNpeMicrocode.dat optional npe_fw \ # arm/xscale/ixp425/ixp425_qmgr.c optional qmgr # -arm/xscale/ixp425/ixp435_ehci.c optional ehci +dev/usb/ehci_ixp4xx.c optional ehci Copied: head/sys/dev/usb/ehci_ixp4xx.c (from r186438, head/sys/arm/xscale/ixp425/ixp435_ehci.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/ehci_ixp4xx.c Tue Dec 23 17:40:02 2008 (r186441, copy of r186438, head/sys/arm/xscale/ixp425/ixp435_ehci.c) @@ -0,0 +1,360 @@ +/*- + * Copyright (c) 2008 Sam Leffler. 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. + */ + +/* + * IXP435 attachment driver for the USB Enhanced Host Controller. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_bus.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include + +#define EHCI_VENDORID_IXP4XX 0x42fa05 +#define EHCI_HC_DEVSTR "IXP4XX Integrated USB 2.0 controller" + +struct ixp_ehci_softc { + ehci_softc_t base; /* storage for EHCI code */ + bus_space_tag_t iot; + bus_space_handle_t ioh; + struct bus_space tag; /* tag for private bus space ops */ +}; + +static int ehci_ixp_detach(device_t self); + +static uint8_t ehci_bs_r_1(void *, bus_space_handle_t, bus_size_t); +static void ehci_bs_w_1(void *, bus_space_handle_t, bus_size_t, u_int8_t); +static uint16_t ehci_bs_r_2(void *, bus_space_handle_t, bus_size_t); +static void ehci_bs_w_2(void *, bus_space_handle_t, bus_size_t, uint16_t); +static uint32_t ehci_bs_r_4(void *, bus_space_handle_t, bus_size_t); +static void ehci_bs_w_4(void *, bus_space_handle_t, bus_size_t, uint32_t); + +static int +ehci_ixp_suspend(device_t self) +{ + ehci_softc_t *sc; + int err; + + err = bus_generic_suspend(self); + if (err == 0) { + sc = device_get_softc(self); + ehci_power(PWR_SUSPEND, sc); + } + return err; +} + +static int +ehci_ixp_resume(device_t self) +{ + ehci_softc_t *sc = device_get_softc(self); + + ehci_power(PWR_RESUME, sc); + bus_generic_resume(self); + return 0; +} + +static int +ehci_ixp_shutdown(device_t self) +{ + ehci_softc_t *sc; + int err; + + err = bus_generic_shutdown(self); + if (err == 0) { + sc = device_get_softc(self); + ehci_shutdown(sc); + } + return err; +} + +static int +ehci_ixp_probe(device_t self) +{ + device_set_desc(self, EHCI_HC_DEVSTR); + return BUS_PROBE_DEFAULT; +} + +static int +ehci_ixp_attach(device_t self) +{ + struct ixp_ehci_softc *isc = device_get_softc(self); + ehci_softc_t *sc = &isc->base; + int err, rid; + + sc->sc_bus.usbrev = USBREV_2_0; + + /* NB: hints fix the memory location and irq */ + + rid = 0; + sc->io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, + &rid, RF_ACTIVE); + if (sc->io_res == NULL) { + device_printf(self, "Could not map memory\n"); + return ENXIO; + } + + /* + * Craft special resource for bus space ops that handle + * byte-alignment of non-word addresses. Also, since + * we're already intercepting bus space ops we handle + * the register window offset that could otherwise be + * done with bus_space_subregion. + */ + isc->iot = rman_get_bustag(sc->io_res); + isc->tag.bs_cookie = isc->iot; + /* read single */ + isc->tag.bs_r_1 = ehci_bs_r_1, + isc->tag.bs_r_2 = ehci_bs_r_2, + isc->tag.bs_r_4 = ehci_bs_r_4, + /* write (single) */ + isc->tag.bs_w_1 = ehci_bs_w_1, + isc->tag.bs_w_2 = ehci_bs_w_2, + isc->tag.bs_w_4 = ehci_bs_w_4, + + sc->iot = &isc->tag; + sc->ioh = rman_get_bushandle(sc->io_res); + sc->sc_size = IXP435_USB1_SIZE - 0x100; + + rid = 0; + sc->irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, + &rid, RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(self, "Could not allocate irq\n"); + ehci_ixp_detach(self); + return ENXIO; + } + sc->sc_bus.bdev = device_add_child(self, "usb", -1); + if (!sc->sc_bus.bdev) { + device_printf(self, "Could not add USB device\n"); + ehci_ixp_detach(self); + return ENOMEM; + } + device_set_ivars(sc->sc_bus.bdev, &sc->sc_bus); + + sprintf(sc->sc_vendor, "Intel"); + sc->sc_id_vendor = EHCI_VENDORID_IXP4XX; + + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, + NULL, (driver_intr_t*)ehci_intr, sc, &sc->ih); + if (err) { + device_printf(self, "Could not setup irq, %d\n", err); + sc->ih = NULL; + ehci_ixp_detach(self); + return ENXIO; + } + + /* There are no companion USB controllers */ + sc->sc_ncomp = 0; + + /* Allocate a parent dma tag for DMA maps */ + err = bus_dma_tag_create(bus_get_dma_tag(self), 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, + NULL, NULL, &sc->sc_bus.parent_dmatag); + if (err) { + device_printf(self, "Could not allocate parent DMA tag (%d)\n", + err); + ehci_ixp_detach(self); + return ENXIO; + } + + /* Allocate a dma tag for transfer buffers */ + err = bus_dma_tag_create(sc->sc_bus.parent_dmatag, 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + BUS_SPACE_MAXSIZE_32BIT, USB_DMA_NSEG, BUS_SPACE_MAXSIZE_32BIT, 0, + busdma_lock_mutex, &Giant, &sc->sc_bus.buffer_dmatag); + if (err) { + device_printf(self, "Could not allocate buffer DMA tag (%d)\n", + err); + ehci_ixp_detach(self); + return ENXIO; + } + + /* + * Arrange to force Host mode, select big-endian byte alignment, + * and arrange to not terminate reset operations (the adapter + * will ignore it if we do but might as well save a reg write). + * Also, the controller has an embedded Transaction Translator + * which means port speed must be read from the Port Status + * register following a port enable. + */ + sc->sc_flags |= EHCI_SCFLG_TT + | EHCI_SCFLG_SETMODE + | EHCI_SCFLG_BIGEDESC + | EHCI_SCFLG_BIGEMMIO + | EHCI_SCFLG_NORESTERM + ; + (void) ehci_reset(sc); + + err = ehci_init(sc); + if (!err) { + sc->sc_flags |= EHCI_SCFLG_DONEINIT; + err = device_probe_and_attach(sc->sc_bus.bdev); + } + + if (err) { + device_printf(self, "USB init failed err=%d\n", err); + ehci_ixp_detach(self); + return EIO; + } + return 0; +} + +static int +ehci_ixp_detach(device_t self) +{ + struct ixp_ehci_softc *isc = device_get_softc(self); + ehci_softc_t *sc = &isc->base; + int err; + + if (sc->sc_flags & EHCI_SCFLG_DONEINIT) { + ehci_detach(sc, 0); + sc->sc_flags &= ~EHCI_SCFLG_DONEINIT; + } + + /* + * Disable interrupts that might have been switched on in ehci_init() + */ + if (sc->iot && sc->ioh) + bus_space_write_4(sc->iot, sc->ioh, EHCI_USBINTR, 0); + if (sc->sc_bus.parent_dmatag != NULL) + bus_dma_tag_destroy(sc->sc_bus.parent_dmatag); + if (sc->sc_bus.buffer_dmatag != NULL) + bus_dma_tag_destroy(sc->sc_bus.buffer_dmatag); + + if (sc->irq_res && sc->ih) { + err = bus_teardown_intr(self, sc->irq_res, sc->ih); + + if (err) + device_printf(self, "Could not tear down irq, %d\n", + err); + sc->ih = NULL; + } + if (sc->sc_bus.bdev != NULL) { + device_delete_child(self, sc->sc_bus.bdev); + sc->sc_bus.bdev = NULL; + } + if (sc->irq_res != NULL) { + bus_release_resource(self, SYS_RES_IRQ, 0, sc->irq_res); + sc->irq_res = NULL; + } + if (sc->io_res != NULL) { + bus_release_resource(self, SYS_RES_MEMORY, 0, sc->io_res); + sc->io_res = NULL; + } + sc->iot = 0; + sc->ioh = 0; + return 0; +} + +/* + * Bus space accessors for PIO operations. + */ + +static uint8_t +ehci_bs_r_1(void *t, bus_space_handle_t h, bus_size_t o) +{ + return bus_space_read_1((bus_space_tag_t) t, h, + 0x100 + (o &~ 3) + (3 - (o & 3))); +} + +static void +ehci_bs_w_1(void *t, bus_space_handle_t h, bus_size_t o, u_int8_t v) +{ + panic("%s", __func__); +} + +static uint16_t +ehci_bs_r_2(void *t, bus_space_handle_t h, bus_size_t o) +{ + return bus_space_read_2((bus_space_tag_t) t, h, + 0x100 + (o &~ 3) + (2 - (o & 3))); +} + +static void +ehci_bs_w_2(void *t, bus_space_handle_t h, bus_size_t o, uint16_t v) +{ + panic("%s", __func__); +} + +static uint32_t +ehci_bs_r_4(void *t, bus_space_handle_t h, bus_size_t o) +{ + return bus_space_read_4((bus_space_tag_t) t, h, 0x100 + o); +} + +static void +ehci_bs_w_4(void *t, bus_space_handle_t h, bus_size_t o, uint32_t v) +{ + bus_space_write_4((bus_space_tag_t) t, h, 0x100 + o, v); +} + +static device_method_t ehci_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, ehci_ixp_probe), + DEVMETHOD(device_attach, ehci_ixp_attach), + DEVMETHOD(device_detach, ehci_ixp_detach), + DEVMETHOD(device_suspend, ehci_ixp_suspend), + DEVMETHOD(device_resume, ehci_ixp_resume), + DEVMETHOD(device_shutdown, ehci_ixp_shutdown), + + /* Bus interface */ + DEVMETHOD(bus_print_child, bus_generic_print_child), + + {0, 0} +}; + +static driver_t ehci_driver = { + "ehci", + ehci_methods, + sizeof(struct ixp_ehci_softc), +}; +static devclass_t ehci_devclass; +DRIVER_MODULE(ehci, ixp, ehci_driver, ehci_devclass, 0, 0); From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 17:57:18 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5198A1065676; Tue, 23 Dec 2008 17:57:18 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FA9F8FC14; Tue, 23 Dec 2008 17:57:18 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNHvIbo009239; Tue, 23 Dec 2008 17:57:18 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNHvI9c009238; Tue, 23 Dec 2008 17:57:18 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812231757.mBNHvI9c009238@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 23 Dec 2008 17:57: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: r186444 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 17:57:18 -0000 Author: obrien Date: Tue Dec 23 17:57:17 2008 New Revision: 186444 URL: http://svn.freebsd.org/changeset/base/186444 Log: Make signal handler safer. Submitted by: Jaakko Heinonen Modified: head/usr.sbin/burncd/burncd.c Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Tue Dec 23 17:55:37 2008 (r186443) +++ head/usr.sbin/burncd/burncd.c Tue Dec 23 17:57:17 2008 (r186444) @@ -58,7 +58,8 @@ struct track_info { int addr; }; static struct track_info tracks[100]; -static int global_fd_for_cleanup, quiet, verbose, saved_block_size, notracks; +static int quiet, verbose, saved_block_size, notracks; +static volatile int global_fd_for_cleanup; void add_track(char *, int, int, int); void do_DAO(int fd, int, int); @@ -716,11 +717,12 @@ cleanup_flush(void) } void -cleanup_signal(int sig __unused) +cleanup_signal(int sig) { - cleanup_flush(); - fprintf(stderr, "\n"); - errx(EXIT_FAILURE, "Aborted"); + signal(sig, SIG_IGN); + ioctl(global_fd_for_cleanup, CDRIOCFLUSH); + write(STDERR_FILENO, "\nAborted\n", 10); + _exit(EXIT_FAILURE); } void From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 18:00:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BEAC1065675; Tue, 23 Dec 2008 18:00:33 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A3748FC1E; Tue, 23 Dec 2008 18:00:33 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNI0Xlb009361; Tue, 23 Dec 2008 18:00:33 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNI0XZW009360; Tue, 23 Dec 2008 18:00:33 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812231800.mBNI0XZW009360@svn.freebsd.org> From: Tom Rhodes Date: Tue, 23 Dec 2008 18:00: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: r186445 - head/share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 18:00:33 -0000 Author: trhodes Date: Tue Dec 23 18:00:33 2008 New Revision: 186445 URL: http://svn.freebsd.org/changeset/base/186445 Log: Netgroup database can be centralized via NIS, list it. Add a missing comma and bump doc date. PR: 127602 Submitted by: Dmitry Sivachenko Modified: head/share/man/man5/nsswitch.conf.5 Modified: head/share/man/man5/nsswitch.conf.5 ============================================================================== --- head/share/man/man5/nsswitch.conf.5 Tue Dec 23 17:57:17 2008 (r186444) +++ head/share/man/man5/nsswitch.conf.5 Tue Dec 23 18:00:33 2008 (r186445) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 22, 2007 +.Dd December 23, 2008 .Dt NSSWITCH.CONF 5 .Os .Sh NAME @@ -141,9 +141,13 @@ The following databases are used by the .Xr getrpcbynumber 3 , .Xr getrpcent 3 .It proto -.Xr getprotobyname 3 +.Xr getprotobyname 3 , .Xr getprotobynumber 3 , .Xr getprotoent 3 +.It netgroup +.Xr getnetgrent 3 , +.Xr setnetgrent 3 , +.Xr innetgr 3 .El .Ss Status codes The following status codes are available: From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 18:23:15 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A61F21065674; Tue, 23 Dec 2008 18:23:15 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 85B508FC12; Tue, 23 Dec 2008 18:23:15 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id mBNINFRH027128; Tue, 23 Dec 2008 10:23:15 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id mBNINE30027127; Tue, 23 Dec 2008 10:23:14 -0800 (PST) (envelope-from obrien) Date: Tue, 23 Dec 2008 10:23:14 -0800 From: "David O'Brien" To: "Carlos A. M. dos Santos" Message-ID: <20081223182314.GC25145@dragon.NUXI.org> References: <200812192020.mBJKKEIo081792@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 18:23:15 -0000 On Sun, Dec 21, 2008 at 10:15:21AM -0200, Carlos A. M. dos Santos wrote: > On Fri, Dec 19, 2008 at 6:20 PM, David E. O'Brien wrote: > > Author: obrien > > Date: Fri Dec 19 20:20:14 2008 > > New Revision: 186337 > > URL: http://svn.freebsd.org/changeset/base/186337 > > > > Log: > > burncd(8) doesn't handle signals and interrupting burncd during operation. > > For example, ^C (SIGINT) may leave the drive spinning and locked. > > This may also happen if you try to write a too-large image to a disc > > and burncd(8) exits with an I/O error. > > > > Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave > > burner in a sane state when burning is interrupted with SIGHUP, SIGINT, > > SIGTERM, or in case an I/O error occurs during write. > > Note, that blanking will still continue after interrupt but it seems to > > finish correctly even after burncd(8) has quit. > > > > Also, while I'm here bump WARNS to "6". > > > > PR: 48730 > > Submitted by: Jaakko Heinonen > > While you are here, would you mind taking a look at bin/123693, either > committing the proposed patch or closing the PR if my proposition is > not acceptable? Yep, I already have that patch to look at. Note it was hell getting the patch - its best to not attach it when it will be base64 encoded - we have no easy way of extracting such encoded attachements. -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 19:15:04 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B233F1065673; Tue, 23 Dec 2008 19:15:04 +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 950388FC0C; Tue, 23 Dec 2008 19:15:04 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNJF4tv011082; Tue, 23 Dec 2008 19:15:04 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNJF4Eo011078; Tue, 23 Dec 2008 19:15:04 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200812231915.mBNJF4Eo011078@svn.freebsd.org> From: Doug Barton Date: Tue, 23 Dec 2008 19:15: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: r186450 - in head/lib/bind/dns: . dns X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 19:15:04 -0000 Author: dougb Date: Tue Dec 23 19:15:04 2008 New Revision: 186450 URL: http://svn.freebsd.org/changeset/base/186450 Log: Update copyrights and comments as of 9.4.3 (no functional changes) Modified: head/lib/bind/dns/code.h head/lib/bind/dns/dns/enumclass.h head/lib/bind/dns/dns/enumtype.h head/lib/bind/dns/dns/rdatastruct.h Modified: head/lib/bind/dns/code.h ============================================================================== --- head/lib/bind/dns/code.h Tue Dec 23 18:36:21 2008 (r186449) +++ head/lib/bind/dns/code.h Tue Dec 23 19:15:04 2008 (r186450) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: head/lib/bind/dns/dns/enumclass.h ============================================================================== --- head/lib/bind/dns/dns/enumclass.h Tue Dec 23 18:36:21 2008 (r186449) +++ head/lib/bind/dns/dns/enumclass.h Tue Dec 23 19:15:04 2008 (r186450) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: head/lib/bind/dns/dns/enumtype.h ============================================================================== --- head/lib/bind/dns/dns/enumtype.h Tue Dec 23 18:36:21 2008 (r186449) +++ head/lib/bind/dns/dns/enumtype.h Tue Dec 23 19:15:04 2008 (r186450) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: head/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- head/lib/bind/dns/dns/rdatastruct.h Tue Dec 23 18:36:21 2008 (r186449) +++ head/lib/bind/dns/dns/rdatastruct.h Tue Dec 23 19:15:04 2008 (r186450) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -1608,10 +1608,10 @@ typedef struct dns_rdata_rrsig { #endif /* GENERIC_DNSSIG_46_H */ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -1627,10 +1627,10 @@ typedef struct dns_rdata_rrsig { #ifndef GENERIC_NSEC_47_H #define GENERIC_NSEC_47_H 1 -/* $Id: nsec_47.h,v 1.4.20.2 2005/04/29 00:16:37 marka Exp $ */ +/* $Id: nsec_47.h,v 1.4.20.4 2008/07/15 23:46:14 tbox Exp $ */ /*! - * \brief Per draft-ietf-dnsext-nsec-rdata-01.txt */ + * \brief Per RFC 3845 */ typedef struct dns_rdata_nsec { dns_rdatacommon_t common; From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 19:46:12 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7A61106567B; Tue, 23 Dec 2008 19:46:12 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94FC18FC26; Tue, 23 Dec 2008 19:46:12 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNJkCuQ011769; Tue, 23 Dec 2008 19:46:12 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNJkCqI011768; Tue, 23 Dec 2008 19:46:12 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200812231946.mBNJkCqI011768@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 23 Dec 2008 19:46: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: r186453 - head/tools/tools X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 19:46:12 -0000 Author: gnn Date: Tue Dec 23 19:46:12 2008 New Revision: 186453 URL: http://svn.freebsd.org/changeset/base/186453 Log: Add the mctest program and description to the README. Modified: head/tools/tools/README Modified: head/tools/tools/README ============================================================================== --- head/tools/tools/README Tue Dec 23 19:19:45 2008 (r186452) +++ head/tools/tools/README Tue Dec 23 19:46:12 2008 (r186453) @@ -38,6 +38,7 @@ kernelcruft Shellscript to find orphaned kerninclude Shellscript to find unused #includes in the kernel. kernxref Shellscript to cross reference symbols in the LINT kernel. kttcp An in-kernel version of the ttcp network performance tool +mctest A multicast test program mfc Merge a directory from HEAD to a branch where it does not already exist and other MFC related script(s). mid Create a Message-ID database for mailing lists. From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 19:59:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B7051065678; Tue, 23 Dec 2008 19:59: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 868638FC25; Tue, 23 Dec 2008 19:59:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNJxMf8012072; Tue, 23 Dec 2008 19:59:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNJxLTL012053; Tue, 23 Dec 2008 19:59:21 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812231959.mBNJxLTL012053@svn.freebsd.org> From: Andrew Thompson Date: Tue, 23 Dec 2008 19:59: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: r186454 - in head/sys/dev/usb2: controller core ethernet input serial wlan X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 19:59:22 -0000 Author: thompsa Date: Tue Dec 23 19:59:21 2008 New Revision: 186454 URL: http://svn.freebsd.org/changeset/base/186454 Log: Remove CALLOUT_RETURNUNLOCKED from the callouts, there is no reason for them to drop the lock for us. Modified: head/sys/dev/usb2/controller/at91dci.c head/sys/dev/usb2/controller/ehci2.c head/sys/dev/usb2/controller/musb2_otg.c head/sys/dev/usb2/controller/ohci2.c head/sys/dev/usb2/controller/uhci2.c head/sys/dev/usb2/controller/uss820dci.c head/sys/dev/usb2/core/usb2_transfer.c head/sys/dev/usb2/ethernet/if_aue2.c head/sys/dev/usb2/ethernet/if_axe2.c head/sys/dev/usb2/ethernet/if_cue2.c head/sys/dev/usb2/ethernet/if_kue2.c head/sys/dev/usb2/ethernet/if_rue2.c head/sys/dev/usb2/ethernet/if_udav2.c head/sys/dev/usb2/input/ukbd2.c head/sys/dev/usb2/input/ums2.c head/sys/dev/usb2/serial/ulpt2.c head/sys/dev/usb2/wlan/if_rum2.c head/sys/dev/usb2/wlan/if_ural2.c head/sys/dev/usb2/wlan/if_zyd2.c Modified: head/sys/dev/usb2/controller/at91dci.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/controller/at91dci.c Tue Dec 23 19:59:21 2008 (r186454) @@ -1043,16 +1043,13 @@ static void at91dci_timeout(void *arg) { struct usb2_xfer *xfer = arg; - struct at91dci_softc *sc = xfer->usb2_sc; DPRINTF("xfer=%p\n", xfer); - USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); /* transfer is transferred */ at91dci_device_done(xfer, USB_ERR_TIMEOUT); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void Modified: head/sys/dev/usb2/controller/ehci2.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/controller/ehci2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -213,8 +213,7 @@ ehci_init(ehci_softc_t *sc) DPRINTF("start\n"); - usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, - CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_tmo_pcd, &sc->sc_bus.bus_mtx, 0); #if USB_DEBUG if (ehcidebug > 2) { @@ -1411,8 +1410,6 @@ ehci_pcd_enable(ehci_softc_t *sc) usb2_sw_transfer(&sc->sc_root_intr, &ehci_root_intr_done); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void @@ -1511,16 +1508,13 @@ static void ehci_timeout(void *arg) { struct usb2_xfer *xfer = arg; - ehci_softc_t *sc = xfer->usb2_sc; DPRINTF("xfer=%p\n", xfer); - USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); /* transfer is transferred */ ehci_device_done(xfer, USB_ERR_TIMEOUT); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void Modified: head/sys/dev/usb2/controller/musb2_otg.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/controller/musb2_otg.c Tue Dec 23 19:59:21 2008 (r186454) @@ -1252,16 +1252,13 @@ static void musbotg_timeout(void *arg) { struct usb2_xfer *xfer = arg; - struct musbotg_softc *sc = xfer->usb2_sc; DPRINTFN(1, "xfer=%p\n", xfer); - USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); /* transfer is transferred */ musbotg_device_done(xfer, USB_ERR_TIMEOUT); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void Modified: head/sys/dev/usb2/controller/ohci2.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/controller/ohci2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -390,8 +390,7 @@ ohci_init(ohci_softc_t *sc) /* set up the bus struct */ sc->sc_bus.methods = &ohci_bus_methods; - usb2_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.bus_mtx, - CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_tmo_rhsc, &sc->sc_bus.bus_mtx, 0); #if USB_DEBUG if (ohcidebug > 15) { @@ -1095,8 +1094,6 @@ ohci_rhsc_enable(ohci_softc_t *sc) usb2_sw_transfer(&sc->sc_root_intr, &ohci_root_intr_done); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void @@ -1240,16 +1237,13 @@ static void ohci_timeout(void *arg) { struct usb2_xfer *xfer = arg; - ohci_softc_t *sc = xfer->usb2_sc; DPRINTF("xfer=%p\n", xfer); - USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); /* transfer is transferred */ ohci_device_done(xfer, USB_ERR_TIMEOUT); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void @@ -2335,10 +2329,8 @@ ohci_root_ctrl_done(struct usb2_xfer *xf case UHF_C_PORT_OVER_CURRENT: case UHF_C_PORT_RESET: /* enable RHSC interrupt if condition is cleared. */ - if ((OREAD4(sc, port) >> 16) == 0) { + if ((OREAD4(sc, port) >> 16) == 0) ohci_rhsc_enable(sc); - USB_BUS_LOCK(&sc->sc_bus); - } break; default: break; Modified: head/sys/dev/usb2/controller/uhci2.c ============================================================================== --- head/sys/dev/usb2/controller/uhci2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/controller/uhci2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -1494,16 +1494,13 @@ static void uhci_timeout(void *arg) { struct usb2_xfer *xfer = arg; - uhci_softc_t *sc = xfer->usb2_sc; DPRINTF("xfer=%p\n", xfer); - USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); /* transfer is transferred */ uhci_device_done(xfer, USB_ERR_TIMEOUT); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void @@ -2912,7 +2909,6 @@ uhci_root_intr_check(void *arg) usb2_sw_transfer(&sc->sc_root_intr, &uhci_root_intr_done); } - USB_BUS_UNLOCK(&sc->sc_bus); } struct usb2_pipe_methods uhci_root_intr_methods = Modified: head/sys/dev/usb2/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb2/controller/uss820dci.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/controller/uss820dci.c Tue Dec 23 19:59:21 2008 (r186454) @@ -973,16 +973,13 @@ static void uss820dci_timeout(void *arg) { struct usb2_xfer *xfer = arg; - struct uss820dci_softc *sc = xfer->usb2_sc; DPRINTF("xfer=%p\n", xfer); - USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); + USB_BUS_LOCK_ASSERT(xfer->udev->bus, MA_OWNED); /* transfer is transferred */ uss820dci_device_done(xfer, USB_ERR_TIMEOUT); - - USB_BUS_UNLOCK(&sc->sc_bus); } static void Modified: head/sys/dev/usb2/core/usb2_transfer.c ============================================================================== --- head/sys/dev/usb2/core/usb2_transfer.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/core/usb2_transfer.c Tue Dec 23 19:59:21 2008 (r186454) @@ -880,7 +880,7 @@ usb2_transfer_setup(struct usb2_device * info->setup_refcount++; usb2_callout_init_mtx(&xfer->timeout_handle, - &udev->bus->bus_mtx, CALLOUT_RETURNUNLOCKED); + &udev->bus->bus_mtx, 0); } else { /* * Setup a dummy xfer, hence we are @@ -1950,8 +1950,6 @@ usb2_dma_delay_done_cb(void *arg) /* queue callback for execution, again */ usb2_transfer_done(xfer, 0); - - USB_BUS_UNLOCK(xfer->udev->bus); } /*------------------------------------------------------------------------* @@ -2092,7 +2090,6 @@ usb2_transfer_start_cb(void *arg) } else { xfer->flags_int.can_cancel_immed = 0; } - USB_BUS_UNLOCK(xfer->udev->bus); } /*------------------------------------------------------------------------* @@ -2707,14 +2704,9 @@ usb2_callout_poll(struct usb2_xfer *xfer usb2_callout_stop(co); (cb) (arg); - - /* the callback should drop the mutex */ - } else { - mtx_unlock(mtx); } - } else { - mtx_unlock(mtx); } + mtx_unlock(mtx); } Modified: head/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_aue2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/ethernet/if_aue2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -770,8 +770,7 @@ aue_attach(device_t dev) mtx_init(&sc->sc_mtx, "aue lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = AUE_IFACE_IDX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -798,10 +797,8 @@ aue_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &aue_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - aue_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -1475,8 +1472,6 @@ aue_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &aue_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } /* Modified: head/sys/dev/usb2/ethernet/if_axe2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_axe2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/ethernet/if_axe2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -597,8 +597,7 @@ axe_attach(device_t dev) mtx_init(&sc->sc_mtx, "axe lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = AXE_IFACE_IDX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -625,10 +624,8 @@ axe_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &axe_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - axe_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -1423,8 +1420,6 @@ axe_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &axe_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } /* Modified: head/sys/dev/usb2/ethernet/if_cue2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_cue2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/ethernet/if_cue2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -408,8 +408,7 @@ cue_attach(device_t dev) mtx_init(&sc->sc_mtx, "cue lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = CUE_IFACE_IDX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -433,10 +432,8 @@ cue_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &cue_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - cue_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -879,8 +876,6 @@ cue_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &cue_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } /* Modified: head/sys/dev/usb2/ethernet/if_kue2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_kue2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/ethernet/if_kue2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -470,8 +470,7 @@ kue_attach(device_t dev) mtx_init(&sc->sc_mtx, "kue lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = KUE_IFACE_IDX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -495,10 +494,8 @@ kue_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &kue_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - kue_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -935,8 +932,6 @@ kue_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &kue_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } static void Modified: head/sys/dev/usb2/ethernet/if_rue2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_rue2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/ethernet/if_rue2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -651,8 +651,7 @@ rue_attach(device_t dev) mtx_init(&sc->sc_mtx, "rue lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = RUE_IFACE_IDX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -679,10 +678,8 @@ rue_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &rue_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - rue_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -1299,8 +1296,6 @@ rue_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &rue_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } /* Modified: head/sys/dev/usb2/ethernet/if_udav2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_udav2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/ethernet/if_udav2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -282,8 +282,7 @@ udav_attach(device_t dev) mtx_init(&sc->sc_mtx, "udav lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = UDAV_IFACE_INDEX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -309,10 +308,8 @@ udav_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &udav_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - udav_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -1080,8 +1077,6 @@ udav_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &udav_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } /* Modified: head/sys/dev/usb2/input/ukbd2.c ============================================================================== --- head/sys/dev/usb2/input/ukbd2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/input/ukbd2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -445,8 +445,6 @@ ukbd_timeout(void *arg) ukbd_interrupt(sc); usb2_callout_reset(&sc->sc_callout, hz / 40, &ukbd_timeout, sc); - - mtx_unlock(&Giant); } static void @@ -639,8 +637,7 @@ ukbd_attach(device_t dev) sc->sc_mode = K_XLATE; sc->sc_iface = uaa->iface; - usb2_callout_init_mtx(&sc->sc_callout, &Giant, - CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_callout, &Giant, 0); err = usb2_transfer_setup(uaa->device, &uaa->info.bIfaceIndex, sc->sc_xfer, ukbd_config, @@ -705,8 +702,8 @@ ukbd_attach(device_t dev) /* start the timer */ - ukbd_timeout(sc); /* will unlock mutex */ - + ukbd_timeout(sc); + mtx_unlock(&Giant); return (0); /* success */ detach: Modified: head/sys/dev/usb2/input/ums2.c ============================================================================== --- head/sys/dev/usb2/input/ums2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/input/ums2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -153,8 +153,6 @@ ums_put_queue_timeout(void *__sc) mtx_assert(&sc->sc_mtx, MA_OWNED); ums_put_queue(sc, 0, 0, 0, 0, 0); - - mtx_unlock(&sc->sc_mtx); } static void @@ -415,8 +413,7 @@ ums_attach(device_t dev) mtx_init(&sc->sc_mtx, "ums lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_callout, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_callout, &sc->sc_mtx, 0); /* * Force the report (non-boot) protocol. Modified: head/sys/dev/usb2/serial/ulpt2.c ============================================================================== --- head/sys/dev/usb2/serial/ulpt2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/serial/ulpt2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -560,8 +560,7 @@ ulpt_attach(device_t dev) mtx_init(&sc->sc_mtx, "ulpt lock", NULL, MTX_DEF | MTX_RECURSE); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); /* search through all the descriptors looking for bidir mode */ @@ -671,9 +670,8 @@ found: /* start reading of status */ mtx_lock(&sc->sc_mtx); - - ulpt_watchdog(sc); /* will unlock mutex */ - + ulpt_watchdog(sc); + mtx_unlock(&sc->sc_mtx); return (0); detach: @@ -762,8 +760,6 @@ ulpt_watchdog(void *arg) usb2_callout_reset(&sc->sc_watchdog, hz, &ulpt_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } static devclass_t ulpt_devclass; Modified: head/sys/dev/usb2/wlan/if_rum2.c ============================================================================== --- head/sys/dev/usb2/wlan/if_rum2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/wlan/if_rum2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -475,8 +475,7 @@ rum_attach(device_t dev) sc->sc_udev = uaa->device; sc->sc_unit = device_get_unit(dev); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = RT2573_IFACE_INDEX; error = usb2_transfer_setup(uaa->device, &iface_index, @@ -501,10 +500,8 @@ rum_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &rum_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - rum_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -1417,8 +1414,6 @@ rum_watchdog(void *arg) } usb2_callout_reset(&sc->sc_watchdog, hz, &rum_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } static void Modified: head/sys/dev/usb2/wlan/if_ural2.c ============================================================================== --- head/sys/dev/usb2/wlan/if_ural2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/wlan/if_ural2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -468,8 +468,7 @@ ural_attach(device_t dev) sc->sc_udev = uaa->device; sc->sc_unit = device_get_unit(dev); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); iface_index = RAL_IFACE_INDEX; error = usb2_transfer_setup(uaa->device, @@ -496,10 +495,8 @@ ural_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &ural_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - ural_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); /* success */ detach: @@ -1405,8 +1402,6 @@ ural_watchdog(void *arg) } usb2_callout_reset(&sc->sc_watchdog, hz, &ural_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } /*========================================================================* Modified: head/sys/dev/usb2/wlan/if_zyd2.c ============================================================================== --- head/sys/dev/usb2/wlan/if_zyd2.c Tue Dec 23 19:46:12 2008 (r186453) +++ head/sys/dev/usb2/wlan/if_zyd2.c Tue Dec 23 19:59:21 2008 (r186454) @@ -1080,8 +1080,7 @@ zyd_attach(device_t dev) usb2_cv_init(&sc->sc_intr_cv, "IWAIT"); - usb2_callout_init_mtx(&sc->sc_watchdog, - &sc->sc_mtx, CALLOUT_RETURNUNLOCKED); + usb2_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); /* * Endpoint 1 = Bulk out (512b @ high speed / 64b @ full speed) @@ -1111,10 +1110,8 @@ zyd_attach(device_t dev) usb2_config_td_queue_command (&sc->sc_config_td, NULL, &zyd_cfg_first_time_setup, 0, 0); - /* start watchdog (will exit mutex) */ - zyd_watchdog(sc); - + mtx_unlock(&sc->sc_mtx); return (0); detach: @@ -2761,8 +2758,6 @@ zyd_watchdog(void *arg) } usb2_callout_reset(&sc->sc_watchdog, hz, &zyd_watchdog, sc); - - mtx_unlock(&sc->sc_mtx); } static void From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 20:04:32 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E8101065674; Tue, 23 Dec 2008 20:04:32 +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 2BC128FC1A; Tue, 23 Dec 2008 20:04:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNK4VbV012219; Tue, 23 Dec 2008 20:04:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNK4VPP012218; Tue, 23 Dec 2008 20:04:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812232004.mBNK4VPP012218@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 23 Dec 2008 20:04: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: r186455 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 20:04:32 -0000 Author: kib Date: Tue Dec 23 20:04:31 2008 New Revision: 186455 URL: http://svn.freebsd.org/changeset/base/186455 Log: Keep the hold on the vnode during VOP_VPTOCNP() call, allowing the vop implementation to drop vnode lock, if needed. Reported and tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Dec 23 19:59:21 2008 (r186454) +++ head/sys/kern/vfs_cache.c Tue Dec 23 20:04:31 2008 (r186455) @@ -851,9 +851,9 @@ vn_vptocnp(struct vnode **vp, char **bp, CACHE_UNLOCK(); vfslocked = VFS_LOCK_GIANT((*vp)->v_mount); vn_lock(*vp, LK_SHARED | LK_RETRY); - vdrop(*vp); error = VOP_VPTOCNP(*vp, &dvp, buf, buflen); VOP_UNLOCK(*vp, 0); + vdrop(*vp); VFS_UNLOCK_GIANT(vfslocked); if (error) { numfullpathfail2++; From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 20:07:51 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF0CB1065674; Tue, 23 Dec 2008 20:07:51 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC2658FC18; Tue, 23 Dec 2008 20:07:51 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNK7pQ2012309; Tue, 23 Dec 2008 20:07:51 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNK7pFq012308; Tue, 23 Dec 2008 20:07:51 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200812232007.mBNK7pFq012308@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 23 Dec 2008 20:07: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: r186456 - head/tools/tools/mctest X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 20:07:51 -0000 Author: gnn Date: Tue Dec 23 20:07:51 2008 New Revision: 186456 URL: http://svn.freebsd.org/changeset/base/186456 Log: Fix a bug in the man page where we were not showing the correct flags in the explanation. Several of the flags were -i, since it was a copy/paste operation. Modified: head/tools/tools/mctest/mctest.1 Modified: head/tools/tools/mctest/mctest.1 ============================================================================== --- head/tools/tools/mctest/mctest.1 Tue Dec 23 20:04:31 2008 (r186455) +++ head/tools/tools/mctest/mctest.1 Tue Dec 23 20:07:51 2008 (r186456) @@ -59,9 +59,9 @@ The options are as follows: .Bl -tag -width ".Fl d Ar argument" .It Fl i Ar interface Network interface, which can be found with ifconfig(1). -.It Fl i Ar group +.It Fl g Ar group Multicast group -.It Fl i Ar base port +.It Fl b Ar base port Port on which to listen .It Fl s Ar size Packet size in bytes. From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 20:25:05 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2030A106564A; Tue, 23 Dec 2008 20:25:05 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B3E88FC1A; Tue, 23 Dec 2008 20:25:05 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNKP4R2012701; Tue, 23 Dec 2008 20:25:04 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNKP4FT012697; Tue, 23 Dec 2008 20:25:04 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200812232025.mBNKP4FT012697@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 23 Dec 2008 20:25: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: r186457 - in head/tools/tools: . ether_reflect X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 20:25:05 -0000 Author: gnn Date: Tue Dec 23 20:25:04 2008 New Revision: 186457 URL: http://svn.freebsd.org/changeset/base/186457 Log: Add a new program, ether_reflect, which is useful in testing ethernet devices and switches. Added: head/tools/tools/ether_reflect/ head/tools/tools/ether_reflect/Makefile (contents, props changed) head/tools/tools/ether_reflect/ether_reflect.1 (contents, props changed) head/tools/tools/ether_reflect/ether_reflect.c (contents, props changed) Modified: head/tools/tools/README Modified: head/tools/tools/README ============================================================================== --- head/tools/tools/README Tue Dec 23 20:07:51 2008 (r186456) +++ head/tools/tools/README Tue Dec 23 20:25:04 2008 (r186457) @@ -19,6 +19,7 @@ diffburst OBSOLETE: equivalent functiona For example: "split -p ^diff < patchfile". See split(1). editing Editor modes and the like to help editing FreeBSD code. epfe Extract printing filter examples from printing.sgml. +ether_reflect An Ethernet packet reflector for low level testing. find-sb Scan a disk for possible filesystem superblocks. gdb_regofs A simple tool that prints out a register offset table for mapping gdb(1) register numbers to struct reg and Added: head/tools/tools/ether_reflect/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ether_reflect/Makefile Tue Dec 23 20:25:04 2008 (r186457) @@ -0,0 +1,10 @@ +# +# $FreeBSD$ +# +# A Makefile that builds both the ether_reflect program and its manual page. + +PROG= ether_reflect + +LDADD+= -lpcap + +.include Added: head/tools/tools/ether_reflect/ether_reflect.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ether_reflect/ether_reflect.1 Tue Dec 23 20:25:04 2008 (r186457) @@ -0,0 +1,108 @@ +.\" Copyright (c) 2008 George V. Neville-Neil +.\" 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 December 23, 2008 +.Dt ether_reflect 1 +.Os +.Sh NAME +.Nm ether_reflect +.Nd "reflect ethernet packets" +.Sh SYNOPSIS +.Nm +.Op Fl a Ar ethernet address +.Op Fl e Ar ethertype +.Op Fl i Ar interface +.Op Fl t Ar timeout +.Op Fl p +.Op Fl d +.Sh DESCRIPTION +The +.Nm +command implements a simple ethernet packet reflector using the +.Xr PCAP 3 +library and +.Xr bpf 4 , +the Berkeley Packet Filter. The program is useful primarily to test +the low level round trip time of packets through an Ethernet interface +and/or a switch. Network protocols, such as IP, and the network stack +in general are never invoked, only the device driver that implements +the particular interface is executed. As the +.Nm +command uses the +.Xr bpf 4 +device the user must have root privileges to execute this program. +.Pp +The options are as follows: +.Bl -tag -width ".Fl d Ar argument" +.It Fl a Ar address +Instead of reversing the ethernet destination and source addresses +supply a different destination ethernet address for each packet +received. +.It Fl e Ar ether type +Use a different ethertype than the default, 0x8822, which is the IEEE +ether type for driver testing. +.It Fl i Ar interface +Network interface, which can be found with ifconfig(1). +.It Fl t Ar timeout +The time, in milliseconds, to wait for a packet. Lower times decrease +latency at the cost of CPU. +.It Fl p +Set the device into promiscuous mode before testing. This is not +usually necessary. +.It Fl d +Debug output. Print various small pieces of debug information. +.El +.Sh EXAMPLES +The following is an example of a typical usage +of the +.Nm +command: +.Pp +.Dl "ether_reflect -i em0 -t 1" +.Pp +Reflect all test packets, those with an ether type of 0x8822, which +are seen on ineterface em0. The timeout is 1 millisecond. +.Pp +.Dl "ether_reflect -i em0 -a 00:00:00:aa:bb:cc -t 1" +.Pp +Rewrite the destination address in each packet to 00:00:00:aa:bb:cc +before reflecting the packet. +.Sh SEE ALSO +.Xr ifconfig 8 , +.Xr tcpdump 1 , +.Xr pcap 4 , +.Xr bpf 2 . +.Sh HISTORY +The +.Nm +program first appeared in +.Fx 8.0 . +.Sh AUTHORS +This +manual page was written by +.An George V. Neville-Neil Aq gnn@FreeBSD.org . +.Sh BUGS +Should be reported to the author or to net@freebsd.org. Added: head/tools/tools/ether_reflect/ether_reflect.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ether_reflect/ether_reflect.c Tue Dec 23 20:25:04 2008 (r186457) @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2008, Neville-Neil Consulting + * 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 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. + * + * Author: George V. Neville-Neil + * + * Purpose: This program uses libpcap to read packets from the network + * of a specific ethertype (default is 0x8822) and reflects them back + * out the same interface with their destination and source mac + * addresses reversed. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include + +#define ETHER_TYPE_TEST "0x8822" +#define SNAPLEN 96 +#define MAXPROG 128 + +char errbuf[PCAP_ERRBUF_SIZE]; + +void usage(char* message) { + if (message != NULL) + printf ("error: %s\n", message); + printf("usage: ether_reflect -i interface -e ethertype " + "-a address -t timeout -p -d\n"); + exit(1); +} + +int main(int argc, char **argv) +{ + int ch; + int debug = 0, promisc = 0; + int timeout = 100; + bpf_u_int32 localnet=0, netmask=0; + unsigned int error = 0; + char *interface = NULL; + char *proto = ETHER_TYPE_TEST; + char in_string[MAXPROG]; + char tmp[ETHER_ADDR_LEN]; + char addr[ETHER_ADDR_LEN]; + char *user_addr = NULL; + pcap_t *capture; + struct bpf_program program; + struct pcap_pkthdr *header; + unsigned char *packet = NULL; + + while ((ch = getopt(argc, argv, "a:e:i:t:pd")) != -1) { + switch (ch) { + case 'a': + user_addr = optarg; + break; + case 'e': + proto = optarg; + break; + case 'i': + interface = optarg; + break; + case 'p': + promisc = 1; + break; + case 't': + timeout = atoi(optarg); + break; + case 'd': + debug = 1; + break; + case '?': + default: + usage("invalid arguments"); + } + } + argc -= optind; + argv += optind; + + if (interface == NULL) + usage("You must specify an interface"); + + if (user_addr != NULL) + ether_aton_r(user_addr, (struct ether_addr *)&tmp); + + if ((capture = pcap_open_live(interface, SNAPLEN, promisc, timeout, + &errbuf[0])) == NULL) + usage(errbuf); + + snprintf(&in_string[0], MAXPROG, "ether proto %s\n", proto); + + if (pcap_lookupnet(interface, &localnet, &netmask, errbuf) < 0) + usage(errbuf); + + if (pcap_compile(capture, &program, in_string, 1, netmask) < 0) + usage(errbuf); + + if (pcap_setfilter(capture, &program) < 0) + usage(errbuf); + + if (pcap_setdirection(capture, PCAP_D_IN) < 0) + usage(errbuf); + + while (1) { + error = pcap_next_ex(capture, &header, + (const unsigned char **)&packet); + if (error == 0) + continue; + if (error == -1) + usage("packet read error"); + if (error == -2) + usage("savefile? invalid!"); + + if (debug) { + printf ("got packet of %d length\n", header->len); + printf ("header %s\n", + ether_ntoa((const struct ether_addr*) + &packet[0])); + printf ("header %s\n", + ether_ntoa((const struct ether_addr*) + &packet[ETHER_ADDR_LEN])); + } + + /* + * If the user did not supply an address then we simply + * reverse the source and destination addresses. + */ + if (user_addr == NULL) { + bcopy(packet, &tmp, ETHER_ADDR_LEN); + bcopy(&packet[ETHER_ADDR_LEN], packet, ETHER_ADDR_LEN); + bcopy(&tmp, &packet[ETHER_ADDR_LEN], ETHER_ADDR_LEN); + } else { + bcopy(&tmp, packet, ETHER_ADDR_LEN); + } + if (pcap_inject(capture, packet, header->len) < 0) + if (debug) + pcap_perror(capture, "pcap_inject"); + } +} From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 20:43:42 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 629ED1065676; Tue, 23 Dec 2008 20:43:42 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5022C8FC1E; Tue, 23 Dec 2008 20:43:42 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNKhgLK013133; Tue, 23 Dec 2008 20:43:42 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNKhgkJ013132; Tue, 23 Dec 2008 20:43:42 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812232043.mBNKhgkJ013132@svn.freebsd.org> From: Joe Marcus Clarke Date: Tue, 23 Dec 2008 20:43: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: r186458 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 20:43:42 -0000 Author: marcus (doc,ports committer) Date: Tue Dec 23 20:43:42 2008 New Revision: 186458 URL: http://svn.freebsd.org/changeset/base/186458 Log: Do not KASSERT when vp->v_dd is NULL. Only directories which have had ".." looked up would have v_dd set to a non-NULL value. This fixes a panic seen when running installworld on a diskless system with a separate /usr file system. Submitted by: cracauer Approved by: kib Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Tue Dec 23 20:25:04 2008 (r186457) +++ head/sys/kern/vfs_cache.c Tue Dec 23 20:43:42 2008 (r186458) @@ -936,7 +936,7 @@ vn_fullpath1(struct thread *td, struct v } ncp = TAILQ_FIRST(&vp->v_cache_dst); if (ncp != NULL) { - MPASS(ncp->nc_dvp == vp->v_dd); + MPASS(vp->v_dd == NULL || ncp->nc_dvp == vp->v_dd); buflen -= ncp->nc_nlen - 1; for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) *--bp = ncp->nc_name[i]; From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 21:06:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01FE91065673; Tue, 23 Dec 2008 21:06:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 97B2E8FC24; Tue, 23 Dec 2008 21:06:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LFESD-0001XF-3Z; Tue, 23 Dec 2008 23:06:17 +0200 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 mBNL6AoN048628 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Dec 2008 23:06:10 +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 mBNL6Acv098707; Tue, 23 Dec 2008 23:06:10 +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 mBNL6AUY098706; Tue, 23 Dec 2008 23:06:10 +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: Tue, 23 Dec 2008 23:06:10 +0200 From: Kostik Belousov To: Joe Marcus Clarke Message-ID: <20081223210610.GK74688@deviant.kiev.zoral.com.ua> References: <200812232043.mBNKhgkJ013132@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sdEQJo40s7ofW8iR" Content-Disposition: inline In-Reply-To: <200812232043.mBNKhgkJ013132@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on 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 X-Virus-Scanned: mail.terabit.net.ua 1LFESD-0001XF-3Z dbcd289965a513af6e85af8775c3df86 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186458 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 21:06:22 -0000 --sdEQJo40s7ofW8iR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 23, 2008 at 08:43:42PM +0000, Joe Marcus Clarke wrote: > Author: marcus (doc,ports committer) > Date: Tue Dec 23 20:43:42 2008 > New Revision: 186458 > URL: http://svn.freebsd.org/changeset/base/186458 >=20 > Log: > Do not KASSERT when vp->v_dd is NULL. Only directories which have had = ".." > looked up would have v_dd set to a non-NULL value. This fixes a panic I was very unaccurate in my formulation to the point where the statement should be considered plain wrong. This does not invalidate the commit, but the way to say this is v_dd is set to NULL by ".." lookups for directories that are not cached as the dst for their names. > seen when running installworld on a diskless system with a separate /usr > file system. > =20 > Submitted by: cracauer > Approved by: kib >=20 > Modified: > head/sys/kern/vfs_cache.c >=20 > Modified: head/sys/kern/vfs_cache.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/kern/vfs_cache.c Tue Dec 23 20:25:04 2008 (r186457) > +++ head/sys/kern/vfs_cache.c Tue Dec 23 20:43:42 2008 (r186458) > @@ -936,7 +936,7 @@ vn_fullpath1(struct thread *td, struct v > } > ncp =3D TAILQ_FIRST(&vp->v_cache_dst); > if (ncp !=3D NULL) { > - MPASS(ncp->nc_dvp =3D=3D vp->v_dd); > + MPASS(vp->v_dd =3D=3D NULL || ncp->nc_dvp =3D=3D vp->v_dd); > buflen -=3D ncp->nc_nlen - 1; > for (i =3D ncp->nc_nlen - 1; i >=3D 0 && bp !=3D buf; i--) > *--bp =3D ncp->nc_name[i]; --sdEQJo40s7ofW8iR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklRUsEACgkQC3+MBN1Mb4gHogCdFFv8lkCRXmfwmYRkMV3x06Py ZhkAoJhPyZ+8v3PxxOZiGv7uz68ZDrY4 =GIQ3 -----END PGP SIGNATURE----- --sdEQJo40s7ofW8iR-- From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 22:20:59 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C49931065675; Tue, 23 Dec 2008 22:20:59 +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 B216E8FC13; Tue, 23 Dec 2008 22:20:59 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNMKxSE015138; Tue, 23 Dec 2008 22:20:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNMKx62015133; Tue, 23 Dec 2008 22:20:59 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200812232220.mBNMKx62015133@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 23 Dec 2008 22:20: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: r186461 - in head: lib/libc/arm lib/libc/include lib/msun/src sys/arm/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 22:21:00 -0000 Author: marcel Date: Tue Dec 23 22:20:59 2008 New Revision: 186461 URL: http://svn.freebsd.org/changeset/base/186461 Log: Add support for the FPA floating-point format on ARM. The FPA floating-point format is identical to the VFP format, but is always stored in big-endian. Introduce _IEEE_WORD_ORDER to describe the byte-order of the FP representation. Obtained from: Juniper Networks, Inc Modified: head/lib/libc/arm/_fpmath.h head/lib/libc/arm/arith.h head/lib/libc/include/fpmath.h head/lib/msun/src/math_private.h head/sys/arm/include/ieee.h Modified: head/lib/libc/arm/_fpmath.h ============================================================================== --- head/lib/libc/arm/_fpmath.h Tue Dec 23 21:07:57 2008 (r186460) +++ head/lib/libc/arm/_fpmath.h Tue Dec 23 22:20:59 2008 (r186461) @@ -26,15 +26,26 @@ * $FreeBSD$ */ +#if defined(__VFP_FP__) +#define _IEEE_WORD_ORDER _BYTE_ORDER +#else +#define _IEEE_WORD_ORDER _BIG_ENDIAN +#endif + union IEEEl2bits { long double e; struct { -#ifndef __ARMEB__ +#if _BYTE_ORDER == _LITTLE_ENDIAN +#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN unsigned int manl :32; +#endif unsigned int manh :20; unsigned int exp :11; unsigned int sign :1; -#else +#if _IEEE_WORD_ORDER == _BIG_ENDIAN + unsigned int manl :32; +#endif +#else /* _BYTE_ORDER == _LITTLE_ENDIAN */ unsigned int sign :1; unsigned int exp :11; unsigned int manh :20; Modified: head/lib/libc/arm/arith.h ============================================================================== --- head/lib/libc/arm/arith.h Tue Dec 23 21:07:57 2008 (r186460) +++ head/lib/libc/arm/arith.h Tue Dec 23 22:20:59 2008 (r186461) @@ -11,7 +11,7 @@ * architecture. See contrib/gdtoa/gdtoaimp.h for details. */ -#ifndef __ARMEB__ +#if !defined(__ARMEB__) && defined(__VFP_FP__) #define IEEE_8087 #define Arith_Kind_ASL 1 #define Sudden_Underflow Modified: head/lib/libc/include/fpmath.h ============================================================================== --- head/lib/libc/include/fpmath.h Tue Dec 23 21:07:57 2008 (r186460) +++ head/lib/libc/include/fpmath.h Tue Dec 23 22:20:59 2008 (r186461) @@ -30,6 +30,10 @@ #include #include "_fpmath.h" +#ifndef _IEEE_WORD_ORDER +#define _IEEE_WORD_ORDER _BYTE_ORDER +#endif + union IEEEf2bits { float f; struct { @@ -52,10 +56,15 @@ union IEEEd2bits { double d; struct { #if _BYTE_ORDER == _LITTLE_ENDIAN +#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN unsigned int manl :32; +#endif unsigned int manh :20; unsigned int exp :11; unsigned int sign :1; +#if _IEEE_WORD_ORDER == _BIG_ENDIAN + unsigned int manl :32; +#endif #else /* _BIG_ENDIAN */ unsigned int sign :1; unsigned int exp :11; Modified: head/lib/msun/src/math_private.h ============================================================================== --- head/lib/msun/src/math_private.h Tue Dec 23 21:07:57 2008 (r186460) +++ head/lib/msun/src/math_private.h Tue Dec 23 22:20:59 2008 (r186461) @@ -38,7 +38,17 @@ * ints. */ -#if BYTE_ORDER == BIG_ENDIAN +#ifdef __arm__ +#if defined(__VFP_FP__) +#define IEEE_WORD_ORDER BYTE_ORDER +#else +#define IEEE_WORD_ORDER BIG_ENDIAN +#endif +#else /* __arm__ */ +#define IEEE_WORD_ORDER BYTE_ORDER +#endif + +#if IEEE_WORD_ORDER == BIG_ENDIAN typedef union { @@ -52,7 +62,7 @@ typedef union #endif -#if BYTE_ORDER == LITTLE_ENDIAN +#if IEEE_WORD_ORDER == LITTLE_ENDIAN typedef union { Modified: head/sys/arm/include/ieee.h ============================================================================== --- head/sys/arm/include/ieee.h Tue Dec 23 21:07:57 2008 (r186460) +++ head/sys/arm/include/ieee.h Tue Dec 23 22:20:59 2008 (r186461) @@ -91,6 +91,12 @@ #define DBL_EXPBITS 11 #define DBL_FRACBITS 52 +#if defined(__VFP_FP__) +#define _IEEE_WORD_ORDER _BYTE_ORDER +#else +#define _IEEE_WORD_ORDER _BIG_ENDIAN +#endif + struct ieee_single { #if _BYTE_ORDER == _BIG_ENDIAN u_int sng_sign:1; @@ -110,10 +116,15 @@ struct ieee_double { u_int dbl_frach:20; u_int dbl_fracl; #else +#if _IEEE_WORD_ORDER == _LITTLE_ENDIAN u_int dbl_fracl; +#endif u_int dbl_frach:20; u_int dbl_exp:11; u_int dbl_sign:1; +#if _IEEE_WORD_ORDER == _BIG_ENDIAN + u_int dbl_fracl; +#endif #endif }; From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 22:47:56 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 862A91065689; Tue, 23 Dec 2008 22:47:56 +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 700E88FC22; Tue, 23 Dec 2008 22:47:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNMluBi015701; Tue, 23 Dec 2008 22:47:56 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNMluxs015699; Tue, 23 Dec 2008 22:47:56 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200812232247.mBNMluxs015699@svn.freebsd.org> From: Doug Barton Date: Tue, 23 Dec 2008 22:47: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: r186462 - in head/contrib/bind9: . bin/check bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc doc/... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 22:47:56 -0000 Author: dougb Date: Tue Dec 23 22:47:56 2008 New Revision: 186462 URL: http://svn.freebsd.org/changeset/base/186462 Log: Merge from vendor/bind9/dist as of the 9.4.3 import Added: head/contrib/bind9/aclocal.m4 - copied unchanged from r186452, vendor/bind9/dist/aclocal.m4 head/contrib/bind9/bin/nsupdate/nsupdate.1 - copied unchanged from r186452, vendor/bind9/dist/bin/nsupdate/nsupdate.1 head/contrib/bind9/config.h.in - copied unchanged from r186452, vendor/bind9/dist/config.h.in head/contrib/bind9/doc/misc/sort-options.pl - copied unchanged from r186452, vendor/bind9/dist/doc/misc/sort-options.pl head/contrib/bind9/doc/rfc/rfc4648.txt - copied unchanged from r186452, vendor/bind9/dist/doc/rfc/rfc4648.txt head/contrib/bind9/doc/rfc/rfc4701.txt - copied unchanged from r186452, vendor/bind9/dist/doc/rfc/rfc4701.txt head/contrib/bind9/doc/rfc/rfc5155.txt - copied unchanged from r186452, vendor/bind9/dist/doc/rfc/rfc5155.txt head/contrib/bind9/lib/bind/aclocal.m4 - copied unchanged from r186452, vendor/bind9/dist/lib/bind/aclocal.m4 head/contrib/bind9/lib/bind/config.h.in - copied unchanged from r186452, vendor/bind9/dist/lib/bind/config.h.in head/contrib/bind9/lib/bind/include/isc/platform.h.in - copied unchanged from r186452, vendor/bind9/dist/lib/bind/include/isc/platform.h.in head/contrib/bind9/lib/isc/include/isc/portset.h - copied unchanged from r186452, vendor/bind9/dist/lib/isc/include/isc/portset.h head/contrib/bind9/lib/isc/portset.c - copied unchanged from r186452, vendor/bind9/dist/lib/isc/portset.c Deleted: head/contrib/bind9/bin/nsupdate/nsupdate.8 Modified: head/contrib/bind9/ (props changed) head/contrib/bind9/CHANGES head/contrib/bind9/COPYRIGHT head/contrib/bind9/FAQ head/contrib/bind9/FAQ.xml head/contrib/bind9/README head/contrib/bind9/bin/check/check-tool.c head/contrib/bind9/bin/check/named-checkconf.c head/contrib/bind9/bin/check/named-checkzone.c head/contrib/bind9/bin/dig/dig.1 head/contrib/bind9/bin/dig/dig.c head/contrib/bind9/bin/dig/dig.docbook head/contrib/bind9/bin/dig/dig.html head/contrib/bind9/bin/dig/dighost.c head/contrib/bind9/bin/dig/host.1 head/contrib/bind9/bin/dig/host.docbook head/contrib/bind9/bin/dig/host.html head/contrib/bind9/bin/dnssec/dnssec-keygen.8 head/contrib/bind9/bin/dnssec/dnssec-keygen.docbook head/contrib/bind9/bin/dnssec/dnssec-keygen.html head/contrib/bind9/bin/dnssec/dnssec-signzone.8 head/contrib/bind9/bin/dnssec/dnssec-signzone.c head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook head/contrib/bind9/bin/dnssec/dnssec-signzone.html head/contrib/bind9/bin/named/client.c head/contrib/bind9/bin/named/config.c head/contrib/bind9/bin/named/controlconf.c head/contrib/bind9/bin/named/include/named/globals.h head/contrib/bind9/bin/named/interfacemgr.c head/contrib/bind9/bin/named/lwaddr.c head/contrib/bind9/bin/named/lwdgnba.c head/contrib/bind9/bin/named/lwdnoop.c head/contrib/bind9/bin/named/lwresd.8 head/contrib/bind9/bin/named/lwresd.c head/contrib/bind9/bin/named/lwresd.docbook head/contrib/bind9/bin/named/lwresd.html head/contrib/bind9/bin/named/main.c head/contrib/bind9/bin/named/named.8 head/contrib/bind9/bin/named/named.conf.5 head/contrib/bind9/bin/named/named.conf.docbook head/contrib/bind9/bin/named/named.conf.html head/contrib/bind9/bin/named/named.docbook head/contrib/bind9/bin/named/named.html head/contrib/bind9/bin/named/query.c head/contrib/bind9/bin/named/server.c head/contrib/bind9/bin/named/unix/include/named/os.h head/contrib/bind9/bin/named/unix/os.c head/contrib/bind9/bin/named/update.c head/contrib/bind9/bin/nsupdate/Makefile.in head/contrib/bind9/bin/nsupdate/nsupdate.c head/contrib/bind9/bin/nsupdate/nsupdate.docbook head/contrib/bind9/bin/nsupdate/nsupdate.html head/contrib/bind9/bin/rndc/rndc-confgen.c head/contrib/bind9/bin/rndc/rndc.8 head/contrib/bind9/bin/rndc/rndc.c head/contrib/bind9/bin/rndc/rndc.docbook head/contrib/bind9/bin/rndc/rndc.html head/contrib/bind9/configure.in head/contrib/bind9/doc/arm/Bv9ARM-book.xml head/contrib/bind9/doc/arm/Bv9ARM.ch01.html head/contrib/bind9/doc/arm/Bv9ARM.ch02.html head/contrib/bind9/doc/arm/Bv9ARM.ch03.html head/contrib/bind9/doc/arm/Bv9ARM.ch04.html head/contrib/bind9/doc/arm/Bv9ARM.ch05.html head/contrib/bind9/doc/arm/Bv9ARM.ch06.html head/contrib/bind9/doc/arm/Bv9ARM.ch07.html head/contrib/bind9/doc/arm/Bv9ARM.ch08.html head/contrib/bind9/doc/arm/Bv9ARM.ch09.html head/contrib/bind9/doc/arm/Bv9ARM.ch10.html head/contrib/bind9/doc/arm/Bv9ARM.html head/contrib/bind9/doc/arm/Bv9ARM.pdf head/contrib/bind9/doc/arm/man.dig.html head/contrib/bind9/doc/arm/man.dnssec-keygen.html head/contrib/bind9/doc/arm/man.dnssec-signzone.html head/contrib/bind9/doc/arm/man.host.html head/contrib/bind9/doc/arm/man.named-checkconf.html head/contrib/bind9/doc/arm/man.named-checkzone.html head/contrib/bind9/doc/arm/man.named.html head/contrib/bind9/doc/arm/man.rndc-confgen.html head/contrib/bind9/doc/arm/man.rndc.conf.html head/contrib/bind9/doc/arm/man.rndc.html head/contrib/bind9/doc/misc/Makefile.in head/contrib/bind9/doc/misc/format-options.pl head/contrib/bind9/doc/misc/migration head/contrib/bind9/doc/misc/options head/contrib/bind9/doc/rfc/index head/contrib/bind9/lib/bind/api head/contrib/bind9/lib/bind/bsd/Makefile.in head/contrib/bind9/lib/bind/bsd/strerror.c head/contrib/bind9/lib/bind/bsd/strtoul.c head/contrib/bind9/lib/bind/configure.in head/contrib/bind9/lib/bind/dst/Makefile.in head/contrib/bind9/lib/bind/dst/dst_api.c head/contrib/bind9/lib/bind/dst/hmac_link.c head/contrib/bind9/lib/bind/dst/support.c head/contrib/bind9/lib/bind/include/Makefile.in head/contrib/bind9/lib/bind/include/arpa/nameser.h head/contrib/bind9/lib/bind/include/isc/assertions.h head/contrib/bind9/lib/bind/include/isc/eventlib.h head/contrib/bind9/lib/bind/include/isc/misc.h head/contrib/bind9/lib/bind/include/netdb.h head/contrib/bind9/lib/bind/include/resolv.h head/contrib/bind9/lib/bind/inet/Makefile.in head/contrib/bind9/lib/bind/inet/inet_net_pton.c head/contrib/bind9/lib/bind/inet/inet_network.c head/contrib/bind9/lib/bind/irs/Makefile.in head/contrib/bind9/lib/bind/irs/dns_ho.c head/contrib/bind9/lib/bind/irs/getnetgrent.c head/contrib/bind9/lib/bind/irs/getnetgrent_r.c head/contrib/bind9/lib/bind/irs/irp.c head/contrib/bind9/lib/bind/isc/Makefile.in head/contrib/bind9/lib/bind/isc/assertions.c head/contrib/bind9/lib/bind/isc/bitncmp.c head/contrib/bind9/lib/bind/isc/ctl_clnt.c head/contrib/bind9/lib/bind/isc/ctl_srvr.c head/contrib/bind9/lib/bind/isc/logging.c head/contrib/bind9/lib/bind/nameser/Makefile.in head/contrib/bind9/lib/bind/port_after.h.in head/contrib/bind9/lib/bind/port_before.h.in head/contrib/bind9/lib/bind/resolv/Makefile.in head/contrib/bind9/lib/bind/resolv/res_debug.c head/contrib/bind9/lib/bind/resolv/res_mkquery.c head/contrib/bind9/lib/bind/resolv/res_query.c head/contrib/bind9/lib/bind/resolv/res_send.c head/contrib/bind9/lib/bind9/api head/contrib/bind9/lib/bind9/check.c head/contrib/bind9/lib/dns/acache.c head/contrib/bind9/lib/dns/adb.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/cache.c head/contrib/bind9/lib/dns/dispatch.c head/contrib/bind9/lib/dns/dst_parse.c head/contrib/bind9/lib/dns/dst_parse.h head/contrib/bind9/lib/dns/include/dns/dispatch.h head/contrib/bind9/lib/dns/journal.c head/contrib/bind9/lib/dns/master.c head/contrib/bind9/lib/dns/masterdump.c head/contrib/bind9/lib/dns/message.c head/contrib/bind9/lib/dns/rbt.c head/contrib/bind9/lib/dns/rbtdb.c head/contrib/bind9/lib/dns/rdata/generic/nsec_47.c head/contrib/bind9/lib/dns/rdata/generic/nsec_47.h head/contrib/bind9/lib/dns/rdata/generic/txt_16.c head/contrib/bind9/lib/dns/rdata/in_1/apl_42.c head/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c head/contrib/bind9/lib/dns/request.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/lib/dns/rootns.c head/contrib/bind9/lib/dns/sdb.c head/contrib/bind9/lib/dns/tkey.c head/contrib/bind9/lib/dns/tsig.c head/contrib/bind9/lib/dns/validator.c head/contrib/bind9/lib/dns/view.c head/contrib/bind9/lib/dns/xfrin.c head/contrib/bind9/lib/dns/zone.c head/contrib/bind9/lib/isc/Makefile.in head/contrib/bind9/lib/isc/api head/contrib/bind9/lib/isc/assertions.c head/contrib/bind9/lib/isc/include/isc/assertions.h head/contrib/bind9/lib/isc/include/isc/lex.h head/contrib/bind9/lib/isc/include/isc/mem.h head/contrib/bind9/lib/isc/include/isc/msgs.h head/contrib/bind9/lib/isc/include/isc/platform.h.in head/contrib/bind9/lib/isc/include/isc/resource.h head/contrib/bind9/lib/isc/include/isc/socket.h head/contrib/bind9/lib/isc/include/isc/timer.h head/contrib/bind9/lib/isc/include/isc/types.h head/contrib/bind9/lib/isc/mem.c head/contrib/bind9/lib/isc/print.c head/contrib/bind9/lib/isc/pthreads/mutex.c head/contrib/bind9/lib/isc/timer.c head/contrib/bind9/lib/isc/unix/app.c head/contrib/bind9/lib/isc/unix/include/isc/net.h head/contrib/bind9/lib/isc/unix/net.c head/contrib/bind9/lib/isc/unix/resource.c head/contrib/bind9/lib/isc/unix/socket.c head/contrib/bind9/lib/isc/unix/socket_p.h head/contrib/bind9/lib/isc/unix/time.c head/contrib/bind9/lib/isccfg/api head/contrib/bind9/lib/isccfg/namedconf.c head/contrib/bind9/lib/lwres/api head/contrib/bind9/make/rules.in head/contrib/bind9/version Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Tue Dec 23 22:20:59 2008 (r186461) +++ head/contrib/bind9/CHANGES Tue Dec 23 22:47:56 2008 (r186462) @@ -1,14 +1,158 @@ - --- 9.4.2-P2 released --- -2406. [bug] Some operating systems have FD_SETSIZE set to a - low value by default, which can cause resource - exhaustion when many simultaneous connections are - open. Linux in particular makes it difficult to - increase this value. To use more sockets with - select(), set ISC_SOCKET_FDSETSIZE. Example: - STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure - (This should not be necessary in most cases, and - never for an authoritative-only server.) [RT #18328] + --- 9.4.3 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.4.3rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2471. [bug] named-checkzone was not reporting missing manditory + glue when sibling checks were disabled. [RT #18768] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2466. [doc] ARM: explain max-cache-ttl 0 SERVFAIL issue. + [RT #18302] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2445. [doc] ARM out-of-date on empty reverse zones (list includes + RFC1918 address, but these are not yet compiled in). + [RT #18578] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.4.3b3 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2433. [tuning] Set initial timeout to 800ms. + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] 2404. [port] hpux: files unlimited support. @@ -39,15 +183,271 @@ 2392. [bug] remove 'grep -q' from acl test script, some platforms don't support it. [RT #18253] +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + + --- 9.4.3b2 released --- + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add descriptions of IPSECKEY, SPF and SSHFP to ARM. + +2381. [port] dlz/mysql: support multiple install layouts for + mysql. /include/{,mysql/}mysql.h and + /lib/{,mysql/}. [RT #18152] + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] + +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve + forgery resilience. [RT #17949] + +2372. [bug] fixed incorrect TAG_HMACSHA256_BITS value [RT #18047] + +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger a assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + + --- 9.4.3b1 released --- + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2339. [port] tru64: support for libbind. [RT #17589] + +2338. [bug] check_ds() could be called with a non DS rdataset. + [RT #17598] + +2337. [bug] BUILD_LDFLAGS was not being correctly set. [RT #17614] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2328. [maint] Add AAAA addresses for A.ROOT-SERVERS.NET, + F.ROOT-SERVERS.NET, H.ROOT-SERVERS.NET, + J.ROOT-SERVERS.NET, K.ROOT-SERVERS.NET and + M.ROOT-SERVERS.NET. + +2326. [bug] It was possible to trigger a INSIST in the acache + processing. + +2325. [port] Linux: use capset() function if available. [RT #17557] + +2323. [port] tru64: namespace clash. [RT #17547] + 2322. [port] MacOS: work around the limitation of setrlimit() for RLIMIT_NOFILE. [RT #17526] - --- 9.4.2-P1 released --- +2319. [bug] Silence Coverity warnings in + lib/dns/rdata/in_1/apl_42.c. [RT #17469] -2375. [security] Fully randomize UDP query ports to improve - forgery resilience. [RT #17949] +2318. [port] sunos fixes for libbind. [RT #17514] + +2314. [bug] Uninitialized memory use on error path in + bin/named/lwdnoop.c. [RT #17476] + +2313. [cleanup] Silence Coverity warnings. Handle private stacks. + [RT #17447] [RT #17478] + +2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. + [RT #17458] + +2311. [func] Update ACL regression test. [RT #17462] + +2310. [bug] dig, host, nslookup: flush stdout before emitting + debug/fatal messages. [RT #17501] + +2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c. + [RT #17495] + +2307. [bug] Remove infinite loop from lib/dns/sdb.c. [RT #17496] + +2306. [bug] Remove potential race from lib/dns/resolver.c. + [RT #17470] + +2305. [security] inet_network() buffer overflow. CVE-2008-0122. + +2304. [bug] Check returns from all dns_rdata_tostruct() calls. + [RT #17460] + +2303. [bug] Remove unnecessary code from bin/named/lwdgnba.c. + [RT #17471] + +2302. [bug] Fix memset() calls in lib/tests/t_api.c. [RT #17472] + +2301. [bug] Remove resource leak and fix error messages in + bin/tests/system/lwresd/lwtest.c. [RT #17474] + +2300. [bug] Fixed failure to close open file in + bin/tests/names/t_names.c. [RT #17473] + +2299. [bug] Remove unnecessary NULL check in + bin/nsupdate/nsupdate.c. [RT #17475] + +2298. [bug] isc_mutex_lock() failure not caught in + bin/tests/timers/t_timers.c. [RT #17468] + +2297. [bug] isc_entropy_createfilesource() failure not caught in + bin/tests/dst/t_dst.c. [RT #17467] + +2296. [port] Allow docbook stylesheet location to be specified to + configure. [RT #17457] + +2295. [bug] Silence static overrun error in bin/named/lwaddr.c. + [RT #17459] + +2293. [func] Add ACL regression test. [RT #17375] + +2292. [bug] Log if the working directory is not writable. + [RT #17312] + +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report + failure to set PR_SET_DUMPABLE. [RT #17312] + +2290. [bug] Let AD in the query signal that the client wants AD + set in the response. [RT #17301] + +2288. [port] win32: mark service as running when we have finished + loading. [RT #17441] + +2287. [bug] Use 'volatile' if the compiler supports it. [RT #17413] + +2284. [bug] Memory leak in UPDATE prerequisite processing. + [RT #17377] + +2283. [bug] TSIG keys were not attaching to the memory + context. TSIG keys should use the rings + memory context rather than the clients memory + context. [RT #17377] + +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, + to protect applications from receiving spurious + SIGPIPE signals when using the resolver. + +2278. [bug] win32: handle the case where Windows returns no + search list or DNS suffix. [RT #17354] + +2277. [bug] Empty zone names were not correctly being caught at + in the post parse checks. [RT #17357] + +2273. [bug] Adjust log level to WARNING when saving inconsistent + stub/slave master and journal files. [RT# 17279] + +2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. + [RT #17262] + +2270. [bug] dns_db_closeversion() version->writer could be reset + before it is tested. [RT #17290] + +2269. [contrib] dbus memory leaks and missing va_end calls. [RT #17232] + +2268. [bug] 0.IN-ADDR.ARPA was missing from the empty zones + list. + +2266. [bug] client.c:get_clientmctx() returned the same mctx + once the pool of mctx's was filled. [RT #17218] + +2265. [bug] Test that the memory context's basic_table is non NULL + before freeing. [RT #17265] + +2264. [bug] Server prefix length was being ignored. [RT #17308] + +2263. [bug] "named-checkconf -z" failed to set default value + for "check-integrity". [RT #17306] + +2262. [bug] Error status from all but the last view could be + lost. [RT #17292] + +2260. [bug] Reported wrong clients-per-query when increasing the + value. [RT #17236] + +2247. [doc] Sort doc/misc/options. [RT #17067] + +2246. [bug] Make the startup of test servers (ans.pl) more + robust. [RT #17147] --- 9.4.2 released --- + --- 9.4.2rc2 released --- 2259. [bug] Reverse incorrect LIBINTERFACE bump of libisc @@ -63,7 +463,7 @@ 2256. [bug] win32: Correctly register the installation location of bindevt.dll. [RT #17159] -2255. [bug] L.ROOT-SERVERS.NET is now 199.7.83.42. +2255. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42. 2254. [bug] timer.c:dispatch() failed to lock timer->lock when reading timer->idle allowing it to see @@ -76,16 +476,16 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested +2249. [bug] Only set Authentic Data bit if client requested DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2245. [bug] Validating lack of DS records at trust anchors wasn't working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] @@ -94,8 +494,8 @@ 2235. [bug] was not being installed. [RT #17135] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -110,7 +510,7 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -124,15 +524,15 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - -2219. [bug] Apply zone consistancy checks to additions, not + +2219. [bug] Apply zone consistency checks to additions, not removals, when updating. [RT #17049] 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2215. [bug] Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094] @@ -175,13 +575,13 @@ localhost;) is used. [RT #16987] - + 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2203. [security] Query id generation was cryptographically weak. [RT # 16915] -2202. [security] The default acls for allow-query-cache and +2202. [security] The default acls for allow-query-cache and allow-recursion were not being applied. [RT #16960] 2200. [bug] The search for cached NSEC records was stopping to @@ -216,7 +616,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -243,7 +643,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -274,7 +674,7 @@ a server address as a name to be looked up, causing unexpected output. [RT #16743] -2164. [bug] The code to determine how named-checkzone / +2164. [bug] The code to determine how named-checkzone / named-compilezone was called failed under windows. [RT #16764] @@ -288,7 +688,7 @@ 2159. [bug] Array bounds overrun in acache processing. [RT #16710] -2158. [bug] ns_client_isself() failed to initialise key +2158. [bug] ns_client_isself() failed to initialize key leading to a REQUIRE failure. [RT #16688] 2156. [bug] Fix node reference leaks in lookup.c:lookup_find(), @@ -363,7 +763,7 @@ 2136. [bug] nslookup/host looped if there was no search list and the host didn't exist. [RT #16657] -2135. [bug] Uninitialised rdataset in sdlz.c. [RT# 16656] +2135. [bug] Uninitialized rdataset in sdlz.c. [RT# 16656] 2133. [port] powerpc: Support both IBM and MacOS Power PC assembler syntaxes. [RT #16647] @@ -379,7 +779,7 @@ 2127. [port] Improved OpenSSL 0.9.8 support. [RT #16563] -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2125. [bug] dns_zone_getzeronosoattl() REQUIRE failure if DLZ was defined. [RT #16574] @@ -419,7 +819,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -431,7 +831,7 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. --- 9.4.0b4 released --- @@ -441,7 +841,7 @@ 2100. [port] win32: copy libeay32.dll to Build\Debug. Copy Debug\named-checkzone to Debug\named-compilezone. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. 2098. [bug] Race in rbtdb.c:no_references(), which occasionally triggered an INSIST failure about the node lock @@ -457,14 +857,14 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2093. [bug] named-checkzone -s was broken. 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -507,7 +907,7 @@ 2078. [bug] dnssec-checkzone output style "default" was badly named. It is now called "relative". [RT #16326] -2077. [bug] 'dnssec-signzone -O raw' wasn't outputing the +2077. [bug] 'dnssec-signzone -O raw' wasn't outputting the complete signed zone. [RT #16326] 2076. [bug] Several files were missing #include @@ -592,7 +992,7 @@ [RT #16287] 2049. [bug] Restore SOA before AXFR when falling back from - a attempted IXFR when transfering in a zone. + a attempted IXFR when transferring in a zone. Allow a initial SOA query before attempting a AXFR to be requested. [RT #16156] @@ -601,7 +1001,7 @@ the OS always returned the same local port. [RT #16182] -2047. [bug] Failed to initialise the interface flags to zero. +2047. [bug] Failed to initialize the interface flags to zero. [RT #16245] 2046. [bug] rbtdb.c:rdataset_setadditional() could cause duplicate @@ -641,7 +1041,7 @@ 2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124] -2033. [bug] We wern't creating multiple client memory contexts +2033. [bug] We weren't creating multiple client memory contexts on demand as expected. [RT #16095] --- 9.4.0a6 released --- @@ -657,7 +1057,7 @@ 2029. [bug] host printed out the server multiple times when specified on the command line. [RT #15992] -2028. [port] linux: socket.c compatability for old systems. +2028. [port] linux: socket.c compatibility for old systems. [RT #16015] 2027. [port] libbind: Solaris x86 support. [RT #16020] @@ -667,7 +1067,7 @@ 2025. [func] Update "zone serial unchanged" message. [RT #16026] -2024. [bug] named emited spurious "zone serial unchanged" +2024. [bug] named emitted spurious "zone serial unchanged" messages on reload. [RT #16027] 2023. [bug] "make install" should create ${localstatedir}/run and @@ -695,7 +1095,7 @@ --- 9.4.0a5 released --- 2015. [cleanup] use-additional-cache is now acache-enable for - consistancy. Default acache-enable off in BIND 9.4 + consistency. Default acache-enable off in BIND 9.4 as it requires memory usage to be configured. It may be enabled by default in BIND 9.5 once we have more experience with it. @@ -715,9 +1115,9 @@ --- 9.4.0a4 released --- -2009. [bug] libbind: coverity fixes. [RT #15808] +2009. [bug] libbind: Coverity fixes. [RT #15808] -2008. [func] It is now posssible to enable/disable DNSSEC +2008. [func] It is now possible to enable/disable DNSSEC validation from rndc. This is useful for the mobile hosts where the current connection point breaks DNSSEC (firewall/proxy). [RT #15592] @@ -729,7 +1129,7 @@ be changed to yes in 9.5.0. [RT #15674] 2006. [security] Allow-query-cache and allow-recursion now default - to the builtin acls "localnets" and "localhost". + to the built in acls "localnets" and "localhost". This is being done to make caching servers less attractive as reflective amplifying targets for @@ -777,7 +1177,7 @@ 1994. [port] OpenSSL 0.9.8 support. [RT #15694] -1993. [bug] Log messsage, via syslog, were missing the space +1993. [bug] Log messages, via syslog, were missing the space after the timestamp if "print-time yes" was specified. [RT #15844] @@ -785,11 +1185,11 @@ view. [RT #15825] 1991. [cleanup] The configuration data, once read, should be treated - as readonly. Expand the use of const to enforce this + as read only. Expand the use of const to enforce this at compile time. [RT #15813] 1990. [bug] libbind: isc's override of broken gettimeofday() - implementions was not always effective. + implementations was not always effective. [RT #15709] 1989. [bug] win32: don't check the service password when @@ -811,7 +1211,7 @@ server for the zone. Also any zones that contain DLV records should be removed when upgrading a slave zone. You do not however have to upgrade all - servers for a zone with DLV records simultaniously. + servers for a zone with DLV records simultaneously. 1984. [func] dig, nslookup and host now advertise a 4096 byte EDNS UDP buffer size by default. [RT #15855] @@ -848,7 +1248,7 @@ 1973. [func] TSIG HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384 and HMACSHA512 support. [RT #13606] -1972. [contrib] DBUS dynamic forwarders integation from +1972. [contrib] DBUS dynamic forwarders integration from Jason Vas Dias . 1971. [port] linux: make detection of missing IF_NAMESIZE more @@ -872,7 +1272,7 @@ 1964. [func] Separate out MX and SRV to CNAME checks. [RT #15723] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -898,7 +1298,7 @@ by native compiler. See README for additional cross compile support information. [RT #15148] -1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998] +1955. [bug] Pre-allocate the cache cleaning iterator. [RT #14998] 1954. [func] Named now falls back to advertising EDNS with a 512 byte receive buffer if the initial EDNS queries @@ -915,7 +1315,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -934,10 +1334,10 @@ 1946. [bug] resume_dslookup() could trigger a REQUIRE failure when using forwarders. [RT #15549] -1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is nolonger recommended. +1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is no longer recommended. To generate a RSAMD5 key you must explicitly request RSAMD5. [RT #13780] - + 1944. [cleanup] isc_hash_create() does not need a read/write lock. [RT #15522] @@ -1028,15 +1428,15 @@ 1917. [doc] funcsynopsisinfo wasn't being treated as verbatim when generating man pages. [RT #15385] -1916. [func] Integrate contibuted IDN code from JPNIC. [RT #15383] +1916. [func] Integrate contributed IDN code from JPNIC. [RT #15383] 1915. [bug] dig +ndots was broken. [RT #15215] 1914. [protocol] DS is required to accept mnemonic algorithms (RFC 4034). Still emit numeric algorithms for - compatability with RFC 3658. [RT #15354] + compatibility with RFC 3658. [RT #15354] -1913. [func] Integrate contibuted DLZ code into named. [RT #11382] +1913. [func] Integrate contributed DLZ code into named. [RT #11382] 1912. [port] aix: atomic locking for powerpc. [RT #15020] @@ -1059,7 +1459,7 @@ [RT #15034] 1905. [bug] Strings returned from cfg_obj_asstring() should be - treated as read-only. The prototype for + treated as read-only. The prototype for cfg_obj_asstring() has been updated to reflect this. [RT #15256] @@ -1108,7 +1508,7 @@ 1891. [port] freebsd: pthread_mutex_init can fail if it runs out of memory. [RT #14995] -1890. [func] Raise the UDP recieve buffer size to 32k if it is +1890. [func] Raise the UDP receive buffer size to 32k if it is less than 32k. [RT #14953] 1889. [port] sunos: non blocking i/o support. [RT #14951] @@ -1148,7 +1548,7 @@ [RT #2471] 1877. [bug] Fix unreasonably low quantum on call to - dns_rbt_destroy2(). Remove unnecessay unhash_node() + dns_rbt_destroy2(). Remove unnecessary unhash_node() call. [RT #14919] 1876. [func] Additional memory debugging support to track size @@ -1189,10 +1589,10 @@ 1863. [bug] rrset-order "fixed" error messages not complete. 1862. [func] Add additional zone data constancy checks. - named-checkzone has extended checking of NS, MX and + named-checkzone has extended checking of NS, MX and SRV record and the hosts they reference. named has extended post zone load checks. - New zone options: check-mx and integrity-check. + New zone options: check-mx and integrity-check. [RT #4940] 1861. [bug] dig could trigger a INSIST on certain malformed @@ -1230,24 +1630,24 @@ 1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591] 1849. [doc] All forms of the man pages (docbook, man, html) should - have consistant copyright dates. + have consistent copyright dates. 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . -1845. [bug] Improve error reporting to distingish between +1845. [bug] Improve error reporting to distinguish between accept()/fcntl() and socket()/fcntl() errors. [RT #13745] 1844. [bug] inet_pton() accepted more that 4 hexadecimal digits for each 16 bit piece of the IPv6 address. The text - representation of a IPv6 address has been tighted + representation of a IPv6 address has been tightened to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt). [RT #5662] @@ -1475,7 +1875,7 @@ 1765. [bug] configure --with-openssl=auto failed. [RT #12937] 1764. [bug] dns_zone_replacedb failed to emit a error message - if there was no SOA record in the replacment db. + if there was no SOA record in the replacement db. [RT #13016] 1763. [func] Perform sanity checks on NS records which refer to @@ -1503,7 +1903,7 @@ 1755. [func] allow-update is now settable at the options / view level. [RT #6636] -1754. [bug] We wern't always attempting to query the parent +1754. [bug] We weren't always attempting to query the parent server for the DS records at the zone cut. [RT #12774] @@ -1523,8 +1923,8 @@ [RT #12866] 1748. [func] dig now returns the byte count for axfr/ixfr. - -1747. [bug] BIND 8 compatability: named/named-checkconf failed + +1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. 1746. [func] Make public the function to read a key file, @@ -1541,7 +1941,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -1552,7 +1952,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -1567,7 +1967,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -1607,7 +2007,7 @@ [RT #12519] 1721. [bug] Error message from the journal processing were not - always identifing the relevent journal. [RT #12519] + always identifying the relevant journal. [RT #12519] 1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1 negative response. [RT #12506] @@ -1664,7 +2064,7 @@ 1703. [bug] named would loop sending NOTIFY messages when it failed to receive a response. [RT #12322] -1702. [bug] also-notify should not be applied to builtin zones. +1702. [bug] also-notify should not be applied to built in zones. [RT #12323] 1701. [doc] A minimal named.conf man page. @@ -1744,7 +2144,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -1816,7 +2216,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -1829,7 +2229,7 @@ masters with keys are specified. 1644. [bug] Update the journal modification time after a - sucessfull refresh query. [RT #11436] + successful refresh query. [RT #11436] 1643. [bug] dns_db_closeversion() could leak memory / node references. [RT #11163] @@ -1846,11 +2246,11 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if - a error had occured. The database version no longer + a error had occurred. The database version no longer matched the version of the database that was dumped. 1635. [bug] Memory leak on error in query_addds(). @@ -1940,21 +2340,21 @@ 1607. [bug] dig, host and nslookup were still using random() to generate query ids. [RT# 11013] *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 22:50:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23D5A1065673; Tue, 23 Dec 2008 22:50:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id CD63D8FC13; Tue, 23 Dec 2008 22:50:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 30B1841C64C; Tue, 23 Dec 2008 23:50:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id GI1sR8kItels; Tue, 23 Dec 2008 23:50:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id CF4DA41C64A; Tue, 23 Dec 2008 23:50:05 +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 35F104448D5; Tue, 23 Dec 2008 22:47:07 +0000 (UTC) Date: Tue, 23 Dec 2008 22:47:07 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Robert Watson In-Reply-To: Message-ID: <20081223224000.O97918@maildrop.int.zabbadoz.net> References: <200812221254.mBMCsr67061758@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: r186393 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 22:50:08 -0000 On Tue, 23 Dec 2008, Robert Watson wrote: Hi, > In IPv4 we've eliminated use of ipprotosw, although we still have > ipprotosw.h, which should go away as it's unused; I'd like to see ip6protosw > go away as well. The domain registration code assumes that when an array of > protocols are registered, the size of the array entry is sizeof(struct > protosw), which happens currently to be true for ip6protosw. At least, I > think. :-) There is some assert like code under DIAGNOSTICS in there I think. So from what I could see the main problems just changing to protosw from ip6protosw are: the pr_input and pr_output routines as they differ in either return code or arguemnts: * pr_input v4 void (struct mbuf *, int) v6 int (struct mbuf **, int *, int) * pr_output v4 int (struct mbuf *, struct socket *) v6 int (struct mbuf *, ...) All the other function pointers seem equal already. I think the pr_output is solveable more easily as I can see - which seemed strange only rip6_output int (struct mbuf *, struct socket *, struct sockaddr_in6 *, struct mbuf *) called from raw_usend(m, so), rip6_send(m, so, dst, control) are defined. I might have missed a few because they weren't yet converted to c99 style initializers. pr_input is more of a problem and we may need to break the INET case to be able to merge the INET6 case to use protosw. I'll further investigate but this might become a bit disruptive. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 22:50:40 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90C301065670; Tue, 23 Dec 2008 22:50:40 +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 7DFBA8FC20; Tue, 23 Dec 2008 22:50:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNModw6015812; Tue, 23 Dec 2008 22:50:39 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNModm8015806; Tue, 23 Dec 2008 22:50:39 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200812232250.mBNModm8015806@svn.freebsd.org> From: Doug Barton Date: Tue, 23 Dec 2008 22:50: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: r186463 - in head/lib/bind: . bind isc isc/isc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 22:50:40 -0000 Author: dougb Date: Tue Dec 23 22:50:39 2008 New Revision: 186463 URL: http://svn.freebsd.org/changeset/base/186463 Log: Updates for version 9.4.3 Modified: head/lib/bind/bind/config.h head/lib/bind/bind/port_after.h head/lib/bind/bind/port_before.h head/lib/bind/config.h head/lib/bind/isc/Makefile head/lib/bind/isc/isc/platform.h Modified: head/lib/bind/bind/config.h ============================================================================== --- head/lib/bind/bind/config.h Tue Dec 23 22:47:56 2008 (r186462) +++ head/lib/bind/bind/config.h Tue Dec 23 22:50:39 2008 (r186463) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* #undef _SOCKADDR_LEN */ #define HAVE_FCNTL_H 1 #define HAVE_PATHS_H 1 @@ -8,6 +8,7 @@ /* #undef HAVE_STROPTS_H */ #define HAVE_SYS_TIMERS_H 1 #define HAVE_SYS_SELECT_H 1 +#define HAVE_MEMORY_H 1 /* #undef SYS_CDEFS_H */ /* #undef _POSIX_PTHREAD_SEMANTICS */ /* #undef POSIX_GETPWUID_R */ @@ -16,14 +17,20 @@ /* #undef POSIX_GETGRNAM_R */ #define HAVE_MEMMOVE 1 #define HAVE_MEMCHR 1 +/* #undef SPRINTF_CHAR */ +/* #undef VSPRINTF_CHAR */ +#define USE_SYSERROR_LIST 1 +/* #undef NEED_STRTOUL */ +/* #undef NEED_SUN4PROTOS */ +/* #undef REENABLE_SEND */ /* #undef NEED_SETGROUPENT */ /* #undef NEED_GETGROUPLIST */ /* define if prototype for getgrnam_r() is required */ -/* #undef NEED_GETGRNAM_R */ -/* #undef NEED_GETGRGID_R */ -/* #undef NEED_GETGRENT_R */ +/* #undef NEED_GETGRNAM_R */ +/* #undef NEED_GETGRGID_R */ +/* #undef NEED_GETGRENT_R */ #define NEED_SETGRENT_R 1 #define NEED_ENDGRENT_R 1 @@ -46,7 +53,7 @@ /* #undef ssize_t */ /* #undef uintptr_t */ -/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ /* #undef SHUTUP_SPUTAUX */ #ifdef SHUTUP_SPUTAUX struct __sFILE; Modified: head/lib/bind/bind/port_after.h ============================================================================== --- head/lib/bind/bind/port_after.h Tue Dec 23 22:47:56 2008 (r186462) +++ head/lib/bind/bind/port_after.h Tue Dec 23 22:50:39 2008 (r186463) @@ -18,12 +18,20 @@ #include #endif /* HAVE_SYS_SELECT_H */ +#ifdef REENABLE_SEND +#undef send +#endif + #undef NEED_PSELECT #define HAVE_SA_LEN 1 #define HAVE_MINIMUM_IFREQ 1 #undef NEED_DAEMON #undef NEED_STRSEP #undef NEED_STRERROR +#ifdef NEED_STRERROR +const char *isc_strerror(int); +#define strerror isc_strerror +#endif #define HAS_INET6_STRUCTS 1 #define HAVE_SIN6_SCOPE_ID 1 #undef NEED_IN6ADDR_ANY @@ -32,12 +40,18 @@ #undef NEED_GETTIMEOFDAY #define HAVE_STRNDUP 1 #undef USE_FIONBIO_IOCTL -#undef USE_SYSERROR_LIST #undef INNETGR_ARGS #undef SETNETGRENT_ARGS #define USE_IFNAMELINKID 1 #define PORT_NONBLOCK O_NONBLOCK +#ifndef _POSIX_PATH_MAX +#define _POSIX_PATH_MAX 255 +#endif +#ifndef PATH_MAX +#define PATH_MAX _POSIX_PATH_MAX +#endif + /* * We need to know the IPv6 address family number even on IPv4-only systems. * Note that this is NOT a protocol constant, and that if the system has its @@ -311,16 +325,16 @@ innetgr_r(const char *, const char *, co #endif #ifdef NEED_SETNETGRENT_R -#ifdef NGR_R_ENT_ARGS -NGR_R_SET_RETURN setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS); +#ifdef NGR_R_SET_ARGS +NGR_R_SET_RETURN setnetgrent_r(NGR_R_SET_CONST char *netgroup, NGR_R_SET_ARGS); #else -NGR_R_SET_RETURN setnetgrent_r(const char *netgroup); +NGR_R_SET_RETURN setnetgrent_r(NGR_R_SET_CONST char *netgroup); #endif #endif #ifdef NEED_ENDNETGRENT_R -#ifdef NGR_R_ENT_ARGS -NGR_R_END_RETURN endnetgrent_r(NGR_R_ENT_ARGS); +#ifdef NGR_R_END_ARGS +NGR_R_END_RETURN endnetgrent_r(NGR_R_END_ARGS); #else NGR_R_END_RETURN endnetgrent_r(void); #endif @@ -386,10 +400,12 @@ int isc__gettimeofday(struct timeval *tv int isc__gettimeofday(struct timeval *tp, struct timezone *tzp); #endif -int getnetgrent(char **machinep, char **userp, char **domainp); +int getnetgrent(NGR_R_CONST char **machinep, NGR_R_CONST char **userp, + NGR_R_CONST char **domainp); #ifdef NGR_R_ARGS -int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS); +int getnetgrent_r(NGR_R_CONST char **machinep, NGR_R_CONST char **userp, + NGR_R_CONST char **domainp, NGR_R_ARGS); #endif #ifdef SETNETGRENT_ARGS @@ -407,11 +423,87 @@ int innetgr(const char *netgroup, const const char *user, const char *domain); #endif -#ifdef NGR_R_ENT_ARGS +#ifdef NGR_R_SET_ARGS NGR_R_SET_RETURN -setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS); +setnetgrent_r(NGR_R_SET_CONST char *netgroup, NGR_R_SET_ARGS); #else NGR_R_SET_RETURN -setnetgrent_r(const char *netgroup); +setnetgrent_r(NGR_R_SET_CONST char *netgroup); +#endif + +#ifdef NEED_STRTOUL +unsigned long strtoul(const char *, char **, int); #endif + +#ifdef NEED_SUN4PROTOS +#include +#ifndef __SIZE_TYPE__ +#define __SIZE_TYPE__ int +#endif +struct sockaddr; +struct iovec; +struct timeval; +struct timezone; +int fprintf(FILE *, const char *, ...); +int getsockname(int, struct sockaddr *, int *); +int getpeername(int, struct sockaddr *, int *); +int socket(int, int, int); +int connect(int, const struct sockaddr *, int); +int writev(int, struct iovec *, int); +int readv(int, struct iovec *, int); +int send(int, const char *, int, int); +void bzero(char *, int); +int recvfrom(int, char *, int, int, struct sockaddr *, int *); +int syslog(int, const char *, ... ); +int printf(const char *, ...); +__SIZE_TYPE__ fread(void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +__SIZE_TYPE__ fwrite(const void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +int fclose(FILE *); +int ungetc(int, FILE *); +int scanf(const char *, ...); +int sscanf(const char *, const char *, ... ); +int tolower(int); +int toupper(int); +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, int); +int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +#ifdef gettimeofday +#undef gettimeofday +int gettimeofday(struct timeval *, struct timezone *); +#define gettimeofday isc__gettimeofday +#else +int gettimeofday(struct timeval *, struct timezone *); +#endif +long strtol(const char*, char **, int); +int fseek(FILE *, long, int); +int setsockopt(int, int, int, const char *, int); +int bind(int, const struct sockaddr *, int); +void bcopy(char *, char *, int); +int fputc(char, FILE *); +int listen(int, int); +int accept(int, struct sockaddr *, int *); +int getsockopt(int, int, int, char *, int *); +int vfprintf(FILE *, const char *, va_list); +int fflush(FILE *); +int fgetc(FILE *); +int fputs(const char *, FILE *); +int fchown(int, int, int); +void setbuf(FILE *, char *); +int gethostname(char *, int); +int rename(const char *, const char *); +time_t time(time_t *); +int fscanf(FILE *, const char *, ...); +int sscanf(const char *, const char *, ...); +int ioctl(int, int, caddr_t); +void perror(const char *); + +#if !defined(__USE_FIXED_PROTOTYPES__) && !defined(__cplusplus) && !defined(__STRICT_ANSI__) +/* + * 'gcc -ansi' changes the prototype for vsprintf(). + * Use this prototype when 'gcc -ansi' is not in effect. + */ +char *vsprintf(char *, const char *, va_list); +#endif +#endif + #endif Modified: head/lib/bind/bind/port_before.h ============================================================================== --- head/lib/bind/bind/port_before.h Tue Dec 23 22:47:56 2008 (r186462) +++ head/lib/bind/bind/port_before.h Tue Dec 23 22:50:39 2008 (r186463) @@ -4,6 +4,10 @@ #define port_before_h #include +#ifdef NEED_SUN4PROTOS +#define _PARAMS(x) x +#endif + struct group; /* silence warning */ struct passwd; /* silence warning */ struct timeval; /* silence warning */ @@ -83,15 +87,22 @@ struct timespec { #define NGR_R_BAD (0) #define NGR_R_COPY buf, buflen #define NGR_R_COPY_ARGS NGR_R_ARGS +#define NGR_R_CONST #define NGR_R_END_RESULT(x) /*empty*/ #define NGR_R_END_RETURN void -#undef NGR_R_ENT_ARGS /*empty*/ +#undef NGR_R_END_ARGS /*empty*/ #define NGR_R_OK 1 #define NGR_R_RETURN int +#define NGR_R_SET_CONST const #undef NGR_R_SET_RESULT /*empty*/ #define NGR_R_SET_RETURN void +#undef NGR_R_SET_ARGS +#if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS) +#define NGR_R_SET_ARGS NGR_R_END_ARGS +#endif + #define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp #define PROTO_R_BAD ERANGE #define PROTO_R_COPY buf, buflen Modified: head/lib/bind/config.h ============================================================================== --- head/lib/bind/config.h Tue Dec 23 22:47:56 2008 (r186462) +++ head/lib/bind/config.h Tue Dec 23 22:50:39 2008 (r186463) @@ -160,6 +160,12 @@ int sigwait(const unsigned int *set, int /* Define if you cannot bind() before connect() for TCP sockets. */ /* #undef BROKEN_TCP_BIND_BEFORE_CONNECT */ +/* Solaris hack to get select_large_fdset. */ +/* #undef FD_SETSIZE */ + +/* Define to 1 if you have the `capset' function. */ +/* #undef HAVE_CAPSET */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -217,6 +223,15 @@ int sigwait(const unsigned int *set, int /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CAPABILITY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DEVPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DYNTUNE_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 @@ -303,7 +318,7 @@ int sigwait(const unsigned int *set, int /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus -#define inline +#define inline /**/ #endif /* Define to `unsigned int' if does not define. */ @@ -314,3 +329,7 @@ int sigwait(const unsigned int *set, int /* Define to `unsigned long' if does not define. */ /* #undef uintptr_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ Modified: head/lib/bind/isc/Makefile ============================================================================== --- head/lib/bind/isc/Makefile Tue Dec 23 22:47:56 2008 (r186462) +++ head/lib/bind/isc/Makefile Tue Dec 23 22:50:39 2008 (r186463) @@ -32,7 +32,7 @@ SRCS+= inet_pton.c \ hash.c heap.c hex.c hmacmd5.c hmacsha.c \ lex.c lfsr.c lib.c log.c md5.c \ mem.c mutexblock.c netaddr.c netscope.c ondestroy.c \ - parseint.c print.c quota.c random.c \ + parseint.c portset.c print.c quota.c random.c \ ratelimiter.c refcount.c region.c result.c rwlock.c \ serial.c sha1.c sha2.c sockaddr.c string.c strtoul.c \ symtab.c task.c taskpool.c timer.c version.c @@ -84,6 +84,7 @@ INCS= ${SRCDIR}/include/isc/app.h \ ${SRCDIR}/include/isc/ondestroy.h \ ${SRCDIR}/include/isc/os.h \ ${SRCDIR}/include/isc/parseint.h \ + ${SRCDIR}/include/isc/portset.h \ ${SRCDIR}/include/isc/print.h \ ${SRCDIR}/include/isc/quota.h \ ${SRCDIR}/include/isc/random.h \ Modified: head/lib/bind/isc/isc/platform.h ============================================================================== --- head/lib/bind/isc/isc/platform.h Tue Dec 23 22:47:56 2008 (r186462) +++ head/lib/bind/isc/isc/platform.h Tue Dec 23 22:50:39 2008 (r186463) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.34.18.9 2007/09/13 05:04:01 each Exp $ */ +/* $Id: platform.h.in,v 1.34.18.11 2008/06/24 23:45:55 tbox Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -142,6 +142,21 @@ */ #undef ISC_PLATFORM_FIXIN6ISADDR +/*! \brief + * Define if the system supports kqueue multiplexing + */ +#define ISC_PLATFORM_HAVEKQUEUE 1 + +/*! \brief + * Define if the system supports epoll multiplexing + */ +#undef ISC_PLATFORM_HAVEEPOLL + +/*! \brief + * Define if the system supports /dev/poll multiplexing + */ +#undef ISC_PLATFORM_HAVEDEVPOLL + /* *** Printing. ***/ @@ -226,19 +241,19 @@ /* * If the "xadd" operation is available on this architecture, - * ISC_PLATFORM_HAVEXADD will be defined. + * ISC_PLATFORM_HAVEXADD will be defined. */ #define ISC_PLATFORM_HAVEXADD 1 /* * If the "atomic swap" operation is available on this architecture, - * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. + * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. */ #define ISC_PLATFORM_HAVEATOMICSTORE 1 /* * If the "compare-and-exchange" operation is available on this architecture, - * ISC_PLATFORM_HAVECMPXCHG will be defined. + * ISC_PLATFORM_HAVECMPXCHG will be defined. */ #define ISC_PLATFORM_HAVECMPXCHG 1 From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 22:51:10 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3C91106568E; Tue, 23 Dec 2008 22:51:10 +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 A2A698FC21; Tue, 23 Dec 2008 22:51:10 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNMpA2C015896; Tue, 23 Dec 2008 22:51:10 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNMpAF9015894; Tue, 23 Dec 2008 22:51:10 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200812232251.mBNMpAF9015894@svn.freebsd.org> From: Doug Barton Date: Tue, 23 Dec 2008 22:51: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: r186464 - in head: share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 22:51:10 -0000 Author: dougb Date: Tue Dec 23 22:51:10 2008 New Revision: 186464 URL: http://svn.freebsd.org/changeset/base/186464 Log: Update bmake glue for changes in 9.4.3 Modified: head/share/doc/bind9/Makefile head/usr.bin/nsupdate/Makefile Modified: head/share/doc/bind9/Makefile ============================================================================== --- head/share/doc/bind9/Makefile Tue Dec 23 22:50:39 2008 (r186463) +++ head/share/doc/bind9/Makefile Tue Dec 23 22:51:10 2008 (r186464) @@ -20,7 +20,7 @@ ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html man.rndc.html ARMDIR= ${TOPDIR}/arm MISC= dnssec format-options.pl ipv6 migration migration-4to9 \ - options rfc-compliance roadmap sdb + options rfc-compliance roadmap sdb sort-options.pl MISCDIR= ${TOPDIR}/misc .include Modified: head/usr.bin/nsupdate/Makefile ============================================================================== --- head/usr.bin/nsupdate/Makefile Tue Dec 23 22:50:39 2008 (r186463) +++ head/usr.bin/nsupdate/Makefile Tue Dec 23 22:51:10 2008 (r186464) @@ -18,7 +18,7 @@ CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATO DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} -MAN= nsupdate.8 +MAN= nsupdate.1 MANFILTER= sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" \ -e "s@^\.HP [0-9]* @@" From owner-svn-src-head@FreeBSD.ORG Tue Dec 23 22:53:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B2B1065670; Tue, 23 Dec 2008 22:53:57 +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 854368FC18; Tue, 23 Dec 2008 22:53:57 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBNMrvs3015984; Tue, 23 Dec 2008 22:53:57 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBNMrvFX015983; Tue, 23 Dec 2008 22:53:57 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200812232253.mBNMrvFX015983@svn.freebsd.org> From: Robert Noland Date: Tue, 23 Dec 2008 22:53: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: r186465 - head/sys/dev/drm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Dec 2008 22:53:57 -0000 Author: rnoland Date: Tue Dec 23 22:53:57 2008 New Revision: 186465 URL: http://svn.freebsd.org/changeset/base/186465 Log: Only set registers if irqs are enabled Approved by: kib Obtained from: drm git Modified: head/sys/dev/drm/radeon_irq.c Modified: head/sys/dev/drm/radeon_irq.c ============================================================================== --- head/sys/dev/drm/radeon_irq.c Tue Dec 23 22:51:10 2008 (r186464) +++ head/sys/dev/drm/radeon_irq.c Tue Dec 23 22:53:57 2008 (r186465) @@ -47,7 +47,8 @@ void radeon_irq_set_state(struct drm_dev else dev_priv->irq_enable_reg &= ~mask; - RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); + if (dev->irq_enabled) + RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); } static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) @@ -59,7 +60,8 @@ static void r500_vbl_irq_set_state(struc else dev_priv->r500_disp_irq_reg &= ~mask; - RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); + if (dev->irq_enabled) + RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); } int radeon_enable_vblank(struct drm_device *dev, int crtc) From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 00:00:52 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9404106564A; Wed, 24 Dec 2008 00:00:52 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97CAA8FC12; Wed, 24 Dec 2008 00:00:52 +0000 (UTC) (envelope-from emax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBO00qOT017191; Wed, 24 Dec 2008 00:00:52 GMT (envelope-from emax@svn.freebsd.org) Received: (from emax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBO00qFR017190; Wed, 24 Dec 2008 00:00:52 GMT (envelope-from emax@svn.freebsd.org) Message-Id: <200812240000.mBO00qFR017190@svn.freebsd.org> From: Maksim Yevmenkin Date: Wed, 24 Dec 2008 00:00: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: r186466 - head/sys/netgraph/bluetooth/hci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 00:00:52 -0000 Author: emax Date: Wed Dec 24 00:00:52 2008 New Revision: 186466 URL: http://svn.freebsd.org/changeset/base/186466 Log: Change message severity level from WARN to INFO. This should reduce amount of messages sent to syslog MFC after: 1 week Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c Modified: head/sys/netgraph/bluetooth/hci/ng_hci_main.c ============================================================================== --- head/sys/netgraph/bluetooth/hci/ng_hci_main.c Tue Dec 23 22:53:57 2008 (r186465) +++ head/sys/netgraph/bluetooth/hci/ng_hci_main.c Wed Dec 24 00:00:52 2008 (r186466) @@ -728,7 +728,7 @@ ng_hci_drv_rcvdata(hook_p hook, item_p i if ((unit->state & NG_HCI_UNIT_READY) != NG_HCI_UNIT_READY || unit->sco == NULL || NG_HOOK_NOT_VALID(unit->sco)) { - NG_HCI_WARN( + NG_HCI_INFO( "%s: %s - could not forward HCI SCO data packet, state=%#x, hook=%p\n", __func__, NG_NODE_NAME(unit->node), unit->state, unit->sco); From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 01:08:19 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3C91065676; Wed, 24 Dec 2008 01:08:19 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E31F8FC0C; Wed, 24 Dec 2008 01:08:19 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBO18JuW018496; Wed, 24 Dec 2008 01:08:19 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBO18Jkw018495; Wed, 24 Dec 2008 01:08:19 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812240108.mBO18Jkw018495@svn.freebsd.org> From: Kip Macy Date: Wed, 24 Dec 2008 01:08: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: r186468 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 01:08:19 -0000 Author: kmacy Date: Wed Dec 24 01:08:18 2008 New Revision: 186468 URL: http://svn.freebsd.org/changeset/base/186468 Log: avoid lock recursion by deferring the link check until after LLE lock is dropped Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Wed Dec 24 01:00:30 2008 (r186467) +++ head/sys/netinet6/nd6_nbr.c Wed Dec 24 01:08:18 2008 (r186468) @@ -603,6 +603,7 @@ nd6_na_input(struct mbuf *m, int off, in int is_override; char *lladdr = NULL; int lladdrlen = 0; + int checklink = 0; struct ifaddr *ifa; struct llentry *ln = NULL; union nd_opts ndopts; @@ -739,7 +740,7 @@ nd6_na_input(struct mbuf *m, int off, in * non-reachable to probably reachable, and might * affect the status of associated prefixes.. */ - pfxlist_onlink_check(); + checklink = 1; } } else { int llchange; @@ -886,6 +887,9 @@ nd6_na_input(struct mbuf *m, int off, in if (chain) nd6_output_flush(ifp, ifp, chain, &sin6, NULL); } + if (checklink) + pfxlist_onlink_check(); + m_freem(m); return; From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 02:12:10 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49F1E106564A; Wed, 24 Dec 2008 02:12:10 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id F1AEA8FC1F; Wed, 24 Dec 2008 02:12:09 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=daemon.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LFJE5-000Mq8-BJ; Wed, 24 Dec 2008 10:11:57 +0800 Message-ID: <49519A76.6010104@micom.mng.net> Date: Wed, 24 Dec 2008 10:12:06 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.12 (X11/20080415) MIME-Version: 1.0 To: Konstantin Belousov References: <200812231604.mBNG4X91006629@svn.freebsd.org> In-Reply-To: <200812231604.mBNG4X91006629@svn.freebsd.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=78F6425E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186433 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 02:12:10 -0000 Konstantin Belousov wrote: > Author: kib > Date: Tue Dec 23 16:04:33 2008 > New Revision: 186433 > URL: http://svn.freebsd.org/changeset/base/186433 > > Log: > Clear busy state on the pages which are after the one that failed the bind > attempt. > > Reported and tested by: ganbold > Reviewed by: rnoland > MFC after: 2 weeks > > Modified: > head/sys/dev/agp/agp.c > > Modified: head/sys/dev/agp/agp.c > ============================================================================== > --- head/sys/dev/agp/agp.c Tue Dec 23 15:47:31 2008 (r186432) > +++ head/sys/dev/agp/agp.c Tue Dec 23 16:04:33 2008 (r186433) > @@ -564,6 +564,7 @@ agp_generic_bind_memory(device_t dev, st > device_printf(dev, "memory already bound\n"); > error = EINVAL; > VM_OBJECT_LOCK(mem->am_obj); > + i = 0; > goto bad; > } > > @@ -592,7 +593,6 @@ agp_generic_bind_memory(device_t dev, st > * Bail out. Reverse all the mappings > * and unwire the pages. > */ > - vm_page_wakeup(m); > for (k = 0; k < i + j; k += AGP_PAGE_SIZE) > AGP_UNBIND_PAGE(dev, offset + k); > goto bad; > @@ -622,8 +622,10 @@ agp_generic_bind_memory(device_t dev, st > bad: > mtx_unlock(&sc->as_lock); > VM_OBJECT_LOCK_ASSERT(mem->am_obj, MA_OWNED); > - for (i = 0; i < mem->am_size; i += PAGE_SIZE) { > - m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(i)); > + for (k = 0; k < mem->am_size; k += PAGE_SIZE) { > + m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); > + if (k >= i) > + vm_page_wakeup(m); > vm_page_lock_queues(); > vm_page_unwire(m, 0); > vm_page_unlock_queues(); > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > > > Thanks a lot. Ganbold -- Some books are to be tasted, others to be swallowed, and some few to be chewed and digested. -- Francis Bacon [As anyone who has ever owned a puppy already knows. Ed.] From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 02:24:42 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 324691065673; Wed, 24 Dec 2008 02:24:42 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from publicd.ub.mng.net (publicd.ub.mng.net [202.179.0.88]) by mx1.freebsd.org (Postfix) with ESMTP id DA4818FC14; Wed, 24 Dec 2008 02:24:41 +0000 (UTC) (envelope-from ganbold@micom.mng.net) Received: from [202.179.0.164] (helo=daemon.micom.mng.net) by publicd.ub.mng.net with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1LFJQD-000Mtr-CY; Wed, 24 Dec 2008 10:24:29 +0800 Message-ID: <49519D66.9090605@micom.mng.net> Date: Wed, 24 Dec 2008 10:24:38 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.12 (X11/20080415) MIME-Version: 1.0 To: Robert Noland References: <200812231616.mBNGGU9Z006874@svn.freebsd.org> In-Reply-To: <200812231616.mBNGGU9Z006874@svn.freebsd.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=78F6425E Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186434 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 02:24:42 -0000 Robert Noland wrote: > Author: rnoland > Date: Tue Dec 23 16:16:30 2008 > New Revision: 186434 > URL: http://svn.freebsd.org/changeset/base/186434 > > Log: > Fix up handling of Intel G4X chips some more. > > Note that you need at least xf86-video-intel 2.4.3 for this to work. > The G4X doesn't put the GATT into the same area of stolen memory > as all the other chips and older versions of the driver didn't > handle that properly. > > Tested by: ganbold > Approved by: kib > MFC after: 2 weeks > > Modified: > head/sys/dev/agp/agp_i810.c > > Modified: head/sys/dev/agp/agp_i810.c > ============================================================================== > --- head/sys/dev/agp/agp_i810.c Tue Dec 23 16:04:33 2008 (r186433) > +++ head/sys/dev/agp/agp_i810.c Tue Dec 23 16:16:30 2008 (r186434) > @@ -167,7 +167,7 @@ static const struct agp_i810_match { > "Intel GM965 SVGA controller"}, > {0x2A128086, CHIP_I965, 0x00020000, > "Intel GME965 SVGA controller"}, > - {0x2A428086, CHIP_I965, 0x00020000, > + {0x2A428086, CHIP_G4X, 0x00020000, > "Intel GM45 SVGA controller"}, > {0x2E028086, CHIP_G4X, 0x00020000, > "Intel 4 Series SVGA controller"}, > @@ -284,6 +284,7 @@ agp_i810_probe(device_t dev) > case CHIP_I915: > case CHIP_I965: > case CHIP_G33: > + case CHIP_G4X: > deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); > if ((deven & AGP_I915_DEVEN_D2F0) == > AGP_I915_DEVEN_D2F0_DISABLED) { > @@ -348,6 +349,7 @@ agp_i810_dump_regs(device_t dev) > case CHIP_I915: > case CHIP_I965: > case CHIP_G33: > + case CHIP_G4X: > device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", > pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); > device_printf(dev, "AGP_I915_MSAC: 0x%02x\n", > @@ -397,7 +399,7 @@ agp_i810_attach(device_t dev) > return error; > > if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && > - ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) > + sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) > { > device_printf(dev, "agp_i810.c does not support physical " > "memory above 4GB.\n"); > @@ -659,8 +661,7 @@ agp_i810_attach(device_t dev) > return EINVAL; > } > > - if (sc->chiptype != CHIP_G4X) > - gtt_size += 4; > + gtt_size += 4; > > sc->stolen = (stolen - gtt_size) * 1024 / 4096; > if (sc->stolen > 0) > @@ -780,6 +781,7 @@ agp_i810_set_aperture(device_t dev, u_in > case CHIP_I915: > case CHIP_I965: > case CHIP_G33: > + case CHIP_G4X: > return agp_generic_set_aperture(dev, aperture); > } > > @@ -798,7 +800,8 @@ agp_i810_write_gtt_entry(device_t dev, i > u_int32_t pte; > > pte = (u_int32_t)physical | 1; > - if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) { > + if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || > + sc->chiptype == CHIP_G4X) { > pte |= (physical & 0x0000000f00000000ull) >> 28; > } else { > /* If we do actually have memory above 4GB on an older system, > @@ -825,6 +828,10 @@ agp_i810_write_gtt_entry(device_t dev, i > bus_write_4(sc->sc_res[0], > (offset >> AGP_PAGE_SHIFT) * 4 + (512 * 1024), pte); > break; > + case CHIP_G4X: > + bus_write_4(sc->sc_res[0], > + (offset >> AGP_PAGE_SHIFT) * 4 + (2 * 1024 * 1024), pte); > + break; > } > } > > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > > > > Thanks a lot Robert. Together with kib@'s agp patch (Revision: 186433) this makes Xorg work with G45 graphics on CURRENT. Ganbold -- A clever prophet makes sure of the event first. From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 03:07:19 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA6171065670; Wed, 24 Dec 2008 03:07:19 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 991228FC0C; Wed, 24 Dec 2008 03:07:19 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBO37J3q020985; Wed, 24 Dec 2008 03:07:19 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBO37Jkq020984; Wed, 24 Dec 2008 03:07:19 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812240307.mBO37Jkq020984@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 24 Dec 2008 03:07: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: r186471 - head/sbin/fsck_ffs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 03:07:19 -0000 Author: obrien Date: Wed Dec 24 03:07:19 2008 New Revision: 186471 URL: http://svn.freebsd.org/changeset/base/186471 Log: Garbage collect 'fflags'. Modified: head/sbin/fsck_ffs/main.c Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Wed Dec 24 02:46:56 2008 (r186470) +++ head/sbin/fsck_ffs/main.c Wed Dec 24 03:07:19 2008 (r186471) @@ -206,7 +206,6 @@ checkfilesys(char *filesys) struct iovec *iov; char errmsg[255]; int iovlen; - int fflags; int cylno; ino_t files; size_t size; @@ -343,7 +342,6 @@ checkfilesys(char *filesys) if (bkgrdflag) { snprintf(snapname, sizeof snapname, "%s/.snap/fsck_snapshot", mntp->f_mntonname); - fflags = mntp->f_flags; build_iovec(&iov, &iovlen, "fstype", "ffs", 4); build_iovec(&iov, &iovlen, "from", snapname, (size_t)-1); @@ -354,7 +352,7 @@ checkfilesys(char *filesys) build_iovec(&iov, &iovlen, "update", NULL, 0); build_iovec(&iov, &iovlen, "snapshot", NULL, 0); - while (nmount(iov, iovlen, fflags) < 0) { + while (nmount(iov, iovlen, mntp->f_flags) < 0) { if (errno == EEXIST && unlink(snapname) == 0) continue; bkgrdflag = 0; @@ -522,7 +520,6 @@ chkdoreload(struct statfs *mntp) { struct iovec *iov; int iovlen; - int fflags; char errmsg[255]; if (mntp == NULL) @@ -531,7 +528,6 @@ chkdoreload(struct statfs *mntp) iov = NULL; iovlen = 0; errmsg[0] = '\0'; - fflags = mntp->f_flags; /* * We modified a mounted file system. Do a mount update on * it unless it is read-write, so we can continue using it @@ -552,7 +548,7 @@ chkdoreload(struct statfs *mntp) * nmount parsing of root mounts and NFS root mounts. */ build_iovec(&iov, &iovlen, "ro", NULL, 0); - if (nmount(iov, iovlen, fflags) == 0) { + if (nmount(iov, iovlen, mntp->f_flags) == 0) { return (0); } pwarn("mount reload of '%s' failed: %s %s\n\n", From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 03:49:28 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 062831065673; Wed, 24 Dec 2008 03:49:28 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id C17BE8FC16; Wed, 24 Dec 2008 03:49:27 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id mBO3nQQh093690; Tue, 23 Dec 2008 19:49:26 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id mBO3nQh4093689; Tue, 23 Dec 2008 19:49:26 -0800 (PST) (envelope-from sgk) Date: Tue, 23 Dec 2008 19:49:26 -0800 From: Steve Kargl To: Ganbold Message-ID: <20081224034926.GA93669@troutmask.apl.washington.edu> References: <200812231616.mBNGGU9Z006874@svn.freebsd.org> <49519D66.9090605@micom.mng.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49519D66.9090605@micom.mng.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Noland Subject: Re: svn commit: r186434 - head/sys/dev/agp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 03:49:28 -0000 On Wed, Dec 24, 2008 at 10:24:38AM +0800, Ganbold wrote: > > Thanks a lot Robert. > Together with kib@'s agp patch (Revision: 186433) this makes > Xorg work with G45 graphics on CURRENT. > Can you please trim your replies when the reply lacks any pertinent content? -- Steve From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 05:31:27 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 193641065670; Wed, 24 Dec 2008 05:31:27 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 086778FC16; Wed, 24 Dec 2008 05:31:27 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBO5VQbL024445; Wed, 24 Dec 2008 05:31:26 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBO5VQ8S024444; Wed, 24 Dec 2008 05:31:26 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812240531.mBO5VQ8S024444@svn.freebsd.org> From: Kip Macy Date: Wed, 24 Dec 2008 05:31:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186474 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 05:31:27 -0000 Author: kmacy Date: Wed Dec 24 05:31:26 2008 New Revision: 186474 URL: http://svn.freebsd.org/changeset/base/186474 Log: Fix missed unlock and reference drop of lle Found by: pho Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Wed Dec 24 04:44:39 2008 (r186473) +++ head/sys/netinet/if_ether.c Wed Dec 24 05:31:26 2008 (r186474) @@ -156,12 +156,12 @@ arptimer(void *arg) ifp = lle->lle_tbl->llt_ifp; IF_AFDATA_LOCK(ifp); LLE_WLOCK(lle); - if ((lle->la_flags & LLE_DELETED) || - (time_second >= lle->la_expire)) { - if (!callout_pending(&lle->la_timer) && - callout_active(&lle->la_timer)) - (void) llentry_free(lle); - } else { + if (((lle->la_flags & LLE_DELETED) + || (time_second >= lle->la_expire)) + && (!callout_pending(&lle->la_timer) && + callout_active(&lle->la_timer))) + (void) llentry_free(lle); + else { /* * Still valid, just drop our reference */ From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 06:59:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F2701065674; Wed, 24 Dec 2008 06:59:08 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F1098FC19; Wed, 24 Dec 2008 06:59:08 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBO6x75x026342; Wed, 24 Dec 2008 06:59:07 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBO6x7S5026341; Wed, 24 Dec 2008 06:59:07 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812240659.mBO6x7S5026341@svn.freebsd.org> From: Sam Leffler Date: Wed, 24 Dec 2008 06:59: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: r186475 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 06:59:08 -0000 Author: sam Date: Wed Dec 24 06:59:07 2008 New Revision: 186475 URL: http://svn.freebsd.org/changeset/base/186475 Log: must pack structures for architectures like arm Reviewed by: thompsa Modified: head/sys/dev/usb/umass.c Modified: head/sys/dev/usb/umass.c ============================================================================== --- head/sys/dev/usb/umass.c Wed Dec 24 05:31:26 2008 (r186474) +++ head/sys/dev/usb/umass.c Wed Dec 24 06:59:07 2008 (r186475) @@ -197,7 +197,7 @@ typedef struct { uByte bCDBLength; # define CBWCDBLENGTH 16 uByte CBWCDB[CBWCDBLENGTH]; -} umass_bbb_cbw_t; +} __packed umass_bbb_cbw_t; #define UMASS_BBB_CBW_SIZE 31 /* Command Status Wrapper */ @@ -212,7 +212,7 @@ typedef struct { # define CSWSTATUS_GOOD 0x0 # define CSWSTATUS_FAILED 0x1 # define CSWSTATUS_PHASE 0x2 -} umass_bbb_csw_t; +} __packed umass_bbb_csw_t; #define UMASS_BBB_CSW_SIZE 13 /* CBI features */ From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 09:17:31 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12D691065673; Wed, 24 Dec 2008 09:17:31 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02C5B8FC1B; Wed, 24 Dec 2008 09:17:31 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBO9HUqn028835; Wed, 24 Dec 2008 09:17:30 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBO9HUP5028834; Wed, 24 Dec 2008 09:17:30 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812240917.mBO9HUP5028834@svn.freebsd.org> From: Tom Rhodes Date: Wed, 24 Dec 2008 09:17: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: r186476 - head/usr.sbin/powerd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 09:17:31 -0000 Author: trhodes Date: Wed Dec 24 09:17:30 2008 New Revision: 186476 URL: http://svn.freebsd.org/changeset/base/186476 Log: Fix a typo higter->higher. Spotted by: ganbold Modified: head/usr.sbin/powerd/powerd.8 Modified: head/usr.sbin/powerd/powerd.8 ============================================================================== --- head/usr.sbin/powerd/powerd.8 Wed Dec 24 06:59:07 2008 (r186475) +++ head/usr.sbin/powerd/powerd.8 Wed Dec 24 09:17:30 2008 (r186476) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2005 +.Dd December 24, 2008 .Dt POWERD 8 .Os .Sh NAME @@ -93,7 +93,7 @@ The default is .It Fl r Ar percent Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. -The default is 75% or higther. +The default is 75% or higher. .It Fl v Verbose mode. Messages about power changes will be printed to stdout and From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 10:08:40 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55C6B1065675; Wed, 24 Dec 2008 10:08:40 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 40B2D8FC18; Wed, 24 Dec 2008 10:08:40 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBOA8ePG029766; Wed, 24 Dec 2008 10:08:40 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBOA8eb3029765; Wed, 24 Dec 2008 10:08:40 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812241008.mBOA8eb3029765@svn.freebsd.org> From: Tom Rhodes Date: Wed, 24 Dec 2008 10:08: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: r186477 - head/usr.bin/csplit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 10:08:40 -0000 Author: trhodes Date: Wed Dec 24 10:08:39 2008 New Revision: 186477 URL: http://svn.freebsd.org/changeset/base/186477 Log: Update the description of -k, output files appear to be left regardless of an error, signal, or complete run. PR: 69861 Submitted by: vlad902@gmail.com Modified: head/usr.bin/csplit/csplit.1 Modified: head/usr.bin/csplit/csplit.1 ============================================================================== --- head/usr.bin/csplit/csplit.1 Wed Dec 24 09:17:30 2008 (r186476) +++ head/usr.bin/csplit/csplit.1 Wed Dec 24 10:08:39 2008 (r186477) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 26, 2005 +.Dd December 24, 2008 .Dt CSPLIT 1 .Os .Sh NAME @@ -59,12 +59,7 @@ Give created files names beginning with The default is .Dq Pa xx . .It Fl k -Do not remove output files if an error occurs or a -.Dv HUP , -.Dv INT -or -.Dv TERM -signal is received. +Do not remove output files. .It Fl n Ar number Use .Ar number From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 11:12:21 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ABC81065673; Wed, 24 Dec 2008 11:12:21 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 691C68FC12; Wed, 24 Dec 2008 11:12:21 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBOBCLYc032598; Wed, 24 Dec 2008 11:12:21 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBOBCLmx032595; Wed, 24 Dec 2008 11:12:21 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812241112.mBOBCLmx032595@svn.freebsd.org> From: Tom Rhodes Date: Wed, 24 Dec 2008 11:12: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: r186478 - in head: sbin/ddb sbin/savecore share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 11:12:21 -0000 Author: trhodes Date: Wed Dec 24 11:12:21 2008 New Revision: 186478 URL: http://svn.freebsd.org/changeset/base/186478 Log: Apply various fixes: Silence mdoc(7) warnings; Xref correct manual pages; Point user to the ddb.8 manual page. PR: 129398 Submitted by: gavin Modified: head/sbin/ddb/ddb.8 head/sbin/savecore/savecore.8 head/share/man/man4/textdump.4 Modified: head/sbin/ddb/ddb.8 ============================================================================== --- head/sbin/ddb/ddb.8 Wed Dec 24 10:08:39 2008 (r186477) +++ head/sbin/ddb/ddb.8 Wed Dec 24 11:12:21 2008 (r186478) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 24, 2008 +.Dd December 24, 2008 .Dt DDB 8 .Os .Sh NAME @@ -87,7 +87,7 @@ kernel on disk. The following debugger commands are available from the command line: .Bl -tag -width indent .It Xo -.Ic Cm capture +.Cm capture .Op Fl M Ar core .Op Fl N Ar system .Cm print @@ -96,7 +96,7 @@ Print the current contents of the .Xr ddb 4 output capture buffer. .It Xo -.Ic Cm capture +.Cm capture .Op Fl M Ar core .Op Fl N Ar system .Cm status @@ -104,6 +104,7 @@ output capture buffer. Print the current status of the .Xr ddb 4 output capture buffer. +.El .Sh SCRIPTING The .Nm Modified: head/sbin/savecore/savecore.8 ============================================================================== --- head/sbin/savecore/savecore.8 Wed Dec 24 10:08:39 2008 (r186477) +++ head/sbin/savecore/savecore.8 Wed Dec 24 11:12:21 2008 (r186478) @@ -28,7 +28,7 @@ .\" From: @(#)savecore.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd February 24, 2005 +.Dd December 24, 2008 .Dt SAVECORE 8 .Os .Sh NAME @@ -144,7 +144,7 @@ is meant to be called near the end of th .Xr gzip 1 , .Xr getbootfile 3 , .Xr textdump 4 , -.Xr tar 4 , +.Xr tar 5 , .Xr dumpon 8 , .Xr syslogd 8 .Sh HISTORY Modified: head/share/man/man4/textdump.4 ============================================================================== --- head/share/man/man4/textdump.4 Wed Dec 24 10:08:39 2008 (r186477) +++ head/share/man/man4/textdump.4 Wed Dec 24 11:12:21 2008 (r186478) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2007 +.Dd December 24, 2008 .Dt textdump 4 .Os .Sh NAME @@ -148,10 +148,15 @@ violation, printing lock-related informa .Bd -literal -offset indent script kdb.enter.witness=show locks .Ed +.Pp +These scripts may also be configured using the +.Xr ddb 8 +utility. .Sh SEE ALSO .Xr bsdtar 1 , .Xr ddb 4 , .Xr tar 5 , +.Xr ddb 8 , .Xr dumpon 8 , .Xr savecore 8 , .Xr sysctl 8 From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 17:13:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB4871065670 for ; Wed, 24 Dec 2008 17:13:33 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id C12B98FC12 for ; Wed, 24 Dec 2008 17:13:33 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id CDCC91EF76B; Wed, 24 Dec 2008 11:57:36 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Wed, 24 Dec 2008 11:57:36 -0500 X-Sasl-enc: SbSwfjlXO7C7eBU+76350ka7YpylikQ/AMQpB0BaXbJp 1230137856 Received: from anglepoise.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 28F5225617; Wed, 24 Dec 2008 11:57:36 -0500 (EST) Message-ID: <495269FE.4060404@incunabulum.net> Date: Wed, 24 Dec 2008 16:57:34 +0000 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.18 (X11/20081204) MIME-Version: 1.0 To: "George V. Neville-Neil" References: <200812232025.mBNKP4FT012697@svn.freebsd.org> In-Reply-To: <200812232025.mBNKP4FT012697@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186457 - in head/tools/tools: . ether_reflect X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 17:13:34 -0000 Cute! From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 19:57:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7AFF1065675; Wed, 24 Dec 2008 19:57:22 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94A978FC17; Wed, 24 Dec 2008 19:57:22 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBOJvMwi046448; Wed, 24 Dec 2008 19:57:22 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBOJvMO2046447; Wed, 24 Dec 2008 19:57:22 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200812241957.mBOJvMO2046447@svn.freebsd.org> From: Bruce M Simpson Date: Wed, 24 Dec 2008 19:57: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: r186479 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 19:57:22 -0000 Author: bms Date: Wed Dec 24 19:57:22 2008 New Revision: 186479 URL: http://svn.freebsd.org/changeset/base/186479 Log: Add macro RB_FOREACH_SAFE(), which accepts an additional argument specifying a temporary tree node pointer. It may be used in a similar way to the *_SAFE() macros in . Modified: head/sys/sys/tree.h Modified: head/sys/sys/tree.h ============================================================================== --- head/sys/sys/tree.h Wed Dec 24 11:12:21 2008 (r186478) +++ head/sys/sys/tree.h Wed Dec 24 19:57:22 2008 (r186479) @@ -737,6 +737,11 @@ name##_RB_MINMAX(struct name *head, int (x) != NULL; \ (x) = name##_RB_NEXT(x)) +#define RB_FOREACH_SAFE(x, name, head, y) \ + for ((x) = RB_MIN(name, head); \ + (x) != NULL && ((y) = name##_RB_NEXT(x)); \ + (x) = (y)) + #define RB_FOREACH_REVERSE(x, name, head) \ for ((x) = RB_MAX(name, head); \ (x) != NULL; \ From owner-svn-src-head@FreeBSD.ORG Wed Dec 24 22:40:13 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C526106564A; Wed, 24 Dec 2008 22:40:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 497D68FC1E; Wed, 24 Dec 2008 22:40:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBOMeD0B096672; Wed, 24 Dec 2008 22:40:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBOMeDGS096671; Wed, 24 Dec 2008 22:40:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812242240.mBOMeDGS096671@svn.freebsd.org> From: Robert Watson Date: Wed, 24 Dec 2008 22:40: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: r186480 - head/usr.sbin/ugidfw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Dec 2008 22:40:13 -0000 Author: rwatson Date: Wed Dec 24 22:40:13 2008 New Revision: 186480 URL: http://svn.freebsd.org/changeset/base/186480 Log: In ugidfw(8), print the rule number and rule contents (as parsed and then regenerated in libugidfw) rather than simply printing that the rule was added with only the number. This makes ugidfw(8) behave a bit more like ipfw(8), and also means that the administrator sees how the rule was interpreted once uids/gids/etc were processed. Obtained from: TrustedBSD Project Modified: head/usr.sbin/ugidfw/ugidfw.c Modified: head/usr.sbin/ugidfw/ugidfw.c ============================================================================== --- head/usr.sbin/ugidfw/ugidfw.c Wed Dec 24 19:57:22 2008 (r186479) +++ head/usr.sbin/ugidfw/ugidfw.c Wed Dec 24 22:40:13 2008 (r186480) @@ -71,7 +71,7 @@ usage(void) void add_rule(int argc, char *argv[]) { - char errstr[BUFSIZ]; + char errstr[BUFSIZ], charstr[BUFSIZ]; struct mac_bsdextended_rule rule; int error, rulenum; @@ -86,7 +86,10 @@ add_rule(int argc, char *argv[]) warnx("%s", errstr); return; } - printf("Added rule %d\n", rulenum); + if (bsde_rule_to_string(&rule, charstr, BUFSIZ) == -1) + warnx("Added rule, but unable to print string."); + else + printf("%d %s\n", rulenum, charstr); } void From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 00:01:29 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813051065677; Thu, 25 Dec 2008 00:01:29 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BA6B8FC22; Thu, 25 Dec 2008 00:01:29 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP01TV4098083; Thu, 25 Dec 2008 00:01:29 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP01Tfe098079; Thu, 25 Dec 2008 00:01:29 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200812250001.mBP01Tfe098079@svn.freebsd.org> From: Julian Elischer Date: Thu, 25 Dec 2008 00:01: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: r186481 - in head: share/man/man4 sys/modules/netgraph/ether_echo sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 00:01:29 -0000 Author: julian Date: Thu Dec 25 00:01:29 2008 New Revision: 186481 URL: http://svn.freebsd.org/changeset/base/186481 Log: Add a trivial node to reflect ethernet frames to whence they came. MFC after: 1 month Added: head/share/man/man4/ng_ether_echo.4 (contents, props changed) head/sys/modules/netgraph/ether_echo/ head/sys/modules/netgraph/ether_echo/Makefile (contents, props changed) head/sys/netgraph/ng_ether_echo.c (contents, props changed) head/sys/netgraph/ng_ether_echo.h (contents, props changed) Added: head/share/man/man4/ng_ether_echo.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ng_ether_echo.4 Thu Dec 25 00:01:29 2008 (r186481) @@ -0,0 +1,77 @@ +.\" Copyright (c) 1996-1999 Whistle Communications, Inc. +.\" All rights reserved. +.\" +.\" Subject to the following obligations and disclaimer of warranty, use and +.\" redistribution of this software, in source or object code forms, with or +.\" without modifications are expressly permitted by Whistle Communications; +.\" provided, however, that: +.\" 1. Any and all reproductions of the source or object code must include the +.\" copyright notice above and the following disclaimer of warranties; and +.\" 2. No rights are granted, in any manner or form, to use Whistle +.\" Communications, Inc. trademarks, including the mark "WHISTLE +.\" COMMUNICATIONS" on advertising, endorsements, or otherwise except as +.\" such appears in the above copyright notice or in the software. +.\" +.\" THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND +.\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO +.\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, +.\" INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. +.\" WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY +.\" REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS +.\" SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. +.\" IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES +.\" RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING +.\" WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +.\" PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER 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 WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY +.\" OF SUCH DAMAGE. +.\" +.\" Author: Archie Cobbs +.\" +.\" $FreeBSD$ +.\" $Whistle: ng_echo.8,v 1.4 1999/01/25 23:46:26 archie Exp $ +.\" +.Dd December 24, 2008 +.Dt NG_ETHER_ECHO 4 +.Os +.Sh NAME +.Nm ng_ether_echo +.Nd netgraph ether_echo node type +.Sh SYNOPSIS +.In netgraph/ng_ether_echo.h +.Sh DESCRIPTION +The +.Nm ether_echo +node type reflects all data and control messages back to the sender. +It assumes (and does not check) that the packet is an ethernet frame, +and swaps teh source and destination addresses before echoing it. +This node type is used for testing and debugging. +.Sh HOOKS +A +.Nm ether_echo +node accepts any request to connect, regardless of the hook name, +as long as the name is unique. +.Sh CONTROL MESSAGES +This node type supports only the generic control messages. +Any other control messages are reflected back to the sender. +.Sh SHUTDOWN +This node shuts down upon receipt of a +.Dv NGM_SHUTDOWN +control message, or when all hooks have been disconnected. +.Sh SEE ALSO +.Xr netgraph 4 , +.Xr ng_hole 4 , +.Xr ng_echo 4 , +.Xr ng_ether 4 , +.Xr ngctl 8 +.Sh HISTORY +The +.Nm +node type was implemented in +.Fx 8.0 . +.Sh AUTHORS +.An Julian Elischer Aq julian@FreeBSD.org Added: head/sys/modules/netgraph/ether_echo/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/netgraph/ether_echo/Makefile Thu Dec 25 00:01:29 2008 (r186481) @@ -0,0 +1,7 @@ +# $FreeBSD$ +# $Whistle: Makefile,v 1.2 1999/01/19 19:39:20 archie Exp $ + +KMOD= ng_ether_echo +SRCS= ng_ether_echo.c + +.include Added: head/sys/netgraph/ng_ether_echo.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netgraph/ng_ether_echo.c Thu Dec 25 00:01:29 2008 (r186481) @@ -0,0 +1,145 @@ +/* + * ng_ether_echo.c + */ + +/*- + * Copyright (c) 1996-1999 Whistle Communications, Inc. + * All rights reserved. + * + * Subject to the following obligations and disclaimer of warranty, use and + * redistribution of this software, in source or object code forms, with or + * without modifications are expressly permitted by Whistle Communications; + * provided, however, that: + * 1. Any and all reproductions of the source or object code must include the + * copyright notice above and the following disclaimer of warranties; and + * 2. No rights are granted, in any manner or form, to use Whistle + * Communications, Inc. trademarks, including the mark "WHISTLE + * COMMUNICATIONS" on advertising, endorsements, or otherwise except as + * such appears in the above copyright notice or in the software. + * + * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO + * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, + * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY + * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS + * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. + * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES + * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING + * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER 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 WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Julian Elisher + * + * $FreeBSD$ + * $Whistle: ng_echo.c,v 1.13 1999/11/01 09:24:51 julian Exp $ + */ + +/* + * Netgraph "ether_echo" node + * + * This node simply bounces data and messages back to whence they came. + * However it swaps the source and destination ether fields. + * No testing is done! + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* Netgraph methods */ +static ng_constructor_t ngee_cons; +static ng_rcvmsg_t ngee_rcvmsg; +static ng_rcvdata_t ngee_rcvdata; +static ng_disconnect_t ngee_disconnect; + +/* Netgraph type */ +static struct ng_type typestruct = { + .version = NG_ABI_VERSION, + .name = NG_ETHER_ECHO_NODE_TYPE, + .constructor = ngee_cons, + .rcvmsg = ngee_rcvmsg, + .rcvdata = ngee_rcvdata, + .disconnect = ngee_disconnect, +}; +NETGRAPH_INIT(ether_echo, &typestruct); + +static int +ngee_cons(node_p node) +{ + return (0); +} + +/* + * Receive control message. We just bounce it back as a reply. + */ +static int +ngee_rcvmsg(node_p node, item_p item, hook_p lasthook) +{ + struct ng_mesg *msg; + int error = 0; + + NGI_GET_MSG(item, msg); + msg->header.flags |= NGF_RESP; + NG_RESPOND_MSG(error, node, item, msg); + return (error); +} + +/* + * Receive data + */ +static int +ngee_rcvdata(hook_p hook, item_p item) +{ + int error; + struct mbuf *m; + + struct ether_header *eh; + struct ether_addr tmpaddr; + + /* Make sure we have an entire header */ + NGI_GET_M(item, m); + if (m->m_len < sizeof(*eh) ) { + m = m_pullup(m, sizeof(*eh)); + if (m == NULL) { + NG_FREE_ITEM(item); + return(EINVAL); + } + } + eh = mtod(m, struct ether_header *); + + /* swap the source and destination fields */ + bcopy(eh->ether_dhost, &tmpaddr, ETHER_ADDR_LEN); + bcopy(eh->ether_shost, eh->ether_dhost, ETHER_ADDR_LEN); + bcopy(&tmpaddr, eh->ether_shost, ETHER_ADDR_LEN); + + NG_FWD_NEW_DATA(error, item, hook, m); + return (error); +} + +/* + * Removal of the last link destroys the nodeo + */ +static int +ngee_disconnect(hook_p hook) +{ + if ((NG_NODE_NUMHOOKS(NG_HOOK_NODE(hook)) == 0) + && (NG_NODE_IS_VALID(NG_HOOK_NODE(hook)))) { + ng_rmnode_self(NG_HOOK_NODE(hook)); + } + return (0); +} + Added: head/sys/netgraph/ng_ether_echo.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netgraph/ng_ether_echo.h Thu Dec 25 00:01:29 2008 (r186481) @@ -0,0 +1,51 @@ +/* + * ng_ether_echo.h + */ + +/*- + * Copyright (c) 1996-1999 Whistle Communications, Inc. + * All rights reserved. + * + * Subject to the following obligations and disclaimer of warranty, use and + * redistribution of this software, in source or object code forms, with or + * without modifications are expressly permitted by Whistle Communications; + * provided, however, that: + * 1. Any and all reproductions of the source or object code must include the + * copyright notice above and the following disclaimer of warranties; and + * 2. No rights are granted, in any manner or form, to use Whistle + * Communications, Inc. trademarks, including the mark "WHISTLE + * COMMUNICATIONS" on advertising, endorsements, or otherwise except as + * such appears in the above copyright notice or in the software. + * + * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO + * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, + * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY + * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS + * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. + * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES + * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING + * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER 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 WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * Author: Archie Cobbs + * + * $FreeBSD$ + * $Whistle: ng_echo.h,v 1.3 1999/01/20 00:22:12 archie Exp $ + */ + +#ifndef _NETGRAPH_NG_ETHER_ECHO_H_ +#define _NETGRAPH_NG_ETHER_ECHO_H_ + +/* Node type name and magic cookie */ +#define NG_ETHER_ECHO_NODE_TYPE "ether_echo" +#define NGM_ETHER_ECHO_COOKIE 1230155201 + +#endif /* _NETGRAPH_NG_ETHER_ECHO_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 02:14:25 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCDA6106564A; Thu, 25 Dec 2008 02:14:25 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA4BA8FC0C; Thu, 25 Dec 2008 02:14:25 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP2EPNY000613; Thu, 25 Dec 2008 02:14:25 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP2EPgP000612; Thu, 25 Dec 2008 02:14:25 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812250214.mBP2EPgP000612@svn.freebsd.org> From: Kip Macy Date: Thu, 25 Dec 2008 02:14: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: r186483 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 02:14:25 -0000 Author: kmacy Date: Thu Dec 25 02:14:25 2008 New Revision: 186483 URL: http://svn.freebsd.org/changeset/base/186483 Log: - Close a race during which the open flag could be cleared but the tun_softc would still be referenced by adding a separate TUN_CLOSED flag that is set after tunclose is done referencing it. - drop the tun_mtx after the flag check to avoid holding it across if_detach which can recurse in to if_tun.c Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Thu Dec 25 01:59:44 2008 (r186482) +++ head/sys/net/if_tun.c Thu Dec 25 02:14:25 2008 (r186483) @@ -79,6 +79,7 @@ struct tun_softc { #define TUN_RWAIT 0x0040 #define TUN_ASYNC 0x0080 #define TUN_IFHEAD 0x0100 +#define TUN_CLOSED 0x0200 #define TUN_READY (TUN_OPEN | TUN_INITED) @@ -256,9 +257,11 @@ tun_destroy(struct tun_softc *tp) /* Unlocked read. */ mtx_lock(&tp->tun_mtx); - if ((tp->tun_flags & TUN_OPEN) != 0) + if ((tp->tun_flags & (TUN_OPEN|TUN_CLOSED)) != TUN_CLOSED) cv_wait_unlock(&tp->tun_cv, &tp->tun_mtx); - + else + mtx_unlock(&tp->tun_mtx); + CURVNET_SET(TUN2IFP(tp)->if_vnet); dev = tp->tun_dev; bpfdetach(TUN2IFP(tp)); @@ -497,6 +500,7 @@ tunclose(struct cdev *dev, int foo, int KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); TUNDEBUG (ifp, "closed\n"); + tp->tun_flags |= TUN_CLOSED; cv_broadcast(&tp->tun_cv); mtx_unlock(&tp->tun_mtx); return (0); From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 04:29:40 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9D291065675; Thu, 25 Dec 2008 04:29:40 +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 A72E48FC18; Thu, 25 Dec 2008 04:29:40 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP4TeUk003275; Thu, 25 Dec 2008 04:29:40 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP4TeBr003274; Thu, 25 Dec 2008 04:29:40 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200812250429.mBP4TeBr003274@svn.freebsd.org> From: Weongyo Jeong Date: Thu, 25 Dec 2008 04:29: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: r186484 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 04:29:40 -0000 Author: weongyo Date: Thu Dec 25 04:29:40 2008 New Revision: 186484 URL: http://svn.freebsd.org/changeset/base/186484 Log: fix a silly bug that I missed a for-loop to initialize AL2230S PHY. Reported by: Hans Petter Selasky Modified: head/sys/dev/usb/if_zyd.c Modified: head/sys/dev/usb/if_zyd.c ============================================================================== --- head/sys/dev/usb/if_zyd.c Thu Dec 25 02:14:25 2008 (r186483) +++ head/sys/dev/usb/if_zyd.c Thu Dec 25 04:29:40 2008 (r186484) @@ -1061,8 +1061,10 @@ zyd_al2230_init_b(struct zyd_rf *rf) for (i = 0; i < N(phyini); i++) zyd_write16_m(sc, phyini[i].reg, phyini[i].val); - if (sc->sc_rfrev == ZYD_RF_AL2230S || sc->sc_al2230s != 0) - zyd_write16_m(sc, phy2230s[i].reg, phy2230s[i].val); + if (sc->sc_rfrev == ZYD_RF_AL2230S || sc->sc_al2230s != 0) { + for (i = 0; i < N(phy2230s); i++) + zyd_write16_m(sc, phy2230s[i].reg, phy2230s[i].val); + } for (i = 0; i < 3; i++) { error = zyd_rfwrite_cr(sc, zyd_al2230_chtable[0][i]); From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 06:44:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 087C51065676; Thu, 25 Dec 2008 06:44:20 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB91F8FC13; Thu, 25 Dec 2008 06:44:19 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP6iJJ1005788; Thu, 25 Dec 2008 06:44:19 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP6iJq3005786; Thu, 25 Dec 2008 06:44:19 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812250644.mBP6iJq3005786@svn.freebsd.org> From: Tom Rhodes Date: Thu, 25 Dec 2008 06:44: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: r186485 - head/usr.sbin/arp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 06:44:20 -0000 Author: trhodes Date: Thu Dec 25 06:44:19 2008 New Revision: 186485 URL: http://svn.freebsd.org/changeset/base/186485 Log: Print a warning when blackhole and reject are used together. Update arp.8 manual page syntax. PR: 125896 Submitted by: Marc Olzheim Approved by: sam Modified: head/usr.sbin/arp/arp.8 head/usr.sbin/arp/arp.c Modified: head/usr.sbin/arp/arp.8 ============================================================================== --- head/usr.sbin/arp/arp.8 Thu Dec 25 04:29:40 2008 (r186484) +++ head/usr.sbin/arp/arp.8 Thu Dec 25 06:44:19 2008 (r186485) @@ -28,7 +28,7 @@ .\" @(#)arp.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 18, 2008 +.Dd December 25, 2008 .Dt ARP 8 .Os .Sh NAME @@ -53,14 +53,12 @@ .Nm .Fl s Ar hostname ether_addr .Op Cm temp -.Op Cm reject -.Op Cm blackhole +.Op Cm blackhole No \&| Cm reject .Op Cm pub Op Cm only .Nm .Fl S Ar hostname ether_addr .Op Cm temp -.Op Cm reject -.Op Cm blackhole +.Op Cm blackhole No \&| Cm reject .Op Cm pub Op Cm only .Nm .Fl f Ar filename @@ -182,7 +180,8 @@ in the file should be of the form .Bd -ragged -offset indent -compact .Ar hostname ether_addr .Op Cm temp -.Op Cm pub +.Op Cm blackhole No \&| Cm reject +.Op Cm pub Op Cm only .Ed .Pp with argument meanings as given above. Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Thu Dec 25 04:29:40 2008 (r186484) +++ head/usr.sbin/arp/arp.c Thu Dec 25 06:44:19 2008 (r186485) @@ -330,8 +330,14 @@ set(int argc, char **argv) argc--; argv++; } } else if (strncmp(argv[0], "blackhole", 9) == 0) { + if (flags & RTF_REJECT) { + printf("Choose one of blackhole or reject, not both.\n"); + } flags |= RTF_BLACKHOLE; } else if (strncmp(argv[0], "reject", 6) == 0) { + if (flags & RTF_BLACKHOLE) { + printf("Choose one of blackhole or reject, not both.\n"); + } flags |= RTF_REJECT; } else if (strncmp(argv[0], "trail", 5) == 0) { /* XXX deprecated and undocumented feature */ @@ -648,8 +654,8 @@ usage(void) " arp [-n] [-i interface] -a", " arp -d hostname [pub]", " arp -d [-i interface] -a", - " arp -s hostname ether_addr [temp] [reject] [blackhole] [pub [only]]", - " arp -S hostname ether_addr [temp] [reject] [blackhole] [pub [only]]", + " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", + " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", " arp -f filename"); exit(1); } From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 07:34:15 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49FA0106564A; Thu, 25 Dec 2008 07:34:15 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38C648FC14; Thu, 25 Dec 2008 07:34:15 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP7YFmp006677; Thu, 25 Dec 2008 07:34:15 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP7YEDS006672; Thu, 25 Dec 2008 07:34:14 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200812250734.mBP7YEDS006672@svn.freebsd.org> From: Julian Elischer Date: Thu, 25 Dec 2008 07:34: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: r186486 - in head: share/man/man4 sys/conf sys/modules/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 07:34:15 -0000 Author: julian Date: Thu Dec 25 07:34:14 2008 New Revision: 186486 URL: http://svn.freebsd.org/changeset/base/186486 Log: Hook up the ether_echo node and fix the man page Modified: head/share/man/man4/Makefile head/share/man/man4/ng_ether_echo.4 head/sys/conf/files head/sys/conf/options head/sys/modules/netgraph/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Dec 25 06:44:19 2008 (r186485) +++ head/share/man/man4/Makefile Thu Dec 25 07:34:14 2008 (r186486) @@ -228,6 +228,7 @@ MAN= aac.4 \ ng_eiface.4 \ ng_etf.4 \ ng_ether.4 \ + ng_ether_echo.4 \ ng_fec.4 \ ng_frame_relay.4 \ ng_gif.4 \ Modified: head/share/man/man4/ng_ether_echo.4 ============================================================================== --- head/share/man/man4/ng_ether_echo.4 Thu Dec 25 06:44:19 2008 (r186485) +++ head/share/man/man4/ng_ether_echo.4 Thu Dec 25 07:34:14 2008 (r186486) @@ -48,7 +48,7 @@ The .Nm ether_echo node type reflects all data and control messages back to the sender. It assumes (and does not check) that the packet is an ethernet frame, -and swaps teh source and destination addresses before echoing it. +and swaps the source and destination addresses before echoing it. This node type is used for testing and debugging. .Sh HOOKS A Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Dec 25 06:44:19 2008 (r186485) +++ head/sys/conf/files Thu Dec 25 07:34:14 2008 (r186486) @@ -2287,6 +2287,7 @@ netgraph/ng_device.c optional netgraph_ netgraph/ng_echo.c optional netgraph_echo netgraph/ng_eiface.c optional netgraph_eiface netgraph/ng_ether.c optional netgraph_ether +netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_fec.c optional netgraph_fec netgraph/ng_frame_relay.c optional netgraph_frame_relay netgraph/ng_gif.c optional netgraph_gif Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Dec 25 06:44:19 2008 (r186485) +++ head/sys/conf/options Thu Dec 25 07:34:14 2008 (r186486) @@ -459,6 +459,7 @@ NETGRAPH_DEVICE opt_netgraph.h NETGRAPH_ECHO opt_netgraph.h NETGRAPH_EIFACE opt_netgraph.h NETGRAPH_ETHER opt_netgraph.h +NETGRAPH_ETHER_ECHO opt_netgraph.h NETGRAPH_FEC opt_netgraph.h NETGRAPH_FRAME_RELAY opt_netgraph.h NETGRAPH_GIF opt_netgraph.h Modified: head/sys/modules/netgraph/Makefile ============================================================================== --- head/sys/modules/netgraph/Makefile Thu Dec 25 06:44:19 2008 (r186485) +++ head/sys/modules/netgraph/Makefile Thu Dec 25 07:34:14 2008 (r186486) @@ -17,6 +17,7 @@ SUBDIR= async \ eiface \ etf \ ether \ + ether_echo \ fec \ frame_relay \ gif \ From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 08:48:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5471065679; Thu, 25 Dec 2008 08:48:08 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE8F88FC18; Thu, 25 Dec 2008 08:48:08 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP8m8x0008047; Thu, 25 Dec 2008 08:48:08 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP8m8LH008046; Thu, 25 Dec 2008 08:48:08 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812250848.mBP8m8LH008046@svn.freebsd.org> From: Tom Rhodes Date: Thu, 25 Dec 2008 08:48: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: r186487 - head/usr.bin/gprof X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 08:48:08 -0000 Author: trhodes Date: Thu Dec 25 08:48:08 2008 New Revision: 186487 URL: http://svn.freebsd.org/changeset/base/186487 Log: Remove reference to unimplemented "-c" option. PR: 119338 Modified: head/usr.bin/gprof/gprof.1 Modified: head/usr.bin/gprof/gprof.1 ============================================================================== --- head/usr.bin/gprof/gprof.1 Thu Dec 25 07:34:14 2008 (r186486) +++ head/usr.bin/gprof/gprof.1 Thu Dec 25 08:48:08 2008 (r186487) @@ -32,7 +32,7 @@ .\" @(#)gprof.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd October 7, 2005 +.Dd December 25, 2008 .Dt GPROF 1 .Os .Sh NAME @@ -263,9 +263,6 @@ inside other functions. .It Fl z Display routines that have zero usage (as shown by call counts and accumulated time). -This is useful with the -.Fl c -option for discovering which routines were never called. .El .Sh FILES .Bl -tag -width a.out.gmon -compact From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 09:02:55 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9710F1065674; Thu, 25 Dec 2008 09:02:55 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86E3D8FC08; Thu, 25 Dec 2008 09:02:55 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP92tGb008337; Thu, 25 Dec 2008 09:02:55 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP92t9i008336; Thu, 25 Dec 2008 09:02:55 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200812250902.mBP92t9i008336@svn.freebsd.org> From: Julian Elischer Date: Thu, 25 Dec 2008 09:02: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: r186488 - head/sys/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 09:02:55 -0000 Author: julian Date: Thu Dec 25 09:02:55 2008 New Revision: 186488 URL: http://svn.freebsd.org/changeset/base/186488 Log: shave about 7% off the overhead of ng_ether by using per-hook receive data methods. Modified: head/sys/netgraph/ng_ether.c Modified: head/sys/netgraph/ng_ether.c ============================================================================== --- head/sys/netgraph/ng_ether.c Thu Dec 25 08:48:08 2008 (r186487) +++ head/sys/netgraph/ng_ether.c Thu Dec 25 09:02:55 2008 (r186488) @@ -102,8 +102,8 @@ static void ng_ether_detach(struct ifnet static void ng_ether_link_state(struct ifnet *ifp, int state); /* Other functions */ -static int ng_ether_rcv_lower(node_p node, struct mbuf *m); -static int ng_ether_rcv_upper(node_p node, struct mbuf *m); +static int ng_ether_rcv_lower(hook_p node, item_p item); +static int ng_ether_rcv_upper(hook_p node, item_p item); /* Netgraph node methods */ static ng_constructor_t ng_ether_constructor; @@ -389,13 +389,16 @@ ng_ether_newhook(node_p node, hook_p hoo name = NG_ETHER_HOOK_LOWER; /* Which hook? */ - if (strcmp(name, NG_ETHER_HOOK_UPPER) == 0) + if (strcmp(name, NG_ETHER_HOOK_UPPER) == 0) { hookptr = &priv->upper; - else if (strcmp(name, NG_ETHER_HOOK_LOWER) == 0) + NG_HOOK_SET_RCVDATA(hook, ng_ether_rcv_upper); + } else if (strcmp(name, NG_ETHER_HOOK_LOWER) == 0) { hookptr = &priv->lower; - else if (strcmp(name, NG_ETHER_HOOK_ORPHAN) == 0) + NG_HOOK_SET_RCVDATA(hook, ng_ether_rcv_lower); + } else if (strcmp(name, NG_ETHER_HOOK_ORPHAN) == 0) { hookptr = &priv->orphan; - else + NG_HOOK_SET_RCVDATA(hook, ng_ether_rcv_lower); + } else return (EINVAL); /* Check if already connected (shouldn't be, but doesn't hurt) */ @@ -571,21 +574,13 @@ ng_ether_rcvmsg(node_p node, item_p item /* * Receive data on a hook. + * Since we use per-hook recveive methods this should never be called. */ static int ng_ether_rcvdata(hook_p hook, item_p item) { - const node_p node = NG_HOOK_NODE(hook); - const priv_p priv = NG_NODE_PRIVATE(node); - struct mbuf *m; - - NGI_GET_M(item, m); NG_FREE_ITEM(item); - if (hook == priv->lower || hook == priv->orphan) - return ng_ether_rcv_lower(node, m); - if (hook == priv->upper) - return ng_ether_rcv_upper(node, m); panic("%s: weird hook", __func__); #ifdef RESTARTABLE_PANICS /* so we don't get an error msg in LINT */ return (0); @@ -596,12 +591,18 @@ ng_ether_rcvdata(hook_p hook, item_p ite * Handle an mbuf received on the "lower" or "orphan" hook. */ static int -ng_ether_rcv_lower(node_p node, struct mbuf *m) +ng_ether_rcv_lower(hook_p hook, item_p item) { + struct mbuf *m; + const node_p node = NG_HOOK_NODE(hook); const priv_p priv = NG_NODE_PRIVATE(node); struct ifnet *const ifp = priv->ifp; + NGI_GET_M(item, m); + NG_FREE_ITEM(item); + /* Check whether interface is ready for packets */ + if (!((ifp->if_flags & IFF_UP) && (ifp->if_drv_flags & IFF_DRV_RUNNING))) { NG_FREE_M(m); @@ -639,11 +640,16 @@ ng_ether_rcv_lower(node_p node, struct m * Handle an mbuf received on the "upper" hook. */ static int -ng_ether_rcv_upper(node_p node, struct mbuf *m) +ng_ether_rcv_upper(hook_p hook, item_p item) { + struct mbuf *m; + const node_p node = NG_HOOK_NODE(hook); const priv_p priv = NG_NODE_PRIVATE(node); struct ifnet *ifp = priv->ifp; + NGI_GET_M(item, m); + NG_FREE_ITEM(item); + /* Check length and pull off header */ if (m->m_pkthdr.len < sizeof(struct ether_header)) { NG_FREE_M(m); From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 09:15:32 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6966E1065677; Thu, 25 Dec 2008 09:15:32 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 173CF8FC22; Thu, 25 Dec 2008 09:15:32 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP9FVkw008593; Thu, 25 Dec 2008 09:15:31 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP9FVUI008592; Thu, 25 Dec 2008 09:15:31 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812250915.mBP9FVUI008592@svn.freebsd.org> From: Tom Rhodes Date: Thu, 25 Dec 2008 09:15: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: r186489 - head/lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 09:15:32 -0000 Author: trhodes Date: Thu Dec 25 09:15:31 2008 New Revision: 186489 URL: http://svn.freebsd.org/changeset/base/186489 Log: Document that kldunloadf can return EINVAL. PR: 125639 Modified: head/lib/libc/sys/kldunload.2 Modified: head/lib/libc/sys/kldunload.2 ============================================================================== --- head/lib/libc/sys/kldunload.2 Thu Dec 25 09:02:55 2008 (r186488) +++ head/lib/libc/sys/kldunload.2 Thu Dec 25 09:15:31 2008 (r186489) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2008 +.Dd December 25, 2008 .Dt KLDUNLOAD 2 .Os .Sh NAME @@ -69,6 +69,10 @@ You do not have access to unlink the fil The file was not found. .It Bq Er EBUSY You attempted to unload a file linked by the kernel. +.It Bq Er EINVAL +The +.Fn kldunloadf +system call was passed invalid flags. .El .Sh SEE ALSO .Xr kldfind 2 , From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 09:32:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF7F31065674; Thu, 25 Dec 2008 09:32:20 +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 C6FE68FC19; Thu, 25 Dec 2008 09:32:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBP9WK1C008926; Thu, 25 Dec 2008 09:32:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBP9WK1n008925; Thu, 25 Dec 2008 09:32:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812250932.mBP9WK1n008925@svn.freebsd.org> From: Alexander Motin Date: Thu, 25 Dec 2008 09:32: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: r186490 - head/sys/modules/netgraph X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 09:32:21 -0000 Author: mav Date: Thu Dec 25 09:32:20 2008 New Revision: 186490 URL: http://svn.freebsd.org/changeset/base/186490 Log: Rejoin ng_tty module to the build. Modified: head/sys/modules/netgraph/Makefile Modified: head/sys/modules/netgraph/Makefile ============================================================================== --- head/sys/modules/netgraph/Makefile Thu Dec 25 09:15:31 2008 (r186489) +++ head/sys/modules/netgraph/Makefile Thu Dec 25 09:32:20 2008 (r186490) @@ -49,6 +49,7 @@ SUBDIR= async \ tag \ tcpmss \ tee \ + tty \ UI \ vjc \ vlan From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 10:05:01 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB221065676; Thu, 25 Dec 2008 10:05:01 +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 4AA788FC0C; Thu, 25 Dec 2008 10:05:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPA50vJ010934; Thu, 25 Dec 2008 10:05:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBPA50Uv010933; Thu, 25 Dec 2008 10:05:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812251005.mBPA50Uv010933@svn.freebsd.org> From: Alexander Motin Date: Thu, 25 Dec 2008 10:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186491 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 10:05:01 -0000 Author: mav Date: Thu Dec 25 10:05:00 2008 New Revision: 186491 URL: http://svn.freebsd.org/changeset/base/186491 Log: ng_tty(4) module updated to match the new TTY subsystem. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Dec 25 09:32:20 2008 (r186490) +++ head/UPDATING Thu Dec 25 10:05:00 2008 (r186491) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20081225: + ng_tty(4) module updated to match the new TTY subsystem. + Due to API change, user-level applications must be updated. + New API support added to mpd5 CVS and expected to be present + in next mpd5.3 release. + 20081219: With __FreeBSD_version 800060 the makefs tool is part of the base system (it was a port). From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 10:18:35 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA701106564A; Thu, 25 Dec 2008 10:18:35 +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 CB2CD8FC19; Thu, 25 Dec 2008 10:18:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPAIZBO011199; Thu, 25 Dec 2008 10:18:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBPAIZ41011198; Thu, 25 Dec 2008 10:18:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812251018.mBPAIZ41011198@svn.freebsd.org> From: Alexander Motin Date: Thu, 25 Dec 2008 10:18: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: r186492 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 10:18:36 -0000 Author: mav Date: Thu Dec 25 10:18:35 2008 New Revision: 186492 URL: http://svn.freebsd.org/changeset/base/186492 Log: Update for the last API changes. Modified: head/share/man/man4/ng_tty.4 Modified: head/share/man/man4/ng_tty.4 ============================================================================== --- head/share/man/man4/ng_tty.4 Thu Dec 25 10:05:00 2008 (r186491) +++ head/share/man/man4/ng_tty.4 Thu Dec 25 10:18:35 2008 (r186492) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_tty.8,v 1.5 1999/01/25 23:46:28 archie Exp $ .\" -.Dd October 2, 2008 +.Dd December 25, 2008 .Dt NG_TTY 4 .Os .Sh NAME @@ -78,18 +78,6 @@ being connected to a .Xr ng_async 4 type node. The hot character has no effect on the transmission of data. -.Pp -The node will attempt to give itself the same netgraph name as the name -of the tty device. -In any case, information about the node is available via the netgraph -.Xr ioctl 2 -command -.Dv NGIOCGINFO . -This command returns a -.Dv "struct nodeinfo" -similar to the -.Dv NGM_NODEINFO -netgraph control message. .Sh HOOKS This node type supports the following hooks: .Pp @@ -112,7 +100,7 @@ so that all received data is forwarded i Returns an integer containing the current hot character in the lower eight bits. .It Dv NGM_TTY_SET_TTY -This command takes an integer pointer to the open file descriptor of the tty +This command takes integer process ID and file descriptor of open tty and registers the tty hooks. .El .Sh SHUTDOWN From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 11:32:38 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE6BB1065670; Thu, 25 Dec 2008 11:32:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5D8A8FC12; Thu, 25 Dec 2008 11:32:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPBWcr5012521; Thu, 25 Dec 2008 11:32:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBPBWc4D012520; Thu, 25 Dec 2008 11:32:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812251132.mBPBWc4D012520@svn.freebsd.org> From: Robert Watson Date: Thu, 25 Dec 2008 11:32: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: r186493 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 11:32:38 -0000 Author: rwatson Date: Thu Dec 25 11:32:38 2008 New Revision: 186493 URL: http://svn.freebsd.org/changeset/base/186493 Log: Following the recent security advisory, add a comment describing our invariants and approach for protocol switch methods in protsw_init(), and also some KASSERT's for non-domain init entries in protocol switch tables: pru_abort and pru_send must both be implemented. For now, leave those assertions #if 0'd, since there are a few protocols that violate them in non-harmful ways. Whether or not we should enforce pru_abort being implemented for non-stream protocols is an interesting question: currently abort is only invoked on stream sockets in situations where un-accepted sockets must be abruptly closed (i.e., close() on a listen socket with pending connections), but in principle it is useful for datagram sockets and most datagram socket types implement it. MFC after: 3 weeks Modified: head/sys/kern/uipc_domain.c Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Thu Dec 25 10:18:35 2008 (r186492) +++ head/sys/kern/uipc_domain.c Thu Dec 25 11:32:38 2008 (r186493) @@ -110,6 +110,28 @@ protosw_init(struct protosw *pr) pr->pr_domain->dom_name, (int)(pr - pr->pr_domain->dom_protosw))); + /* + * Protocol switch methods fall into three categories: mandatory, + * mandatory but protosw_init() provides a default, and optional. + * + * For true protocols (i.e., pru_attach != NULL), KASSERT truly + * mandatory methods with no defaults, and initialize defaults for + * other mandatory methods if the protocol hasn't defined an + * implementation (NULL function pointer). + */ +#if 0 + if (pu->pru_attach != NULL) { + KASSERT(pu->pru_abort != NULL, + ("protosw_init: %ssw[%d] pru_abort NULL", + pr->pr_domain->dom_name, + (int)(pr - pr->pr_domain->dom_protosw))); + KASSERT(pu->pru_send != NULL, + ("protosw_init: %ssw[%d] pru_send NULL", + pr->pr_domain->dom_name, + (int)(pr - pr->pr_domain->dom_protosw))); + } +#endif + #define DEFAULT(foo, bar) if ((foo) == NULL) (foo) = (bar) DEFAULT(pu->pru_accept, pru_accept_notsupp); DEFAULT(pu->pru_bind, pru_bind_notsupp); From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 15:44:10 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA05B1065673; Thu, 25 Dec 2008 15:44:10 +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 C85248FC12; Thu, 25 Dec 2008 15:44:10 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPFiAPI017040; Thu, 25 Dec 2008 15:44:10 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBPFiANE017039; Thu, 25 Dec 2008 15:44:10 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200812251544.mBPFiANE017039@svn.freebsd.org> From: Florent Thoumie Date: Thu, 25 Dec 2008 15:44: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: r186494 - head/usr.sbin/pkg_install/add X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 15:44:11 -0000 Author: flz Date: Thu Dec 25 15:44:10 2008 New Revision: 186494 URL: http://svn.freebsd.org/changeset/base/186494 Log: Add package directory for 7.1-RELEASE in head as well as stable/7. Modified: head/usr.sbin/pkg_install/add/main.c Modified: head/usr.sbin/pkg_install/add/main.c ============================================================================== --- head/usr.sbin/pkg_install/add/main.c Thu Dec 25 11:32:38 2008 (r186493) +++ head/usr.sbin/pkg_install/add/main.c Thu Dec 25 15:44:10 2008 (r186494) @@ -79,6 +79,7 @@ struct { { 602000, 602099, "/packages-6.2-release" }, { 603000, 603099, "/packages-6.3-release" }, { 700000, 700099, "/packages-7.0-release" }, + { 701000, 701099, "/packages-7.1-release" }, { 300000, 399000, "/packages-3-stable" }, { 400000, 499000, "/packages-4-stable" }, { 502100, 502128, "/packages-5-current" }, From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 16:59:35 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 972AD106564A; Thu, 25 Dec 2008 16:59:35 +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 86BDC8FC14; Thu, 25 Dec 2008 16:59:35 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPGxZTH018611; Thu, 25 Dec 2008 16:59:35 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBPGxZog018609; Thu, 25 Dec 2008 16:59:35 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200812251659.mBPGxZog018609@svn.freebsd.org> From: Florent Thoumie Date: Thu, 25 Dec 2008 16:59: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: r186496 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 16:59:35 -0000 Author: flz Date: Thu Dec 25 16:59:35 2008 New Revision: 186496 URL: http://svn.freebsd.org/changeset/base/186496 Log: Follow symlinks when deleting directories. Bump PKG_INSTALL_VER to 20081225 (Merry Christmas \o/). PR: bin/54446 Submitted by: Andrea Barberio MFC after: 1 month Modified: head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Thu Dec 25 16:44:01 2008 (r186495) +++ head/usr.sbin/pkg_install/lib/lib.h Thu Dec 25 16:59:35 2008 (r186496) @@ -105,7 +105,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20080708 +#define PKG_INSTALL_VERSION 20081225 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Thu Dec 25 16:44:01 2008 (r186495) +++ head/usr.sbin/pkg_install/lib/plist.c Thu Dec 25 16:59:35 2008 (r186496) @@ -544,45 +544,92 @@ delete_package(Boolean ign_err, Boolean int delete_hierarchy(const char *dir, Boolean ign_err, Boolean nukedirs) { - char *cp1, *cp2; + char *cp1, *cp2, *realdir; - cp1 = cp2 = strdup(dir); - if (!fexists(dir)) { + realdir = malloc(FILENAME_MAX); + if (realdir == NULL) { + warnx("Couldn't allocate enough memory\n"); + return (ign_err ? SUCCESS : FAIL); + } + + if (issymlink(dir) && readlink(dir, realdir, FILENAME_MAX-1) == -1) + return (ign_err ? SUCCESS : FAIL); + + strlcpy(realdir, dir, FILENAME_MAX); + + cp1 = cp2 = strdup(realdir); + if (cp1 == NULL) { + warnx("Couldn't allocate enough memory\n"); + return (ign_err ? SUCCESS : FAIL); + } + + if (!fexists(realdir)) { if (!ign_err) warnx("%s '%s' doesn't exist", - isdir(dir) ? "directory" : "file", dir); - return !ign_err; + isdir(realdir) ? "directory" : "file", realdir); + free(cp1); + free(realdir); + return (ign_err ? SUCCESS : FAIL); } else if (nukedirs) { - if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), dir)) - return 1; + if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), realdir)) { + free(cp1); + free(realdir); + return (ign_err ? SUCCESS : FAIL); + } } - else if (isdir(dir) && !issymlink(dir)) { - if (RMDIR(dir) && !ign_err) - return 1; + else if (isdir(realdir)) { + if (RMDIR(realdir)) { + free(cp1); + free(realdir); + return (ign_err ? SUCCESS : FAIL); + } } else { - if (REMOVE(dir, ign_err)) - return 1; + if (REMOVE(realdir, ign_err)) { + free(cp1); + free(realdir); + return (ign_err ? SUCCESS : FAIL); + } } - if (!nukedirs) - return 0; + if (!nukedirs) { + free(cp1); + free(realdir); + return (SUCCESS); + } while (cp2) { if ((cp2 = strrchr(cp1, '/')) != NULL) *cp2 = '\0'; - if (!isemptydir(dir)) - return 0; - if (RMDIR(dir) && !ign_err) { - if (!fexists(dir)) - warnx("directory '%s' doesn't exist", dir); - else - return 1; + if (!isemptydir(realdir)) { + free(cp1); + free(realdir); + return (SUCCESS); + } + if (RMDIR(realdir) && !ign_err) { + if (!fexists(realdir)) { + warnx("directory '%s' doesn't exist", realdir); + free(cp1); + free(realdir); + return (SUCCESS); + } else { + free(cp1); + free(realdir); + return (FAIL); + } } /* back up the pathname one component */ if (cp2) { - cp1 = strdup(dir); + free(cp1); + cp1 = strdup(realdir); + if (cp1 == NULL) { + warnx("Couldn't allocate enough memory\n"); + return (ign_err ? SUCCESS : FAIL); + } } } - return 0; + free(cp1); + free(realdir); + return (SUCCESS); } + From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 19:05:21 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39A57106564A; Thu, 25 Dec 2008 19:05:21 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id B3B698FC29; Thu, 25 Dec 2008 19:05:20 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so1418231anc.13 for ; Thu, 25 Dec 2008 11:05:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=j0ghuRN7nXMEydJZ3P86ZCyiERlD5NAbhF4sIYbqC8U=; b=DarJIfqSjUv2xJcDcdBeUx2GbSOoQGtVdUYTcnzKscS5lA5A8F10RCK6FTa69T4FEG 8XtReGR+gTWoij89o9D9sMAitwUmFjyrb0DnSjxXFCOaA13DSlTLhI15HuGyvKhYEfTC GCT3yiYLjs8v/W6zhM99FQmzlDXrS9LBe5N1w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=UaWoI/yLCzxty3lzhMuu6AuAaPEVoXPbFWyCMxUZhjAVjkswoeWRPeTSLyMpkSWAzb tLWoAnENVRdz0vIEHznZZ1DXC3yYpAuy4Cm2sPWQifsI34fcelC8tpe7CsgkJJstCxDT /FRqumVnOtmiREpxKgBq2qwaYOZardDqtuEDk= Received: by 10.100.126.15 with SMTP id y15mr5955388anc.123.1230231919880; Thu, 25 Dec 2008 11:05:19 -0800 (PST) Received: from ?10.94.86.53? ([32.159.232.211]) by mx.google.com with ESMTPS id d29sm13649204and.41.2008.12.25.11.05.09 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 25 Dec 2008 11:05:19 -0800 (PST) References: <200812251659.mBPGxZog018609@svn.freebsd.org> Message-Id: From: Garrett Cooper To: Florent Thoumie In-Reply-To: <200812251659.mBPGxZog018609@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5F136) Mime-Version: 1.0 (iPhone Mail 5F136) Date: Thu, 25 Dec 2008 11:04:44 -0800 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Subject: Re: svn commit: r186496 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 19:05:21 -0000 On Dec 25, 2008, at 8:59, Florent Thoumie wrote: > Author: flz > Date: Thu Dec 25 16:59:35 2008 > New Revision: 186496 > URL: http://svn.freebsd.org/changeset/base/186496 > > Log: > Follow symlinks when deleting directories. > Bump PKG_INSTALL_VER to 20081225 (Merry Christmas \o/). > > PR: bin/54446 > Submitted by: Andrea Barberio > MFC after: 1 month > > Modified: > head/usr.sbin/pkg_install/lib/lib.h > head/usr.sbin/pkg_install/lib/plist.c > > Modified: head/usr.sbin/pkg_install/lib/lib.h > === > === > === > ===================================================================== > --- head/usr.sbin/pkg_install/lib/lib.h Thu Dec 25 16:44:01 > 2008 (r186495) > +++ head/usr.sbin/pkg_install/lib/lib.h Thu Dec 25 16:59:35 > 2008 (r186496) > @@ -105,7 +105,7 @@ > * Version of the package tools - increase only when some > * functionality used by bsd.port.mk is changed, added or removed > */ > -#define PKG_INSTALL_VERSION 20080708 > +#define PKG_INSTALL_VERSION 20081225 > > #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" > #define main(argc, argv) real_main(argc, argv) > > Modified: head/usr.sbin/pkg_install/lib/plist.c > === > === > === > ===================================================================== > --- head/usr.sbin/pkg_install/lib/plist.c Thu Dec 25 16:44:01 > 2008 (r186495) > +++ head/usr.sbin/pkg_install/lib/plist.c Thu Dec 25 16:59:35 > 2008 (r186496) > @@ -544,45 +544,92 @@ delete_package(Boolean ign_err, Boolean > int > delete_hierarchy(const char *dir, Boolean ign_err, Boolean nukedirs) > { > - char *cp1, *cp2; > + char *cp1, *cp2, *realdir; > > - cp1 = cp2 = strdup(dir); > - if (!fexists(dir)) { > + realdir = malloc(FILENAME_MAX); Should FILENAME_MAX be +1, as well as all offsets? > + if (realdir == NULL) { > + warnx("Couldn't allocate enough memory\n"); > + return (ign_err ? SUCCESS : FAIL); > + } > + > + if (issymlink(dir) && readlink(dir, realdir, FILENAME_MAX-1) == > -1) Memory leak. > > + return (ign_err ? SUCCESS : FAIL); > + > + strlcpy(realdir, dir, FILENAME_MAX); > + > + cp1 = cp2 = strdup(realdir); > + if (cp1 == NULL) { > + warnx("Couldn't allocate enough memory\n"); > + return (ign_err ? SUCCESS : FAIL); Another memory leak. > + } > + > + if (!fexists(realdir)) { > if (!ign_err) > warnx("%s '%s' doesn't exist", > - isdir(dir) ? "directory" : "file", dir); > - return !ign_err; > + isdir(realdir) ? "directory" : "file", realdir); > + free(cp1); > + free(realdir); > + return (ign_err ? SUCCESS : FAIL); > } > else if (nukedirs) { > - if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), dir)) > - return 1; > + if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), > realdir)) { > + free(cp1); > + free(realdir); > + return (ign_err ? SUCCESS : FAIL); > + } > } > - else if (isdir(dir) && !issymlink(dir)) { > - if (RMDIR(dir) && !ign_err) > - return 1; > + else if (isdir(realdir)) { > + if (RMDIR(realdir)) { > + free(cp1); > + free(realdir); > + return (ign_err ? SUCCESS : FAIL); > + } > } > else { > - if (REMOVE(dir, ign_err)) > - return 1; > + if (REMOVE(realdir, ign_err)) { > + free(cp1); > + free(realdir); > + return (ign_err ? SUCCESS : FAIL); > + } > } > > - if (!nukedirs) > - return 0; > + if (!nukedirs) { > + free(cp1); > + free(realdir); > + return (SUCCESS); > + } > while (cp2) { > if ((cp2 = strrchr(cp1, '/')) != NULL) > *cp2 = '\0'; > - if (!isemptydir(dir)) > - return 0; > - if (RMDIR(dir) && !ign_err) { > - if (!fexists(dir)) > - warnx("directory '%s' doesn't exist", dir); > - else > - return 1; > + if (!isemptydir(realdir)) { > + free(cp1); > + free(realdir); > + return (SUCCESS); > + } > + if (RMDIR(realdir) && !ign_err) { > + if (!fexists(realdir)) { > + warnx("directory '%s' doesn't exist", realdir); > + free(cp1); > + free(realdir); > + return (SUCCESS); > + } else { > + free(cp1); > + free(realdir); > + return (FAIL); > + } > } > /* back up the pathname one component */ > if (cp2) { > - cp1 = strdup(dir); > + free(cp1); > + cp1 = strdup(realdir); > + if (cp1 == NULL) { > + warnx("Couldn't allocate enough memory\n"); Another memory leak. > + return (ign_err ? SUCCESS : FAIL); > + } > } > } > - return 0; > + free(cp1); > + free(realdir); > + return (SUCCESS); > } > + From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 19:40:16 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C67E1065676; Thu, 25 Dec 2008 19:40:16 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id 3EE148FC16; Thu, 25 Dec 2008 19:40:14 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1195122fgb.35 for ; Thu, 25 Dec 2008 11:40:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=V31XoYtqiuZPRzBujPr2GI0zJTYNRwTp/oAwvl8erO8=; b=G6ZsA4J/IKAJ36s1SwczkgokMCyUlzN5ay1/l0RoXc4tEBgBrWbrGdFSpxUHV+N4Hq UmiYEs9vJIcNJ5ToieG1UfeQXB+0cEpUw7ODpDZMH2GmxViQvvcWLRwcBjixmbygyc5J k8wgV95N2zeQ0YRnFcfgqx5oZ7zuJxM6M0Nrk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GkHnTydNRti3sS4aEPimOlWfaLcvhg8s8S/mhMK3YeE1x7lCFl7ZubBJOwAj+EX4GG rGzSNYpRJYTvAcSLgA5MLPgQvQeckQOsiwIfdNgmk1ZGE6QfYgWw9Sx68NzEbaYz9gkA ifZXqLtBXdg5w+5XMZ5gh/MSS46CGT3fffekY= Received: by 10.103.193.12 with SMTP id v12mr3600167mup.23.1230234013490; Thu, 25 Dec 2008 11:40:13 -0800 (PST) Received: by 10.103.137.8 with HTTP; Thu, 25 Dec 2008 11:40:13 -0800 (PST) Message-ID: Date: Thu, 25 Dec 2008 17:40:13 -0200 From: "Carlos A. M. dos Santos" To: obrien@freebsd.org In-Reply-To: <20081223182314.GC25145@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812192020.mBJKKEIo081792@svn.freebsd.org> <20081223182314.GC25145@dragon.NUXI.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 19:40:16 -0000 On Tue, Dec 23, 2008 at 4:23 PM, David O'Brien wrote: > On Sun, Dec 21, 2008 at 10:15:21AM -0200, Carlos A. M. dos Santos wrote: [...] >> While you are here, would you mind taking a look at bin/123693, either >> committing the proposed patch or closing the PR if my proposition is >> not acceptable? > > Yep, I already have that patch to look at. Note it was hell getting the > patch - its best to not attach it when it will be base64 encoded - we > have no easy way of extracting such encoded attachements. Unfortunately I can't control how GMail handles message attachments. I will send you the patch in a private message. -- cd /usr/ports/sysutils/life make clean From owner-svn-src-head@FreeBSD.ORG Thu Dec 25 22:32:32 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5ED7106564A; Thu, 25 Dec 2008 22:32:32 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C291D8FC12; Thu, 25 Dec 2008 22:32:32 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBPMWWKd024607; Thu, 25 Dec 2008 22:32:32 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBPMWWtH024606; Thu, 25 Dec 2008 22:32:32 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200812252232.mBPMWWtH024606@svn.freebsd.org> From: Qing Li Date: Thu, 25 Dec 2008 22:32: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: r186497 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Dec 2008 22:32:32 -0000 Author: qingli Date: Thu Dec 25 22:32:32 2008 New Revision: 186497 URL: http://svn.freebsd.org/changeset/base/186497 Log: The "tun?" dev need not be opened at all. One is allowed to perform the following operations, e.g.: 1) ifconfig tun0 create 2) ifconfig tun0 10.1.1.1 10.1.1.2 3) route add -net 192.103.54.0/24 -iface tun0 4) ifconfig tun0 destroy If cv wait on the TUN_CLOSED flag, then the last operation (4) will block forever. Revert the previous changes and fix the mtx_unlock() leak. Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Thu Dec 25 16:59:35 2008 (r186496) +++ head/sys/net/if_tun.c Thu Dec 25 22:32:32 2008 (r186497) @@ -79,7 +79,6 @@ struct tun_softc { #define TUN_RWAIT 0x0040 #define TUN_ASYNC 0x0080 #define TUN_IFHEAD 0x0100 -#define TUN_CLOSED 0x0200 #define TUN_READY (TUN_OPEN | TUN_INITED) @@ -257,11 +256,11 @@ tun_destroy(struct tun_softc *tp) /* Unlocked read. */ mtx_lock(&tp->tun_mtx); - if ((tp->tun_flags & (TUN_OPEN|TUN_CLOSED)) != TUN_CLOSED) + if ((tp->tun_flags & TUN_OPEN) != 0) cv_wait_unlock(&tp->tun_cv, &tp->tun_mtx); else mtx_unlock(&tp->tun_mtx); - + CURVNET_SET(TUN2IFP(tp)->if_vnet); dev = tp->tun_dev; bpfdetach(TUN2IFP(tp)); @@ -500,7 +499,6 @@ tunclose(struct cdev *dev, int foo, int KNOTE_UNLOCKED(&tp->tun_rsel.si_note, 0); TUNDEBUG (ifp, "closed\n"); - tp->tun_flags |= TUN_CLOSED; cv_broadcast(&tp->tun_cv); mtx_unlock(&tp->tun_mtx); return (0); From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 07:16:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DBD01065674; Fri, 26 Dec 2008 07:16:20 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BDCB8FC21; Fri, 26 Dec 2008 07:16:20 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQ7GKro034088; Fri, 26 Dec 2008 07:16:20 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQ7GKY2034087; Fri, 26 Dec 2008 07:16:20 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200812260716.mBQ7GKY2034087@svn.freebsd.org> From: Maxim Konovalov Date: Fri, 26 Dec 2008 07:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186498 - head/usr.bin/netstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 07:16:20 -0000 Author: maxim Date: Fri Dec 26 07:16:20 2008 New Revision: 186498 URL: http://svn.freebsd.org/changeset/base/186498 Log: o Fix grammar. PR: bin/129938 Submitted by: Bruce Cran Modified: head/usr.bin/netstat/inet6.c Modified: head/usr.bin/netstat/inet6.c ============================================================================== --- head/usr.bin/netstat/inet6.c Thu Dec 25 22:32:32 2008 (r186497) +++ head/usr.bin/netstat/inet6.c Fri Dec 26 07:16:20 2008 (r186498) @@ -1058,7 +1058,7 @@ rip6_stats(u_long off, const char *name, #define p(f, m) if (rip6stat.f || sflag <= 1) \ printf(m, (uintmax_t)rip6stat.f, plural(rip6stat.f)) p(rip6s_ipackets, "\t%ju message%s received\n"); - p(rip6s_isum, "\t%ju checksum calcuration%s on inbound\n"); + p(rip6s_isum, "\t%ju checksum calculation%s on inbound\n"); p(rip6s_badsum, "\t%ju message%s with bad checksum\n"); p(rip6s_nosock, "\t%ju message%s dropped due to no socket\n"); p(rip6s_nosockmcast, From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 11:11:30 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 969021065674; Fri, 26 Dec 2008 11:11:30 +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 83E208FC1A; Fri, 26 Dec 2008 11:11:30 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQBBUbW040158; Fri, 26 Dec 2008 11:11:30 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQBBUtH040157; Fri, 26 Dec 2008 11:11:30 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200812261111.mBQBBUtH040157@svn.freebsd.org> From: Rui Paulo Date: Fri, 26 Dec 2008 11:11: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: r186499 - head/usr.bin/top X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 11:11:30 -0000 Author: rpaulo Date: Fri Dec 26 11:11:30 2008 New Revision: 186499 URL: http://svn.freebsd.org/changeset/base/186499 Log: Right align the CPU column header. Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Fri Dec 26 07:16:20 2008 (r186498) +++ head/usr.bin/top/machine.c Fri Dec 26 11:11:30 2008 (r186499) @@ -106,9 +106,9 @@ static char io_header[] = "%5d%s %-*.*s %6ld %6ld %6ld %6ld %6ld %6ld %6.2f%% %.*s" static char smp_header_thr[] = - " PID%s %-*.*s THR PRI NICE SIZE RES STATE C TIME %6s COMMAND"; + " PID%s %-*.*s THR PRI NICE SIZE RES STATE C TIME %6s COMMAND"; static char smp_header[] = - " PID%s %-*.*s " "PRI NICE SIZE RES STATE C TIME %6s COMMAND"; + " PID%s %-*.*s " "PRI NICE SIZE RES STATE C TIME %6s COMMAND"; #define smp_Proc_format \ "%5d%s %-*.*s %s%3d %4s%7s %6s %-6.6s %2d%7s %5.2f%% %.*s" From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 19:45:25 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B533A1065676; Fri, 26 Dec 2008 19:45:25 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A47C88FC0C; Fri, 26 Dec 2008 19:45:25 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQJjPWV049260; Fri, 26 Dec 2008 19:45:25 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQJjPCq049254; Fri, 26 Dec 2008 19:45:25 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200812261945.mBQJjPCq049254@svn.freebsd.org> From: Qing Li Date: Fri, 26 Dec 2008 19:45: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: r186500 - in head: sys/net sys/netinet sys/netinet6 usr.sbin/arp usr.sbin/ndp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 19:45:25 -0000 Author: qingli Date: Fri Dec 26 19:45:24 2008 New Revision: 186500 URL: http://svn.freebsd.org/changeset/base/186500 Log: This checkin addresses a couple of issues: 1. The "route" command allows route insertion through the interface-direct option "-iface". During if_attach(), an sockaddr_dl{} entry is created for the interface and is part of the interface address list. This sockaddr_dl{} entry describes the interface in detail. The "route" command selects this entry as the "gateway" object when the "-iface" option is present. The "arp" and "ndp" commands also interact with the kernel through the routing socket when adding and removing static L2 entries. The static L2 information is also provided through the "gateway" object with an AF_LINK family type, similar to what is provided by the "route" command. In order to differentiate between these two types of operations, a RTF_LLDATA flag is introduced. This flag is set by the "arp" and "ndp" commands when issuing the add and delete commands. This flag is also set in each L2 entry returned by the kernel. The "arp" and "ndp" command follows a convention where a RTM_GET is issued first followed by a RTM_ADD/DELETE. This RTM_GET request fills in the fields for a "rtm" object, which is reinjected into the kernel by a subsequent RTM_ADD/DELETE command. The entry returend from RTM_GET is a prefix route, so the RTF_LLDATA flag must be specified when issuing the RTM_ADD/DELETE messages. 2. Enforce the convention that NET_RT_FLAGS with a 0 w_arg is the specification for retrieving L2 information. Also optimized the code logic. Reviewed by: julian Modified: head/sys/net/route.h head/sys/net/rtsock.c head/sys/netinet/in.c head/sys/netinet6/in6.c head/usr.sbin/arp/arp.c head/usr.sbin/ndp/ndp.c Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Fri Dec 26 11:11:30 2008 (r186499) +++ head/sys/net/route.h Fri Dec 26 19:45:24 2008 (r186500) @@ -174,6 +174,7 @@ struct ortentry { /* 0x100 unused, was RTF_CLONING */ #define RTF_XRESOLVE 0x200 /* external daemon resolves name */ /* 0x400 unused, was RTF_LLINFO */ +#define RTF_LLDATA 0x400 /* used by apps to add/del L2 entries */ #define RTF_STATIC 0x800 /* manually added */ #define RTF_BLACKHOLE 0x1000 /* just discard pkts (during updates) */ #define RTF_PROTO2 0x4000 /* protocol specific routing flag */ Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Dec 26 11:11:30 2008 (r186499) +++ head/sys/net/rtsock.c Fri Dec 26 19:45:24 2008 (r186500) @@ -53,6 +53,7 @@ #include #include +#include #include #include #include @@ -514,8 +515,10 @@ route_output(struct mbuf *m, struct sock if (info.rti_info[RTAX_GATEWAY] == NULL) senderr(EINVAL); saved_nrt = NULL; + /* support for new ARP code */ - if (info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK) { + if (info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK && + (rtm->rtm_flags & RTF_LLDATA) != 0) { error = lla_rt_output(rtm, &info); break; } @@ -535,7 +538,8 @@ route_output(struct mbuf *m, struct sock saved_nrt = NULL; /* support for new ARP code */ if (info.rti_info[RTAX_GATEWAY] && - (info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK)) { + (info.rti_info[RTAX_GATEWAY]->sa_family == AF_LINK) && + (rtm->rtm_flags & RTF_LLDATA) != 0) { error = lla_rt_output(rtm, &info); break; } @@ -1427,6 +1431,21 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) lim = AF_MAX; } else /* dump only one table */ i = lim = af; + + /* + * take care of llinfo entries, the caller must + * specify an AF + */ + if (w.w_op == NET_RT_FLAGS && w.w_arg == 0) { + if (af != 0) + error = lltable_sysctl_dumparp(af, w.w_req); + else + error = EINVAL; + break; + } + /* + * take care of routing entries + */ for (error = 0; error == 0 && i <= lim; i++) if ((rnh = V_rt_tables[curthread->td_proc->p_fibnum][i]) != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1435,11 +1454,6 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; - /* - * take care of llinfo entries - */ - if (w.w_op == NET_RT_FLAGS) - error = lltable_sysctl_dumparp(af, w.w_req); break; case NET_RT_IFLIST: Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Dec 26 11:11:30 2008 (r186499) +++ head/sys/netinet/in.c Fri Dec 26 19:45:24 2008 (r186500) @@ -1222,7 +1222,7 @@ in_lltable_dump(struct lltable *llt, str arpc.rtm.rtm_rmx.rmx_expire = lle->la_flags & LLE_STATIC ? 0 : lle->la_expire; - arpc.rtm.rtm_flags |= RTF_HOST; + arpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); if (lle->la_flags & LLE_STATIC) arpc.rtm.rtm_flags |= RTF_STATIC; arpc.rtm.rtm_index = ifp->if_index; Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Dec 26 11:11:30 2008 (r186499) +++ head/sys/netinet6/in6.c Fri Dec 26 19:45:24 2008 (r186500) @@ -2282,7 +2282,7 @@ in6_lltable_dump(struct lltable *llt, st bcopy(&lle->ll_addr, LLADDR(sdl), ifp->if_addrlen); ndpc.rtm.rtm_rmx.rmx_expire = lle->la_flags & LLE_STATIC ? 0 : lle->la_expire; - ndpc.rtm.rtm_flags |= RTF_HOST; + ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA); if (lle->la_flags & LLE_STATIC) ndpc.rtm.rtm_flags |= RTF_STATIC; ndpc.rtm.rtm_index = ifp->if_index; Modified: head/usr.sbin/arp/arp.c ============================================================================== --- head/usr.sbin/arp/arp.c Fri Dec 26 11:11:30 2008 (r186499) +++ head/usr.sbin/arp/arp.c Fri Dec 26 19:45:24 2008 (r186500) @@ -477,6 +477,7 @@ delete(char *host, int do_proxy) } dst->sin_other = SIN_PROXY; } + rtm->rtm_flags |= RTF_LLDATA; if (rtmsg(RTM_DELETE, dst, NULL) != NULL) { printf("%s (%s) deleted\n", host, inet_ntoa(addr->sin_addr)); return (0); @@ -706,7 +707,7 @@ rtmsg(int cmd, struct sockaddr_inarp *ds rtm->rtm_addrs |= RTA_GATEWAY; rtm->rtm_rmx.rmx_expire = expire_time; rtm->rtm_inits = RTV_EXPIRE; - rtm->rtm_flags |= (RTF_HOST | RTF_STATIC); + rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA); dst->sin_other = 0; if (doing_proxy) { if (proxy_only) Modified: head/usr.sbin/ndp/ndp.c ============================================================================== --- head/usr.sbin/ndp/ndp.c Fri Dec 26 11:11:30 2008 (r186499) +++ head/usr.sbin/ndp/ndp.c Fri Dec 26 19:45:24 2008 (r186500) @@ -554,6 +554,7 @@ delete: * but we want the actual address */ NEXTADDR(RTA_DST, sin_m); + rtm->rtm_flags |= RTF_LLDATA; if (rtmsg(RTM_DELETE) == 0) { struct sockaddr_in6 s6 = *sin; /* XXX: for safety */ @@ -895,7 +896,7 @@ rtmsg(cmd) rtm->rtm_rmx.rmx_expire = expire_time; rtm->rtm_inits = RTV_EXPIRE; } - rtm->rtm_flags |= (RTF_HOST | RTF_STATIC); + rtm->rtm_flags |= (RTF_HOST | RTF_STATIC | RTF_LLDATA); #if 0 /* we don't support ipv6addr/128 type proxying */ if (rtm->rtm_flags & RTF_ANNOUNCE) { rtm->rtm_flags &= ~RTF_HOST; From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 20:27:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603FD106564A; Fri, 26 Dec 2008 20:27:33 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 507D28FC08; Fri, 26 Dec 2008 20:27:33 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQKRWEl050044; Fri, 26 Dec 2008 20:27:32 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQKRWaE050043; Fri, 26 Dec 2008 20:27:32 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812262027.mBQKRWaE050043@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Dec 2008 20:27: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: r186501 - head/sys/geom/part X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 20:27:33 -0000 Author: obrien Date: Fri Dec 26 20:27:32 2008 New Revision: 186501 URL: http://svn.freebsd.org/changeset/base/186501 Log: When the geometry does not match the label, print out the values. Modified: head/sys/geom/part/g_part_bsd.c Modified: head/sys/geom/part/g_part_bsd.c ============================================================================== --- head/sys/geom/part/g_part_bsd.c Fri Dec 26 19:45:24 2008 (r186500) +++ head/sys/geom/part/g_part_bsd.c Fri Dec 26 20:27:32 2008 (r186501) @@ -337,9 +337,10 @@ g_part_bsd_read(struct g_part_table *bas goto invalid_label; if (heads != basetable->gpt_heads && !basetable->gpt_fixgeom) basetable->gpt_heads = heads; - if (sectors != basetable->gpt_sectors || - heads != basetable->gpt_heads) - printf("GEOM: %s: geometry does not match label.\n", pp->name); + if (sectors != basetable->gpt_sectors || heads != basetable->gpt_heads) + printf("GEOM: %s: geometry does not match label" + " (%uh,%us != %uh,%us).\n", pp->name, heads, sectors, + basetable->gpt_heads, basetable->gpt_sectors); chs = le32dec(buf + 60); if (chs < 1) From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 22:31:45 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59C49106564A; Fri, 26 Dec 2008 22:31:45 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48A088FC08; Fri, 26 Dec 2008 22:31:45 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQMVjki052151; Fri, 26 Dec 2008 22:31:45 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQMVjHC052150; Fri, 26 Dec 2008 22:31:45 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200812262231.mBQMVjHC052150@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 26 Dec 2008 22:31: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: r186502 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 22:31:45 -0000 Author: luigi Date: Fri Dec 26 22:31:45 2008 New Revision: 186502 URL: http://svn.freebsd.org/changeset/base/186502 Log: Clarify the behaviour of conditionals when dealing with comparisons. In particular, point out that string comparison can only use != and == (how weird, given that the underlying call to strcmp returns more information), that floating point values are correctly interpreted as numbers, and that the left-hand side must be a variable expansion. MFC after: 3 weeks Modified: head/usr.bin/make/make.1 Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Fri Dec 26 20:27:32 2008 (r186501) +++ head/usr.bin/make/make.1 Fri Dec 26 22:31:45 2008 (r186502) @@ -1130,24 +1130,35 @@ has been defined. .Pp An .Ar expression -may also be an arithmetic or string comparison, with the left-hand side -being a variable expansion. -Variable expansion is -performed on both sides of the comparison, after which the integral +may also be a numeric or string comparison: +in this case, the left-hand side +.Ar must be +a variable expansion, whereas the right-hand side can be a +constant or a variable expansion. +Variable expansion is performed on both sides, after which the resulting values are compared. A value is interpreted as hexadecimal if it is preceded by 0x, otherwise it is decimal; octal numbers are not supported. -The standard C relational operators are all supported. -If after -variable expansion, either the left or right hand side of a +.Pp +String comparison can only use the .Sq Ic == or .Sq Ic != -operator is not an integral value, then -string comparison is performed between the expanded -variables. -If no relational operator is given, it is assumed that the expanded -variable is being compared against 0. +operators, whereas numeric values (both integer and floating point) +can also be compared using the +.Sq Ic > +, +.Sq Ic >= +, +.Sq Ic < +and +.Sq Ic <= +operators. +.Pp +If no relational operator (and right-hand value) are given, an implicit +.Sq Ic != 0 +is used. However be very careful in using this feature especially +when the left-hand side variable expansion returns a string. .Pp When .Nm From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 22:47:12 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D7211065674; Fri, 26 Dec 2008 22:47: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 1C3D08FC0C; Fri, 26 Dec 2008 22:47:12 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQMlC79052517; Fri, 26 Dec 2008 22:47:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQMlBkv052516; Fri, 26 Dec 2008 22:47:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812262247.mBQMlBkv052516@svn.freebsd.org> From: Alexander Motin Date: Fri, 26 Dec 2008 22:47: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: r186503 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 22:47:12 -0000 Author: mav Date: Fri Dec 26 22:47:11 2008 New Revision: 186503 URL: http://svn.freebsd.org/changeset/base/186503 Log: Add some special handling for AD1986A codec: Disable some unneeded pathes in overcomplicated input mixer to help parser to handle the rest better. This gives mic input boost control in some configurations and just more predictable operation in others. 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 Dec 26 22:31:45 2008 (r186502) +++ head/sys/dev/sound/pci/hda/hdac.c Fri Dec 26 22:47:11 2008 (r186503) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081223_0121" +#define HDA_DRV_TEST_REV "20081226_0122" SND_DECLARE_FILE("$FreeBSD$"); @@ -4548,6 +4548,32 @@ hdac_vendor_patch_parse(struct hdac_devi */ break; case HDA_CODEC_AD1986A: + /* + * This codec has overcomplicated input mixing. + * Make some cleaning there. + */ + /* Disable input mono mixer. Not needed and not supported. */ + w = hdac_widget_get(devinfo, 43); + if (w != NULL) + w->enable = 0; + /* Disable any with any input mixing mesh. Use separately. */ + w = hdac_widget_get(devinfo, 39); + if (w != NULL) + w->enable = 0; + w = hdac_widget_get(devinfo, 40); + if (w != NULL) + w->enable = 0; + w = hdac_widget_get(devinfo, 41); + if (w != NULL) + w->enable = 0; + w = hdac_widget_get(devinfo, 42); + if (w != NULL) + w->enable = 0; + /* Disable duplicate mixer node connector. */ + w = hdac_widget_get(devinfo, 15); + if (w != NULL) + w->connsenable[3] = 0; + if (subvendor == ASUS_A8X_SUBVENDOR) { /* * This is just plain ridiculous.. There From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 22:54:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889D81065670; Fri, 26 Dec 2008 22:54:53 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 747608FC18; Fri, 26 Dec 2008 22:54:53 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQMsrDV052677; Fri, 26 Dec 2008 22:54:53 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQMsrbR052676; Fri, 26 Dec 2008 22:54:53 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812262254.mBQMsrbR052676@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Dec 2008 22:54: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: r186504 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 22:54:53 -0000 Author: obrien Date: Fri Dec 26 22:54:53 2008 New Revision: 186504 URL: http://svn.freebsd.org/changeset/base/186504 Log: Make the sub-'argc' static to make it harder to overwrite thru a buffer overflow. Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Fri Dec 26 22:47:11 2008 (r186503) +++ head/sbin/mount/mount.c Fri Dec 26 22:54:53 2008 (r186504) @@ -503,9 +503,10 @@ int mountfs(const char *vfstype, const char *spec, const char *name, int flags, const char *options, const char *mntopts) { + static int argc; char *argv[MAX_ARGS]; struct statfs sf; - int argc, i, ret; + int i, ret; char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX]; /* resolve the mountpoint with realpath(3) */ From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 22:55:39 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52B4D106564A; Fri, 26 Dec 2008 22:55:39 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41FF48FC1F; Fri, 26 Dec 2008 22:55:39 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBQMtdWl052752; Fri, 26 Dec 2008 22:55:39 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBQMtdXv052750; Fri, 26 Dec 2008 22:55:39 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200812262255.mBQMtdXv052750@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 26 Dec 2008 22:55: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: r186505 - head/sbin/mount X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 22:55:39 -0000 Author: obrien Date: Fri Dec 26 22:55:38 2008 New Revision: 186505 URL: http://svn.freebsd.org/changeset/base/186505 Log: style(9) Modified: head/sbin/mount/getmntopts.c head/sbin/mount/mount.c Modified: head/sbin/mount/getmntopts.c ============================================================================== --- head/sbin/mount/getmntopts.c Fri Dec 26 22:54:53 2008 (r186504) +++ head/sbin/mount/getmntopts.c Fri Dec 26 22:55:38 2008 (r186505) @@ -130,7 +130,7 @@ checkpath(const char *path, char *resolv struct stat sb; if (realpath(path, resolved) != NULL && stat(resolved, &sb) == 0) { - if (!S_ISDIR(sb.st_mode)) + if (!S_ISDIR(sb.st_mode)) errx(EX_USAGE, "%s: not a directory", resolved); } else errx(EX_USAGE, "%s: %s", resolved, strerror(errno)); @@ -176,7 +176,7 @@ build_iovec_argf(struct iovec **iov, int char val[255] = { 0 }; va_start(ap, fmt); - vsnprintf(val, sizeof(val), fmt, ap); + vsnprintf(val, sizeof(val), fmt, ap); va_end(ap); build_iovec(iov, iovlen, name, strdup(val), (size_t)-1); } Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Fri Dec 26 22:54:53 2008 (r186504) +++ head/sbin/mount/mount.c Fri Dec 26 22:55:38 2008 (r186505) @@ -145,7 +145,7 @@ use_mountprog(const char *vfstype) if (strcmp(vfstype, fs[i]) == 0) return (1); } - + return (0); } @@ -210,7 +210,7 @@ static void restart_mountd(void) { struct pidfh *pfh; - pid_t mountdpid; + pid_t mountdpid; pfh = pidfile_open(_PATH_MOUNTDPID, 0600, &mountdpid); if (pfh != NULL) { @@ -302,7 +302,7 @@ main(int argc, char *argv[]) if ((init_flags & MNT_UPDATE) && (ro == 0)) options = catopt(options, "noro"); - + rval = 0; switch (argc) { case 0: @@ -567,7 +567,7 @@ mountfs(const char *vfstype, const char if (use_mountprog(vfstype)) { ret = exec_mountprog(name, execname, argv); } else { - ret = mount_fs(vfstype, argc, argv); + ret = mount_fs(vfstype, argc, argv); } free(optbuf); From owner-svn-src-head@FreeBSD.ORG Fri Dec 26 23:46:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15C97106564A; Fri, 26 Dec 2008 23:46:20 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E77BD8FC14; Fri, 26 Dec 2008 23:46:19 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id C82FB1A3C3A; Fri, 26 Dec 2008 15:46:19 -0800 (PST) Date: Fri, 26 Dec 2008 15:46:19 -0800 From: Alfred Perlstein To: Ken Smith Message-ID: <20081226234619.GT18389@elvis.mu.org> References: <200812121158.mBCBwRPT096820@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812121158.mBCBwRPT096820@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: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 23:46:20 -0000 Does this mean that the user has to find the "Linux" package in the "add packages" area now? If so, that seems a bit complicated to get started. There's a LOT of packages. Pardon if I'm missing something obvious here. -Alfred * Ken Smith [081212 03:58] wrote: > Author: kensmith > Date: Fri Dec 12 11:58:27 2008 > New Revision: 185982 > URL: http://svn.freebsd.org/changeset/base/185982 > > Log: > Remove the offer to install Linux compatibility on i386 in the mainline > portion of sysinstall. Leave it to be treated as a regular package > along with all the other packages... > > Modified: > head/usr.sbin/sysinstall/config.c > head/usr.sbin/sysinstall/install.c > head/usr.sbin/sysinstall/menus.c > head/usr.sbin/sysinstall/sysinstall.h > > Modified: head/usr.sbin/sysinstall/config.c > ============================================================================== > --- head/usr.sbin/sysinstall/config.c Fri Dec 12 11:43:48 2008 (r185981) > +++ head/usr.sbin/sysinstall/config.c Fri Dec 12 11:58:27 2008 (r185982) > @@ -531,23 +531,6 @@ configUsers(dialogMenuItem *self) > return DITEM_SUCCESS; > } > > -#ifdef WITH_LINUX > -int > -configLinux(dialogMenuItem *self) > -{ > - WINDOW *w = savescr(); > - int i; > - > - dialog_clear_norefresh(); > - variable_set2(VAR_LINUX_ENABLE, "YES", 1); > - Mkdir("/compat/linux"); > - msgNotify("Installing Linux compatibility library..."); > - i = package_add("linux_base-fc"); > - restorescr(w); > - return i; > -} > -#endif > - > int > configSecurelevel(dialogMenuItem *self) > { > > Modified: head/usr.sbin/sysinstall/install.c > ============================================================================== > --- head/usr.sbin/sysinstall/install.c Fri Dec 12 11:43:48 2008 (r185981) > +++ head/usr.sbin/sysinstall/install.c Fri Dec 12 11:58:27 2008 (r185982) > @@ -686,12 +686,6 @@ nodisks: > if (!msgYesNo("Would you like to set this machine's time zone now?")) > systemExecute("tzsetup"); > > -#ifdef WITH_LINUX > - dialog_clear_norefresh(); > - if (!msgYesNo("Would you like to enable Linux binary compatibility?")) > - (void)configLinux(self); > -#endif > - > #ifdef WITH_MICE > dialog_clear_norefresh(); > if (!msgNoYes("Does this system have a PS/2, serial, or bus mouse?")) > > Modified: head/usr.sbin/sysinstall/menus.c > ============================================================================== > --- head/usr.sbin/sysinstall/menus.c Fri Dec 12 11:43:48 2008 (r185981) > +++ head/usr.sbin/sysinstall/menus.c Fri Dec 12 11:58:27 2008 (r185982) > @@ -1247,10 +1247,6 @@ DMenu MenuStartup = { > dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" }, > { " lpd", "This host has a printer and wants to run lpd.", > dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, > -#ifdef WITH_LINUX > - { " Linux", "This host wants to be able to run Linux binaries.", > - dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" }, > -#endif > #ifdef __i386__ > { " SCO", "This host wants to be able to run IBCS2 binaries.", > dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" }, > > Modified: head/usr.sbin/sysinstall/sysinstall.h > ============================================================================== > --- head/usr.sbin/sysinstall/sysinstall.h Fri Dec 12 11:43:48 2008 (r185981) > +++ head/usr.sbin/sysinstall/sysinstall.h Fri Dec 12 11:58:27 2008 (r185982) > @@ -61,10 +61,6 @@ > #define WITH_SLICES > #endif > > -#if defined(__i386__) > -#define WITH_LINUX > -#endif > - > /* device limits */ > #define DEV_NAME_MAX 128 /* The maximum length of a device name */ > #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 00:13:31 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E9571065677; Sat, 27 Dec 2008 00:13:31 +0000 (UTC) (envelope-from kensmith@cse.Buffalo.EDU) Received: from phoebe.cse.buffalo.edu (phoebe.cse.buffalo.edu [128.205.32.89]) by mx1.freebsd.org (Postfix) with ESMTP id B73098FC1A; Sat, 27 Dec 2008 00:13:30 +0000 (UTC) (envelope-from kensmith@cse.Buffalo.EDU) Received: from [128.205.32.76] (bauer.cse.buffalo.edu [128.205.32.76]) (authenticated bits=0) by phoebe.cse.buffalo.edu (8.14.1/8.13.7) with ESMTP id mBR0DOwj002718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Dec 2008 19:13:24 -0500 (EST) (envelope-from kensmith@cse.buffalo.edu) From: Ken Smith To: Alfred Perlstein In-Reply-To: <20081226234619.GT18389@elvis.mu.org> References: <200812121158.mBCBwRPT096820@svn.freebsd.org> <20081226234619.GT18389@elvis.mu.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-2xoT+09cWt8/aJUqPd87" Organization: U. Buffalo CSE Department Date: Fri, 26 Dec 2008 19:13:24 -0500 Message-Id: <1230336804.25666.11.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-DCC-Buffalo.EDU-Metrics: phoebe.cse.buffalo.edu 1029; Body=0 Fuz1=0 Fuz2=0 X-Spam-Status: No, score=-4.0 required=5.0 tests=RCVD_IN_DNSWL_MED autolearn=failed version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on phoebe.cse.buffalo.edu Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ken Smith Subject: Re: svn commit: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 00:13:31 -0000 --=-2xoT+09cWt8/aJUqPd87 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2008-12-26 at 15:46 -0800, Alfred Perlstein wrote: > Does this mean that the user has to find the "Linux" package in the > "add packages" area now? If so, that seems a bit complicated to > get started. There's a LOT of packages. Pardon if I'm missing something > obvious here. Yes, sort of. I've asked portmgr@ to help with setting things up so we've got a couple of new meta packages that help users set up a usable workstation relatively painlessly. They've said we can work together with the Gnome and KDE folks to try and get that set up. I'm not sure at this point if Linux emulation will be part of that or not, we haven't gotten quite that far yet. And we'll do something to make those meta-packages relatively easy to find. For example without something along those lines a user may just select the "gnome2" metapackage thinking they'll get a usable workstation but at least as of the last time I did something like that you don't quite wind up with a usable workstation (xorg-server is missing for example :-/). That said this has sort of been threatened for quite a while now, and having sysinstall not care about any packages before it hits what is currently its "Do you want to browse all the packages" section is needed if we're talking about not including pre-built packages with the release itself and that sort of thing. We're just setting it up so all packages get treated as packages instead of some being intertwined in earlier phases of sysinstall. --=20 Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | --=-2xoT+09cWt8/aJUqPd87 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklVcyQACgkQ/G14VSmup/aDHQCfQQh4VuGWQK8LzTz1B2DYI4WJ +AgAnROa36Fvwtenh4cgiw1+1GYLgxIF =clgW -----END PGP SIGNATURE----- --=-2xoT+09cWt8/aJUqPd87-- From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 00:17:41 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A2021065674; Sat, 27 Dec 2008 00:17:41 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8996C8FC14; Sat, 27 Dec 2008 00:17:41 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBR0HfcE054208; Sat, 27 Dec 2008 00:17:41 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBR0HfFj054207; Sat, 27 Dec 2008 00:17:41 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812270017.mBR0HfFj054207@svn.freebsd.org> From: Tom Rhodes Date: Sat, 27 Dec 2008 00:17: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: r186506 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 00:17:41 -0000 Author: trhodes Date: Sat Dec 27 00:17:41 2008 New Revision: 186506 URL: http://svn.freebsd.org/changeset/base/186506 Log: Fix up after last commit: Bump doc date; Kill hard sentence breaks; Fix commas by moving them off their own line. Modified: head/usr.bin/make/make.1 Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Fri Dec 26 22:55:38 2008 (r186505) +++ head/usr.bin/make/make.1 Sat Dec 27 00:17:41 2008 (r186506) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd March 24, 2008 +.Dd December 26, 2008 .Dt MAKE 1 .Os .Sh NAME @@ -1146,10 +1146,8 @@ or .Sq Ic != operators, whereas numeric values (both integer and floating point) can also be compared using the -.Sq Ic > -, -.Sq Ic >= -, +.Sq Ic > , +.Sq Ic >= , .Sq Ic < and .Sq Ic <= @@ -1157,7 +1155,8 @@ operators. .Pp If no relational operator (and right-hand value) are given, an implicit .Sq Ic != 0 -is used. However be very careful in using this feature especially +is used. +However be very careful in using this feature especially when the left-hand side variable expansion returns a string. .Pp When From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 00:32:09 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 724D5106564A; Sat, 27 Dec 2008 00:32:09 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 5D8658FC0C; Sat, 27 Dec 2008 00:32:09 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 1C4521A3C3A; Fri, 26 Dec 2008 16:32:09 -0800 (PST) Date: Fri, 26 Dec 2008 16:32:09 -0800 From: Alfred Perlstein To: Peter Wemm Message-ID: <20081227003209.GU18389@elvis.mu.org> References: <200812132159.mBDLxIQv040799@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r186057 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 00:32:09 -0000 * Peter Wemm [081216 20:12] wrote: > On Sat, Dec 13, 2008 at 1:59 PM, Bjoern A. Zeeb wrote: > > De-virtualize the MD5 context for TCP initial seq number generation > > and make it a function local variable like we do almost everywhere > > inside the kernel. > [..] > > --- head/sys/netinet/vinet.h Sat Dec 13 21:17:46 2008 (r186056) > > +++ head/sys/netinet/vinet.h Sat Dec 13 21:59:18 2008 (r186057) > > @@ -142,7 +142,6 @@ struct vnet_inet { > > int _isn_last_reseed; > > u_int32_t _isn_offset; > > u_int32_t _isn_offset_old; > > - MD5_CTX _isn_ctx; > > > > struct inpcbhead _udb; > > struct inpcbinfo _udbinfo; > > I'm bitterly unhappy with this. Every time these structs are touched, > either directly or indirectly, there is a guaranteed ABI breakage with > kernel modules. > > There needs to be a __FreeBSD_version bump (or something similar) > every time any of these structures change, and any kernel modules > *must* be prevented from loading. It can't be a >= some version, it > has to be an exact match. Peter, at Juniper we have what's called a "flag day" which sort of means that nothing will work past a certain point if you mix pre and post modules. Perhaps we just need a monotonically increasing kernel_flag parameter that the kernel linker will check on module load time. > With the global variable method the linker calculates the offsets at > load time. With this abomination, the knowledge of the structure > layout is compiled into the generated code with no chance of a fixup. > There are no sanity checks. If a module that referenced _isn_ctx is > loaded the old way, there would be a link error. The new way will > have it silently trash _udb instead. There's no "structure size changed" hook? I could have sworn that linker could warn about that... or are you saying that making this a global explicitly deactivates this check? > There is a whole world of hurt being unleashed here. I suspect that > we might even be possible to run out of digits in our > __FreeBSD_version numbering scheme. maybe another variable, like above would be useful. -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 00:38:26 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 958A31065673; Sat, 27 Dec 2008 00:38:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9D98FC12; Sat, 27 Dec 2008 00:38:26 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 60C581A3C3A; Fri, 26 Dec 2008 16:38:26 -0800 (PST) Date: Fri, 26 Dec 2008 16:38:26 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20081227003826.GV18389@elvis.mu.org> References: <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> <4947F363.4010909@samsco.org> <20081216.120412.1346820326.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081216.120412.1346820326.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, scottl@samsco.org, src-committers@FreeBSD.org, mav@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 00:38:26 -0000 * M. Warner Losh [081216 11:06] wrote: > In message: <4947F363.4010909@samsco.org> > Scott Long writes: > : M. Warner Losh wrote: > : > In message: <4947D474.9040802@samsco.org> > : > Scott Long writes: > : > : Alexander Motin wrote: > : > : > Author: mav > : > : > Date: Tue Dec 16 16:04:40 2008 > : > : > New Revision: 186182 > : > : > URL: http://svn.freebsd.org/changeset/base/186182 > : > : > > : > : > Log: > : > : > Call ata_legacy() only once on attach and save it's result. Scanning PCI > : > : > configuration registers (which are not going to change) on every interrupt > : > : > looks expensive, especially when interrupt is shared. Profiling shows me 3% > : > : > of time spent by atapci0 on pure network load due to IRQ sharing with em0. > : > : > > : > : > : > : Nice change. PCI Config registers are exceptionally slow to access on > : > : most systems. > : > > : > And we've been recommending to people for years that they avoid config > : > space access in interrupt handlers. Maybe it is time for something > : > that checks and prints a warning? > : > > : > : With the move to memory-mapped pci config registers, there was an > : intention to allow low-end devices to put their registers into config > : space. I think I recall some legacy ultra-low end devices that also > : put a few required registers into config space. So while it's not ideal > : to access it from an interrupt handler, I can't think of why it should > : be expressly forbidden. > > True. I wasn't planning on banning it, just warning about it so we > could be purposeful in our use of it. Likely unworkable though... Easy enough to stash a "once" varible in the generic device struct and warn when returning from an isr when INVARIANTS or something is turned on. Then you'd only get one warning per device once it happens. -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 01:10:18 2008 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C1241065674; Sat, 27 Dec 2008 01:10:18 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 27C338FC27; Sat, 27 Dec 2008 01:10:17 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id D5B7C1A3C3B; Fri, 26 Dec 2008 17:10:17 -0800 (PST) Date: Fri, 26 Dec 2008 17:10:17 -0800 From: Alfred Perlstein To: Ken Smith Message-ID: <20081227011017.GW18389@elvis.mu.org> References: <200812121158.mBCBwRPT096820@svn.freebsd.org> <20081226234619.GT18389@elvis.mu.org> <1230336804.25666.11.camel@bauer.cse.buffalo.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1230336804.25666.11.camel@bauer.cse.buffalo.edu> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ken Smith Subject: Re: svn commit: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 01:10:18 -0000 * Ken Smith [081226 16:13] wrote: > On Fri, 2008-12-26 at 15:46 -0800, Alfred Perlstein wrote: > > Does this mean that the user has to find the "Linux" package in the > > "add packages" area now? If so, that seems a bit complicated to > > get started. There's a LOT of packages. Pardon if I'm missing something > > obvious here. > > Yes, sort of. > > I've asked portmgr@ to help with setting things up so we've got a couple > of new meta packages that help users set up a usable workstation > relatively painlessly. They've said we can work together with the Gnome > and KDE folks to try and get that set up. I'm not sure at this point if > Linux emulation will be part of that or not, we haven't gotten quite > that far yet. And we'll do something to make those meta-packages > relatively easy to find. For example without something along those > lines a user may just select the "gnome2" metapackage thinking they'll > get a usable workstation but at least as of the last time I did > something like that you don't quite wind up with a usable workstation > (xorg-server is missing for example :-/). > > That said this has sort of been threatened for quite a while now, and > having sysinstall not care about any packages before it hits what is > currently its "Do you want to browse all the packages" section is needed > if we're talking about not including pre-built packages with the release > itself and that sort of thing. We're just setting it up so all packages > get treated as packages instead of some being intertwined in earlier > phases of sysinstall. OK, that makes sense. Please track it though, it would be bad to wind up "hiding" Linux compat from users under a huge package selection. thanks, -- - Alfred Perlstein From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 01:46:13 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 615591065676; Sat, 27 Dec 2008 01:46:13 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mx1.freebsd.org (Postfix) with ESMTP id 5796B8FC24; Sat, 27 Dec 2008 01:46:12 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id k40so3693451rvb.1 for ; Fri, 26 Dec 2008 17:46:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=bM9Kfb/m+4YFjXg3LErz4JN7WQUFIrlDYOidoKMDYXM=; b=rM8YJqi70dA478kzEnLmDIKThqicqpasQPp7QCs9mp4kCi2AG1+27O3poqRM+wCPxZ hwk+9cjhxtcMKNFGO1pAGph4iZSmqs6t3GWRYJBixMn9/hJ9gA/uSd9hrZfKwVbjE9xY lkoOotw9z7JECYIGJ+FPvBOgw6HA+6utlebdc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=RU+bkuZqA56+dFYxRWqsh4P+cAJi4b2xUpc87tfCEFkj1poevsFsXKv0mY82vqaRM1 hLmEhRLp1D+UEhyUxbVWV9IfYmQ6gI7ygsO270ZR89xHPfr/W0QSr8/vml98kr1/by9Q kfH0hkCUn7LDxA45wnQj7Y2FnNIwOjvXiVizY= Received: by 10.141.203.7 with SMTP id f7mr5523369rvq.125.1230342372125; Fri, 26 Dec 2008 17:46:12 -0800 (PST) Received: by 10.140.135.2 with HTTP; Fri, 26 Dec 2008 17:46:12 -0800 (PST) Message-ID: <7d6fde3d0812261746g66d19d2clf646333cf9da5559@mail.gmail.com> Date: Fri, 26 Dec 2008 17:46:12 -0800 From: "Garrett Cooper" To: "Alfred Perlstein" In-Reply-To: <20081227011017.GW18389@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812121158.mBCBwRPT096820@svn.freebsd.org> <20081226234619.GT18389@elvis.mu.org> <1230336804.25666.11.camel@bauer.cse.buffalo.edu> <20081227011017.GW18389@elvis.mu.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Ken Smith , src-committers@freebsd.org, Ken Smith Subject: Re: svn commit: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 01:46:13 -0000 On Fri, Dec 26, 2008 at 5:10 PM, Alfred Perlstein wrote: > * Ken Smith [081226 16:13] wrote: >> On Fri, 2008-12-26 at 15:46 -0800, Alfred Perlstein wrote: >> > Does this mean that the user has to find the "Linux" package in the >> > "add packages" area now? If so, that seems a bit complicated to >> > get started. There's a LOT of packages. Pardon if I'm missing something >> > obvious here. >> >> Yes, sort of. >> >> I've asked portmgr@ to help with setting things up so we've got a couple >> of new meta packages that help users set up a usable workstation >> relatively painlessly. They've said we can work together with the Gnome >> and KDE folks to try and get that set up. I'm not sure at this point if >> Linux emulation will be part of that or not, we haven't gotten quite >> that far yet. And we'll do something to make those meta-packages >> relatively easy to find. For example without something along those >> lines a user may just select the "gnome2" metapackage thinking they'll >> get a usable workstation but at least as of the last time I did >> something like that you don't quite wind up with a usable workstation >> (xorg-server is missing for example :-/). >> >> That said this has sort of been threatened for quite a while now, and >> having sysinstall not care about any packages before it hits what is >> currently its "Do you want to browse all the packages" section is needed >> if we're talking about not including pre-built packages with the release >> itself and that sort of thing. We're just setting it up so all packages >> get treated as packages instead of some being intertwined in earlier >> phases of sysinstall. > > OK, that makes sense. Please track it though, it would be bad to wind up > "hiding" Linux compat from users under a huge package selection. > > thanks, > -- > - Alfred Perlstein Yes, but it'd be nicer for linux compatibility to point to actual working linux emulators instead of long-defunct packages (the Redhat emulation package -- bleh). I'm all for improving the linux compat layer packaging -- thanks Ken! -Garrett From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 02:34:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BFAE106564A; Sat, 27 Dec 2008 02:34:08 +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 1065B8FC0C; Sat, 27 Dec 2008 02:34:07 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from [10.140.174.86] (mobile-032-170-112-099.mycingular.net [32.170.112.99] (may be forged)) (authenticated bits=0) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id mBR2XmsH059494; Fri, 26 Dec 2008 19:33:58 -0700 (MST) (envelope-from scottl@samsco.org) References: <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> <4947F363.4010909@samsco.org> <20081216.120412.1346820326.imp@bsdimp.com> <20081227003826.GV18389@elvis.mu.org> Message-Id: <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> From: Scott Long To: Alfred Perlstein In-Reply-To: <20081227003826.GV18389@elvis.mu.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5G77) Mime-Version: 1.0 (iPhone Mail 5G77) Date: Fri, 26 Dec 2008 19:33:38 -0700 X-Spam-Status: No, score=-2.6 required=3.8 tests=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" , "mav@freebsd.org" , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 02:34:08 -0000 On Dec 26, 2008, at 5:38 PM, Alfred Perlstein wrote: > * M. Warner Losh [081216 11:06] wrote: >> In message: <4947F363.4010909@samsco.org> >> Scott Long writes: >> : M. Warner Losh wrote: >> : > In message: <4947D474.9040802@samsco.org> >> : > Scott Long writes: >> : > : Alexander Motin wrote: >> : > : > Author: mav >> : > : > Date: Tue Dec 16 16:04:40 2008 >> : > : > New Revision: 186182 >> : > : > URL: http://svn.freebsd.org/changeset/base/186182 >> : > : > >> : > : > Log: >> : > : > Call ata_legacy() only once on attach and save it's >> result. Scanning PCI >> : > : > configuration registers (which are not going to change) >> on every interrupt >> : > : > looks expensive, especially when interrupt is shared. >> Profiling shows me 3% >> : > : > of time spent by atapci0 on pure network load due to IRQ >> sharing with em0. >> : > : > >> : > : >> : > : Nice change. PCI Config registers are exceptionally slow to >> access on >> : > : most systems. >> : > >> : > And we've been recommending to people for years that they avoid >> config >> : > space access in interrupt handlers. Maybe it is time for >> something >> : > that checks and prints a warning? >> : > >> : >> : With the move to memory-mapped pci config registers, there was an >> : intention to allow low-end devices to put their registers into >> config >> : space. I think I recall some legacy ultra-low end devices that >> also >> : put a few required registers into config space. So while it's >> not ideal >> : to access it from an interrupt handler, I can't think of why it >> should >> : be expressly forbidden. >> >> True. I wasn't planning on banning it, just warning about it so we >> could be purposeful in our use of it. Likely unworkable though... > > Easy enough to stash a "once" varible in the generic device struct > and warn when returning from an isr when INVARIANTS or something is > turned on. > > Then you'd only get one warning per device once it happens. > > I prefer to do nothing. It's not unsafe or erroneous to access cfg registers. But if some kind of message does get added, I insist that it drop all pretenses and say, "you're too poor to run freebsd, come back when you can afford better hardware.". :) Scott From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 02:45:54 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 428E3106564A; Sat, 27 Dec 2008 02:45:54 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 609A98FC18; Sat, 27 Dec 2008 02:45:53 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so1554138anc.13 for ; Fri, 26 Dec 2008 18:45:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=ff6Z8+E4n/pd8jn3OOWr5mPZplCkR3BKg+YL6mHqcLc=; b=QbEbTk28vkH0+y2MtACLKVf7CVrPMdbo3v12DCsjsvgHrwUalxArKWgdX+1UYICm9u IIXhofbzJl+I0z7aUdhZApz12MeTIPFrMispv2Gp2pvWKMuchVIKVvM1EU9hOWiZuEPS AZjRKYtzVZz5336PTG/MMvVKzPFLCMANdnf8o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=DzeqN5YVMx9XVvWy7ErYpUKaL7h0qjvByVDnYvRjhJKNGaZGjyj7YXS1hBcjNVVW7D /GMp/R+r0fW9alhm3+iRuSVnpkC2hxd6y8InVDo/fL7Lc+LVbsPIpHMZHDePzAgbRtFa qIvnDVJqFgtZjhTgdEwJ/cwNp4UOJj+TbIEsg= Received: by 10.100.168.18 with SMTP id q18mr6634154ane.7.1230345952733; Fri, 26 Dec 2008 18:45:52 -0800 (PST) Received: from ?10.87.218.31? ([32.155.74.116]) by mx.google.com with ESMTPS id b14sm17619657ana.32.2008.12.26.18.45.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 26 Dec 2008 18:45:51 -0800 (PST) References: <4947D474.9040802@samsco.org> <20081216.101038.1172765453.imp@bsdimp.com> <4947F363.4010909@samsco.org> <20081216.120412.1346820326.imp@bsdimp.com> <20081227003826.GV18389@elvis.mu.org> <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> Message-Id: <0775EC1A-7920-4B2A-A00E-1A930953B597@gmail.com> From: Garrett Cooper To: Scott Long In-Reply-To: <72A0CF67-F521-4C4B-955D-A80A77CC1165@samsco.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5F136) Mime-Version: 1.0 (iPhone Mail 5F136) Date: Fri, 26 Dec 2008 18:45:29 -0800 Cc: "src-committers@freebsd.org" , "mav@freebsd.org" , Alfred Perlstein , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186182 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 02:45:54 -0000 On Dec 26, 2008, at 18:33, Scott Long wrote: > > On Dec 26, 2008, at 5:38 PM, Alfred Perlstein > wrote: > >> * M. Warner Losh [081216 11:06] wrote: >>> In message: <4947F363.4010909@samsco.org> >>> Scott Long writes: >>> : M. Warner Losh wrote: >>> : > In message: <4947D474.9040802@samsco.org> >>> : > Scott Long writes: >>> : > : Alexander Motin wrote: >>> : > : > Author: mav >>> : > : > Date: Tue Dec 16 16:04:40 2008 >>> : > : > New Revision: 186182 >>> : > : > URL: http://svn.freebsd.org/changeset/base/186182 >>> : > : > >>> : > : > Log: >>> : > : > Call ata_legacy() only once on attach and save it's >>> result. Scanning PCI >>> : > : > configuration registers (which are not going to change) >>> on every interrupt >>> : > : > looks expensive, especially when interrupt is shared. >>> Profiling shows me 3% >>> : > : > of time spent by atapci0 on pure network load due to IRQ >>> sharing with em0. >>> : > : > >>> : > : >>> : > : Nice change. PCI Config registers are exceptionally slow to >>> access on >>> : > : most systems. >>> : > >>> : > And we've been recommending to people for years that they >>> avoid config >>> : > space access in interrupt handlers. Maybe it is time for >>> something >>> : > that checks and prints a warning? >>> : > >>> : >>> : With the move to memory-mapped pci config registers, there was an >>> : intention to allow low-end devices to put their registers into >>> config >>> : space. I think I recall some legacy ultra-low end devices that >>> also >>> : put a few required registers into config space. So while it's >>> not ideal >>> : to access it from an interrupt handler, I can't think of why it >>> should >>> : be expressly forbidden. >>> >>> True. I wasn't planning on banning it, just warning about it so we >>> could be purposeful in our use of it. Likely unworkable though... >> >> Easy enough to stash a "once" varible in the generic device struct >> and warn when returning from an isr when INVARIANTS or something is >> turned on. >> >> Then you'd only get one warning per device once it happens. >> >> > > I prefer to do nothing. It's not unsafe or erroneous to access cfg > registers. But if some kind of message does get added, I insist > that it drop all pretenses and say, "you're too poor to run freebsd, > come back when you can afford better hardware.". :) > > Scott Unfortunately embedded systems can't win the lottery ;.). -Garrett From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 08:03:33 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 748E9106564A; Sat, 27 Dec 2008 08:03:33 +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 5E6098FC12; Sat, 27 Dec 2008 08:03:33 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBR83XHs063942; Sat, 27 Dec 2008 08:03:33 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBR83XA5063933; Sat, 27 Dec 2008 08:03:33 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200812270803.mBR83XA5063933@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 27 Dec 2008 08:03: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: r186507 - in head: share/man/man4 sys/compat/ndis sys/dev/if_ndis sys/modules/ndis usr.sbin/ndiscvt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 08:03:33 -0000 Author: weongyo Date: Sat Dec 27 08:03:32 2008 New Revision: 186507 URL: http://svn.freebsd.org/changeset/base/186507 Log: Integrate the NDIS USB support code to CURRENT. Now the NDISulator supports NDIS USB drivers that it've tested with devices as follows: - Anygate XM-142 (Conexant) - Netgear WG111v2 (Realtek) - U-Khan UW-2054u (Marvell) - Shuttle XPC Accessory PN20 (Realtek) - ipTIME G054U2 (Ralink) - UNiCORN WL-54G (ZyDAS) - ZyXEL G-200v2 (ZyDAS) All of them succeeded to attach and worked though there are still some problems that it's expected to be solved. To use NDIS USB support, you should rebuild and install ndiscvt(8) and if you encounter a problem to attach please set `hw.ndisusb.halt' to 0 then retry. I expect no changes of the NDIS code for PCI, PCMCIA devices. Obtained from: //depot/projects/ndisusb/... Modified: head/share/man/man4/ndis.4 head/sys/compat/ndis/kern_ndis.c head/sys/compat/ndis/kern_windrv.c head/sys/compat/ndis/ndis_var.h head/sys/compat/ndis/ntoskrnl_var.h head/sys/compat/ndis/subr_ndis.c head/sys/compat/ndis/subr_ntoskrnl.c head/sys/compat/ndis/subr_usbd.c head/sys/compat/ndis/usbd_var.h head/sys/dev/if_ndis/if_ndis.c head/sys/dev/if_ndis/if_ndis_pccard.c head/sys/dev/if_ndis/if_ndis_pci.c head/sys/dev/if_ndis/if_ndis_usb.c head/sys/dev/if_ndis/if_ndisvar.h head/sys/modules/ndis/Makefile head/usr.sbin/ndiscvt/inf.c head/usr.sbin/ndiscvt/windrv_stub.c Modified: head/share/man/man4/ndis.4 ============================================================================== --- head/share/man/man4/ndis.4 Sat Dec 27 00:17:41 2008 (r186506) +++ head/share/man/man4/ndis.4 Sat Dec 27 08:03:32 2008 (r186507) @@ -105,7 +105,7 @@ file. The .Nm driver is designed to support mainly Ethernet and wireless -network devices with PCI and PCMCIA bus attachments. +network devices with PCI, PCMCIA and USB bus attachments. (Cardbus devices are also supported as a subset of PCI.) It can Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/kern_ndis.c Sat Dec 27 08:03:32 2008 (r186507) @@ -65,6 +65,9 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include + #include #include #include @@ -144,7 +147,6 @@ ndis_modevent(module_t mod, int cmd, voi } TAILQ_INIT(&ndis_devhead); - break; case MOD_SHUTDOWN: if (TAILQ_FIRST(&ndis_devhead) == NULL) { @@ -1199,6 +1201,31 @@ ndis_shutdown_nic(arg) } int +ndis_pnpevent_nic(arg, type) + void *arg; + int type; +{ + struct ndis_softc *sc; + ndis_handle adapter; + ndis_pnpevent_handler pnpeventfunc; + + sc = arg; + NDIS_LOCK(sc); + adapter = sc->ndis_block->nmb_miniportadapterctx; + pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler; + NDIS_UNLOCK(sc); + if (adapter == NULL || pnpeventfunc == NULL) + return(EIO); + + if (sc->ndis_chars->nmc_rsvd0 == NULL) + MSCALL4(pnpeventfunc, adapter, type, NULL, 0); + else + MSCALL4(pnpeventfunc, sc->ndis_chars->nmc_rsvd0, type, NULL, 0); + + return (0); +} + +int ndis_init_nic(arg) void *arg; { Modified: head/sys/compat/ndis/kern_windrv.c ============================================================================== --- head/sys/compat/ndis/kern_windrv.c Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/kern_windrv.c Sat Dec 27 08:03:32 2008 (r186507) @@ -56,6 +56,9 @@ __FBSDID("$FreeBSD$"); #include #endif +#include +#include + #include #include #include @@ -349,9 +352,11 @@ windrv_load(mod, img, len, bustype, devl if (pe_patch_imports(img, "NDIS", ndis_functbl)) return(ENOEXEC); - /* Dynamically link the HAL.dll routines -- also required. */ - if (pe_patch_imports(img, "HAL", hal_functbl)) - return(ENOEXEC); + /* Dynamically link the HAL.dll routines -- optional. */ + if (pe_get_import_descriptor(img, &imp_desc, "HAL") == 0) { + if (pe_patch_imports(img, "HAL", hal_functbl)) + return(ENOEXEC); + } /* Dynamically link ntoskrnl.exe -- optional. */ if (pe_get_import_descriptor(img, &imp_desc, "ntoskrnl") == 0) { Modified: head/sys/compat/ndis/ndis_var.h ============================================================================== --- head/sys/compat/ndis/ndis_var.h Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/ndis_var.h Sat Dec 27 08:03:32 2008 (r186507) @@ -1658,6 +1658,7 @@ typedef void (*ndis_return_handler)(ndis typedef void (*ndis_enable_interrupts_handler)(ndis_handle); typedef void (*ndis_disable_interrupts_handler)(ndis_handle); typedef void (*ndis_shutdown_handler)(void *); +typedef void (*ndis_pnpevent_handler)(void *, int, void *, uint32_t); typedef void (*ndis_allocdone_handler)(ndis_handle, void *, ndis_physaddr *, uint32_t, void *); typedef uint8_t (*ndis_checkforhang_handler)(ndis_handle); @@ -1739,6 +1740,7 @@ extern void ndis_free_bufs(ndis_buffer * extern int ndis_reset_nic(void *); extern int ndis_halt_nic(void *); extern int ndis_shutdown_nic(void *); +extern int ndis_pnpevent_nic(void *, int); extern int ndis_init_nic(void *); extern void ndis_return_packet(void *, void *); extern int ndis_init_dma(void *); @@ -1759,6 +1761,7 @@ extern void NdisAllocatePacket(ndis_stat extern void NdisFreePacket(ndis_packet *); extern ndis_status NdisScheduleWorkItem(ndis_work_item *); extern void NdisMSleep(uint32_t); +extern void ndis_cancel_timerlist(void); __END_DECLS #endif /* _NDIS_VAR_H_ */ Modified: head/sys/compat/ndis/ntoskrnl_var.h ============================================================================== --- head/sys/compat/ndis/ntoskrnl_var.h Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/ntoskrnl_var.h Sat Dec 27 08:03:32 2008 (r186507) @@ -536,6 +536,11 @@ typedef struct wait_block wait_block; #define WAITKEY_VALID 0x8000 +/* kthread priority */ +#define LOW_PRIORITY 0 +#define LOW_REALTIME_PRIORITY 16 +#define HIGH_PRIORITY 31 + struct thread_context { void *tc_thrctx; void *tc_thrfunc; @@ -989,7 +994,13 @@ struct irp { } s2; void *irp_fileobj; } irp_overlay; - kapc irp_apc; + union { + kapc irp_apc; + struct { + void *irp_xfer; + void *irp_dev; + } irp_usb; + } irp_misc; void *irp_compkey; } irp_tail; }; @@ -997,6 +1008,9 @@ struct irp { #define irp_csl s2.u2.irp_csl #define irp_pkttype s2.u2.irp_pkttype +#define IRP_NDIS_DEV(irp) (irp)->irp_tail.irp_misc.irp_usb.irp_dev +#define IRP_NDISUSB_XFER(irp) (irp)->irp_tail.irp_misc.irp_usb.irp_xfer + typedef struct irp irp; #define InterlockedExchangePointer(dst, val) \ @@ -1009,6 +1023,10 @@ typedef struct irp irp; (cancel_func)InterlockedExchangePointer( \ (void *)&(ip)->irp_cancelfunc, (void *)(func)) +#define IoSetCancelValue(irp, val) \ + (u_long)InterlockedExchangePointer( \ + (void *)&(ip)->irp_cancel, (void *)(val)) + #define IoGetCurrentIrpStackLocation(irp) \ (irp)->irp_tail.irp_overlay.irp_csl @@ -1035,6 +1053,8 @@ typedef struct irp irp; #define IoMarkIrpPending(irp) \ IoGetCurrentIrpStackLocation(irp)->isl_ctl |= SL_PENDING_RETURNED +#define IoUnmarkIrpPending(irp) \ + IoGetCurrentIrpStackLocation(irp)->isl_ctl &= ~SL_PENDING_RETURNED #define IoCopyCurrentIrpStackLocationToNext(irp) \ do { \ @@ -1191,14 +1211,21 @@ typedef struct driver_object driver_obje #define STATUS_ALERTED 0x00000101 #define STATUS_TIMEOUT 0x00000102 #define STATUS_PENDING 0x00000103 +#define STATUS_FAILURE 0xC0000001 +#define STATUS_NOT_IMPLEMENTED 0xC0000002 #define STATUS_INVALID_PARAMETER 0xC000000D #define STATUS_INVALID_DEVICE_REQUEST 0xC0000010 #define STATUS_MORE_PROCESSING_REQUIRED 0xC0000016 +#define STATUS_NO_MEMORY 0xC0000017 #define STATUS_BUFFER_TOO_SMALL 0xC0000023 #define STATUS_MUTANT_NOT_OWNED 0xC0000046 +#define STATUS_NOT_SUPPORTED 0xC00000BB #define STATUS_INVALID_PARAMETER_2 0xC00000F0 #define STATUS_INSUFFICIENT_RESOURCES 0xC000009A +#define STATUS_DEVICE_NOT_CONNECTED 0xC000009D +#define STATUS_CANCELLED 0xC0000120 #define STATUS_NOT_FOUND 0xC0000225 +#define STATUS_DEVICE_REMOVED 0xC00002B6 #define STATUS_WAIT_0 0x00000000 @@ -1365,6 +1392,7 @@ extern void ExFreePool(void *); extern uint32_t IoConnectInterrupt(kinterrupt **, void *, void *, kspin_lock *, uint32_t, uint8_t, uint8_t, uint8_t, uint8_t, uint32_t, uint8_t); +extern uint8_t MmIsAddressValid(void *); extern void *MmMapIoSpace(uint64_t, uint32_t, uint32_t); extern void MmUnmapIoSpace(void *, size_t); extern void MmBuildMdlForNonPagedPool(mdl *); Modified: head/sys/compat/ndis/subr_ndis.c ============================================================================== --- head/sys/compat/ndis/subr_ndis.c Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/subr_ndis.c Sat Dec 27 08:03:32 2008 (r186507) @@ -95,6 +95,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include @@ -302,6 +304,15 @@ static void dummy(void); */ #define NDIS_POOL_EXTRA 16 +struct ktimer_list { + ktimer *kl_timer; + list_entry kl_next; +}; + +static struct list_entry ndis_timerlist; +static kspin_lock ndis_timerlock; +static int ndis_isusbdev; + int ndis_libinit() { @@ -317,6 +328,9 @@ ndis_libinit() patch++; } + KeInitializeSpinLock(&ndis_timerlock); + InitializeListHead(&ndis_timerlist); + return(0); } @@ -1215,6 +1229,16 @@ NdisMInitializeTimer(timer, handle, func ndis_timer_function func; void *ctx; { + ndis_miniport_block *block; + struct ktimer_list *kl; + struct ndis_softc *sc; + uint8_t irql; + + block = (ndis_miniport_block *)handle; + sc = device_get_softc(block->nmb_physdeviceobj->do_devext); + if (sc->ndis_iftype == PNPBus && ndis_isusbdev == 0) + ndis_isusbdev = 1; + /* Save the driver's funcptr and context */ timer->nmt_timerfunc = func; @@ -1232,7 +1256,38 @@ NdisMInitializeTimer(timer, handle, func ndis_findwrap((funcptr)ndis_timercall), timer); timer->nmt_ktimer.k_dpc = &timer->nmt_kdpc; - return; + if (ndis_isusbdev == 1) { + kl = (struct ktimer_list *)malloc(sizeof(*kl), M_DEVBUF, + M_NOWAIT | M_ZERO); + if (kl == NULL) + panic("out of memory"); /* no way to report errors */ + + kl->kl_timer = &timer->nmt_ktimer; + KeAcquireSpinLock(&ndis_timerlock, &irql); + InsertHeadList((&ndis_timerlist), (&kl->kl_next)); + KeReleaseSpinLock(&ndis_timerlock, irql); + } +} + +void +ndis_cancel_timerlist(void) +{ + list_entry *l; + struct ktimer_list *kl; + uint8_t cancelled, irql; + + KeAcquireSpinLock(&ndis_timerlock, &irql); + + while(!IsListEmpty(&ndis_timerlist)) { + l = RemoveHeadList(&ndis_timerlist); + kl = CONTAINING_RECORD(l, struct ktimer_list, kl_next); + KeReleaseSpinLock(&ndis_timerlock, irql); + cancelled = KeCancelTimer(kl->kl_timer); + free(kl, M_DEVBUF); + KeAcquireSpinLock(&ndis_timerlock, &irql); + } + + KeReleaseSpinLock(&ndis_timerlock, irql); } /* @@ -1277,6 +1332,26 @@ NdisMCancelTimer(timer, cancelled) ndis_timer *timer; uint8_t *cancelled; { + list_entry *l; + struct ktimer_list *kl; + uint8_t irql; + + if (ndis_isusbdev == 1) { + KeAcquireSpinLock(&ndis_timerlock, &irql); + l = ndis_timerlist.nle_flink; + while(l != &ndis_timerlist) { + kl = CONTAINING_RECORD(l, struct ktimer_list, kl_next); + if (kl->kl_timer == &timer->nt_ktimer) { + RemoveEntryList((&kl->kl_next)); + l = l->nle_flink; + free(kl, M_DEVBUF); + continue; + } + l = l->nle_flink; + } + KeReleaseSpinLock(&ndis_timerlock, irql); + } + *cancelled = KeCancelTimer(&timer->nt_ktimer); return; } Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/subr_ntoskrnl.c Sat Dec 27 08:03:32 2008 (r186507) @@ -207,7 +207,6 @@ static void *MmMapLockedPages(mdl *, uin static void *MmMapLockedPagesSpecifyCache(mdl *, uint8_t, uint32_t, void *, uint32_t, uint32_t); static void MmUnmapLockedPages(void *, mdl *); -static uint8_t MmIsAddressValid(void *); static device_t ntoskrnl_finddev(device_t, uint64_t, struct resource **); static void RtlZeroMemory(void *, size_t); static void RtlCopyMemory(void *, const void *, size_t); @@ -251,6 +250,8 @@ static funcptr ntoskrnl_findwrap(funcptr static uint32_t DbgPrint(char *, ...); static void DbgBreakPoint(void); static void KeBugCheckEx(uint32_t, u_long, u_long, u_long, u_long); +static int32_t KeDelayExecutionThread(uint8_t, uint8_t, int64_t *); +static int32_t KeSetPriorityThread(struct thread *, int32_t); static void dummy(void); static struct mtx ntoskrnl_dispatchlock; @@ -1143,16 +1144,18 @@ uint8_t IoCancelIrp(irp *ip) { cancel_func cfunc; + uint8_t cancelirql; - IoAcquireCancelSpinLock(&ip->irp_cancelirql); + IoAcquireCancelSpinLock(&cancelirql); cfunc = IoSetCancelRoutine(ip, NULL); ip->irp_cancel = TRUE; - if (ip->irp_cancelfunc == NULL) { - IoReleaseCancelSpinLock(ip->irp_cancelirql); + if (cfunc == NULL) { + IoReleaseCancelSpinLock(cancelirql); return(FALSE); } + ip->irp_cancelirql = cancelirql; MSCALL2(cfunc, IoGetCurrentIrpStackLocation(ip)->isl_devobj, ip); - return(TRUE); + return (uint8_t)IoSetCancelValue(ip, TRUE); } uint32_t @@ -1186,24 +1189,27 @@ IofCompleteRequest(ip, prioboost) irp *ip; uint8_t prioboost; { - uint32_t i; uint32_t status; device_object *dobj; io_stack_location *sl; completion_func cf; - ip->irp_pendingreturned = - IoGetCurrentIrpStackLocation(ip)->isl_ctl & SL_PENDING_RETURNED; - sl = (io_stack_location *)(ip + 1); - - for (i = ip->irp_currentstackloc; i < (uint32_t)ip->irp_stackcnt; i++) { - if (ip->irp_currentstackloc < ip->irp_stackcnt - 1) { - IoSkipCurrentIrpStackLocation(ip); + KASSERT(ip->irp_iostat.isb_status != STATUS_PENDING, + ("incorrect IRP(%p) status (STATUS_PENDING)", ip)); + + sl = IoGetCurrentIrpStackLocation(ip); + IoSkipCurrentIrpStackLocation(ip); + + do { + if (sl->isl_ctl & SL_PENDING_RETURNED) + ip->irp_pendingreturned = TRUE; + + if (ip->irp_currentstackloc != (ip->irp_stackcnt + 1)) dobj = IoGetCurrentIrpStackLocation(ip)->isl_devobj; - } else + else dobj = NULL; - if (sl[i].isl_completionfunc != NULL && + if (sl->isl_completionfunc != NULL && ((ip->irp_iostat.isb_status == STATUS_SUCCESS && sl->isl_ctl & SL_INVOKE_ON_SUCCESS) || (ip->irp_iostat.isb_status != STATUS_SUCCESS && @@ -1214,12 +1220,16 @@ IofCompleteRequest(ip, prioboost) status = MSCALL3(cf, dobj, ip, sl->isl_completionctx); if (status == STATUS_MORE_PROCESSING_REQUIRED) return; + } else { + if ((ip->irp_currentstackloc <= ip->irp_stackcnt) && + (ip->irp_pendingreturned == TRUE)) + IoMarkIrpPending(ip); } - if (IoGetCurrentIrpStackLocation(ip)->isl_ctl & - SL_PENDING_RETURNED) - ip->irp_pendingreturned = TRUE; - } + /* move to the next. */ + IoSkipCurrentIrpStackLocation(ip); + sl++; + } while (ip->irp_currentstackloc <= (ip->irp_stackcnt + 1)); /* Handle any associated IRPs. */ @@ -2672,7 +2682,7 @@ MmUnmapLockedPages(vaddr, buf) * here, but it doesn't. */ -static uint8_t +uint8_t MmIsAddressValid(vaddr) void *vaddr; { @@ -4258,6 +4268,73 @@ KeReadStateTimer(timer) return(timer->k_header.dh_sigstate); } +static int32_t +KeDelayExecutionThread(wait_mode, alertable, interval) + uint8_t wait_mode; + uint8_t alertable; + int64_t *interval; +{ + ktimer timer; + + if (wait_mode != 0) + panic("invalid wait_mode %d", wait_mode); + + KeInitializeTimer(&timer); + KeSetTimer(&timer, *interval, NULL); + KeWaitForSingleObject(&timer, 0, 0, alertable, NULL); + + return STATUS_SUCCESS; +} + +static uint64_t +KeQueryInterruptTime(void) +{ + int ticks; + struct timeval tv; + + getmicrouptime(&tv); + + ticks = tvtohz(&tv); + + return ticks * ((10000000 + hz - 1) / hz); +} + +static struct thread * +KeGetCurrentThread(void) +{ + + return curthread; +} + +static int32_t +KeSetPriorityThread(td, pri) + struct thread *td; + int32_t pri; +{ + int32_t old; + + if (td == NULL) + return LOW_REALTIME_PRIORITY; + + if (td->td_priority <= PRI_MIN_KERN) + old = HIGH_PRIORITY; + else if (td->td_priority >= PRI_MAX_KERN) + old = LOW_PRIORITY; + else + old = LOW_REALTIME_PRIORITY; + + thread_lock(td); + if (pri == HIGH_PRIORITY) + sched_prio(td, PRI_MIN_KERN); + if (pri == LOW_REALTIME_PRIORITY) + sched_prio(td, PRI_MIN_KERN + (PRI_MAX_KERN - PRI_MIN_KERN) / 2); + if (pri == LOW_PRIORITY) + sched_prio(td, PRI_MAX_KERN); + thread_unlock(td); + + return old; +} + static void dummy() { @@ -4441,6 +4518,10 @@ image_patch_table ntoskrnl_functbl[] = { IMPORT_CFUNC(WmiTraceMessage, 0), IMPORT_SFUNC(KeQuerySystemTime, 1), IMPORT_CFUNC(KeTickCount, 0), + IMPORT_SFUNC(KeDelayExecutionThread, 3), + IMPORT_SFUNC(KeQueryInterruptTime, 0), + IMPORT_SFUNC(KeGetCurrentThread, 0), + IMPORT_SFUNC(KeSetPriorityThread, 2), /* * This last entry is a catch-all for any function we haven't Modified: head/sys/compat/ndis/subr_usbd.c ============================================================================== --- head/sys/compat/ndis/subr_usbd.c Sat Dec 27 00:17:41 2008 (r186506) +++ head/sys/compat/ndis/subr_usbd.c Sat Dec 27 08:03:32 2008 (r186507) @@ -45,10 +45,24 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "usbdevs.h" + #include #include #include @@ -56,18 +70,64 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include static driver_object usbd_driver; -static uint32_t usbd_iodispatch(device_object *, irp *); - -static void USBD_GetUSBDIVersion(usbd_version_info *); -static void dummy(void); +static int32_t usbd_func_bulkintr(irp *); +static int32_t usbd_func_vendorclass(irp *); +static int32_t usbd_func_selconf(irp *); +static int32_t usbd_func_getdesc(irp *); +static usbd_status usbd_get_desc_ndis(usbd_device_handle, int, int, int, + void *, int *); +static union usbd_urb *usbd_geturb(irp *); +static usbd_status usbd_init_ndispipe(irp *, usb_endpoint_descriptor_t *); +static usbd_xfer_handle usbd_init_ndisxfer(irp *, usb_endpoint_descriptor_t *, + void *, uint32_t); +static int32_t usbd_iodispatch(device_object *, irp *); +static int32_t usbd_ioinvalid(device_object *, irp *); +static int32_t usbd_pnp(device_object *, irp *); +static int32_t usbd_power(device_object *, irp *); +static void usbd_irpcancel(device_object *, irp *); +static void usbd_irpcancel_cb(void *); +static int32_t usbd_submit_urb(irp *); +static int32_t usbd_urb2nt(int32_t); +static void usbd_xfereof(usbd_xfer_handle, usbd_private_handle, + usbd_status); +static void usbd_xferadd(usbd_xfer_handle, usbd_private_handle, + usbd_status); +static void usbd_xfertask(device_object *, void *); +static void dummy(void); + +static union usbd_urb *USBD_CreateConfigurationRequestEx( + usb_config_descriptor_t *, + struct usbd_interface_list_entry *); +static union usbd_urb *USBD_CreateConfigurationRequest( + usb_config_descriptor_t *, + uint16_t *); +static void USBD_GetUSBDIVersion(usbd_version_info *); +static usb_interface_descriptor_t *USBD_ParseConfigurationDescriptorEx( + usb_config_descriptor_t *, void *, int32_t, int32_t, + int32_t, int32_t, int32_t); +static usb_interface_descriptor_t *USBD_ParseConfigurationDescriptor( + usb_config_descriptor_t *, uint8_t, uint8_t); + +/* + * We need to wrap these functions because these need `context switch' from + * Windows to UNIX before it's called. + */ +static funcptr usbd_iodispatch_wrap; +static funcptr usbd_ioinvalid_wrap; +static funcptr usbd_pnp_wrap; +static funcptr usbd_power_wrap; +static funcptr usbd_irpcancel_wrap; +static funcptr usbd_xfertask_wrap; int usbd_libinit(void) { image_patch_table *patch; + int i; patch = usbd_functbl; while (patch->ipt_func != NULL) { @@ -77,14 +137,36 @@ usbd_libinit(void) patch++; } + windrv_wrap((funcptr)usbd_ioinvalid, + (funcptr *)&usbd_ioinvalid_wrap, 2, WINDRV_WRAP_STDCALL); + windrv_wrap((funcptr)usbd_iodispatch, + (funcptr *)&usbd_iodispatch_wrap, 2, WINDRV_WRAP_STDCALL); + windrv_wrap((funcptr)usbd_pnp, + (funcptr *)&usbd_pnp_wrap, 2, WINDRV_WRAP_STDCALL); + windrv_wrap((funcptr)usbd_power, + (funcptr *)&usbd_power_wrap, 2, WINDRV_WRAP_STDCALL); + windrv_wrap((funcptr)usbd_irpcancel, + (funcptr *)&usbd_irpcancel_wrap, 2, WINDRV_WRAP_STDCALL); + windrv_wrap((funcptr)usbd_xfertask, + (funcptr *)&usbd_xfertask_wrap, 2, WINDRV_WRAP_STDCALL); + /* Create a fake USB driver instance. */ windrv_bus_attach(&usbd_driver, "USB Bus"); /* Set up our dipatch routine. */ + for (i = 0; i <= IRP_MJ_MAXIMUM_FUNCTION; i++) + usbd_driver.dro_dispatch[i] = + (driver_dispatch)usbd_ioinvalid_wrap; usbd_driver.dro_dispatch[IRP_MJ_INTERNAL_DEVICE_CONTROL] = - (driver_dispatch)usbd_iodispatch; + (driver_dispatch)usbd_iodispatch_wrap; + usbd_driver.dro_dispatch[IRP_MJ_DEVICE_CONTROL] = + (driver_dispatch)usbd_iodispatch_wrap; + usbd_driver.dro_dispatch[IRP_MJ_POWER] = + (driver_dispatch)usbd_power_wrap; + usbd_driver.dro_dispatch[IRP_MJ_PNP] = + (driver_dispatch)usbd_pnp_wrap; return(0); } @@ -100,17 +182,949 @@ usbd_libfini(void) patch++; } + windrv_unwrap(usbd_ioinvalid_wrap); + windrv_unwrap(usbd_iodispatch_wrap); + windrv_unwrap(usbd_pnp_wrap); + windrv_unwrap(usbd_power_wrap); + windrv_unwrap(usbd_irpcancel_wrap); + windrv_unwrap(usbd_xfertask_wrap); + free(usbd_driver.dro_drivername.us_buf, M_DEVBUF); return(0); } -static uint32_t +static int32_t usbd_iodispatch(dobj, ip) device_object *dobj; irp *ip; { - return(0); + device_t dev = dobj->do_devext; + int32_t status; + struct io_stack_location *irp_sl; + + irp_sl = IoGetCurrentIrpStackLocation(ip); + switch (irp_sl->isl_parameters.isl_ioctl.isl_iocode) { + case IOCTL_INTERNAL_USB_SUBMIT_URB: + IRP_NDIS_DEV(ip) = dev; + + status = usbd_submit_urb(ip); + break; + default: + device_printf(dev, "ioctl 0x%x isn't supported\n", + irp_sl->isl_parameters.isl_ioctl.isl_iocode); + status = USBD_STATUS_NOT_SUPPORTED; + break; + } + + if (status == USBD_STATUS_PENDING) + return (STATUS_PENDING); + + ip->irp_iostat.isb_status = usbd_urb2nt(status); + if (status != USBD_STATUS_SUCCESS) + ip->irp_iostat.isb_info = 0; + return (ip->irp_iostat.isb_status); +} + +static int32_t +usbd_ioinvalid(dobj, ip) + device_object *dobj; + irp *ip; +{ + device_t dev = dobj->do_devext; + struct io_stack_location *irp_sl; + + irp_sl = IoGetCurrentIrpStackLocation(ip); + device_printf(dev, "invalid I/O dispatch %d:%d\n", irp_sl->isl_major, + irp_sl->isl_minor); + + ip->irp_iostat.isb_status = STATUS_FAILURE; + ip->irp_iostat.isb_info = 0; + + IoCompleteRequest(ip, IO_NO_INCREMENT); + + return (STATUS_FAILURE); +} + +static int32_t +usbd_pnp(dobj, ip) + device_object *dobj; + irp *ip; +{ + device_t dev = dobj->do_devext; + struct io_stack_location *irp_sl; + + irp_sl = IoGetCurrentIrpStackLocation(ip); + device_printf(dev, "%s: unsupported I/O dispatch %d:%d\n", + __func__, irp_sl->isl_major, irp_sl->isl_minor); + + ip->irp_iostat.isb_status = STATUS_FAILURE; + ip->irp_iostat.isb_info = 0; + + IoCompleteRequest(ip, IO_NO_INCREMENT); + + return (STATUS_FAILURE); +} + +static int32_t +usbd_power(dobj, ip) + device_object *dobj; + irp *ip; +{ + device_t dev = dobj->do_devext; + struct io_stack_location *irp_sl; + + irp_sl = IoGetCurrentIrpStackLocation(ip); + device_printf(dev, "%s: unsupported I/O dispatch %d:%d\n", + __func__, irp_sl->isl_major, irp_sl->isl_minor); + + ip->irp_iostat.isb_status = STATUS_FAILURE; + ip->irp_iostat.isb_info = 0; + + IoCompleteRequest(ip, IO_NO_INCREMENT); + + return (STATUS_FAILURE); +} + +/* Convert USBD_STATUS to NTSTATUS */ +static int32_t +usbd_urb2nt(status) + int32_t status; +{ + + switch (status) { + case USBD_STATUS_SUCCESS: + return (STATUS_SUCCESS); + case USBD_STATUS_DEVICE_GONE: + return (STATUS_DEVICE_NOT_CONNECTED); + case USBD_STATUS_PENDING: + return (STATUS_PENDING); + case USBD_STATUS_NOT_SUPPORTED: + return (STATUS_NOT_IMPLEMENTED); + case USBD_STATUS_NO_MEMORY: + return (STATUS_NO_MEMORY); + case USBD_STATUS_REQUEST_FAILED: + return (STATUS_NOT_SUPPORTED); + case USBD_STATUS_CANCELED: + return (STATUS_CANCELLED); + default: + break; + } + + return (STATUS_FAILURE); +} + +/* Convert FreeBSD's usbd_status to USBD_STATUS */ +static int32_t +usbd_usb2urb(int status) +{ + + switch (status) { + case USBD_NORMAL_COMPLETION: + return (USBD_STATUS_SUCCESS); + case USBD_IN_PROGRESS: + return (USBD_STATUS_PENDING); + case USBD_TIMEOUT: + return (USBD_STATUS_TIMEOUT); + case USBD_SHORT_XFER: + return (USBD_STATUS_ERROR_SHORT_TRANSFER); + case USBD_IOERROR: + return (USBD_STATUS_XACT_ERROR); + case USBD_NOMEM: + return (USBD_STATUS_NO_MEMORY); + case USBD_INVAL: + return (USBD_STATUS_REQUEST_FAILED); + case USBD_NOT_STARTED: + case USBD_TOO_DEEP: + case USBD_NO_POWER: + return (USBD_STATUS_DEVICE_GONE); + case USBD_CANCELLED: + return (USBD_STATUS_CANCELED); + default: + break; + } + + return (USBD_STATUS_NOT_SUPPORTED); +} + +static union usbd_urb * +usbd_geturb(ip) + irp *ip; +{ + struct io_stack_location *irp_sl; + + irp_sl = IoGetCurrentIrpStackLocation(ip); + + return (irp_sl->isl_parameters.isl_others.isl_arg1); +} + +static int32_t +usbd_submit_urb(ip) + irp *ip; +{ + device_t dev = IRP_NDIS_DEV(ip); + int32_t status; + union usbd_urb *urb; + + urb = usbd_geturb(ip); + /* + * In a case of URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER, + * USBD_URB_STATUS(urb) would be set at callback functions like + * usbd_intr() or usbd_xfereof(). + */ + switch (urb->uu_hdr.uuh_func) { + case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: + status = usbd_func_bulkintr(ip); + if (status != USBD_STATUS_SUCCESS && + status != USBD_STATUS_PENDING) + USBD_URB_STATUS(urb) = status; + break; + case URB_FUNCTION_VENDOR_DEVICE: + case URB_FUNCTION_VENDOR_INTERFACE: + case URB_FUNCTION_VENDOR_ENDPOINT: + case URB_FUNCTION_VENDOR_OTHER: + case URB_FUNCTION_CLASS_DEVICE: + case URB_FUNCTION_CLASS_INTERFACE: + case URB_FUNCTION_CLASS_ENDPOINT: + case URB_FUNCTION_CLASS_OTHER: + status = usbd_func_vendorclass(ip); + USBD_URB_STATUS(urb) = status; + break; + case URB_FUNCTION_SELECT_CONFIGURATION: + status = usbd_func_selconf(ip); + USBD_URB_STATUS(urb) = status; + break; + case URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE: + status = usbd_func_getdesc(ip); + USBD_URB_STATUS(urb) = status; + break; + default: + device_printf(dev, "func 0x%x isn't supported\n", + urb->uu_hdr.uuh_func); + USBD_URB_STATUS(urb) = status = USBD_STATUS_NOT_SUPPORTED; + break; + } + + return (status); +} + +static int32_t +usbd_func_getdesc(ip) + irp *ip; +{ + device_t dev = IRP_NDIS_DEV(ip); + int actlen, i; + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct usbd_urb_control_descriptor_request *ctldesc; + uint32_t len; + union usbd_urb *urb; + usb_config_descriptor_t cd, *cdp; + usbd_status status; + + mtx_lock(&Giant); + + urb = usbd_geturb(ip); + ctldesc = &urb->uu_ctldesc; + if (ctldesc->ucd_desctype == UDESC_CONFIG) { + /* Get the short config descriptor. */ + status = usbd_get_config_desc(uaa->device, ctldesc->ucd_idx, + &cd); + if (status != USBD_NORMAL_COMPLETION) { + ctldesc->ucd_trans_buflen = 0; + mtx_unlock(&Giant); + return usbd_usb2urb(status); + } + /* Get the full descriptor. Try a few times for slow devices. */ + len = MIN(ctldesc->ucd_trans_buflen, UGETW(cd.wTotalLength)); + for (i = 0; i < 3; i++) { + status = usbd_get_desc_ndis(uaa->device, + ctldesc->ucd_desctype, ctldesc->ucd_idx, + len, ctldesc->ucd_trans_buf, &actlen); + if (status == USBD_NORMAL_COMPLETION) + break; + usbd_delay_ms(uaa->device, 200); + } + if (status != USBD_NORMAL_COMPLETION) { + ctldesc->ucd_trans_buflen = 0; + mtx_unlock(&Giant); + return usbd_usb2urb(status); + } + + cdp = (usb_config_descriptor_t *)ctldesc->ucd_trans_buf; + if (cdp->bDescriptorType != UDESC_CONFIG) { + device_printf(dev, "bad desc %d\n", + cdp->bDescriptorType); + status = USBD_INVAL; + } + } else if (ctldesc->ucd_desctype == UDESC_STRING) { + /* Try a few times for slow devices. */ + for (i = 0; i < 3; i++) { + status = usbd_get_string_desc(uaa->device, + (UDESC_STRING << 8) + ctldesc->ucd_idx, + ctldesc->ucd_langid, ctldesc->ucd_trans_buf, + &actlen); + if (actlen > ctldesc->ucd_trans_buflen) + panic("small string buffer for UDESC_STRING"); + if (status == USBD_NORMAL_COMPLETION) + break; + usbd_delay_ms(uaa->device, 200); + } + } else + status = usbd_get_desc_ndis(uaa->device, ctldesc->ucd_desctype, + ctldesc->ucd_idx, ctldesc->ucd_trans_buflen, + ctldesc->ucd_trans_buf, &actlen); + + if (status != USBD_NORMAL_COMPLETION) { + ctldesc->ucd_trans_buflen = 0; + mtx_unlock(&Giant); + return usbd_usb2urb(status); + } + + ctldesc->ucd_trans_buflen = actlen; + ip->irp_iostat.isb_info = actlen; + + mtx_unlock(&Giant); + + return (USBD_STATUS_SUCCESS); +} + +/* + * FIXME: at USB1, not USB2, framework, there's no a interface to get `actlen'. + * However, we need it!!! + */ +static usbd_status +usbd_get_desc_ndis(usbd_device_handle dev, int type, int index, int len, + void *desc, int *actlen) +{ + usb_device_request_t req; + + req.bmRequestType = UT_READ_DEVICE; + req.bRequest = UR_GET_DESCRIPTOR; + USETW2(req.wValue, type, index); + USETW(req.wIndex, 0); + USETW(req.wLength, len); + return usbd_do_request_flags_pipe(dev, dev->default_pipe, &req, desc, + 0, actlen, USBD_DEFAULT_TIMEOUT); +} + +static int32_t +usbd_func_selconf(ip) + irp *ip; +{ + device_t dev = IRP_NDIS_DEV(ip); + int i, j; + struct usb_attach_arg *uaa = device_get_ivars(dev); + struct usbd_interface_information *intf; + struct usbd_pipe_information *pipe; + struct usbd_urb_select_configuration *selconf; + union usbd_urb *urb; + usb_config_descriptor_t *conf; + usb_endpoint_descriptor_t *edesc; + usbd_device_handle udev = uaa->device; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 09:33:01 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3F81065686; Sat, 27 Dec 2008 09:33:01 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 1B47A8FC1D; Sat, 27 Dec 2008 09:33:00 +0000 (UTC) (envelope-from rdivacky@lev.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9DF759CB1A8; Sat, 27 Dec 2008 10:27:49 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3-+z4YARuNCT; Sat, 27 Dec 2008 10:27:37 +0100 (CET) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 761059CB2C6; Sat, 27 Dec 2008 10:27:37 +0100 (CET) Received: (from rdivacky@localhost) by lev.vlakno.cz (8.14.2/8.14.2/Submit) id mBR9RaKR026766; Sat, 27 Dec 2008 10:27:36 +0100 (CET) (envelope-from rdivacky) Date: Sat, 27 Dec 2008 10:27:36 +0100 From: Roman Divacky To: Garrett Cooper Message-ID: <20081227092736.GA25457@freebsd.org> References: <200812121158.mBCBwRPT096820@svn.freebsd.org> <20081226234619.GT18389@elvis.mu.org> <1230336804.25666.11.camel@bauer.cse.buffalo.edu> <20081227011017.GW18389@elvis.mu.org> <7d6fde3d0812261746g66d19d2clf646333cf9da5559@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7d6fde3d0812261746g66d19d2clf646333cf9da5559@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , svn-src-head@freebsd.org, Ken Smith , Ken Smith Subject: Re: svn commit: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 09:33:01 -0000 On Fri, Dec 26, 2008 at 05:46:12PM -0800, Garrett Cooper wrote: > On Fri, Dec 26, 2008 at 5:10 PM, Alfred Perlstein wrote: > > * Ken Smith [081226 16:13] wrote: > >> On Fri, 2008-12-26 at 15:46 -0800, Alfred Perlstein wrote: > >> > Does this mean that the user has to find the "Linux" package in the > >> > "add packages" area now? If so, that seems a bit complicated to > >> > get started. There's a LOT of packages. Pardon if I'm missing something > >> > obvious here. > >> > >> Yes, sort of. > >> > >> I've asked portmgr@ to help with setting things up so we've got a couple > >> of new meta packages that help users set up a usable workstation > >> relatively painlessly. They've said we can work together with the Gnome > >> and KDE folks to try and get that set up. I'm not sure at this point if > >> Linux emulation will be part of that or not, we haven't gotten quite > >> that far yet. And we'll do something to make those meta-packages > >> relatively easy to find. For example without something along those > >> lines a user may just select the "gnome2" metapackage thinking they'll > >> get a usable workstation but at least as of the last time I did > >> something like that you don't quite wind up with a usable workstation > >> (xorg-server is missing for example :-/). > >> > >> That said this has sort of been threatened for quite a while now, and > >> having sysinstall not care about any packages before it hits what is > >> currently its "Do you want to browse all the packages" section is needed > >> if we're talking about not including pre-built packages with the release > >> itself and that sort of thing. We're just setting it up so all packages > >> get treated as packages instead of some being intertwined in earlier > >> phases of sysinstall. > > > > OK, that makes sense. Please track it though, it would be bad to wind up > > "hiding" Linux compat from users under a huge package selection. > > > > thanks, > > -- > > - Alfred Perlstein > > Yes, but it'd be nicer for linux compatibility to point to actual > working linux emulators instead of long-defunct packages (the Redhat > emulation package -- bleh). > I'm all for improving the linux compat layer packaging -- thanks Ken! > -Garrett we've switched to 2.6 emulation on default in -current so we are able to use newer fedora distro. the problem here is that there is no release freebsd with default 2.6 emulation, hence the default port stays at fc4 that's going to change From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 09:36:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA9DD106564A; Sat, 27 Dec 2008 09:36:22 +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 986C98FC08; Sat, 27 Dec 2008 09:36:22 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBR9aMR7066137; Sat, 27 Dec 2008 09:36:22 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBR9aMpC066135; Sat, 27 Dec 2008 09:36:22 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812270936.mBR9aMpC066135@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 09:36: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: r186508 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 09:36:22 -0000 Author: bz Date: Sat Dec 27 09:36:22 2008 New Revision: 186508 URL: http://svn.freebsd.org/changeset/base/186508 Log: Make ipsec_getpolicybysock() static and no longer export it. It has not been used outside this file since about the FAST_IPSEC -> IPSEC change. MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 08:03:32 2008 (r186507) +++ head/sys/netipsec/ipsec.c Sat Dec 27 09:36:22 2008 (r186508) @@ -354,12 +354,8 @@ ipsec_getpolicy(struct tdb_ident *tdbi, * * NOTE: IPv6 mapped adddress concern is implemented here. */ -struct secpolicy * -ipsec_getpolicybysock(m, dir, inp, error) - struct mbuf *m; - u_int dir; - struct inpcb *inp; - int *error; +static struct secpolicy * +ipsec_getpolicybysock(struct mbuf *m, u_int dir, struct inpcb *inp, int *error) { INIT_VNET_IPSEC(curvnet); struct inpcbpolicy *pcbsp = NULL; Modified: head/sys/netipsec/ipsec.h ============================================================================== --- head/sys/netipsec/ipsec.h Sat Dec 27 08:03:32 2008 (r186507) +++ head/sys/netipsec/ipsec.h Sat Dec 27 09:36:22 2008 (r186508) @@ -364,8 +364,6 @@ extern struct secpolicy *ipsec_getpolicy struct inpcb; extern struct secpolicy *ipsec4_checkpolicy __P((struct mbuf *, u_int, u_int, int *, struct inpcb *)); -extern struct secpolicy *ipsec_getpolicybysock(struct mbuf *, u_int, - struct inpcb *, int *); extern struct secpolicy * ipsec_getpolicybyaddr(struct mbuf *, u_int, int, int *); From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 09:42:18 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3E76106567D; Sat, 27 Dec 2008 09:42:17 +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 E1E118FC18; Sat, 27 Dec 2008 09:42:17 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBR9gHQ5066286; Sat, 27 Dec 2008 09:42:17 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBR9gHBd066285; Sat, 27 Dec 2008 09:42:17 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200812270942.mBR9gHBd066285@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 27 Dec 2008 09:42: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: r186509 - head/sys/compat/ndis X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 09:42:18 -0000 Author: weongyo Date: Sat Dec 27 09:42:17 2008 New Revision: 186509 URL: http://svn.freebsd.org/changeset/base/186509 Log: fix a bug to handling the argument that it passed `device_t' but it's handled as `struct ndis_softc'. It'll cause a panic when the driver is detached. Modified: head/sys/compat/ndis/kern_ndis.c Modified: head/sys/compat/ndis/kern_ndis.c ============================================================================== --- head/sys/compat/ndis/kern_ndis.c Sat Dec 27 09:36:22 2008 (r186508) +++ head/sys/compat/ndis/kern_ndis.c Sat Dec 27 09:42:17 2008 (r186509) @@ -1205,11 +1205,13 @@ ndis_pnpevent_nic(arg, type) void *arg; int type; { + device_t dev; struct ndis_softc *sc; ndis_handle adapter; ndis_pnpevent_handler pnpeventfunc; - sc = arg; + dev = arg; + sc = device_get_softc(arg); NDIS_LOCK(sc); adapter = sc->ndis_block->nmb_miniportadapterctx; pnpeventfunc = sc->ndis_chars->nmc_pnpevent_handler; From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 10:13:44 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F69A106567C; Sat, 27 Dec 2008 10:13:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA378FC24; Sat, 27 Dec 2008 10:13:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRADi6j067033; Sat, 27 Dec 2008 10:13:44 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRADiob067032; Sat, 27 Dec 2008 10:13:44 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200812271013.mBRADiob067032@svn.freebsd.org> From: Peter Holm Date: Sat, 27 Dec 2008 10:13: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: r186510 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 10:13:44 -0000 Author: pho Date: Sat Dec 27 10:13:43 2008 New Revision: 186510 URL: http://svn.freebsd.org/changeset/base/186510 Log: Prevent overflow of uio_resid. Approved by: kib Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Sat Dec 27 09:42:17 2008 (r186509) +++ head/sys/kern/vfs_syscalls.c Sat Dec 27 10:13:43 2008 (r186510) @@ -4069,6 +4069,8 @@ kern_getdirentries(struct thread *td, in int error, eofflag; AUDIT_ARG(fd, fd); + if (count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 11:00:20 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0D47106564A; Sat, 27 Dec 2008 11:00:20 +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 8CFBA8FC12; Sat, 27 Dec 2008 11:00:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRB0KSZ069687; Sat, 27 Dec 2008 11:00:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRB0Kkl069686; Sat, 27 Dec 2008 11:00:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812271100.mBRB0Kkl069686@svn.freebsd.org> From: Alexander Motin Date: Sat, 27 Dec 2008 11:00: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: r186511 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 11:00:20 -0000 Author: mav Date: Sat Dec 27 11:00:20 2008 New Revision: 186511 URL: http://svn.freebsd.org/changeset/base/186511 Log: Add some found NVidia MCP7x HDA controller IDs. 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 Sat Dec 27 10:13:43 2008 (r186510) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Dec 27 11:00:20 2008 (r186511) @@ -162,6 +162,16 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_NVIDIA_MCP65_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044b) #define HDA_NVIDIA_MCP67_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055c) #define HDA_NVIDIA_MCP67_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055d) +#define HDA_NVIDIA_MCP78_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0774) +#define HDA_NVIDIA_MCP78_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0775) +#define HDA_NVIDIA_MCP78_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0776) +#define HDA_NVIDIA_MCP78_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0777) +#define HDA_NVIDIA_MCP73_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fc) +#define HDA_NVIDIA_MCP73_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fd) +#define HDA_NVIDIA_MCP79_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac0) +#define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1) +#define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2) +#define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3) #define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff) /* ATI */ @@ -468,6 +478,16 @@ static const struct { { HDA_NVIDIA_MCP65_2, "NVidia MCP65" }, { HDA_NVIDIA_MCP67_1, "NVidia MCP67" }, { HDA_NVIDIA_MCP67_2, "NVidia MCP67" }, + { HDA_NVIDIA_MCP73_1, "NVidia MCP73" }, + { HDA_NVIDIA_MCP73_2, "NVidia MCP73" }, + { HDA_NVIDIA_MCP78_1, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_2, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_3, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_4, "NVidia MCP78" }, + { HDA_NVIDIA_MCP79_1, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_2, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_3, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_4, "NVidia MCP79" }, { HDA_ATI_SB450, "ATI SB450" }, { HDA_ATI_SB600, "ATI SB600" }, { HDA_VIA_VT82XX, "VIA VT8251/8237A" }, From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 11:12:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1FF106564A; Sat, 27 Dec 2008 11:12:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3762E8FC1B; Sat, 27 Dec 2008 11:12:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRBCOrh069943; Sat, 27 Dec 2008 11:12:24 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRBCOjN069941; Sat, 27 Dec 2008 11:12:24 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812271112.mBRBCOjN069941@svn.freebsd.org> From: Robert Watson Date: Sat, 27 Dec 2008 11:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186512 - head/lib/libutil X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 11:12:24 -0000 Author: rwatson Date: Sat Dec 27 11:12:23 2008 New Revision: 186512 URL: http://svn.freebsd.org/changeset/base/186512 Log: Include param.h instead of types.h when using user.h. Otherwise there is a dependence on ucred.h including audit.h including param.h, which we would like to eliminate. MFC after: 3 weeks Modified: head/lib/libutil/kinfo_getfile.c head/lib/libutil/kinfo_getvmmap.c Modified: head/lib/libutil/kinfo_getfile.c ============================================================================== --- head/lib/libutil/kinfo_getfile.c Sat Dec 27 11:00:20 2008 (r186511) +++ head/lib/libutil/kinfo_getfile.c Sat Dec 27 11:12:23 2008 (r186512) @@ -1,7 +1,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include Modified: head/lib/libutil/kinfo_getvmmap.c ============================================================================== --- head/lib/libutil/kinfo_getvmmap.c Sat Dec 27 11:00:20 2008 (r186511) +++ head/lib/libutil/kinfo_getvmmap.c Sat Dec 27 11:12:23 2008 (r186512) @@ -1,7 +1,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 11:38:42 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D6D1065673; Sat, 27 Dec 2008 11:38:42 +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 0D2F18FC1D; Sat, 27 Dec 2008 11:38:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRBcfx3070452; Sat, 27 Dec 2008 11:38:41 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRBcfBb070451; Sat, 27 Dec 2008 11:38:41 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271138.mBRBcfBb070451@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 11:38: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: r186513 - head/sys/dev/cfe X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 11:38:42 -0000 Author: bz Date: Sat Dec 27 11:38:41 2008 New Revision: 186513 URL: http://svn.freebsd.org/changeset/base/186513 Log: Remove an unused variable to make the SENTRY5 mips kernel compile (though with some asm warning). Modified: head/sys/dev/cfe/cfe_console.c Modified: head/sys/dev/cfe/cfe_console.c ============================================================================== --- head/sys/dev/cfe/cfe_console.c Sat Dec 27 11:12:23 2008 (r186512) +++ head/sys/dev/cfe/cfe_console.c Sat Dec 27 11:38:41 2008 (r186513) @@ -62,7 +62,6 @@ static struct ttydevsw cfe_ttydevsw = { }; static int conhandle = -1; -static struct tty *cfe_tp = NULL; /* XXX does cfe have to poll? */ static int polltime; static struct callout_handle cfe_timeouthandle From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 12:23:22 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E99001065670; Sat, 27 Dec 2008 12:23:22 +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 D4FE08FC13; Sat, 27 Dec 2008 12:23:22 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRCNMP8071294; Sat, 27 Dec 2008 12:23:22 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRCNMgJ071293; Sat, 27 Dec 2008 12:23:22 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200812271223.mBRCNMgJ071293@svn.freebsd.org> From: Weongyo Jeong Date: Sat, 27 Dec 2008 12:23: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: r186514 - head/sys/modules/usb2 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 12:23:23 -0000 Author: weongyo Date: Sat Dec 27 12:23:22 2008 New Revision: 186514 URL: http://svn.freebsd.org/changeset/base/186514 Log: unbreak the build. Decoupled the USB2's NDIS build from the default build. Pointy hat to: me Modified: head/sys/modules/usb2/Makefile Modified: head/sys/modules/usb2/Makefile ============================================================================== --- head/sys/modules/usb2/Makefile Sat Dec 27 11:38:41 2008 (r186513) +++ head/sys/modules/usb2/Makefile Sat Dec 27 12:23:22 2008 (r186514) @@ -53,7 +53,7 @@ SUBDIR += input_ms SUBDIR += misc SUBDIR += misc_dbp SUBDIR += misc_fm -SUBDIR += ndis +#SUBDIR += ndis SUBDIR += quirk SUBDIR += scanner SUBDIR += serial From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 14:17:15 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBDC71065676; Sat, 27 Dec 2008 14:17:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B73A78FC13; Sat, 27 Dec 2008 14:17:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBREHFp2073556; Sat, 27 Dec 2008 14:17:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBREHFWm073555; Sat, 27 Dec 2008 14:17:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812271417.mBREHFWm073555@svn.freebsd.org> From: Robert Watson Date: Sat, 27 Dec 2008 14:17: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: r186515 - head/cddl/contrib/opensolaris/lib/libzfs/common X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 14:17:15 -0000 Author: rwatson Date: Sat Dec 27 14:17:15 2008 New Revision: 186515 URL: http://svn.freebsd.org/changeset/base/186515 Log: Including mount.h requires including param.h. MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sat Dec 27 12:23:22 2008 (r186514) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Sat Dec 27 14:17:15 2008 (r186515) @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 14:24:24 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 745DB1065670; Sat, 27 Dec 2008 14:24:24 +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 612688FC1B; Sat, 27 Dec 2008 14:24:24 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBREOOAR073735; Sat, 27 Dec 2008 14:24:24 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBREOOf5073734; Sat, 27 Dec 2008 14:24:24 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200812271424.mBREOOf5073734@svn.freebsd.org> From: Ulf Lilleengen Date: Sat, 27 Dec 2008 14:24: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: r186516 - head/sbin/geom/misc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 14:24:24 -0000 Author: lulf Date: Sat Dec 27 14:24:24 2008 New Revision: 186516 URL: http://svn.freebsd.org/changeset/base/186516 Log: - Back out r186038. Rather than changing the intent of the caller, the problem should be handled internally in gvinum. Suggested by: pjd Modified: head/sbin/geom/misc/subr.c Modified: head/sbin/geom/misc/subr.c ============================================================================== --- head/sbin/geom/misc/subr.c Sat Dec 27 14:17:15 2008 (r186515) +++ head/sbin/geom/misc/subr.c Sat Dec 27 14:24:24 2008 (r186516) @@ -211,7 +211,7 @@ g_metadata_store(const char *name, u_cha sector = NULL; error = 0; - fd = open(path, O_RDWR); + fd = open(path, O_WRONLY); if (fd == -1) return (errno); mediasize = g_get_mediasize(name); From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 14:32:39 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA7D01065675; Sat, 27 Dec 2008 14:32:39 +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 B76728FC19; Sat, 27 Dec 2008 14:32:39 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBREWd45073904; Sat, 27 Dec 2008 14:32:39 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBREWd6D073903; Sat, 27 Dec 2008 14:32:39 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200812271432.mBREWd6D073903@svn.freebsd.org> From: Ulf Lilleengen Date: Sat, 27 Dec 2008 14:32: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: r186517 - head/sys/geom/vinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 14:32:39 -0000 Author: lulf Date: Sat Dec 27 14:32:39 2008 New Revision: 186517 URL: http://svn.freebsd.org/changeset/base/186517 Log: - Fix an issue with access permissions to underlying disks used by a gvinum plex. If the plex is a raid5 plex, and is being written to, parity data might have to be read from the underlying disks, requiring them to be opened for reading as well as writing. MFC after: 1 week Modified: head/sys/geom/vinum/geom_vinum_plex.c Modified: head/sys/geom/vinum/geom_vinum_plex.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_plex.c Sat Dec 27 14:24:24 2008 (r186516) +++ head/sys/geom/vinum/geom_vinum_plex.c Sat Dec 27 14:32:39 2008 (r186517) @@ -663,11 +663,21 @@ gv_plex_normal_request(struct gv_plex *p static int gv_plex_access(struct g_provider *pp, int dr, int dw, int de) { + struct gv_plex *p; struct g_geom *gp; struct g_consumer *cp, *cp2; int error; gp = pp->geom; + p = gp->softc; + KASSERT(p != NULL, ("NULL p")); + + if (p->org == GV_PLEX_RAID5) { + if (dw > 0 && dr == 0) + dr = 1; + else if (dw < 0 && dr == 0) + dr = -1; + } LIST_FOREACH(cp, &gp->consumer, consumer) { error = g_access(cp, dr, dw, de); From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 14:34:34 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 376AE106568A; Sat, 27 Dec 2008 14:34: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 241128FC19; Sat, 27 Dec 2008 14:34:34 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBREYXGK074051; Sat, 27 Dec 2008 14:34:33 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBREYXNi074049; Sat, 27 Dec 2008 14:34:33 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200812271434.mBREYXNi074049@svn.freebsd.org> From: Florent Thoumie Date: Sat, 27 Dec 2008 14:34: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: r186518 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 14:34:34 -0000 Author: flz Date: Sat Dec 27 14:34:33 2008 New Revision: 186518 URL: http://svn.freebsd.org/changeset/base/186518 Log: Fix memory leaks introduced in last commit. Bump version to 20081227. Reported by: gcooper Submitted by: Andrea Barberio MFC after: 1 month Modified: head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Sat Dec 27 14:32:39 2008 (r186517) +++ head/usr.sbin/pkg_install/lib/lib.h Sat Dec 27 14:34:33 2008 (r186518) @@ -105,7 +105,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20081225 +#define PKG_INSTALL_VERSION 20081227 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Sat Dec 27 14:32:39 2008 (r186517) +++ head/usr.sbin/pkg_install/lib/plist.c Sat Dec 27 14:34:33 2008 (r186518) @@ -544,9 +544,8 @@ delete_package(Boolean ign_err, Boolean int delete_hierarchy(const char *dir, Boolean ign_err, Boolean nukedirs) { - char *cp1, *cp2, *realdir; + char *cp1, *cp2, realdir[FILENAME_MAX]; - realdir = malloc(FILENAME_MAX); if (realdir == NULL) { warnx("Couldn't allocate enough memory\n"); return (ign_err ? SUCCESS : FAIL); @@ -555,7 +554,7 @@ delete_hierarchy(const char *dir, Boolea if (issymlink(dir) && readlink(dir, realdir, FILENAME_MAX-1) == -1) return (ign_err ? SUCCESS : FAIL); - strlcpy(realdir, dir, FILENAME_MAX); + strlcpy(realdir, dir, FILENAME_MAX-1); cp1 = cp2 = strdup(realdir); if (cp1 == NULL) { @@ -568,34 +567,29 @@ delete_hierarchy(const char *dir, Boolea warnx("%s '%s' doesn't exist", isdir(realdir) ? "directory" : "file", realdir); free(cp1); - free(realdir); return (ign_err ? SUCCESS : FAIL); } else if (nukedirs) { if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), realdir)) { free(cp1); - free(realdir); return (ign_err ? SUCCESS : FAIL); } } else if (isdir(realdir)) { if (RMDIR(realdir)) { free(cp1); - free(realdir); return (ign_err ? SUCCESS : FAIL); } } else { if (REMOVE(realdir, ign_err)) { free(cp1); - free(realdir); return (ign_err ? SUCCESS : FAIL); } } if (!nukedirs) { free(cp1); - free(realdir); return (SUCCESS); } while (cp2) { @@ -603,18 +597,15 @@ delete_hierarchy(const char *dir, Boolea *cp2 = '\0'; if (!isemptydir(realdir)) { free(cp1); - free(realdir); return (SUCCESS); } if (RMDIR(realdir) && !ign_err) { if (!fexists(realdir)) { warnx("directory '%s' doesn't exist", realdir); free(cp1); - free(realdir); return (SUCCESS); } else { free(cp1); - free(realdir); return (FAIL); } } @@ -629,7 +620,6 @@ delete_hierarchy(const char *dir, Boolea } } free(cp1); - free(realdir); return (SUCCESS); } From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 15:07:51 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6F70106564A; Sat, 27 Dec 2008 15:07:51 +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 B49648FC0C; Sat, 27 Dec 2008 15:07:51 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRF7pWq074682; Sat, 27 Dec 2008 15:07:51 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRF7pkv074681; Sat, 27 Dec 2008 15:07:51 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271507.mBRF7pkv074681@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 15:07: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: r186519 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 15:07:51 -0000 Author: bz Date: Sat Dec 27 15:07:51 2008 New Revision: 186519 URL: http://svn.freebsd.org/changeset/base/186519 Log: Permit digits at the beginning and end of kernel config file names for `make universe'. This catches a few more arm and, once enabled, mips configs and permits having local configs named like NOINET6. Reviewed by: phk MFC after: 4 weeks Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Dec 27 14:34:33 2008 (r186518) +++ head/Makefile Sat Dec 27 15:07:51 2008 (r186519) @@ -298,7 +298,7 @@ universe_prologue: .endif .for target in ${TARGETS} KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ - find [A-Z]*[A-Z] -type f -maxdepth 0 \ + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ ! -name DEFAULTS ! -name LINT KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} universe: universe_${target} From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 15:15:08 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50EAC106564A; Sat, 27 Dec 2008 15:15:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 088218FC16; Sat, 27 Dec 2008 15:15:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 7CCB241C5D0; Sat, 27 Dec 2008 16:15:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id TEh-ItXPjdoh; Sat, 27 Dec 2008 16:15:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 1B9D441C5EB; Sat, 27 Dec 2008 16:15:05 +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 C93524448D5; Sat, 27 Dec 2008 15:13:46 +0000 (UTC) Date: Sat, 27 Dec 2008 15:13:46 +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-head@freebsd.org In-Reply-To: <200812271507.mBRF7pkv074681@svn.freebsd.org> Message-ID: <20081227150827.D97918@maildrop.int.zabbadoz.net> References: <200812271507.mBRF7pkv074681@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: r186519 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 15:15:08 -0000 On Sat, 27 Dec 2008, Bjoern A. Zeeb wrote: > Author: bz > Date: Sat Dec 27 15:07:51 2008 > New Revision: 186519 > URL: http://svn.freebsd.org/changeset/base/186519 > > Log: > Permit digits at the beginning and end of kernel config file names for > `make universe'. This catches a few more arm and, once enabled, mips > configs and permits having local configs named like NOINET6. FYI: current state of `make universe': - Does not complete for a few arm configs. Patch to fix this, is here fore review: http://people.freebsd.org/~bz/20081227-01-arm-conf.diff - Does not complete for one i386 config. Will commit as soon as the compiles finish. Experimental: - For mips which is not yet part of universe: + kernels compile fine after I had fixed one earlier today. + world does not build but fails in libpam. > Modified: > head/Makefile > > Modified: head/Makefile > ============================================================================== > --- head/Makefile Sat Dec 27 14:34:33 2008 (r186518) > +++ head/Makefile Sat Dec 27 15:07:51 2008 (r186519) > @@ -298,7 +298,7 @@ universe_prologue: > .endif > .for target in ${TARGETS} > KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ > - find [A-Z]*[A-Z] -type f -maxdepth 0 \ > + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ > ! -name DEFAULTS ! -name LINT > KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} > universe: universe_${target} > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 15:22:23 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24AC41065673; Sat, 27 Dec 2008 15:22:23 +0000 (UTC) (envelope-from rik@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1234E8FC13; Sat, 27 Dec 2008 15:22:23 +0000 (UTC) (envelope-from rik@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRFMMXM074983; Sat, 27 Dec 2008 15:22:22 GMT (envelope-from rik@svn.freebsd.org) Received: (from rik@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRFMMHY074982; Sat, 27 Dec 2008 15:22:22 GMT (envelope-from rik@svn.freebsd.org) Message-Id: <200812271522.mBRFMMHY074982@svn.freebsd.org> From: Roman Kurakin Date: Sat, 27 Dec 2008 15:22: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: r186520 - head/sys/dev/puc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 15:22:23 -0000 Author: rik Date: Sat Dec 27 15:22:22 2008 New Revision: 186520 URL: http://svn.freebsd.org/changeset/base/186520 Log: Add support for the Oxford OX16PCI958-based card. Note, that the patch provided with this card for the Linux states that the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'. So probably we should also use the subdevice/subvendord here. For now just ignore that fact. PR: kern/129665 Submitted by: bsam Obtained from: united efforst with bsam Modified: head/sys/dev/puc/pucdata.c Modified: head/sys/dev/puc/pucdata.c ============================================================================== --- head/sys/dev/puc/pucdata.c Sat Dec 27 15:07:51 2008 (r186519) +++ head/sys/dev/puc/pucdata.c Sat Dec 27 15:22:22 2008 (r186520) @@ -632,6 +632,12 @@ const struct puc_cfg puc_pci_devices[] = PUC_PORT_2S, 0x10, 4, 0, }, + { 0x1415, 0x9538, 0xffff, 0, + "Oxford Semiconductor OX16PCI958 UARTs", + DEFAULT_RCLK * 10, + PUC_PORT_8S, 0x18, 0, 8, + }, + { 0x14d2, 0x8010, 0xffff, 0, "VScom PCI-100L", DEFAULT_RCLK * 8, From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 16:03:34 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9E881065679; Sat, 27 Dec 2008 16:03:34 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8F2768FC12; Sat, 27 Dec 2008 16:03:34 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRG3YMp075755; Sat, 27 Dec 2008 16:03:34 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRG3YYj075754; Sat, 27 Dec 2008 16:03:34 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <200812271603.mBRG3YYj075754@svn.freebsd.org> From: Alexander Kabaev Date: Sat, 27 Dec 2008 16:03: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: r186521 - head/sys/dev/uart X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 16:03:34 -0000 Author: kan Date: Sat Dec 27 16:03:34 2008 New Revision: 186521 URL: http://svn.freebsd.org/changeset/base/186521 Log: Minor style(9) compliance change. Modified: head/sys/dev/uart/uart_tty.c Modified: head/sys/dev/uart/uart_tty.c ============================================================================== --- head/sys/dev/uart/uart_tty.c Sat Dec 27 15:22:22 2008 (r186520) +++ head/sys/dev/uart/uart_tty.c Sat Dec 27 16:03:34 2008 (r186521) @@ -374,7 +374,8 @@ uart_tty_attach(struct uart_softc *sc) return (0); } -int uart_tty_detach(struct uart_softc *sc) +int +uart_tty_detach(struct uart_softc *sc) { struct tty *tp; From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 17:06:26 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 950F31065670; Sat, 27 Dec 2008 17:06:26 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by mx1.freebsd.org (Postfix) with ESMTP id 20B648FC17; Sat, 27 Dec 2008 17:06:25 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by an-out-0708.google.com with SMTP id c2so1606433anc.13 for ; Sat, 27 Dec 2008 09:06:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=P47vvkxVEgLdu9Fd7o81VL+l6D9k0TFyJ3tZCnhyjwA=; b=AAorys0fQXbTJCbrEiS5qVFoqcMGDWSH9uM+xFQaZJnWnupERyZ1oiqPrhNN/0zRXA O+1aeNxBZ9ghBTWUfR3hZ0npwGO/HkTOeHl+JtZFZZZD2egyKqFbFksmV+ly1ZUzdb04 yZ013kLDxEZIZ7xkzjEhF1hpLbqLI55MWGvFY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=pKv9rWc2bKEiB0KD0qXW3Ai1V+T6zCO6n8Q1fnhSwh/q98tpUnnJSWGysw9MaOJOFn ZSNLBob/uVbS/tqy7ksSRyFpSTfAjSYkXD87qi8vXjDaEi82zm0bC+ENszZEt6OYrq70 /WRyMoJEQXJ6/xWblfzE6zN6T0EPZA7AnyO7A= Received: by 10.100.127.15 with SMTP id z15mr6872554anc.10.1230397585415; Sat, 27 Dec 2008 09:06:25 -0800 (PST) Received: from ?10.86.56.206? ([32.155.163.96]) by mx.google.com with ESMTPS id b14sm21101469ana.12.2008.12.27.09.06.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Dec 2008 09:06:24 -0800 (PST) References: <200812271507.mBRF7pkv074681@svn.freebsd.org> <20081227150827.D97918@maildrop.int.zabbadoz.net> Message-Id: <26259E4E-6E26-4DAE-8046-80C7C46B7CD5@gmail.com> From: Garrett Cooper To: "Bjoern A. Zeeb" In-Reply-To: <20081227150827.D97918@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5F136) Mime-Version: 1.0 (iPhone Mail 5F136) Date: Sat, 27 Dec 2008 09:05:58 -0800 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "M. Warner Losh" Subject: Re: svn commit: r186519 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 17:06:26 -0000 On Dec 27, 2008, at 7:13, "Bjoern A. Zeeb" wrote: > On Sat, 27 Dec 2008, Bjoern A. Zeeb wrote: > >> Author: bz >> Date: Sat Dec 27 15:07:51 2008 >> New Revision: 186519 >> URL: http://svn.freebsd.org/changeset/base/186519 >> >> Log: >> Permit digits at the beginning and end of kernel config file names >> for >> `make universe'. This catches a few more arm and, once enabled, mips >> configs and permits having local configs named like NOINET6. > > FYI: current state of `make universe': > > - Does not complete for a few arm configs. > Patch to fix this, is here fore review: http://people.freebsd.org/~bz/20081227-01-arm-conf.diff > > - Does not complete for one i386 config. > Will commit as soon as the compiles finish. > > Experimental: > > - For mips which is not yet part of universe: > + kernels compile fine after I had fixed one earlier today. > + world does not build but fails in libpam. *paging mr Losh -- mr Losh!* > >> Modified: >> head/Makefile >> >> Modified: head/Makefile >> === >> === >> === >> ===================================================================== >> --- head/Makefile Sat Dec 27 14:34:33 2008 (r186518) >> +++ head/Makefile Sat Dec 27 15:07:51 2008 (r186519) >> @@ -298,7 +298,7 @@ universe_prologue: >> .endif >> .for target in ${TARGETS} >> KERNCONFS!= cd ${.CURDIR}/sys/${target}/conf && \ >> - find [A-Z]*[A-Z] -type f -maxdepth 0 \ >> + find [A-Z0-9]*[A-Z0-9] -type f -maxdepth 0 \ >> ! -name DEFAULTS ! -name LINT >> KERNCONFS:= ${KERNCONFS:S/^NOTES$/LINT/} >> universe: universe_${target} >> > > -- > Bjoern A. Zeeb The greatest risk is not taking > one. From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 17:19:16 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980EE1065678; Sat, 27 Dec 2008 17:19: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 87E3B8FC13; Sat, 27 Dec 2008 17:19:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRHJGxA077165; Sat, 27 Dec 2008 17:19:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRHJGkl077164; Sat, 27 Dec 2008 17:19:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271719.mBRHJGkl077164@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 17:19: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: r186522 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 17:19:16 -0000 Author: bz Date: Sat Dec 27 17:19:16 2008 New Revision: 186522 URL: http://svn.freebsd.org/changeset/base/186522 Log: Hide detect_virtual() along with the accompanying string arrays under #ifndef XEN to make XEN config compile again. In case of Xen vm_guest is hard coded. Move the list for the vm_guest sysctl out of the restictive bounds as the sysctl is there in either case. Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Sat Dec 27 16:03:34 2008 (r186521) +++ head/sys/kern/subr_param.c Sat Dec 27 17:19:16 2008 (r186522) @@ -126,6 +126,14 @@ SYSCTL_PROC(_kern, OID_AUTO, vm_guest, C */ struct buf *swbuf; +static const char *const vm_guest_sysctl_names[] = { + "none", + "generic", + "xen", + NULL +}; + +#ifndef XEN static const char *const vm_bnames[] = { "QEMU", /* QEMU */ "Plex86", /* Plex86 */ @@ -141,13 +149,6 @@ static const char *const vm_pnames[] = { NULL }; -static const char *const vm_guest_sysctl_names[] = { - "none", - "generic", - "xen", - NULL -}; - /* * Detect known Virtual Machine hosts by inspecting the emulated BIOS. @@ -178,6 +179,7 @@ detect_virtual(void) } return (VM_GUEST_NO); } +#endif /* * Boot time overrides that are not scaled against main memory From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 17:22:17 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC9B4106564A; Sat, 27 Dec 2008 17:22:17 +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 ACF508FC1D; Sat, 27 Dec 2008 17:22:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRHMHJ3077269; Sat, 27 Dec 2008 17:22:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRHMHV4077268; Sat, 27 Dec 2008 17:22:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271722.mBRHMHV4077268@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 17:22: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: r186523 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 17:22:17 -0000 Author: bz Date: Sat Dec 27 17:22:17 2008 New Revision: 186523 URL: http://svn.freebsd.org/changeset/base/186523 Log: Removed duplicate makeoptions MODULES_OVERRIDE="" Modified: head/sys/arm/conf/AVILA Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Sat Dec 27 17:19:16 2008 (r186522) +++ head/sys/arm/conf/AVILA Sat Dec 27 17:22:17 2008 (r186523) @@ -31,7 +31,6 @@ makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale -makeoptions MODULES_OVERRIDE="" #options HZ=1000 options HZ=100 options DEVICE_POLLING From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 18:09:19 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A2CA106564A for ; Sat, 27 Dec 2008 18:09:19 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 9A85B8FC30 for ; Sat, 27 Dec 2008 18:09:18 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by bwz12 with SMTP id 12so11361235bwz.19 for ; Sat, 27 Dec 2008 10:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=b+4lsq6iZeMHZBoCa/Z70Bg9DkRz1ojiDJ/CYzIb6PI=; b=CkeOmkSMgxGHfYhV7CaFdnzPHNHURmjMRgFqhCfI2a2pESwothjRVXJ1f/d8ABbCQd LztQWsAFb94OEJLTSLnt0fII/BhmbTZPYZTu1NO61AO2XKSRFORGmWutpNP2FSZogN/y NHkJ3+w3I0LEXjNhfmFbcTrzTZE80+UYMQ7ys= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=dNq2sAdmIVlvItDdM34jsCGnzDn+RKtsC7a4GGUq8GjJieBw8d+cxMLjVX+9GbukOm s/eAInKEZLAmOVqVzoI0QMK+1qE80dKu7fgqISeOM3Z5SYZPBiggsw3Q9RI803mR13uq d0nkLJUCFAAy4WjNWe1YgV+Sox0FW3sf17mDQ= Received: by 10.181.137.13 with SMTP id p13mr4458129bkn.173.1230399745555; Sat, 27 Dec 2008 09:42:25 -0800 (PST) Received: by 10.181.9.17 with HTTP; Sat, 27 Dec 2008 09:42:25 -0800 (PST) Message-ID: Date: Sat, 27 Dec 2008 18:42:25 +0100 From: "Antoine Brodin" Sender: antoine.brodin.freebsd@gmail.com To: "Ivan Voras" In-Reply-To: <200812171957.mBHJvCO2013765@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812171957.mBHJvCO2013765@svn.freebsd.org> X-Google-Sender-Auth: 4a9c7a3168978fbf Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186252 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 18:09:19 -0000 On Wed, Dec 17, 2008 at 8:57 PM, Ivan Voras wrote: > Author: ivoras > Date: Wed Dec 17 19:57:12 2008 > New Revision: 186252 > URL: http://svn.freebsd.org/changeset/base/186252 > > Log: > Introduce a sysctl kern.vm_guest that reflects what the kernel knows about > it running under a virtual environment. This also introduces a globally > accessible variable vm_guest that can be used where appropriate in the > kernel to inspect this environment. > > To make it easier for the long run, an enum VM_GUEST is also introduced, > which could possibly be factored out in a header somewhere (but the > question is where - vm/vm_param.h? sys/param.h?) so it eventually becomes > a part of the standard KPI. In any case, it's a start. > > The purpose of all this isn't to absolutely detect that the OS is running > under a virtual environment (cf. "redpill") but to allow the parts of the > kernel and the userland that care about this particular aspect and can do > something useful depending on it to have a standardised interface. Reducing > kern.hz is one example but there are other things that could be done like > avoiding context switches, not using CPU instructions that are known to be > slow in emulation, possibly different strategies in VM (memory) allocation, > CPU scheduling, etc. > > It isn't clear if the JAILS/VIMAGE functionality should also be exposed > by this particular mechanism (probably not since they're not "full" > virtual hardware environments). Sometime in the future another sysctl and > a variable could be introduced to reflect if the kernel supports any kind > of virtual hosting (e.g. VMWare VMI, Xen dom0). > > Reviewed by: silence from src-commiters@, virtualization@, kmacy@ > Approved by: gnn (mentor) > Security: Obscurity doesn't help. > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c [snip] > +enum VM_GUEST { VM_GUEST_NO, VM_GUEST_VM, VM_GUEST_XEN }; > + [snip] > - hz = detect_virtual() ? HZ_VM : HZ; > + hz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ; [snip] Hi Ivan, Could you change VM_GUEST_NO / VM_GUEST_VM / VM_GUEST_XEN to a #define or explicitly initialize them? The magnitude comparison between vm_guest and VM_GUEST_NO looks like gratuitous obfuscation. Cheers, Antoine From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 19:02:02 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1236B106564A; Sat, 27 Dec 2008 19:02:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDAF38FC14; Sat, 27 Dec 2008 19:02:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRJ21Gf079470; Sat, 27 Dec 2008 19:02:01 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRJ21DL079469; Sat, 27 Dec 2008 19:02:01 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812271902.mBRJ21DL079469@svn.freebsd.org> From: Sam Leffler Date: Sat, 27 Dec 2008 19:02: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: r186524 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 19:02:02 -0000 Author: sam Date: Sat Dec 27 19:02:01 2008 New Revision: 186524 URL: http://svn.freebsd.org/changeset/base/186524 Log: arm is in DEFAULTS; remove dup Submitted by: bz Modified: head/sys/arm/conf/CAMBRIA Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Sat Dec 27 17:22:17 2008 (r186523) +++ head/sys/arm/conf/CAMBRIA Sat Dec 27 19:02:01 2008 (r186524) @@ -18,7 +18,6 @@ # # $FreeBSD$ -machine arm ident CAMBRIA include "../xscale/ixp425/std.ixp435" From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 19:03:58 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EA401065679; Sat, 27 Dec 2008 19:03:58 +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 4F1EA8FC25; Sat, 27 Dec 2008 19:03:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRJ3wmf079539; Sat, 27 Dec 2008 19:03:58 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRJ3wIJ079536; Sat, 27 Dec 2008 19:03:58 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271903.mBRJ3wIJ079536@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 19:03: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: r186525 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 19:03:58 -0000 Author: bz Date: Sat Dec 27 19:03:57 2008 New Revision: 186525 URL: http://svn.freebsd.org/changeset/base/186525 Log: In additions to the configs from r185478, which also enabled the use of modules for arm, disable them by adding MODULES_OVERRIDE="" here as well. Reviewed by: sam MFC after: 3 weeks Modified: head/sys/arm/conf/EP80219 head/sys/arm/conf/HL200 head/sys/arm/conf/IQ31244 Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Sat Dec 27 19:02:01 2008 (r186524) +++ head/sys/arm/conf/EP80219 Sat Dec 27 19:03:57 2008 (r186525) @@ -28,6 +28,7 @@ options STARTUP_PAGETABLE_ADDR=0xa00000 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 makeoptions CONF_CFLAGS=-mcpu=xscale Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Sat Dec 27 19:02:01 2008 (r186524) +++ head/sys/arm/conf/HL200 Sat Dec 27 19:03:57 2008 (r186525) @@ -23,6 +23,7 @@ include "../at91/std.hl200" #To statically compile in device wiring instead of /boot/device.hints hints "KB920X.hints" +makeoptions MODULES_OVERRIDE="" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options DDB Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Sat Dec 27 19:02:01 2008 (r186524) +++ head/sys/arm/conf/IQ31244 Sat Dec 27 19:03:57 2008 (r186525) @@ -29,6 +29,7 @@ options STARTUP_PAGETABLE_ADDR=0xa000000 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 makeoptions CONF_CFLAGS=-mcpu=xscale From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 19:37:47 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 466881065673; Sat, 27 Dec 2008 19:37:47 +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 36BA68FC18; Sat, 27 Dec 2008 19:37:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRJbluZ080198; Sat, 27 Dec 2008 19:37:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRJblRo080197; Sat, 27 Dec 2008 19:37:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271937.mBRJblRo080197@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 19: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: r186526 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 19:37:47 -0000 Author: bz Date: Sat Dec 27 19:37:46 2008 New Revision: 186526 URL: http://svn.freebsd.org/changeset/base/186526 Log: Change the in6p variable names to inp to be able to diff the v4 to the v6 implementations. MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 19:03:57 2008 (r186525) +++ head/sys/netipsec/ipsec.c Sat Dec 27 19:37:46 2008 (r186526) @@ -1240,8 +1240,8 @@ ipsec_delete_pcbpolicy(inp) #ifdef INET6 int -ipsec6_set_policy(in6p, optname, request, len, cred) - struct inpcb *in6p; +ipsec6_set_policy(inp, optname, request, len, cred) + struct inpcb *inp; int optname; caddr_t request; size_t len; @@ -1252,7 +1252,7 @@ ipsec6_set_policy(in6p, optname, request struct secpolicy **pcb_sp; /* sanity check. */ - if (in6p == NULL || request == NULL) + if (inp == NULL || request == NULL) return EINVAL; if (len < sizeof(*xpl)) return EINVAL; @@ -1261,10 +1261,10 @@ ipsec6_set_policy(in6p, optname, request /* select direction */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: - pcb_sp = &in6p->inp_sp->sp_in; + pcb_sp = &inp->inp_sp->sp_in; break; case IPSEC_DIR_OUTBOUND: - pcb_sp = &in6p->inp_sp->sp_out; + pcb_sp = &inp->inp_sp->sp_out; break; default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, @@ -1276,8 +1276,8 @@ ipsec6_set_policy(in6p, optname, request } int -ipsec6_get_policy(in6p, request, len, mp) - struct inpcb *in6p; +ipsec6_get_policy(inp, request, len, mp) + struct inpcb *inp; caddr_t request; size_t len; struct mbuf **mp; @@ -1287,9 +1287,9 @@ ipsec6_get_policy(in6p, request, len, mp struct secpolicy *pcb_sp; /* sanity check. */ - if (in6p == NULL || request == NULL || mp == NULL) + if (inp == NULL || request == NULL || mp == NULL) return EINVAL; - IPSEC_ASSERT(in6p->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); if (len < sizeof(*xpl)) return EINVAL; xpl = (struct sadb_x_policy *)request; @@ -1297,10 +1297,10 @@ ipsec6_get_policy(in6p, request, len, mp /* select direction */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: - pcb_sp = in6p->inp_sp->sp_in; + pcb_sp = inp->inp_sp->sp_in; break; case IPSEC_DIR_OUTBOUND: - pcb_sp = in6p->inp_sp->sp_out; + pcb_sp = inp->inp_sp->sp_out; break; default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, @@ -1677,10 +1677,10 @@ ipsec4_hdrsiz(m, dir, inp) * and maybe from ip6_forward.() */ size_t -ipsec6_hdrsiz(m, dir, in6p) +ipsec6_hdrsiz(m, dir, inp) struct mbuf *m; u_int dir; - struct inpcb *in6p; + struct inpcb *inp; { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp; @@ -1688,15 +1688,15 @@ ipsec6_hdrsiz(m, dir, in6p) size_t size; IPSEC_ASSERT(m != NULL, ("null mbuf")); - IPSEC_ASSERT(in6p == NULL || in6p->inp_socket != NULL, + IPSEC_ASSERT(inp == NULL || inp->inp_socket != NULL, ("socket w/o inpcb")); /* get SP for this packet */ /* XXX Is it right to call with IP_FORWARDING. */ - if (in6p == NULL) + if (inp == NULL) sp = ipsec_getpolicybyaddr(m, dir, IP_FORWARDING, &error); else - sp = ipsec_getpolicybysock(m, dir, in6p, &error); + sp = ipsec_getpolicybysock(m, dir, inp, &error); if (sp == NULL) return 0; From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 19:42:59 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E08D0106567C; Sat, 27 Dec 2008 19:42:59 +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 D0DE08FC19; Sat, 27 Dec 2008 19:42:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRJgxnC080323; Sat, 27 Dec 2008 19:42:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRJgxwJ080322; Sat, 27 Dec 2008 19:42:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812271942.mBRJgxwJ080322@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 19:42: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: r186527 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 19:43:00 -0000 Author: bz Date: Sat Dec 27 19:42:59 2008 New Revision: 186527 URL: http://svn.freebsd.org/changeset/base/186527 Log: For consistency with ipsec4_setspidx_inpcb() rename file local function ipsec6_setspidx_in6pcb() to ipsec6_setspidx_inpcb(). MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 19:37:46 2008 (r186526) +++ head/sys/netipsec/ipsec.c Sat Dec 27 19:42:59 2008 (r186527) @@ -230,7 +230,7 @@ SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_ static int ipsec4_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); #ifdef INET6 -static int ipsec6_setspidx_in6pcb __P((struct mbuf *, struct inpcb *pcb)); +static int ipsec6_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); #endif static int ipsec_setspidx __P((struct mbuf *, struct secpolicyindex *, int)); static void ipsec4_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); @@ -371,7 +371,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ /* set spidx in pcb */ if (inp->inp_vflag & INP_IPV6PROTO) { #ifdef INET6 - *error = ipsec6_setspidx_in6pcb(m, inp); + *error = ipsec6_setspidx_inpcb(m, inp); pcbsp = inp->inp_sp; #else *error = EINVAL; /* should not happen */ @@ -572,7 +572,7 @@ ipsec4_setspidx_inpcb(m, pcb) #ifdef INET6 static int -ipsec6_setspidx_in6pcb(m, pcb) +ipsec6_setspidx_inpcb(m, pcb) struct mbuf *m; struct inpcb *pcb; { From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 20:37:53 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9CC5106564A; Sat, 27 Dec 2008 20:37: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 CA4B28FC16; Sat, 27 Dec 2008 20:37:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRKbr3S081838; Sat, 27 Dec 2008 20:37:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRKbrNK081837; Sat, 27 Dec 2008 20:37:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812272037.mBRKbrNK081837@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 20:37: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: r186528 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 20:37:54 -0000 Author: bz Date: Sat Dec 27 20:37:53 2008 New Revision: 186528 URL: http://svn.freebsd.org/changeset/base/186528 Log: Rewrite ipsec6_setspidx_inpcb() to match the logic in the (now) equivalent IPv4 counterpart. MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 19:42:59 2008 (r186527) +++ head/sys/netipsec/ipsec.c Sat Dec 27 20:37:53 2008 (r186528) @@ -576,8 +576,6 @@ ipsec6_setspidx_inpcb(m, pcb) struct mbuf *m; struct inpcb *pcb; { - //INIT_VNET_IPSEC(curvnet); - struct secpolicyindex *spidx; int error; IPSEC_ASSERT(pcb != NULL, ("null pcb")); @@ -585,26 +583,18 @@ ipsec6_setspidx_inpcb(m, pcb) IPSEC_ASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, ("null sp_in || sp_out")); - bzero(&pcb->inp_sp->sp_in->spidx, sizeof(*spidx)); - bzero(&pcb->inp_sp->sp_out->spidx, sizeof(*spidx)); - - spidx = &pcb->inp_sp->sp_in->spidx; - error = ipsec_setspidx(m, spidx, 1); - if (error) - goto bad; - spidx->dir = IPSEC_DIR_INBOUND; - - spidx = &pcb->inp_sp->sp_out->spidx; - error = ipsec_setspidx(m, spidx, 1); - if (error) - goto bad; - spidx->dir = IPSEC_DIR_OUTBOUND; - - return 0; + error = ipsec_setspidx(m, &pcb->inp_sp->sp_in->spidx, 1); + if (error == 0) { + pcb->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; + pcb->inp_sp->sp_out->spidx = pcb->inp_sp->sp_in->spidx; + pcb->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; + } else { + bzero(&pcb->inp_sp->sp_in->spidx, + sizeof(pcb->inp_sp->sp_in->spidx)); + bzero(&pcb->inp_sp->sp_out->spidx, + sizeof(pcb->inp_sp->sp_in->spidx)); + } -bad: - bzero(&pcb->inp_sp->sp_in->spidx, sizeof(*spidx)); - bzero(&pcb->inp_sp->sp_out->spidx, sizeof(*spidx)); return error; } #endif From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 20:48:12 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03A3010656D2; Sat, 27 Dec 2008 20:48:12 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E81768FC0C; Sat, 27 Dec 2008 20:48:11 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRKmBTB082103; Sat, 27 Dec 2008 20:48:11 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRKmBKo082102; Sat, 27 Dec 2008 20:48:11 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200812272048.mBRKmBKo082102@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 27 Dec 2008 20:48: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: r186529 - head/sys/dev/acpi_support X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 20:48:12 -0000 Author: stas Date: Sat Dec 27 20:48:11 2008 New Revision: 186529 URL: http://svn.freebsd.org/changeset/base/186529 Log: - Fix incorrect array declaration that was causing the stack overflow on some (most?) Asus laptops. Discussed with: rpaulo Approved by: kib (mentor) MFC after: 2 weeks Modified: head/sys/dev/acpi_support/acpi_asus.c Modified: head/sys/dev/acpi_support/acpi_asus.c ============================================================================== --- head/sys/dev/acpi_support/acpi_asus.c Sat Dec 27 20:37:53 2008 (r186528) +++ head/sys/dev/acpi_support/acpi_asus.c Sat Dec 27 20:48:11 2008 (r186529) @@ -976,7 +976,7 @@ acpi_asus_sysctl_set(struct acpi_asus_so { ACPI_STATUS status = AE_OK; ACPI_OBJECT_LIST acpiargs; - ACPI_OBJECT acpiarg[0]; + ACPI_OBJECT acpiarg[1]; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); ACPI_SERIAL_ASSERT(asus); From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 21:20:02 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81BAB1065673; Sat, 27 Dec 2008 21:20:02 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 5170C8FC0C; Sat, 27 Dec 2008 21:20:01 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by bwz12 with SMTP id 12so11467899bwz.19 for ; Sat, 27 Dec 2008 13:19:59 -0800 (PST) Received: by 10.181.199.11 with SMTP id b11mr3595856bkq.105.1230412798790; Sat, 27 Dec 2008 13:19:58 -0800 (PST) Received: by 10.181.20.7 with HTTP; Sat, 27 Dec 2008 13:19:58 -0800 (PST) Message-ID: <9bbcef730812271319g60e190acj4a68ee419edc7277@mail.gmail.com> Date: Sat, 27 Dec 2008 22:19:58 +0100 From: ivoras@freebsd.org To: "Antoine Brodin" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812171957.mBHJvCO2013765@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186252 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 21:20:02 -0000 On 27/12/2008, Antoine Brodin wrote: > On Wed, Dec 17, 2008 at 8:57 PM, Ivan Voras wrote: > Modified: head/sys/kern/subr_param.c > [snip] >> +enum VM_GUEST { VM_GUEST_NO, VM_GUEST_VM, VM_GUEST_XEN }; >> + > [snip] >> - hz = detect_virtual() ? HZ_VM : HZ; >> + hz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ; > [snip] > > Hi Ivan, > > Could you change VM_GUEST_NO / VM_GUEST_VM / VM_GUEST_XEN to a #define > or explicitly initialize them? > The magnitude comparison between vm_guest and VM_GUEST_NO looks like > gratuitous obfuscation. I think that the "enum" type is very well defined and its behaviour widely known so it is not necessary to break it into #defines. Would you be happy if I explicitly initalized the first member of the enum to signify its values are important? enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 21:20:34 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF4AC1065688; Sat, 27 Dec 2008 21: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 BF2C38FC16; Sat, 27 Dec 2008 21:20:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRLKYuM082707; Sat, 27 Dec 2008 21: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 mBRLKYZl082706; Sat, 27 Dec 2008 21:20:34 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812272120.mBRLKYZl082706@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 21: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: r186530 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 21:20:35 -0000 Author: bz Date: Sat Dec 27 21:20:34 2008 New Revision: 186530 URL: http://svn.freebsd.org/changeset/base/186530 Log: Convert function definitions to constantly use ANSI-style parameter declarations. Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 20:48:11 2008 (r186529) +++ head/sys/netipsec/ipsec.c Sat Dec 27 21:20:34 2008 (r186530) @@ -462,11 +462,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ * others : error occured. */ struct secpolicy * -ipsec_getpolicybyaddr(m, dir, flag, error) - struct mbuf *m; - u_int dir; - int flag; - int *error; +ipsec_getpolicybyaddr(struct mbuf *m, u_int dir, int flag, int *error) { INIT_VNET_IPSEC(curvnet); struct secpolicyindex spidx; @@ -498,11 +494,8 @@ ipsec_getpolicybyaddr(m, dir, flag, erro } struct secpolicy * -ipsec4_checkpolicy(m, dir, flag, error, inp) - struct mbuf *m; - u_int dir, flag; - int *error; - struct inpcb *inp; +ipsec4_checkpolicy(struct mbuf *m, u_int dir, u_int flag, int *error, + struct inpcb *inp) { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp; @@ -545,9 +538,7 @@ ipsec4_checkpolicy(m, dir, flag, error, } static int -ipsec4_setspidx_inpcb(m, pcb) - struct mbuf *m; - struct inpcb *pcb; +ipsec4_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) { int error; @@ -572,9 +563,7 @@ ipsec4_setspidx_inpcb(m, pcb) #ifdef INET6 static int -ipsec6_setspidx_inpcb(m, pcb) - struct mbuf *m; - struct inpcb *pcb; +ipsec6_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) { int error; @@ -605,10 +594,7 @@ ipsec6_setspidx_inpcb(m, pcb) * the caller is responsible for error recovery (like clearing up spidx). */ static int -ipsec_setspidx(m, spidx, needport) - struct mbuf *m; - struct secpolicyindex *spidx; - int needport; +ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) { INIT_VNET_IPSEC(curvnet); struct ip *ip = NULL; @@ -799,10 +785,7 @@ ipsec4_setspidx_ipaddr(struct mbuf *m, s #ifdef INET6 static void -ipsec6_get_ulp(m, spidx, needport) - struct mbuf *m; - struct secpolicyindex *spidx; - int needport; +ipsec6_get_ulp(struct mbuf *m, struct secpolicyindex *spidx, int needport) { INIT_VNET_IPSEC(curvnet); int off, nxt; @@ -867,9 +850,7 @@ ipsec6_get_ulp(m, spidx, needport) /* assumes that m is sane */ static int -ipsec6_setspidx_ipaddr(m, spidx) - struct mbuf *m; - struct secpolicyindex *spidx; +ipsec6_setspidx_ipaddr(struct mbuf *m, struct secpolicyindex *spidx) { struct ip6_hdr *ip6 = NULL; struct ip6_hdr ip6buf; @@ -909,17 +890,14 @@ ipsec6_setspidx_ipaddr(m, spidx) #endif static void -ipsec_delpcbpolicy(p) - struct inpcbpolicy *p; +ipsec_delpcbpolicy(struct inpcbpolicy *p) { free(p, M_IPSEC_INPCB); } /* initialize policy in PCB */ int -ipsec_init_policy(so, pcb_sp) - struct socket *so; - struct inpcbpolicy **pcb_sp; +ipsec_init_policy(struct socket *so, struct inpcbpolicy **pcb_sp) { INIT_VNET_IPSEC(curvnet); struct inpcbpolicy *new; @@ -959,8 +937,7 @@ ipsec_init_policy(so, pcb_sp) /* copy old ipsec policy into new */ int -ipsec_copy_policy(old, new) - struct inpcbpolicy *old, *new; +ipsec_copy_policy(struct inpcbpolicy *old, struct inpcbpolicy *new) { struct secpolicy *sp; @@ -1003,8 +980,7 @@ ipsec_delisr(struct ipsecrequest *p) /* deep-copy a policy in PCB */ static struct secpolicy * -ipsec_deepcopy_policy(src) - struct secpolicy *src; +ipsec_deepcopy_policy(struct secpolicy *src) { struct ipsecrequest *newchain = NULL; struct ipsecrequest *p; @@ -1058,12 +1034,8 @@ fail: /* set policy and ipsec request if present. */ static int -ipsec_set_policy(pcb_sp, optname, request, len, cred) - struct secpolicy **pcb_sp; - int optname; - caddr_t request; - size_t len; - struct ucred *cred; +ipsec_set_policy(struct secpolicy **pcb_sp, int optname, caddr_t request, + size_t len, struct ucred *cred) { INIT_VNET_IPSEC(curvnet); struct sadb_x_policy *xpl; @@ -1111,9 +1083,7 @@ ipsec_set_policy(pcb_sp, optname, reques } static int -ipsec_get_policy(pcb_sp, mp) - struct secpolicy *pcb_sp; - struct mbuf **mp; +ipsec_get_policy(struct secpolicy *pcb_sp, struct mbuf **mp) { INIT_VNET_IPSEC(curvnet); @@ -1135,12 +1105,8 @@ ipsec_get_policy(pcb_sp, mp) } int -ipsec4_set_policy(inp, optname, request, len, cred) - struct inpcb *inp; - int optname; - caddr_t request; - size_t len; - struct ucred *cred; +ipsec4_set_policy(struct inpcb *inp, int optname, caddr_t request, + size_t len, struct ucred *cred) { INIT_VNET_IPSEC(curvnet); struct sadb_x_policy *xpl; @@ -1171,11 +1137,8 @@ ipsec4_set_policy(inp, optname, request, } int -ipsec4_get_policy(inp, request, len, mp) - struct inpcb *inp; - caddr_t request; - size_t len; - struct mbuf **mp; +ipsec4_get_policy(struct inpcb *inp, caddr_t request, size_t len, + struct mbuf **mp) { INIT_VNET_IPSEC(curvnet); struct sadb_x_policy *xpl; @@ -1208,8 +1171,7 @@ ipsec4_get_policy(inp, request, len, mp) /* delete policy in PCB */ int -ipsec_delete_pcbpolicy(inp) - struct inpcb *inp; +ipsec_delete_pcbpolicy(struct inpcb *inp) { IPSEC_ASSERT(inp != NULL, ("null inp")); @@ -1230,12 +1192,8 @@ ipsec_delete_pcbpolicy(inp) #ifdef INET6 int -ipsec6_set_policy(inp, optname, request, len, cred) - struct inpcb *inp; - int optname; - caddr_t request; - size_t len; - struct ucred *cred; +ipsec6_set_policy(struct inpcb *inp, int optname, caddr_t request, + size_t len, struct ucred *cred) { INIT_VNET_IPSEC(curvnet); struct sadb_x_policy *xpl; @@ -1266,11 +1224,8 @@ ipsec6_set_policy(inp, optname, request, } int -ipsec6_get_policy(inp, request, len, mp) - struct inpcb *inp; - caddr_t request; - size_t len; - struct mbuf **mp; +ipsec6_get_policy(struct inpcb *inp, caddr_t request, size_t len, + struct mbuf **mp) { INIT_VNET_IPSEC(curvnet); struct sadb_x_policy *xpl; @@ -1307,8 +1262,7 @@ ipsec6_get_policy(inp, request, len, mp) * Either IPSEC_LEVEL_USE or IPSEC_LEVEL_REQUIRE are always returned. */ u_int -ipsec_get_reqlevel(isr) - struct ipsecrequest *isr; +ipsec_get_reqlevel(struct ipsecrequest *isr) { INIT_VNET_IPSEC(curvnet); u_int level = 0; @@ -1487,9 +1441,7 @@ ipsec_in_reject(struct secpolicy *sp, st * and {ah,esp}4_input for tunnel mode */ int -ipsec4_in_reject(m, inp) - struct mbuf *m; - struct inpcb *inp; +ipsec4_in_reject(struct mbuf *m, struct inpcb *inp) { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp; @@ -1526,9 +1478,7 @@ ipsec4_in_reject(m, inp) * and {ah,esp}6_input for tunnel mode */ int -ipsec6_in_reject(m, inp) - struct mbuf *m; - struct inpcb *inp; +ipsec6_in_reject(struct mbuf *m, struct inpcb *inp) { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp = NULL; @@ -1626,10 +1576,7 @@ ipsec_hdrsiz(struct secpolicy *sp) /* This function is called from ip_forward() and ipsec4_hdrsize_tcp(). */ size_t -ipsec4_hdrsiz(m, dir, inp) - struct mbuf *m; - u_int dir; - struct inpcb *inp; +ipsec4_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp) { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp; @@ -1667,10 +1614,7 @@ ipsec4_hdrsiz(m, dir, inp) * and maybe from ip6_forward.() */ size_t -ipsec6_hdrsiz(m, dir, inp) - struct mbuf *m; - u_int dir; - struct inpcb *inp; +ipsec6_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp) { INIT_VNET_IPSEC(curvnet); struct secpolicy *sp; @@ -1710,9 +1654,7 @@ ipsec6_hdrsiz(m, dir, inp) * based on RFC 2401. */ int -ipsec_chkreplay(seq, sav) - u_int32_t seq; - struct secasvar *sav; +ipsec_chkreplay(u_int32_t seq, struct secasvar *sav) { const struct secreplay *replay; u_int32_t diff; @@ -1768,9 +1710,7 @@ ipsec_chkreplay(seq, sav) * 1: NG */ int -ipsec_updatereplay(seq, sav) - u_int32_t seq; - struct secasvar *sav; +ipsec_updatereplay(u_int32_t seq, struct secasvar *sav) { INIT_VNET_IPSEC(curvnet); struct secreplay *replay; @@ -1867,9 +1807,7 @@ ok: * wsize: buffer size (bytes). */ static void -vshiftl(bitmap, nbit, wsize) - unsigned char *bitmap; - int nbit, wsize; +vshiftl(unsigned char *bitmap, int nbit, int wsize) { int s, j, i; unsigned char over; @@ -1926,8 +1864,7 @@ ipsec_address(union sockaddr_union* sa) } const char * -ipsec_logsastr(sav) - struct secasvar *sav; +ipsec_logsastr(struct secasvar *sav) { static char buf[256]; char *p; @@ -1952,8 +1889,7 @@ ipsec_logsastr(sav) } void -ipsec_dumpmbuf(m) - struct mbuf *m; +ipsec_dumpmbuf(struct mbuf *m) { int totlen; int i; From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 21:47:48 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB7B21065673; Sat, 27 Dec 2008 21:47:47 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2308FC12; Sat, 27 Dec 2008 21:47:46 +0000 (UTC) (envelope-from antoine.brodin.freebsd@gmail.com) Received: by bwz12 with SMTP id 12so11482602bwz.19 for ; Sat, 27 Dec 2008 13:47:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=nqdDrYBr+kO4t05EsCMnhImjzRATS1MYDlQ8inxSFBE=; b=sai7vKO+N6isPVbvs/wTI/qGAsg+9xsF7bL2N1i5gZoH+TNVHGs1y3RB0l90ya0pDv kDHuEF9eeSt2qvU3H7r+5r2IxMFe9OH73zVw9y1ky0EXFVQ2ORBO+FqOklMWuVvmqbI8 vgrVl28Hry8bFBM4DpAnU2b0zjI2bluoBN3aY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=hC44pU/2h9eL6kIxaMbETgoih7ZOad7jSX1UVYOZwjRUH9NPgNz7nj5RURcqJ7WtOt HVe1iDZRRK07hziU4OctNzay4NHIqMLq5IAkkcejflDRBU5RayotiE5VXM9aaqm9lM4Z Z5Fxoo7n6rYXkmc67m5WnnZwV0gc4hZvotKRM= Received: by 10.181.208.8 with SMTP id k8mr4528925bkq.128.1230414465247; Sat, 27 Dec 2008 13:47:45 -0800 (PST) Received: by 10.181.9.17 with HTTP; Sat, 27 Dec 2008 13:47:45 -0800 (PST) Message-ID: Date: Sat, 27 Dec 2008 22:47:45 +0100 From: "Antoine Brodin" Sender: antoine.brodin.freebsd@gmail.com To: ivoras@freebsd.org In-Reply-To: <9bbcef730812271319g60e190acj4a68ee419edc7277@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812171957.mBHJvCO2013765@svn.freebsd.org> <9bbcef730812271319g60e190acj4a68ee419edc7277@mail.gmail.com> X-Google-Sender-Auth: df4211453d1076a5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186252 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 21:47:48 -0000 On Sat, Dec 27, 2008 at 10:19 PM, wrote: > On 27/12/2008, Antoine Brodin wrote: >> On Wed, Dec 17, 2008 at 8:57 PM, Ivan Voras wrote: > >> Modified: head/sys/kern/subr_param.c >> [snip] >>> +enum VM_GUEST { VM_GUEST_NO, VM_GUEST_VM, VM_GUEST_XEN }; >>> + >> [snip] >>> - hz = detect_virtual() ? HZ_VM : HZ; >>> + hz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ; >> [snip] >> >> Hi Ivan, >> >> Could you change VM_GUEST_NO / VM_GUEST_VM / VM_GUEST_XEN to a #define >> or explicitly initialize them? >> The magnitude comparison between vm_guest and VM_GUEST_NO looks like >> gratuitous obfuscation. > > I think that the "enum" type is very well defined and its behaviour > widely known so it is not necessary to break it into #defines. Would > you be happy if I explicitly initalized the first member of the enum > to signify its values are important? > > enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; > I would be happy if you initialized explicitly the 3 values. You use these values as an index in the vm_guest_sysctl_names array and you compare them in init_param1() so I think it's better to be explicit. Cheers, Antoine From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 22:38:57 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79454106564A; Sat, 27 Dec 2008 22:38:57 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id D3BD68FC0C; Sat, 27 Dec 2008 22:38:56 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so2175384yxb.13 for ; Sat, 27 Dec 2008 14:38:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=3ul4nnHwYOQYPyTH76APFAUNZTVVOEIrh5q6vo7kZi8=; b=XuxFeD0s2FJiuHBPxn0u9zuC1rEN2Lj7dneltLtF1S3u2zqTC/xF3QZa+MqDAt0zhH BazknOX7JiCWhGXF2RQlOlIl7uO19ThLPqKJvR2CYL9bmM22WZljL1MIFkr7u2YrSkT+ nh63D2kO3r1CcAaQ+IN4wYLDsQsLf1Pos9zig= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=m0DzAyb8TPzyeROTY7O9cyeClYu1YNMZKbSGsWAm9K8XWZY/YJ365OzE4e3+X8awjn oU5PBNfQqDwow7D/jyF0Yv0WeeYdnKrN3dfBKETZ938sOcpRLqBEcl0TcecjvdHx8x2Q HCQnOr/GDeChAjmDx72OHy6NmRcGQqJdf9ZEQ= Received: by 10.100.127.18 with SMTP id z18mr6992029anc.6.1230417536203; Sat, 27 Dec 2008 14:38:56 -0800 (PST) Received: from ?10.94.212.171? ([32.159.67.242]) by mx.google.com with ESMTPS id b29sm16393795ana.53.2008.12.27.14.38.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Dec 2008 14:38:55 -0800 (PST) References: <200812171957.mBHJvCO2013765@svn.freebsd.org> <9bbcef730812271319g60e190acj4a68ee419edc7277@mail.gmail.com> Message-Id: <9A8DD0DB-F5B1-4978-B4DB-5D7974F93DC3@gmail.com> From: Garrett Cooper To: Antoine Brodin In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5F136) Mime-Version: 1.0 (iPhone Mail 5F136) Date: Sat, 27 Dec 2008 14:38:45 -0800 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "ivoras@freebsd.org" Subject: Re: svn commit: r186252 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 22:38:57 -0000 On Dec 27, 2008, at 13:47, "Antoine Brodin" wrote: > On Sat, Dec 27, 2008 at 10:19 PM, wrote: >> On 27/12/2008, Antoine Brodin wrote: >>> On Wed, Dec 17, 2008 at 8:57 PM, Ivan Voras >>> wrote: >> >>> Modified: head/sys/kern/subr_param.c >>> [snip] >>>> +enum VM_GUEST { VM_GUEST_NO, VM_GUEST_VM, VM_GUEST_XEN }; >>>> + >>> [snip] >>>> - hz = detect_virtual() ? HZ_VM : HZ; >>>> + hz = vm_guest > VM_GUEST_NO ? HZ_VM : HZ; >>> [snip] >>> >>> Hi Ivan, >>> >>> Could you change VM_GUEST_NO / VM_GUEST_VM / VM_GUEST_XEN to a >>> #define >>> or explicitly initialize them? >>> The magnitude comparison between vm_guest and VM_GUEST_NO looks like >>> gratuitous obfuscation. >> >> I think that the "enum" type is very well defined and its behaviour >> widely known so it is not necessary to break it into #defines. Would >> you be happy if I explicitly initalized the first member of the enum >> to signify its values are important? >> >> enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; >> > > I would be happy if you initialized explicitly the 3 values. > You use these values as an index in the vm_guest_sysctl_names array > and you compare them in init_param1() so I think it's better to be > explicit. > > Cheers, > > Antoine Ivan's suggestion explicitly defines the first value and implicitly defines the next couple indices. Is there really anything more you're looking for in terms of coverage? -Garrett From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 22:58:17 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A4B81065675; Sat, 27 Dec 2008 22:58:17 +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 39F2D8FC24; Sat, 27 Dec 2008 22:58:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRMwH2q086018; Sat, 27 Dec 2008 22:58:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRMwHrd086017; Sat, 27 Dec 2008 22:58:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812272258.mBRMwHrd086017@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 22:58: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: r186531 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 22:58:17 -0000 Author: bz Date: Sat Dec 27 22:58:16 2008 New Revision: 186531 URL: http://svn.freebsd.org/changeset/base/186531 Log: Non-functional (style) changes: - Always use round brackets with return (). - Add empty line to beginning of functions without local variables. - Comments start with a capital letter and end in a '.'. While there adapt a few comments. Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 21:20:34 2008 (r186530) +++ head/sys/netipsec/ipsec.c Sat Dec 27 22:58:16 2008 (r186531) @@ -104,7 +104,7 @@ struct vnet_ipsec vnet_ipsec_0; #endif #ifdef VIMAGE_GLOBALS -/* NB: name changed so netstat doesn't use it */ +/* NB: name changed so netstat doesn't use it. */ struct ipsecstat ipsec4stat; struct secpolicy ip4_def_policy; int ipsec_debug; @@ -309,7 +309,7 @@ key_allocsp_default(const char* where, i KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP key_allocsp_default returns SP:%p (%u)\n", sp, sp->refcnt)); - return sp; + return (sp); } #define KEY_ALLOCSP_DEFAULT() \ key_allocsp_default(__FILE__, __LINE__) @@ -339,7 +339,7 @@ ipsec_getpolicy(struct tdb_ident *tdbi, if (sp == NULL) /*XXX????*/ sp = KEY_ALLOCSP_DEFAULT(); IPSEC_ASSERT(sp != NULL, ("null SP")); - return sp; + return (sp); } /* @@ -359,7 +359,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ { INIT_VNET_IPSEC(curvnet); struct inpcbpolicy *pcbsp = NULL; - struct secpolicy *currsp = NULL; /* policy on socket */ + struct secpolicy *currsp = NULL; /* Policy on socket. */ struct secpolicy *sp; IPSEC_ASSERT(m != NULL, ("null mbuf")); @@ -368,20 +368,20 @@ ipsec_getpolicybysock(struct mbuf *m, u_ IPSEC_ASSERT(dir == IPSEC_DIR_INBOUND || dir == IPSEC_DIR_OUTBOUND, ("invalid direction %u", dir)); - /* set spidx in pcb */ + /* Set spidx in pcb. */ if (inp->inp_vflag & INP_IPV6PROTO) { #ifdef INET6 *error = ipsec6_setspidx_inpcb(m, inp); pcbsp = inp->inp_sp; #else - *error = EINVAL; /* should not happen */ + *error = EINVAL; /* Should not happen. */ #endif } else { *error = ipsec4_setspidx_inpcb(m, inp); pcbsp = inp->inp_sp; } if (*error) - return NULL; + return (NULL); IPSEC_ASSERT(pcbsp != NULL, ("null pcbsp")); switch (dir) { @@ -394,7 +394,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ } IPSEC_ASSERT(currsp != NULL, ("null currsp")); - if (pcbsp->priv) { /* when privilieged socket */ + if (pcbsp->priv) { /* When privilieged socket. */ switch (currsp->policy) { case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_IPSEC: @@ -403,9 +403,9 @@ ipsec_getpolicybysock(struct mbuf *m, u_ break; case IPSEC_POLICY_ENTRUST: - /* look for a policy in SPD */ + /* Look for a policy in SPD. */ sp = KEY_ALLOCSP(&currsp->spidx, dir); - if (sp == NULL) /* no SP found */ + if (sp == NULL) /* No SP found. */ sp = KEY_ALLOCSP_DEFAULT(); break; @@ -413,18 +413,18 @@ ipsec_getpolicybysock(struct mbuf *m, u_ ipseclog((LOG_ERR, "%s: Invalid policy for PCB %d\n", __func__, currsp->policy)); *error = EINVAL; - return NULL; + return (NULL); } - } else { /* unpriv, SPD has policy */ + } else { /* Unpriv, SPD has policy. */ sp = KEY_ALLOCSP(&currsp->spidx, dir); - if (sp == NULL) { /* no SP found */ + if (sp == NULL) { /* No SP found. */ switch (currsp->policy) { case IPSEC_POLICY_BYPASS: ipseclog((LOG_ERR, "%s: Illegal policy for " "non-priviliged defined %d\n", __func__, currsp->policy)); *error = EINVAL; - return NULL; + return (NULL); case IPSEC_POLICY_ENTRUST: sp = KEY_ALLOCSP_DEFAULT(); @@ -439,7 +439,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ ipseclog((LOG_ERR, "%s: Invalid policy for " "PCB %d\n", __func__, currsp->policy)); *error = EINVAL; - return NULL; + return (NULL); } } } @@ -448,7 +448,7 @@ ipsec_getpolicybysock(struct mbuf *m, u_ KEYDEBUG(KEYDEBUG_IPSEC_STAMP, printf("DP %s (priv %u policy %u) allocate SP:%p (refcnt %u)\n", __func__, pcbsp->priv, currsp->policy, sp, sp->refcnt)); - return sp; + return (sp); } /* @@ -481,16 +481,16 @@ ipsec_getpolicybyaddr(struct mbuf *m, u_ if (*error != 0) { DPRINTF(("%s: setpidx failed, dir %u flag %u\n", __func__, dir, flag)); - return NULL; + return (NULL); } spidx.dir = dir; sp = KEY_ALLOCSP(&spidx, dir); } - if (sp == NULL) /* no SP found, use system default */ + if (sp == NULL) /* No SP found, use system default. */ sp = KEY_ALLOCSP_DEFAULT(); IPSEC_ASSERT(sp != NULL, ("null SP")); - return sp; + return (sp); } struct secpolicy * @@ -508,25 +508,25 @@ ipsec4_checkpolicy(struct mbuf *m, u_int if (sp == NULL) { IPSEC_ASSERT(*error != 0, ("getpolicy failed w/o error")); V_ipsec4stat.ips_out_inval++; - return NULL; + return (NULL); } IPSEC_ASSERT(*error == 0, ("sp w/ error set to %u", *error)); switch (sp->policy) { case IPSEC_POLICY_ENTRUST: default: printf("%s: invalid policy %u\n", __func__, sp->policy); - /* fall thru... */ + /* FALLTHROUGH */ case IPSEC_POLICY_DISCARD: V_ipsec4stat.ips_out_polvio++; - *error = -EINVAL; /* packet is discarded by caller */ + *error = -EINVAL; /* Packet is discarded by caller. */ break; case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_NONE: KEY_FREESP(&sp); - sp = NULL; /* NB: force NULL result */ + sp = NULL; /* NB: force NULL result. */ break; case IPSEC_POLICY_IPSEC: - if (sp->req == NULL) /* acquire an SA */ + if (sp->req == NULL) /* Acquire a SA. */ *error = key_spdacquire(sp); break; } @@ -534,7 +534,7 @@ ipsec4_checkpolicy(struct mbuf *m, u_int KEY_FREESP(&sp); sp = NULL; } - return sp; + return (sp); } static int @@ -558,7 +558,7 @@ ipsec4_setspidx_inpcb(struct mbuf *m, st bzero(&pcb->inp_sp->sp_out->spidx, sizeof (pcb->inp_sp->sp_in->spidx)); } - return error; + return (error); } #ifdef INET6 @@ -584,14 +584,14 @@ ipsec6_setspidx_inpcb(struct mbuf *m, st sizeof(pcb->inp_sp->sp_in->spidx)); } - return error; + return (error); } #endif /* - * configure security policy index (src/dst/proto/sport/dport) + * Configure security policy index (src/dst/proto/sport/dport) * by looking at the content of mbuf. - * the caller is responsible for error recovery (like clearing up spidx). + * The caller is responsible for error recovery (like clearing up spidx). */ static int ipsec_setspidx(struct mbuf *m, struct secpolicyindex *spidx, int needport) @@ -607,9 +607,9 @@ ipsec_setspidx(struct mbuf *m, struct se IPSEC_ASSERT(m != NULL, ("null mbuf")); /* - * validate m->m_pkthdr.len. we see incorrect length if we + * Validate m->m_pkthdr.len. We see incorrect length if we * mistakenly call this function with inconsistent mbuf chain - * (like 4.4BSD tcp/udp processing). XXX should we panic here? + * (like 4.4BSD tcp/udp processing). XXX Should we panic here? */ len = 0; for (n = m; n; n = n->m_next) @@ -618,14 +618,14 @@ ipsec_setspidx(struct mbuf *m, struct se KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: pkthdr len(%d) mismatch (%d), ignored.\n", __func__, len, m->m_pkthdr.len)); - return EINVAL; + return (EINVAL); } if (m->m_pkthdr.len < sizeof(struct ip)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: pkthdr len(%d) too small (v4), ignored.\n", __func__, m->m_pkthdr.len)); - return EINVAL; + return (EINVAL); } if (m->m_len >= sizeof(*ip)) @@ -643,28 +643,28 @@ ipsec_setspidx(struct mbuf *m, struct se case 4: error = ipsec4_setspidx_ipaddr(m, spidx); if (error) - return error; + return (error); ipsec4_get_ulp(m, spidx, needport); - return 0; + return (0); #ifdef INET6 case 6: if (m->m_pkthdr.len < sizeof(struct ip6_hdr)) { KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: pkthdr len(%d) too small (v6), " "ignored\n", __func__, m->m_pkthdr.len)); - return EINVAL; + return (EINVAL); } error = ipsec6_setspidx_ipaddr(m, spidx); if (error) - return error; + return (error); ipsec6_get_ulp(m, spidx, needport); - return 0; + return (0); #endif default: KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: " "unknown IP version %u, ignored.\n", __func__, v)); - return EINVAL; + return (EINVAL); } } @@ -674,11 +674,11 @@ ipsec4_get_ulp(struct mbuf *m, struct se u_int8_t nxt; int off; - /* sanity check */ + /* Sanity check. */ IPSEC_ASSERT(m != NULL, ("null mbuf")); IPSEC_ASSERT(m->m_pkthdr.len >= sizeof(struct ip),("packet too short")); - /* NB: ip_input() flips it into host endian XXX need more checking */ + /* NB: ip_input() flips it into host endian. XXX Need more checking. */ if (m->m_len < sizeof (struct ip)) { struct ip *ip = mtod(m, struct ip *); if (ip->ip_off & (IP_MF | IP_OFFMASK)) @@ -732,14 +732,14 @@ ipsec4_get_ulp(struct mbuf *m, struct se case IPPROTO_AH: if (off + sizeof(ip6e) > m->m_pkthdr.len) goto done; - /* XXX sigh, this works but is totally bogus */ + /* XXX Sigh, this works but is totally bogus. */ m_copydata(m, off, sizeof(ip6e), (caddr_t) &ip6e); off += (ip6e.ip6e_len + 2) << 2; nxt = ip6e.ip6e_nxt; break; case IPPROTO_ICMP: default: - /* XXX intermediate headers??? */ + /* XXX Intermediate headers??? */ spidx->ul_proto = nxt; goto done_proto; } @@ -751,7 +751,7 @@ done_proto: spidx->dst.sin.sin_port = IPSEC_PORT_ANY; } -/* assumes that m is sane */ +/* Assumes that m is sane. */ static int ipsec4_setspidx_ipaddr(struct mbuf *m, struct secpolicyindex *spidx) { @@ -780,7 +780,7 @@ ipsec4_setspidx_ipaddr(struct mbuf *m, s spidx->prefs = sizeof(struct in_addr) << 3; spidx->prefd = sizeof(struct in_addr) << 3; - return 0; + return (0); } #ifdef INET6 @@ -793,14 +793,14 @@ ipsec6_get_ulp(struct mbuf *m, struct se struct udphdr uh; struct icmp6_hdr ih; - /* sanity check */ + /* Sanity check. */ if (m == NULL) panic("%s: NULL pointer was passed.\n", __func__); KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s:\n", __func__); kdebug_mbuf(m)); - /* set default */ + /* Set default. */ spidx->ul_proto = IPSEC_ULPROTO_ANY; ((struct sockaddr_in6 *)&spidx->src)->sin6_port = IPSEC_PORT_ANY; ((struct sockaddr_in6 *)&spidx->dst)->sin6_port = IPSEC_PORT_ANY; @@ -842,13 +842,13 @@ ipsec6_get_ulp(struct mbuf *m, struct se htons((uint16_t)ih.icmp6_code); break; default: - /* XXX intermediate headers??? */ + /* XXX Intermediate headers??? */ spidx->ul_proto = nxt; break; } } -/* assumes that m is sane */ +/* Assumes that m is sane. */ static int ipsec6_setspidx_ipaddr(struct mbuf *m, struct secpolicyindex *spidx) { @@ -885,24 +885,25 @@ ipsec6_setspidx_ipaddr(struct mbuf *m, s } spidx->prefd = sizeof(struct in6_addr) << 3; - return 0; + return (0); } #endif static void ipsec_delpcbpolicy(struct inpcbpolicy *p) { + free(p, M_IPSEC_INPCB); } -/* initialize policy in PCB */ +/* Initialize policy in PCB. */ int ipsec_init_policy(struct socket *so, struct inpcbpolicy **pcb_sp) { INIT_VNET_IPSEC(curvnet); struct inpcbpolicy *new; - /* sanity check. */ + /* Sanity check. */ if (so == NULL || pcb_sp == NULL) panic("%s: NULL pointer was passed.\n", __func__); @@ -910,14 +911,14 @@ ipsec_init_policy(struct socket *so, str M_IPSEC_INPCB, M_NOWAIT|M_ZERO); if (new == NULL) { ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); - return ENOBUFS; + return (ENOBUFS); } new->priv = IPSEC_IS_PRIVILEGED_SO(so); if ((new->sp_in = KEY_NEWSP()) == NULL) { ipsec_delpcbpolicy(new); - return ENOBUFS; + return (ENOBUFS); } new->sp_in->state = IPSEC_SPSTATE_ALIVE; new->sp_in->policy = IPSEC_POLICY_ENTRUST; @@ -925,17 +926,17 @@ ipsec_init_policy(struct socket *so, str if ((new->sp_out = KEY_NEWSP()) == NULL) { KEY_FREESP(&new->sp_in); ipsec_delpcbpolicy(new); - return ENOBUFS; + return (ENOBUFS); } new->sp_out->state = IPSEC_SPSTATE_ALIVE; new->sp_out->policy = IPSEC_POLICY_ENTRUST; *pcb_sp = new; - return 0; + return (0); } -/* copy old ipsec policy into new */ +/* Copy old IPsec policy into new. */ int ipsec_copy_policy(struct inpcbpolicy *old, struct inpcbpolicy *new) { @@ -946,18 +947,18 @@ ipsec_copy_policy(struct inpcbpolicy *ol KEY_FREESP(&new->sp_in); new->sp_in = sp; } else - return ENOBUFS; + return (ENOBUFS); sp = ipsec_deepcopy_policy(old->sp_out); if (sp) { KEY_FREESP(&new->sp_out); new->sp_out = sp; } else - return ENOBUFS; + return (ENOBUFS); new->priv = old->priv; - return 0; + return (0); } struct ipsecrequest * @@ -968,17 +969,18 @@ ipsec_newisr(void) p = malloc(sizeof(struct ipsecrequest), M_IPSEC_SR, M_NOWAIT|M_ZERO); if (p != NULL) IPSECREQUEST_LOCK_INIT(p); - return p; + return (p); } void ipsec_delisr(struct ipsecrequest *p) { + IPSECREQUEST_LOCK_DESTROY(p); free(p, M_IPSEC_SR); } -/* deep-copy a policy in PCB */ +/* Deep-copy a policy in PCB. */ static struct secpolicy * ipsec_deepcopy_policy(struct secpolicy *src) { @@ -989,13 +991,13 @@ ipsec_deepcopy_policy(struct secpolicy * struct secpolicy *dst; if (src == NULL) - return NULL; + return (NULL); dst = KEY_NEWSP(); if (dst == NULL) - return NULL; + return (NULL); /* - * deep-copy IPsec request chain. This is required since struct + * Deep-copy IPsec request chain. This is required since struct * ipsecrequest is not reference counted. */ q = &newchain; @@ -1019,9 +1021,9 @@ ipsec_deepcopy_policy(struct secpolicy * dst->req = newchain; dst->state = src->state; dst->policy = src->policy; - /* do not touch the refcnt fields */ + /* Do not touch the refcnt fields. */ - return dst; + return (dst); fail: for (p = newchain; p; p = r) { @@ -1029,10 +1031,10 @@ fail: ipsec_delisr(p); p = NULL; } - return NULL; + return (NULL); } -/* set policy and ipsec request if present. */ +/* Set policy and IPsec request if present. */ static int ipsec_set_policy(struct secpolicy **pcb_sp, int optname, caddr_t request, size_t len, struct ucred *cred) @@ -1042,44 +1044,44 @@ ipsec_set_policy(struct secpolicy **pcb_ struct secpolicy *newsp = NULL; int error; - /* sanity check. */ + /* Sanity check. */ if (pcb_sp == NULL || *pcb_sp == NULL || request == NULL) - return EINVAL; + return (EINVAL); if (len < sizeof(*xpl)) - return EINVAL; + return (EINVAL); xpl = (struct sadb_x_policy *)request; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: passed policy\n", __func__); kdebug_sadb_x_policy((struct sadb_ext *)xpl)); - /* check policy type */ + /* Check policy type. */ /* ipsec_set_policy() accepts IPSEC, ENTRUST and BYPASS. */ if (xpl->sadb_x_policy_type == IPSEC_POLICY_DISCARD || xpl->sadb_x_policy_type == IPSEC_POLICY_NONE) - return EINVAL; + return (EINVAL); - /* check privileged socket */ + /* Check privileged socket. */ if (cred != NULL && xpl->sadb_x_policy_type == IPSEC_POLICY_BYPASS) { error = priv_check_cred(cred, PRIV_NETINET_IPSEC, 0); if (error) - return EACCES; + return (EACCES); } - /* allocation new SP entry */ + /* Allocating new SP entry. */ if ((newsp = key_msg2sp(xpl, len, &error)) == NULL) - return error; + return (error); newsp->state = IPSEC_SPSTATE_ALIVE; - /* clear old SP and set new SP */ + /* Clear old SP and set new SP. */ KEY_FREESP(pcb_sp); *pcb_sp = newsp; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: new policy\n", __func__); kdebug_secpolicy(newsp)); - return 0; + return (0); } static int @@ -1087,21 +1089,21 @@ ipsec_get_policy(struct secpolicy *pcb_s { INIT_VNET_IPSEC(curvnet); - /* sanity check. */ + /* Sanity check. */ if (pcb_sp == NULL || mp == NULL) - return EINVAL; + return (EINVAL); *mp = key_sp2msg(pcb_sp); if (!*mp) { ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); - return ENOBUFS; + return (ENOBUFS); } (*mp)->m_type = MT_DATA; KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s:\n", __func__); kdebug_mbuf(*mp)); - return 0; + return (0); } int @@ -1112,14 +1114,14 @@ ipsec4_set_policy(struct inpcb *inp, int struct sadb_x_policy *xpl; struct secpolicy **pcb_sp; - /* sanity check. */ + /* Sanity check. */ if (inp == NULL || request == NULL) - return EINVAL; + return (EINVAL); if (len < sizeof(*xpl)) - return EINVAL; + return (EINVAL); xpl = (struct sadb_x_policy *)request; - /* select direction */ + /* Select direction. */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: pcb_sp = &inp->inp_sp->sp_in; @@ -1130,10 +1132,10 @@ ipsec4_set_policy(struct inpcb *inp, int default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); - return EINVAL; + return (EINVAL); } - return ipsec_set_policy(pcb_sp, optname, request, len, cred); + return (ipsec_set_policy(pcb_sp, optname, request, len, cred)); } int @@ -1144,15 +1146,15 @@ ipsec4_get_policy(struct inpcb *inp, cad struct sadb_x_policy *xpl; struct secpolicy *pcb_sp; - /* sanity check. */ + /* Sanity check. */ if (inp == NULL || request == NULL || mp == NULL) - return EINVAL; + return (EINVAL); IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); if (len < sizeof(*xpl)) - return EINVAL; + return (EINVAL); xpl = (struct sadb_x_policy *)request; - /* select direction */ + /* Select direction. */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: pcb_sp = inp->inp_sp->sp_in; @@ -1163,20 +1165,20 @@ ipsec4_get_policy(struct inpcb *inp, cad default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); - return EINVAL; + return (EINVAL); } - return ipsec_get_policy(pcb_sp, mp); + return (ipsec_get_policy(pcb_sp, mp)); } -/* delete policy in PCB */ +/* Delete policy in PCB. */ int ipsec_delete_pcbpolicy(struct inpcb *inp) { IPSEC_ASSERT(inp != NULL, ("null inp")); if (inp->inp_sp == NULL) - return 0; + return (0); if (inp->inp_sp->sp_in != NULL) KEY_FREESP(&inp->inp_sp->sp_in); @@ -1187,7 +1189,7 @@ ipsec_delete_pcbpolicy(struct inpcb *inp ipsec_delpcbpolicy(inp->inp_sp); inp->inp_sp = NULL; - return 0; + return (0); } #ifdef INET6 @@ -1199,14 +1201,14 @@ ipsec6_set_policy(struct inpcb *inp, int struct sadb_x_policy *xpl; struct secpolicy **pcb_sp; - /* sanity check. */ + /* Sanity check. */ if (inp == NULL || request == NULL) - return EINVAL; + return (EINVAL); if (len < sizeof(*xpl)) - return EINVAL; + return (EINVAL); xpl = (struct sadb_x_policy *)request; - /* select direction */ + /* Select direction. */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: pcb_sp = &inp->inp_sp->sp_in; @@ -1217,10 +1219,10 @@ ipsec6_set_policy(struct inpcb *inp, int default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); - return EINVAL; + return (EINVAL); } - return ipsec_set_policy(pcb_sp, optname, request, len, cred); + return (ipsec_set_policy(pcb_sp, optname, request, len, cred)); } int @@ -1231,15 +1233,15 @@ ipsec6_get_policy(struct inpcb *inp, cad struct sadb_x_policy *xpl; struct secpolicy *pcb_sp; - /* sanity check. */ + /* Sanity check. */ if (inp == NULL || request == NULL || mp == NULL) - return EINVAL; + return (EINVAL); IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); if (len < sizeof(*xpl)) - return EINVAL; + return (EINVAL); xpl = (struct sadb_x_policy *)request; - /* select direction */ + /* Select direction. */ switch (xpl->sadb_x_policy_dir) { case IPSEC_DIR_INBOUND: pcb_sp = inp->inp_sp->sp_in; @@ -1250,15 +1252,15 @@ ipsec6_get_policy(struct inpcb *inp, cad default: ipseclog((LOG_ERR, "%s: invalid direction=%u\n", __func__, xpl->sadb_x_policy_dir)); - return EINVAL; + return (EINVAL); } - return ipsec_get_policy(pcb_sp, mp); + return (ipsec_get_policy(pcb_sp, mp)); } #endif /* - * return current level. + * Return current level. * Either IPSEC_LEVEL_USE or IPSEC_LEVEL_REQUIRE are always returned. */ u_int @@ -1275,7 +1277,7 @@ ipsec_get_reqlevel(struct ipsecrequest * isr->sp->spidx.src.sa.sa_family, isr->sp->spidx.dst.sa.sa_family)); -/* XXX note that we have ipseclog() expanded here - code sync issue */ +/* XXX Note that we have ipseclog() expanded here - code sync issue. */ #define IPSEC_CHECK_DEFAULT(lev) \ (((lev) != IPSEC_LEVEL_USE && (lev) != IPSEC_LEVEL_REQUIRE \ && (lev) != IPSEC_LEVEL_UNIQUE) \ @@ -1287,7 +1289,7 @@ ipsec_get_reqlevel(struct ipsecrequest * (lev) \ : (lev)) - /* set default level */ + /* Set default level. */ switch (((struct sockaddr *)&isr->sp->spidx.src)->sa_family) { #ifdef INET case AF_INET: @@ -1312,7 +1314,7 @@ ipsec_get_reqlevel(struct ipsecrequest * #undef IPSEC_CHECK_DEFAULT - /* set level */ + /* Set level. */ switch (isr->level) { case IPSEC_LEVEL_DEFAULT: switch (isr->saidx.proto) { @@ -1330,8 +1332,8 @@ ipsec_get_reqlevel(struct ipsecrequest * break; case IPPROTO_IPCOMP: /* - * we don't really care, as IPcomp document says that - * we shouldn't compress small packets + * We don't really care, as IPcomp document says that + * we shouldn't compress small packets. */ level = IPSEC_LEVEL_USE; break; @@ -1353,7 +1355,7 @@ ipsec_get_reqlevel(struct ipsecrequest * panic("%s: Illegal IPsec level %u\n", __func__, isr->level); } - return level; + return (level); } /* @@ -1376,19 +1378,19 @@ ipsec_in_reject(struct secpolicy *sp, st KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("%s: using SP\n", __func__); kdebug_secpolicy(sp)); - /* check policy */ + /* Check policy. */ switch (sp->policy) { case IPSEC_POLICY_DISCARD: - return 1; + return (1); case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_NONE: - return 0; + return (0); } IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, ("invalid policy %u", sp->policy)); - /* XXX should compare policy against ipsec header history */ + /* XXX Should compare policy against IPsec header history. */ need_auth = 0; for (isr = sp->req; isr != NULL; isr = isr->next) { @@ -1400,7 +1402,7 @@ ipsec_in_reject(struct secpolicy *sp, st KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: ESP m_flags:%x\n", __func__, m->m_flags)); - return 1; + return (1); } if (!need_auth && @@ -1410,7 +1412,7 @@ ipsec_in_reject(struct secpolicy *sp, st KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: ESP/AH m_flags:%x\n", __func__, m->m_flags)); - return 1; + return (1); } break; case IPPROTO_AH: @@ -1419,26 +1421,26 @@ ipsec_in_reject(struct secpolicy *sp, st KEYDEBUG(KEYDEBUG_IPSEC_DUMP, printf("%s: AH m_flags:%x\n", __func__, m->m_flags)); - return 1; + return (1); } break; case IPPROTO_IPCOMP: /* - * we don't really care, as IPcomp document + * We don't really care, as IPcomp document * says that we shouldn't compress small - * packets, IPComp policy should always be + * packets. IPComp policy should always be * treated as being in "use" level. */ break; } } - return 0; /* valid */ + return (0); /* Valid. */ } /* * Check AH/ESP integrity. * This function is called from tcp_input(), udp_input(), - * and {ah,esp}4_input for tunnel mode + * and {ah,esp}4_input for tunnel mode. */ int ipsec4_in_reject(struct mbuf *m, struct inpcb *inp) @@ -1450,7 +1452,8 @@ ipsec4_in_reject(struct mbuf *m, struct IPSEC_ASSERT(m != NULL, ("null mbuf")); - /* get SP for this packet. + /* + * Get SP for this packet. * When we are called from ip_forward(), we call * ipsec_getpolicybyaddr() with IP_FORWARDING flag. */ @@ -1465,17 +1468,17 @@ ipsec4_in_reject(struct mbuf *m, struct V_ipsec4stat.ips_in_polvio++; KEY_FREESP(&sp); } else { - result = 0; /* XXX should be panic ? + result = 0; /* XXX Should be panic? * -> No, there may be error. */ } - return result; + return (result); } #ifdef INET6 /* * Check AH/ESP integrity. * This function is called from tcp6_input(), udp6_input(), - * and {ah,esp}6_input for tunnel mode + * and {ah,esp}6_input for tunnel mode. */ int ipsec6_in_reject(struct mbuf *m, struct inpcb *inp) @@ -1485,11 +1488,11 @@ ipsec6_in_reject(struct mbuf *m, struct int error; int result; - /* sanity check */ + /* Sanity check. */ if (m == NULL) - return 0; /* XXX should be panic ? */ + return (0); /* XXX Should be panic? */ - /* get SP for this packet. + /* Get SP for this packet. * When we are called from ip_forward(), we call * ipsec_getpolicybyaddr() with IP_FORWARDING flag. */ @@ -1506,14 +1509,14 @@ ipsec6_in_reject(struct mbuf *m, struct } else { result = 0; } - return result; + return (result); } #endif /* - * compute the byte size to be occupied by IPsec header. - * in case it is tunneled, it includes the size of outer IP header. - * NOTE: SP passed is free in this function. + * Compute the byte size to be occupied by IPsec header. + * In case it is tunnelled, it includes the size of outer IP header. + * NOTE: SP passed is freed in this function. */ static size_t ipsec_hdrsiz(struct secpolicy *sp) @@ -1529,7 +1532,7 @@ ipsec_hdrsiz(struct secpolicy *sp) case IPSEC_POLICY_DISCARD: case IPSEC_POLICY_BYPASS: case IPSEC_POLICY_NONE: - return 0; + return (0); } IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, @@ -1571,7 +1574,7 @@ ipsec_hdrsiz(struct secpolicy *sp) siz += clen; } - return siz; + return (siz); } /* This function is called from ip_forward() and ipsec4_hdrsize_tcp(). */ @@ -1585,7 +1588,7 @@ ipsec4_hdrsiz(struct mbuf *m, u_int dir, IPSEC_ASSERT(m != NULL, ("null mbuf")); - /* get SP for this packet. + /* Get SP for this packet. * When we are called from ip_forward(), we call * ipsec_getpolicybyaddr() with IP_FORWARDING flag. */ @@ -1602,16 +1605,16 @@ ipsec4_hdrsiz(struct mbuf *m, u_int dir, KEY_FREESP(&sp); } else { - size = 0; /* XXX should be panic ? + size = 0; /* XXX Should be panic? * -> No, we are called w/o knowing if * IPsec processing is needed. */ } - return size; + return (size); } #ifdef INET6 /* This function is called from ipsec6_hdrsize_tcp(), - * and maybe from ip6_forward.() + * and maybe from ip6_forward(). */ size_t ipsec6_hdrsiz(struct mbuf *m, u_int dir, struct inpcb *inp) @@ -1625,7 +1628,7 @@ ipsec6_hdrsiz(struct mbuf *m, u_int dir, IPSEC_ASSERT(inp == NULL || inp->inp_socket != NULL, ("socket w/o inpcb")); - /* get SP for this packet */ + /* Get SP for this packet. */ /* XXX Is it right to call with IP_FORWARDING. */ if (inp == NULL) sp = ipsec_getpolicybyaddr(m, dir, IP_FORWARDING, &error); @@ -1633,13 +1636,13 @@ ipsec6_hdrsiz(struct mbuf *m, u_int dir, sp = ipsec_getpolicybysock(m, dir, inp, &error); if (sp == NULL) - return 0; + return (0); size = ipsec_hdrsiz(sp); KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("%s: size:%lu.\n", __func__, (unsigned long)size)); KEY_FREESP(&sp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Dec 27 23:24:59 2008 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 977581065673; Sat, 27 Dec 2008 23:24:59 +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 882C08FC16; Sat, 27 Dec 2008 23:24:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBRNOx1x086609; Sat, 27 Dec 2008 23:24:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBRNOx4A086608; Sat, 27 Dec 2008 23:24:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812272324.mBRNOx4A086608@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 27 Dec 2008 23:24: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: r186532 - head/sys/netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Dec 2008 23:24:59 -0000 Author: bz Date: Sat Dec 27 23:24:59 2008 New Revision: 186532 URL: http://svn.freebsd.org/changeset/base/186532 Log: Like in the rest of the file and the network stack use inp as variable name for the inpcb. For consistency with the other *_hdrsiz functions use 'size' instead of 'siz' as variable name. No functional change. MFC after: 4 weeks Modified: head/sys/netipsec/ipsec.c Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Sat Dec 27 22:58:16 2008 (r186531) +++ head/sys/netipsec/ipsec.c Sat Dec 27 23:24:59 2008 (r186532) @@ -228,9 +228,9 @@ SYSCTL_V_STRUCT(V_NET, vnet_ipsec, _net_ "IPsec IPv6 statistics."); #endif /* INET6 */ -static int ipsec4_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); +static int ipsec4_setspidx_inpcb __P((struct mbuf *, struct inpcb *)); #ifdef INET6 -static int ipsec6_setspidx_inpcb __P((struct mbuf *, struct inpcb *pcb)); +static int ipsec6_setspidx_inpcb __P((struct mbuf *, struct inpcb *)); #endif static int ipsec_setspidx __P((struct mbuf *, struct secpolicyindex *, int)); static void ipsec4_get_ulp __P((struct mbuf *m, struct secpolicyindex *, int)); @@ -538,50 +538,50 @@ ipsec4_checkpolicy(struct mbuf *m, u_int } static int -ipsec4_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) +ipsec4_setspidx_inpcb(struct mbuf *m, struct inpcb *inp) { int error; - IPSEC_ASSERT(pcb != NULL, ("null pcb")); - IPSEC_ASSERT(pcb->inp_sp != NULL, ("null inp_sp")); - IPSEC_ASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, + IPSEC_ASSERT(inp != NULL, ("null inp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(inp->inp_sp->sp_out != NULL && inp->inp_sp->sp_in != NULL, ("null sp_in || sp_out")); - error = ipsec_setspidx(m, &pcb->inp_sp->sp_in->spidx, 1); + error = ipsec_setspidx(m, &inp->inp_sp->sp_in->spidx, 1); if (error == 0) { - pcb->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; - pcb->inp_sp->sp_out->spidx = pcb->inp_sp->sp_in->spidx; - pcb->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; + inp->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; + inp->inp_sp->sp_out->spidx = inp->inp_sp->sp_in->spidx; + inp->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; } else { - bzero(&pcb->inp_sp->sp_in->spidx, - sizeof (pcb->inp_sp->sp_in->spidx)); - bzero(&pcb->inp_sp->sp_out->spidx, - sizeof (pcb->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_in->spidx, + sizeof (inp->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_out->spidx, + sizeof (inp->inp_sp->sp_in->spidx)); } return (error); } #ifdef INET6 static int -ipsec6_setspidx_inpcb(struct mbuf *m, struct inpcb *pcb) +ipsec6_setspidx_inpcb(struct mbuf *m, struct inpcb *inp) { int error; - IPSEC_ASSERT(pcb != NULL, ("null pcb")); - IPSEC_ASSERT(pcb->inp_sp != NULL, ("null inp_sp")); - IPSEC_ASSERT(pcb->inp_sp->sp_out != NULL && pcb->inp_sp->sp_in != NULL, + IPSEC_ASSERT(inp != NULL, ("null inp")); + IPSEC_ASSERT(inp->inp_sp != NULL, ("null inp_sp")); + IPSEC_ASSERT(inp->inp_sp->sp_out != NULL && inp->inp_sp->sp_in != NULL, ("null sp_in || sp_out")); - error = ipsec_setspidx(m, &pcb->inp_sp->sp_in->spidx, 1); + error = ipsec_setspidx(m, &inp->inp_sp->sp_in->spidx, 1); if (error == 0) { - pcb->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; - pcb->inp_sp->sp_out->spidx = pcb->inp_sp->sp_in->spidx; - pcb->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; + inp->inp_sp->sp_in->spidx.dir = IPSEC_DIR_INBOUND; + inp->inp_sp->sp_out->spidx = inp->inp_sp->sp_in->spidx; + inp->inp_sp->sp_out->spidx.dir = IPSEC_DIR_OUTBOUND; } else { - bzero(&pcb->inp_sp->sp_in->spidx, - sizeof(pcb->inp_sp->sp_in->spidx)); - bzero(&pcb->inp_sp->sp_out->spidx, - sizeof(pcb->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_in->spidx, + sizeof(inp->inp_sp->sp_in->spidx)); + bzero(&inp->inp_sp->sp_out->spidx, + sizeof(inp->inp_sp->sp_in->spidx)); } return (error); @@ -1523,7 +1523,7 @@ ipsec_hdrsiz(struct secpolicy *sp) { INIT_VNET_IPSEC(curvnet); struct ipsecrequest *isr; - size_t siz; + size_t size; KEYDEBUG(KEYDEBUG_IPSEC_DATA, printf("%s: using SP\n", __func__); kdebug_secpolicy(sp)); @@ -1538,7 +1538,7 @@ ipsec_hdrsiz(struct secpolicy *sp) IPSEC_ASSERT(sp->policy == IPSEC_POLICY_IPSEC, ("invalid policy %u", sp->policy)); - siz = 0; + size = 0; for (isr = sp->req; isr != NULL; isr = isr->next) { size_t clen = 0; @@ -1571,10 +1571,10 @@ ipsec_hdrsiz(struct secpolicy *sp) break; } } - siz += clen; + size += clen; } - return (siz); + return (size); } /* This function is called from ip_forward() and ipsec4_hdrsize_tcp(). */