From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 03:21:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88DFB106566C; Sun, 30 Sep 2012 03:21:22 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 748EE8FC0A; Sun, 30 Sep 2012 03:21:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U3LMeU049557; Sun, 30 Sep 2012 03:21:22 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U3LMKt049555; Sun, 30 Sep 2012 03:21:22 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209300321.q8U3LMKt049555@svn.freebsd.org> From: Eitan Adler Date: Sun, 30 Sep 2012 03:21: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: r241061 - head/usr.sbin/rtprio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 03:21:22 -0000 Author: eadler Date: Sun Sep 30 03:21:21 2012 New Revision: 241061 URL: http://svn.freebsd.org/changeset/base/241061 Log: Document the security.bsd.unprivileged_idprio in idprio(1) in addition to rtprio(2). Approved by: wblock MFC after: 3 days Modified: head/usr.sbin/rtprio/rtprio.1 Modified: head/usr.sbin/rtprio/rtprio.1 ============================================================================== --- head/usr.sbin/rtprio/rtprio.1 Sun Sep 30 00:44:53 2012 (r241060) +++ head/usr.sbin/rtprio/rtprio.1 Sun Sep 30 03:21:21 2012 (r241061) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 23, 1994 +.Dd September 29, 2012 .Dt RTPRIO 1 .Os .Sh NAME @@ -113,6 +113,14 @@ highest priority of 0 means "the current process". .Pp Only root is allowed to set realtime or idle priority for a process. +A user may modify the idle priority of their own processes if the +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_idprio +is set to non-zero. +Note that this increases the chance that a deadlock can occur +if a process locks a required resource and then does +not get to run. .Sh EXIT STATUS If .Nm From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 03:25:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B616F106564A; Sun, 30 Sep 2012 03:25:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A16E58FC15; Sun, 30 Sep 2012 03:25:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U3P4Wa050090; Sun, 30 Sep 2012 03:25:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U3P4RJ050088; Sun, 30 Sep 2012 03:25:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201209300325.q8U3P4RJ050088@svn.freebsd.org> From: Eitan Adler Date: Sun, 30 Sep 2012 03: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: r241062 - head/lib/libc/string X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 03:25:04 -0000 Author: eadler Date: Sun Sep 30 03:25:04 2012 New Revision: 241062 URL: http://svn.freebsd.org/changeset/base/241062 Log: clarify the wording for 'first' and 'last' Approved by: wblock MFC after: 3 days Modified: head/lib/libc/string/ffs.3 Modified: head/lib/libc/string/ffs.3 ============================================================================== --- head/lib/libc/string/ffs.3 Sun Sep 30 03:21:21 2012 (r241061) +++ head/lib/libc/string/ffs.3 Sun Sep 30 03:25:04 2012 (r241062) @@ -30,7 +30,7 @@ .\" @(#)ffs.3 8.2 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd May 3, 2011 +.Dd September 29, 2012 .Dt FFS 3 .Os .Sh NAME @@ -63,8 +63,7 @@ The .Fn ffsl and .Fn ffsll -functions find the first bit set -(beginning with the least significant bit) +functions find the first (least significant) bit set in .Fa value and return the index of that bit. @@ -74,11 +73,11 @@ The .Fn flsl and .Fn flsll -functions find the last bit set in +functions find the last (most significant) bit set in .Fa value and return the index of that bit. .Pp -Bits are numbered starting at 1 (the least significant bit). +Bits are numbered starting at 1, the least significant bit. A return value of zero from any of these functions means that the argument was zero. .Sh SEE ALSO From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 03:54:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E31211065670; Sun, 30 Sep 2012 03:54:57 +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 CF37C8FC12; Sun, 30 Sep 2012 03:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U3svP4054216; Sun, 30 Sep 2012 03:54:57 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U3svar054213; Sun, 30 Sep 2012 03:54:57 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201209300354.q8U3svar054213@svn.freebsd.org> From: Alan Cox Date: Sun, 30 Sep 2012 03:54: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: r241063 - head/sys/arm/arm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 03:54:58 -0000 Author: alc Date: Sun Sep 30 03:54:57 2012 New Revision: 241063 URL: http://svn.freebsd.org/changeset/base/241063 Log: Stop calling pmap_remove_write() from pmap_remove_all(). Doing so is not only inefficient but also leads to recursive lock acquisition. Tested by: ray Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Sun Sep 30 03:25:04 2012 (r241062) +++ head/sys/arm/arm/pmap-v6.c Sun Sep 30 03:54:57 2012 (r241063) @@ -2307,7 +2307,6 @@ pmap_remove_all(vm_page_t m) if (TAILQ_EMPTY(&m->md.pv_list)) return; rw_wlock(&pvh_global_lock); - pmap_remove_write(m); curpm = vmspace_pmap(curproc->p_vmspace); while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) { if (flush == FALSE && (pv->pv_pmap == curpm || @@ -2318,6 +2317,8 @@ pmap_remove_all(vm_page_t m) l2b = pmap_get_l2_bucket(pv->pv_pmap, pv->pv_va); KASSERT(l2b != NULL, ("No l2 bucket")); ptep = &l2b->l2b_kva[l2pte_index(pv->pv_va)]; + if (L2_S_WRITABLE(*ptep)) + vm_page_dirty(m); *ptep = 0; if (pmap_is_current(pv->pv_pmap)) PTE_SYNC(ptep); @@ -2328,6 +2329,7 @@ pmap_remove_all(vm_page_t m) PMAP_UNLOCK(pv->pv_pmap); pmap_free_pv_entry(pv); } + m->md.pvh_attrs &= ~(PVF_MOD | PVF_REF); if (flush) { if (PV_BEEN_EXECD(flags)) From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 07:51:57 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4A41106566C; Sun, 30 Sep 2012 07:51:57 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF6C28FC14; Sun, 30 Sep 2012 07:51:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U7pvQ8089583; Sun, 30 Sep 2012 07:51:57 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U7pvMO089581; Sun, 30 Sep 2012 07:51:57 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201209300751.q8U7pvMO089581@svn.freebsd.org> From: Joel Dahl Date: Sun, 30 Sep 2012 07:51: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: r241064 - 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: Sun, 30 Sep 2012 07:51:58 -0000 Author: joel (doc committer) Date: Sun Sep 30 07:51:57 2012 New Revision: 241064 URL: http://svn.freebsd.org/changeset/base/241064 Log: mdoc: remove superfluous paragraph macro. Modified: head/share/man/man9/drbr.9 Modified: head/share/man/man9/drbr.9 ============================================================================== --- head/share/man/man9/drbr.9 Sun Sep 30 03:54:57 2012 (r241063) +++ head/share/man/man9/drbr.9 Sun Sep 30 07:51:57 2012 (r241064) @@ -119,7 +119,6 @@ there will not be more mbufs when .Fn drbr_dequeue is actually called. Provided the tx queue lock is held there will not be less. -.Pp .Sh RETURN VALUES The .Fn drbr_enqueue From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 07:52:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3289A106566C; Sun, 30 Sep 2012 07:52:41 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4A78FC15; Sun, 30 Sep 2012 07:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U7qe6w089729; Sun, 30 Sep 2012 07:52:40 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U7qex3089727; Sun, 30 Sep 2012 07:52:40 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209300752.q8U7qex3089727@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 07:52: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: r241065 - head/sys/boot/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: Sun, 30 Sep 2012 07:52:41 -0000 Author: ae Date: Sun Sep 30 07:52:40 2012 New Revision: 241065 URL: http://svn.freebsd.org/changeset/base/241065 Log: Fix disk_cleanup() to work without DISK_DEBUG too. Modified: head/sys/boot/common/disk.c Modified: head/sys/boot/common/disk.c ============================================================================== --- head/sys/boot/common/disk.c Sun Sep 30 07:51:57 2012 (r241064) +++ head/sys/boot/common/disk.c Sun Sep 30 07:52:40 2012 (r241065) @@ -373,7 +373,9 @@ disk_close(struct disk_devdesc *dev) void disk_cleanup(const struct devsw *d_dev) { +#ifdef DISK_DEBUG struct disk_devdesc dev; +#endif struct dentry *entry, *tmp; STAILQ_FOREACH_SAFE(entry, &opened_disks, entry, tmp) { @@ -385,10 +387,10 @@ disk_cleanup(const struct devsw *d_dev) dev.d_unit = entry->d_unit; dev.d_slice = entry->d_slice; dev.d_partition = entry->d_partition; - STAILQ_REMOVE(&opened_disks, entry, dentry, entry); DEBUG("%s was freed => %p [%d]", disk_fmtdev(&dev), entry->od, entry->od->rcnt); #endif + STAILQ_REMOVE(&opened_disks, entry, dentry, entry); if (entry->od->rcnt < 1) { if (entry->od->table != NULL) ptable_close(entry->od->table); From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 09:21:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28259106564A; Sun, 30 Sep 2012 09:21:11 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED7758FC15; Sun, 30 Sep 2012 09:21:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U9LAgC002265; Sun, 30 Sep 2012 09:21:10 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U9LA1T002259; Sun, 30 Sep 2012 09:21:10 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209300921.q8U9LA1T002259@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 09:21: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: r241066 - in head/sys: dev/ie dev/sound/pci i386/bios x86/bios X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 09:21:11 -0000 Author: kevlo Date: Sun Sep 30 09:21:10 2012 New Revision: 241066 URL: http://svn.freebsd.org/changeset/base/241066 Log: Free result of device_get_children(9). Modified: head/sys/dev/ie/if_ie_isa.c head/sys/dev/sound/pci/hdspe-pcm.c head/sys/dev/sound/pci/hdspe.c head/sys/i386/bios/smapi.c head/sys/x86/bios/smbios.c Modified: head/sys/dev/ie/if_ie_isa.c ============================================================================== --- head/sys/dev/ie/if_ie_isa.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/dev/ie/if_ie_isa.c Sun Sep 30 09:21:10 2012 (r241066) @@ -875,6 +875,7 @@ ie_modevent (mod, what, arg) devclass_get_devices(ie_devclass, &devs, &count); for (i = 0; i < count; i++) device_delete_child(device_get_parent(devs[i]), devs[i]); + free(devs, M_TEMP); break; default: break; Modified: head/sys/dev/sound/pci/hdspe-pcm.c ============================================================================== --- head/sys/dev/sound/pci/hdspe-pcm.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/dev/sound/pci/hdspe-pcm.c Sun Sep 30 09:21:10 2012 (r241066) @@ -207,6 +207,7 @@ hdspe_running(struct sc_info *sc) } } + free(devlist, M_TEMP); return 0; bad: @@ -214,6 +215,7 @@ bad: device_printf(sc->dev,"hdspe is running\n"); #endif + free(devlist, M_TEMP); return 1; } Modified: head/sys/dev/sound/pci/hdspe.c ============================================================================== --- head/sys/dev/sound/pci/hdspe.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/dev/sound/pci/hdspe.c Sun Sep 30 09:21:10 2012 (r241066) @@ -107,6 +107,7 @@ hdspe_intr(void *p) } hdspe_write_1(sc, HDSPE_INTERRUPT_ACK, 0); + free(devlist, M_TEMP); } snd_mtxunlock(sc->lock); Modified: head/sys/i386/bios/smapi.c ============================================================================== --- head/sys/i386/bios/smapi.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/i386/bios/smapi.c Sun Sep 30 09:21:10 2012 (r241066) @@ -292,6 +292,7 @@ smapi_modevent (module_t mod, int what, for (i = 0; i < count; i++) { device_delete_child(device_get_parent(devs[i]), devs[i]); } + free(devs, M_TEMP); break; default: break; Modified: head/sys/x86/bios/smbios.c ============================================================================== --- head/sys/x86/bios/smbios.c Sun Sep 30 07:52:40 2012 (r241065) +++ head/sys/x86/bios/smbios.c Sun Sep 30 09:21:10 2012 (r241066) @@ -204,6 +204,7 @@ smbios_modevent (mod, what, arg) for (i = 0; i < count; i++) { device_delete_child(device_get_parent(devs[i]), devs[i]); } + free(devs, M_TEMP); break; default: break; From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 09:26:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 545C51065670; Sun, 30 Sep 2012 09:26:27 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FA098FC0C; Sun, 30 Sep 2012 09:26:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8U9QRA8003071; Sun, 30 Sep 2012 09:26:27 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8U9QRDo003069; Sun, 30 Sep 2012 09:26:27 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209300926.q8U9QRDo003069@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 09:26: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: r241067 - head/sys/dev/mmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 09:26:28 -0000 Author: kevlo Date: Sun Sep 30 09:26:26 2012 New Revision: 241067 URL: http://svn.freebsd.org/changeset/base/241067 Log: Remove an unneeded NULL check after M_WAITOK. Modified: head/sys/dev/mmc/mmc.c Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Sun Sep 30 09:21:10 2012 (r241066) +++ head/sys/dev/mmc/mmc.c Sun Sep 30 09:26:26 2012 (r241067) @@ -1261,8 +1261,6 @@ mmc_discover_cards(struct mmc_softc *sc) if (newcard) { ivar = malloc(sizeof(struct mmc_ivars), M_DEVBUF, M_WAITOK | M_ZERO); - if (!ivar) - return; memcpy(ivar->raw_cid, raw_cid, sizeof(raw_cid)); } if (mmcbr_get_ro(sc->dev)) From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 12:24:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B668510656A6; Sun, 30 Sep 2012 12:24:16 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98F4E8FC08; Sun, 30 Sep 2012 12:24:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UCOGsc029240; Sun, 30 Sep 2012 12:24:16 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UCOG5o029237; Sun, 30 Sep 2012 12:24:16 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209301224.q8UCOG5o029237@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 12:24: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: r241068 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 12:24:17 -0000 Author: ae Date: Sun Sep 30 12:24:15 2012 New Revision: 241068 URL: http://svn.freebsd.org/changeset/base/241068 Log: Reduce the number of attempts to detect proper kld format for the amd64 loader. Modified: head/sys/boot/i386/loader/Makefile head/sys/boot/i386/loader/conf.c Modified: head/sys/boot/i386/loader/Makefile ============================================================================== --- head/sys/boot/i386/loader/Makefile Sun Sep 30 09:26:26 2012 (r241067) +++ head/sys/boot/i386/loader/Makefile Sun Sep 30 12:24:15 2012 (r241068) @@ -125,6 +125,7 @@ LDADD= ${LIBFICL} ${LIBFIREWIRE} ${LIBZF .if ${MACHINE_CPUARCH} == "amd64" beforedepend ${OBJS}: machine CLEANFILES+= machine +CFLAGS+= -DLOADER_PREFER_AMD64 machine: ln -sf ${.CURDIR}/../../../i386/include machine .endif Modified: head/sys/boot/i386/loader/conf.c ============================================================================== --- head/sys/boot/i386/loader/conf.c Sun Sep 30 09:26:26 2012 (r241067) +++ head/sys/boot/i386/loader/conf.c Sun Sep 30 12:24:15 2012 (r241068) @@ -109,10 +109,16 @@ extern struct file_format amd64_elf; extern struct file_format amd64_elf_obj; struct file_format *file_formats[] = { +#ifdef LOADER_PREFER_AMD64 + &amd64_elf, + &amd64_elf_obj, +#endif &i386_elf, &i386_elf_obj, +#ifndef LOADER_PREFER_AMD64 &amd64_elf, &amd64_elf_obj, +#endif NULL }; From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 13:14:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A87A106564A; Sun, 30 Sep 2012 13:14:38 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 666788FC0A; Sun, 30 Sep 2012 13:14:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UDEcUY036010; Sun, 30 Sep 2012 13:14:38 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UDEbQd036007; Sun, 30 Sep 2012 13:14:37 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209301314.q8UDEbQd036007@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 13:14: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: r241069 - head/sys/boot/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: Sun, 30 Sep 2012 13:14:38 -0000 Author: ae Date: Sun Sep 30 13:14:37 2012 New Revision: 241069 URL: http://svn.freebsd.org/changeset/base/241069 Log: Remember the file format of the last loaded module and try to use it for next files. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Sun Sep 30 12:24:15 2012 (r241068) +++ head/sys/boot/common/module.c Sun Sep 30 13:14:37 2012 (r241069) @@ -271,6 +271,7 @@ command_lsmod(int argc, char *argv[]) int file_load(char *filename, vm_offset_t dest, struct preloaded_file **result) { + static int last_file_format = 0; struct preloaded_file *fp; int error; int i; @@ -279,12 +280,18 @@ file_load(char *filename, vm_offset_t de dest = archsw.arch_loadaddr(LOAD_RAW, filename, dest); error = EFTYPE; - for (i = 0, fp = NULL; file_formats[i] && fp == NULL; i++) { + for (i = last_file_format, fp = NULL; + file_formats[i] && fp == NULL; i++) { error = (file_formats[i]->l_load)(filename, dest, &fp); if (error == 0) { - fp->f_loader = i; /* remember the loader */ + fp->f_loader = last_file_format = i; /* remember the loader */ *result = fp; break; + } else if (last_file_format == i && i != 0) { + /* Restart from the beginning */ + last_file_format = i = 0; + fp = NULL; + continue; } if (error == EFTYPE) continue; /* Unknown to this handler? */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 13:17:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9E0D9106566B; Sun, 30 Sep 2012 13:17:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89DDB8FC08; Sun, 30 Sep 2012 13:17:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UDHYmA036465; Sun, 30 Sep 2012 13:17:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UDHYjb036463; Sun, 30 Sep 2012 13:17:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201209301317.q8UDHYjb036463@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Sun, 30 Sep 2012 13:17: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: r241070 - head/sys/boot/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: Sun, 30 Sep 2012 13:17:34 -0000 Author: ae Date: Sun Sep 30 13:17:33 2012 New Revision: 241070 URL: http://svn.freebsd.org/changeset/base/241070 Log: Fix the style. Modified: head/sys/boot/common/module.c Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Sun Sep 30 13:14:37 2012 (r241069) +++ head/sys/boot/common/module.c Sun Sep 30 13:17:33 2012 (r241070) @@ -288,10 +288,10 @@ file_load(char *filename, vm_offset_t de *result = fp; break; } else if (last_file_format == i && i != 0) { - /* Restart from the beginning */ - last_file_format = i = 0; - fp = NULL; - continue; + /* Restart from the beginning */ + last_file_format = i = 0; + fp = NULL; + continue; } if (error == EFTYPE) continue; /* Unknown to this handler? */ From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 15:42:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 88986106566B; Sun, 30 Sep 2012 15:42:21 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 730C68FC0C; Sun, 30 Sep 2012 15:42:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UFgLge057716; Sun, 30 Sep 2012 15:42:21 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UFgLFo057713; Sun, 30 Sep 2012 15:42:21 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209301542.q8UFgLFo057713@svn.freebsd.org> From: Kevin Lo Date: Sun, 30 Sep 2012 15:42: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: r241073 - in head/sys: i386/bios x86/bios X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 15:42:21 -0000 Author: kevlo Date: Sun Sep 30 15:42:20 2012 New Revision: 241073 URL: http://svn.freebsd.org/changeset/base/241073 Log: Add missing header needed by free(9). Spotted by: David Wolfskill Modified: head/sys/i386/bios/smapi.c head/sys/x86/bios/smbios.c Modified: head/sys/i386/bios/smapi.c ============================================================================== --- head/sys/i386/bios/smapi.c Sun Sep 30 15:33:53 2012 (r241072) +++ head/sys/i386/bios/smapi.c Sun Sep 30 15:42:20 2012 (r241073) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: head/sys/x86/bios/smbios.c ============================================================================== --- head/sys/x86/bios/smbios.c Sun Sep 30 15:33:53 2012 (r241072) +++ head/sys/x86/bios/smbios.c Sun Sep 30 15:42:20 2012 (r241073) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 17:33:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7F51065673; Sun, 30 Sep 2012 17:33:31 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FBDC8FC0A; Sun, 30 Sep 2012 17:33:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UHXUpB078189; Sun, 30 Sep 2012 17:33:30 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UHXUa9078187; Sun, 30 Sep 2012 17:33:30 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201209301733.q8UHXUa9078187@svn.freebsd.org> From: Tijl Coosemans Date: Sun, 30 Sep 2012 17:33: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: r241077 - head/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Sep 2012 17:33:31 -0000 Author: tijl Date: Sun Sep 30 17:33:30 2012 New Revision: 241077 URL: http://svn.freebsd.org/changeset/base/241077 Log: - Simplify the implementation of atomic_compare_exchange_strong_explicit. - Evaluate the memory order argument in atomic_fetch_*_explicit macros. - Implement atomic_store_explicit using atomic_exchange_explicit instead of a plain assignment. Reviewed by: theraven MFC after: 2 weeks Modified: head/include/stdatomic.h Modified: head/include/stdatomic.h ============================================================================== --- head/include/stdatomic.h Sun Sep 30 16:21:12 2012 (r241076) +++ head/include/stdatomic.h Sun Sep 30 17:33:30 2012 (r241077) @@ -234,19 +234,12 @@ typedef _Atomic(__uintmax_t) atomic_uin #else #define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) __extension__ ({ \ - __typeof__((object)->__val) __v; \ - __typeof__(expected) __e; \ - _Bool __r; \ - __e = (expected); \ - (void)(success); \ - (void)(failure); \ - __v = __sync_val_compare_and_swap(&(object)->__val, \ - *__e, (desired)); \ - __r = (*__e == __v); \ - *__e = __v; \ - __r; \ + __typeof__(expected) __ep = (expected); \ + __typeof__(*__ep) __e = *__ep; \ + (void)(success); (void)(failure); \ + (*__ep = __sync_val_compare_and_swap(&(object)->__val, \ + __e, desired)) == __e; \ }) - #define atomic_compare_exchange_weak_explicit(object, expected, \ desired, success, failure) \ atomic_compare_exchange_strong_explicit(object, expected, \ @@ -271,25 +264,19 @@ __extension__ ({ \ }) #endif #define atomic_fetch_add_explicit(object, operand, order) \ - __sync_fetch_and_add(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_add(&(object)->__val, operand)) #define atomic_fetch_and_explicit(object, operand, order) \ - __sync_fetch_and_and(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_and(&(object)->__val, operand)) #define atomic_fetch_or_explicit(object, operand, order) \ - __sync_fetch_and_or(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_or(&(object)->__val, operand)) #define atomic_fetch_sub_explicit(object, operand, order) \ - __sync_fetch_and_sub(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_sub(&(object)->__val, operand)) #define atomic_fetch_xor_explicit(object, operand, order) \ - __sync_fetch_and_xor(&(object)->__val, operand) + ((void)(order), __sync_fetch_and_xor(&(object)->__val, operand)) #define atomic_load_explicit(object, order) \ - __sync_fetch_and_add(&(object)->__val, 0) -#define atomic_store_explicit(object, desired, order) __extension__ ({ \ - __typeof__(object) __o = (object); \ - __typeof__(desired) __d = (desired); \ - (void)(order); \ - __sync_synchronize(); \ - __o->__val = __d; \ - __sync_synchronize(); \ -}) + ((void)(order), __sync_fetch_and_add(&(object)->__val, 0)) +#define atomic_store_explicit(object, desired, order) \ + ((void)atomic_exchange_explicit(object, desired, order)) #endif /* From owner-svn-src-head@FreeBSD.ORG Sun Sep 30 19:31:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78D94106566B; Sun, 30 Sep 2012 19:31:21 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 28CEC8FC08; Sun, 30 Sep 2012 19:31:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8UJVLoN099406; Sun, 30 Sep 2012 19:31:21 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8UJVKfD099403; Sun, 30 Sep 2012 19:31:20 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201209301931.q8UJVKfD099403@svn.freebsd.org> From: Hans Petter Selasky Date: Sun, 30 Sep 2012 19:31: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: r241078 - head/sys/netgraph/bluetooth/drivers/ubt X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 30 Sep 2012 19:31:21 -0000 Author: hselasky Date: Sun Sep 30 19:31:20 2012 New Revision: 241078 URL: http://svn.freebsd.org/changeset/base/241078 Log: The USB Bluetooth driver should only grab its own interfaces. This allows the USB bluetooth driver to co-exist with other USB device classes and drivers. Reported by: Geoffrey Levand MFC after: 1 week Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Sep 30 17:33:30 2012 (r241077) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Sun Sep 30 19:31:20 2012 (r241078) @@ -439,6 +439,7 @@ ubt_attach(device_t dev) struct ubt_softc *sc = device_get_softc(dev); struct usb_endpoint_descriptor *ed; struct usb_interface_descriptor *id; + struct usb_interface *iface; uint16_t wMaxPacketSize; uint8_t alt_index, i, j; uint8_t iface_index[2] = { 0, 1 }; @@ -554,10 +555,21 @@ ubt_attach(device_t dev) goto detach; } - /* Claim all interfaces on the device */ - for (i = 1; usbd_get_iface(uaa->device, i) != NULL; i ++) - usbd_set_parent_iface(uaa->device, i, uaa->info.bIfaceIndex); + /* Claim all interfaces belonging to the Bluetooth part */ + for (i = 1;; i++) { + iface = usbd_get_iface(uaa->device, i); + if (iface == NULL) + break; + id = usbd_get_interface_descriptor(iface); + if ((id != NULL) && + (id->bInterfaceClass == UICLASS_WIRELESS) && + (id->bInterfaceSubClass == UISUBCLASS_RF) && + (id->bInterfaceProtocol == UIPROTO_BLUETOOTH)) { + usbd_set_parent_iface(uaa->device, i, + uaa->info.bIfaceIndex); + } + } return (0); /* success */ detach: From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 05:12:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91F6810656E3; Mon, 1 Oct 2012 05:12:18 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 737188FC0A; Mon, 1 Oct 2012 05:12:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915CIrR085584; Mon, 1 Oct 2012 05:12:18 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915CIJM085583; Mon, 1 Oct 2012 05:12:18 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201210010512.q915CIJM085583@svn.freebsd.org> From: Andrew Turner Date: Mon, 1 Oct 2012 05:12: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: r241080 - 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: Mon, 01 Oct 2012 05:12:18 -0000 Author: andrew Date: Mon Oct 1 05:12:17 2012 New Revision: 241080 URL: http://svn.freebsd.org/changeset/base/241080 Log: Fix the clobber list on the atomic operators that do comparisons. Without this some compilers will place a cmp instruction before the atomic operation and expect to be able to use the result afterwards. By adding "cc" to the list of used registers we tell the compiler to not do this. Modified: head/sys/arm/include/atomic.h Modified: head/sys/arm/include/atomic.h ============================================================================== --- head/sys/arm/include/atomic.h Mon Oct 1 03:17:23 2012 (r241079) +++ head/sys/arm/include/atomic.h Mon Oct 1 05:12:17 2012 (r241080) @@ -123,7 +123,7 @@ atomic_set_32(volatile uint32_t *address "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - , "+r" (address), "+r" (setmask) : : "memory"); + , "+r" (address), "+r" (setmask) : : "cc", "memory"); } @@ -138,7 +138,7 @@ atomic_set_long(volatile u_long *address "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - , "+r" (address), "+r" (setmask) : : "memory"); + , "+r" (address), "+r" (setmask) : : "cc", "memory"); } @@ -153,7 +153,7 @@ atomic_clear_32(volatile uint32_t *addre "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (address), "+r" (setmask) : : "memory"); + ,"+r" (address), "+r" (setmask) : : "cc", "memory"); } static __inline void @@ -167,7 +167,7 @@ atomic_clear_long(volatile u_long *addre "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (address), "+r" (setmask) : : "memory"); + ,"+r" (address), "+r" (setmask) : : "cc", "memory"); } static __inline u_int32_t @@ -185,7 +185,8 @@ atomic_cmpset_32(volatile u_int32_t *p, "moveq %0, #1\n" "2:" : "=&r" (ret) - ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "memory"); + ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "cc", + "memory"); return (ret); } @@ -204,7 +205,8 @@ atomic_cmpset_long(volatile u_long *p, v "moveq %0, #1\n" "2:" : "=&r" (ret) - ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "memory"); + ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "cc", + "memory"); return (ret); } @@ -254,7 +256,7 @@ atomic_add_32(volatile u_int32_t *p, u_i "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } static __inline void @@ -268,7 +270,7 @@ atomic_add_long(volatile u_long *p, u_lo "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } static __inline void @@ -282,7 +284,7 @@ atomic_subtract_32(volatile u_int32_t *p "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } static __inline void @@ -296,7 +298,7 @@ atomic_subtract_long(volatile u_long *p, "cmp %1, #0\n" "bne 1b\n" : "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); } ATOMIC_ACQ_REL(clear, 32) @@ -322,7 +324,7 @@ atomic_fetchadd_32(volatile uint32_t *p, "cmp %2, #0\n" "bne 1b\n" : "+r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); return (ret); } @@ -337,7 +339,7 @@ atomic_readandclear_32(volatile u_int32_ "cmp %2, #0\n" "bne 1b\n" : "=r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p) : : "memory"); + ,"+r" (p) : : "cc", "memory"); return (ret); } @@ -370,7 +372,7 @@ atomic_fetchadd_long(volatile u_long *p, "cmp %2, #0\n" "bne 1b\n" : "+r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p), "+r" (val) : : "memory"); + ,"+r" (p), "+r" (val) : : "cc", "memory"); return (ret); } @@ -385,7 +387,7 @@ atomic_readandclear_long(volatile u_long "cmp %2, #0\n" "bne 1b\n" : "=r" (ret), "=&r" (tmp), "+r" (tmp2) - ,"+r" (p) : : "memory"); + ,"+r" (p) : : "cc", "memory"); return (ret); } @@ -516,7 +518,7 @@ atomic_cmpset_32(volatile u_int32_t *p, "moveq %1, #1\n" "movne %1, #0\n" : "+r" (ras_start), "=r" (done) - ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "memory"); + ,"+r" (p), "+r" (cmpval), "+r" (newval) : : "cc", "memory"); return (done); } From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 05:15:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 306F810656E2; Mon, 1 Oct 2012 05:15:14 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C3518FC12; Mon, 1 Oct 2012 05:15:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915FDlN085974; Mon, 1 Oct 2012 05:15:13 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915FDto085972; Mon, 1 Oct 2012 05:15:13 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201210010515.q915FDto085972@svn.freebsd.org> From: Andrew Turner Date: Mon, 1 Oct 2012 05:15: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: r241081 - head/sys/arm/ti/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: Mon, 01 Oct 2012 05:15:14 -0000 Author: andrew Date: Mon Oct 1 05:15:13 2012 New Revision: 241081 URL: http://svn.freebsd.org/changeset/base/241081 Log: Remove unused variables from the OMAP ehci code. Modified: head/sys/arm/ti/usb/omap_ehci.c Modified: head/sys/arm/ti/usb/omap_ehci.c ============================================================================== --- head/sys/arm/ti/usb/omap_ehci.c Mon Oct 1 05:12:17 2012 (r241080) +++ head/sys/arm/ti/usb/omap_ehci.c Mon Oct 1 05:15:13 2012 (r241081) @@ -665,10 +665,8 @@ omap_ehci_fini(struct omap_ehci_softc *i static int omap_ehci_suspend(device_t dev) { - ehci_softc_t *sc = device_get_softc(dev); int err; - sc = sc; err = bus_generic_suspend(dev); if (err) return (err); @@ -691,8 +689,6 @@ omap_ehci_suspend(device_t dev) static int omap_ehci_resume(device_t dev) { - ehci_softc_t *sc = device_get_softc(dev); - sc = sc; bus_generic_resume(dev); @@ -715,10 +711,8 @@ omap_ehci_resume(device_t dev) static int omap_ehci_shutdown(device_t dev) { - ehci_softc_t *sc = device_get_softc(dev); int err; - sc = sc; err = bus_generic_shutdown(dev); if (err) return (err); From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 05:42:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DCBF10658C9; Mon, 1 Oct 2012 05:42:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0752B8FC1A; Mon, 1 Oct 2012 05:42:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915gh3H089400; Mon, 1 Oct 2012 05:42:43 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915gh6H089388; Mon, 1 Oct 2012 05:42:43 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010542.q915gh6H089388@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 05:42: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: r241082 - in head/sys: dev/usb dev/usb/controller mips/cavium/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: Mon, 01 Oct 2012 05:42:44 -0000 Author: hselasky Date: Mon Oct 1 05:42:43 2012 New Revision: 241082 URL: http://svn.freebsd.org/changeset/base/241082 Log: Inherit USB mode from RootHUB port where the USB device is connected. Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs. This simplifies some checks in the USB controller drivers. MFC after: 1 week Modified: head/sys/dev/usb/controller/at91dci.c head/sys/dev/usb/controller/atmegadci.c head/sys/dev/usb/controller/avr32dci.c head/sys/dev/usb/controller/ehci.c head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/ohci.c head/sys/dev/usb/controller/uhci.c head/sys/dev/usb/controller/uss820dci.c head/sys/dev/usb/controller/xhci.c head/sys/dev/usb/usb_hub.c head/sys/mips/cavium/usb/octusb.c Modified: head/sys/dev/usb/controller/at91dci.c ============================================================================== --- head/sys/dev/usb/controller/at91dci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/at91dci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2277,10 +2277,6 @@ at91dci_ep_init(struct usb_device *udev, if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if (udev->speed != USB_SPEED_FULL) { /* not supported */ return; Modified: head/sys/dev/usb/controller/atmegadci.c ============================================================================== --- head/sys/dev/usb/controller/atmegadci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/atmegadci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2112,10 +2112,6 @@ atmegadci_ep_init(struct usb_device *ude if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if (udev->speed != USB_SPEED_FULL) { /* not supported */ return; Modified: head/sys/dev/usb/controller/avr32dci.c ============================================================================== --- head/sys/dev/usb/controller/avr32dci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/avr32dci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2056,10 +2056,6 @@ avr32dci_ep_init(struct usb_device *udev if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if ((udev->speed != USB_SPEED_FULL) && (udev->speed != USB_SPEED_HIGH)) { /* not supported */ Modified: head/sys/dev/usb/controller/ehci.c ============================================================================== --- head/sys/dev/usb/controller/ehci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/ehci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -3701,10 +3701,6 @@ ehci_ep_init(struct usb_device *udev, st edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { if ((udev->speed != USB_SPEED_HIGH) && Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/musb_otg.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2748,10 +2748,6 @@ musbotg_ep_init(struct usb_device *udev, if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if ((udev->speed != USB_SPEED_FULL) && (udev->speed != USB_SPEED_HIGH)) { /* not supported */ Modified: head/sys/dev/usb/controller/ohci.c ============================================================================== --- head/sys/dev/usb/controller/ohci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/ohci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2315,6 +2315,7 @@ ohci_roothub_exec(struct usb_device *ude } v = OREAD4(sc, OHCI_RH_PORT_STATUS(index)); DPRINTFN(9, "port status=0x%04x\n", v); + v &= ~UPS_PORT_MODE_DEVICE; /* force host mode */ USETW(sc->sc_hub_desc.ps.wPortStatus, v); USETW(sc->sc_hub_desc.ps.wPortChange, v >> 16); len = sizeof(sc->sc_hub_desc.ps); @@ -2551,10 +2552,6 @@ ohci_ep_init(struct usb_device *udev, st edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: Modified: head/sys/dev/usb/controller/uhci.c ============================================================================== --- head/sys/dev/usb/controller/uhci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/uhci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -3030,10 +3030,6 @@ uhci_ep_init(struct usb_device *udev, st edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: Modified: head/sys/dev/usb/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb/controller/uss820dci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/uss820dci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -2333,10 +2333,6 @@ uss820dci_ep_init(struct usb_device *ude if (udev->device_index != sc->sc_rt_addr) { - if (udev->flags.usb_mode != USB_MODE_DEVICE) { - /* not supported */ - return; - } if (udev->speed != USB_SPEED_FULL) { /* not supported */ return; Modified: head/sys/dev/usb/controller/xhci.c ============================================================================== --- head/sys/dev/usb/controller/xhci.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/controller/xhci.c Mon Oct 1 05:42:43 2012 (r241082) @@ -3712,10 +3712,6 @@ xhci_ep_init(struct usb_device *udev, st DPRINTFN(2, "endpoint=%p, addr=%d, endpt=%d, mode=%d\n", ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->parent_hub == NULL) { /* root HUB has special endpoint handling */ return; Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/dev/usb/usb_hub.c Mon Oct 1 05:42:43 2012 (r241082) @@ -518,7 +518,10 @@ repeat: * * NOTE: This part is currently FreeBSD specific. */ - if (sc->sc_st.port_status & UPS_PORT_MODE_DEVICE) + if (udev->parent_hub != NULL) { + /* inherit mode from the parent HUB */ + mode = udev->parent_hub->flags.usb_mode; + } else if (sc->sc_st.port_status & UPS_PORT_MODE_DEVICE) mode = USB_MODE_DEVICE; else mode = USB_MODE_HOST; Modified: head/sys/mips/cavium/usb/octusb.c ============================================================================== --- head/sys/mips/cavium/usb/octusb.c Mon Oct 1 05:15:13 2012 (r241081) +++ head/sys/mips/cavium/usb/octusb.c Mon Oct 1 05:42:43 2012 (r241082) @@ -1860,10 +1860,6 @@ octusb_ep_init(struct usb_device *udev, ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode, sc->sc_addr); - if (udev->flags.usb_mode != USB_MODE_HOST) { - /* not supported */ - return; - } if (udev->device_index != sc->sc_addr) { switch (edesc->bmAttributes & UE_XFERTYPE) { case UE_CONTROL: From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 05:43:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C43CC1065713; Mon, 1 Oct 2012 05:43:24 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96D0F8FC1D; Mon, 1 Oct 2012 05:43:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q915hO1u089514; Mon, 1 Oct 2012 05:43:24 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q915hOxm089511; Mon, 1 Oct 2012 05:43:24 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201210010543.q915hOxm089511@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Mon, 1 Oct 2012 05:43: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: r241083 - in head/sys: kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2012 05:43:25 -0000 Author: pjd Date: Mon Oct 1 05:43:24 2012 New Revision: 241083 URL: http://svn.freebsd.org/changeset/base/241083 Log: - Enforce CAP_MKFIFO on mkfifoat(2), not on mknodat(2). Without this change mkfifoat(2) was not restricted. - Introduce CAP_MKNOD and enforce it on mknodat(2). Sponsored by: FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/vfs_syscalls.c head/sys/sys/capability.h Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Mon Oct 1 05:42:43 2012 (r241082) +++ head/sys/kern/vfs_syscalls.c Mon Oct 1 05:43:24 2012 (r241083) @@ -1334,7 +1334,7 @@ restart: bwillwrite(); NDINIT_ATRIGHTS(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, pathseg, path, fd, - CAP_MKFIFO, td); + CAP_MKNOD, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); @@ -1458,8 +1458,9 @@ kern_mkfifoat(struct thread *td, int fd, AUDIT_ARG_MODE(mode); restart: bwillwrite(); - NDINIT_AT(&nd, CREATE, LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, - pathseg, path, fd, td); + NDINIT_ATRIGHTS(&nd, CREATE, + LOCKPARENT | SAVENAME | MPSAFE | AUDITVNODE1, pathseg, path, fd, + CAP_MKFIFO, td); if ((error = namei(&nd)) != 0) return (error); vfslocked = NDHASGIANT(&nd); Modified: head/sys/sys/capability.h ============================================================================== --- head/sys/sys/capability.h Mon Oct 1 05:42:43 2012 (r241082) +++ head/sys/sys/capability.h Mon Oct 1 05:43:24 2012 (r241083) @@ -81,6 +81,7 @@ #define CAP_MKDIR 0x0000000000200000ULL #define CAP_RMDIR 0x0000000000400000ULL #define CAP_MKFIFO 0x0000000000800000ULL +#define CAP_MKNOD 0x0080000000000000ULL /* Lookups - used to constrain *at() calls. */ #define CAP_LOOKUP 0x0000000001000000ULL @@ -137,7 +138,7 @@ #define CAP_PDKILL 0x0040000000000000ULL /* The mask of all valid method rights. */ -#define CAP_MASK_VALID 0x007fffffffffffffULL +#define CAP_MASK_VALID 0x00ffffffffffffffULL #ifdef _KERNEL From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 06:49:00 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1C4E110656D6; Mon, 1 Oct 2012 06:49:00 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 073338FC14; Mon, 1 Oct 2012 06:49:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q916mxli097888; Mon, 1 Oct 2012 06:48:59 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q916mxbg097886; Mon, 1 Oct 2012 06:48:59 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210010648.q916mxbg097886@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 1 Oct 2012 06:48: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: r241089 - 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: Mon, 01 Oct 2012 06:49:00 -0000 Author: hselasky Date: Mon Oct 1 06:48:59 2012 New Revision: 241089 URL: http://svn.freebsd.org/changeset/base/241089 Log: Regenerate usb.conf MFC after: 1 week Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Mon Oct 1 06:42:07 2012 (r241088) +++ head/etc/devd/usb.conf Mon Oct 1 06:48:59 2012 (r241089) @@ -157,7 +157,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeeeb|0xeee c|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeee b|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -2061,7 +2061,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0b05"; - match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790)"; + match "product" "(0x1731|0x1732|0x1742|0x1760|0x1761|0x1784|0x1790|0x179d)"; action "kldload -n if_run"; }; @@ -3861,7 +3861,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x1a86"; - match "product" "0x7523"; + match "product" "(0x5523|0x7523)"; action "kldload -n uchcom"; }; @@ -4600,5 +4600,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2271 USB entries processed +# 2274 USB entries processed From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 10:46:36 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4110D106566C; Mon, 1 Oct 2012 10:46:36 +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 2D1168FC15; Mon, 1 Oct 2012 10:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91AkaoV030263; Mon, 1 Oct 2012 10:46:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91AkZ27030261; Mon, 1 Oct 2012 10:46:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201210011046.q91AkZ27030261@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 1 Oct 2012 10:46: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: r241092 - 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: Mon, 01 Oct 2012 10:46:36 -0000 Author: kib Date: Mon Oct 1 10:46:35 2012 New Revision: 241092 URL: http://svn.freebsd.org/changeset/base/241092 Log: Add the UPDATING note about padlock rng support requiring the config change. Requested by: Dewayne Geraghty MFC after: 3 days Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Oct 1 08:33:39 2012 (r241091) +++ head/UPDATING Mon Oct 1 10:46:35 2012 (r241092) @@ -24,6 +24,14 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20120913: + The random(4) support for the VIA hardware random number + generator (`PADLOCK') is no longer enabled unconditionally. + Add the PADLOCK_RNG option in the custom kernel config if + needed. The GENERIC kernels on i386 and amd64 do include the + option, so the change only affects the custom kernel + configurations. + 20120908: The pf(4) packet filter ABI has been changed. pfctl(8) and snmp_pf module need to be recompiled to work with new kernel. From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 11:26:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0A1481065A55; Mon, 1 Oct 2012 11:26:52 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E155F8FC08; Mon, 1 Oct 2012 11:26:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91BQpn1037220; Mon, 1 Oct 2012 11:26:51 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91BQpia037155; Mon, 1 Oct 2012 11:26:51 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201210011126.q91BQpia037155@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 1 Oct 2012 11:26: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: r241096 - in head/release/doc: . de_DE.ISO8859-1/early-adopter de_DE.ISO8859-1/errata de_DE.ISO8859-1/hardware/alpha de_DE.ISO8859-1/hardware/common de_DE.ISO8859-1/hardware/i386 de_DE.... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 11:26:53 -0000 Author: gabor Date: Mon Oct 1 11:26:49 2012 New Revision: 241096 URL: http://svn.freebsd.org/changeset/base/241096 Log: - Rename .sgml files to .xml to track the recent doc changes MFC after: 1 day Added: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml head/release/doc/de_DE.ISO8859-1/errata/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/errata/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/installation/common/install.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml head/release/doc/de_DE.ISO8859-1/installation/common/layout.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml head/release/doc/de_DE.ISO8859-1/installation/common/trouble.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml head/release/doc/de_DE.ISO8859-1/installation/i386/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml head/release/doc/de_DE.ISO8859-1/readme/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/readme/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml - copied, changed from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/share/xml/ - copied from r241094, head/release/doc/de_DE.ISO8859-1/share/sgml/ head/release/doc/en_US.ISO8859-1/errata/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/errata/article.sgml head/release/doc/en_US.ISO8859-1/hardware/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/en_US.ISO8859-1/readme/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/readme/article.sgml head/release/doc/en_US.ISO8859-1/relnotes/article.xml - copied unchanged from r241094, head/release/doc/en_US.ISO8859-1/relnotes/article.sgml head/release/doc/en_US.ISO8859-1/share/xml/ - copied from r241094, head/release/doc/en_US.ISO8859-1/share/sgml/ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml head/release/doc/fr_FR.ISO8859-1/errata/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/errata/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/install.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml head/release/doc/fr_FR.ISO8859-1/installation/i386/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.xml - copied, changed from r241094, head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.xml - copied unchanged from r241094, head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/share/xml/ - copied from r241094, head/release/doc/fr_FR.ISO8859-1/share/sgml/ head/release/doc/ja_JP.eucJP/errata/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/errata/article.sgml head/release/doc/ja_JP.eucJP/hardware/alpha/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml head/release/doc/ja_JP.eucJP/hardware/common/artheader.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml head/release/doc/ja_JP.eucJP/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/ja_JP.eucJP/hardware/common/dev.sgml head/release/doc/ja_JP.eucJP/hardware/common/intro.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/common/intro.sgml head/release/doc/ja_JP.eucJP/hardware/i386/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/i386/article.sgml head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml head/release/doc/ja_JP.eucJP/relnotes/alpha/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml head/release/doc/ja_JP.eucJP/relnotes/amd64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/common/new.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ja_JP.eucJP/relnotes/common/new.sgml head/release/doc/ja_JP.eucJP/relnotes/i386/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml head/release/doc/ja_JP.eucJP/relnotes/ia64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/pc98/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml head/release/doc/ja_JP.eucJP/share/xml/ - copied from r241094, head/release/doc/ja_JP.eucJP/share/sgml/ head/release/doc/ja_JP.eucJP/share/xml/dev-auto-ja.xml - copied unchanged from r241094, head/release/doc/ja_JP.eucJP/share/sgml/dev-auto-ja.sgml head/release/doc/ru_RU.KOI8-R/errata/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/errata/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/dev.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/intro.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml head/release/doc/ru_RU.KOI8-R/installation/alpha/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/installation/amd64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/common/abstract.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml head/release/doc/ru_RU.KOI8-R/installation/common/artheader.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/installation/common/install.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/install.sgml head/release/doc/ru_RU.KOI8-R/installation/common/layout.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml head/release/doc/ru_RU.KOI8-R/installation/common/trouble.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml head/release/doc/ru_RU.KOI8-R/installation/i386/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml head/release/doc/ru_RU.KOI8-R/installation/ia64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/pc98/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/readme/article.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/readme/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/common/new.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.xml - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/share/xml/ - copied from r241094, head/release/doc/ru_RU.KOI8-R/share/sgml/ head/release/doc/ru_RU.KOI8-R/share/xml/dev-auto-ru.xml (contents, props changed) - copied, changed from r241094, head/release/doc/ru_RU.KOI8-R/share/sgml/dev-auto-ru.sgml head/release/doc/share/xml/ - copied from r241094, head/release/doc/share/sgml/ head/release/doc/zh_CN.GB2312/errata/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/errata/article.sgml head/release/doc/zh_CN.GB2312/hardware/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/hardware/article.sgml head/release/doc/zh_CN.GB2312/readme/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/readme/article.sgml head/release/doc/zh_CN.GB2312/relnotes/article.xml - copied, changed from r241094, head/release/doc/zh_CN.GB2312/relnotes/article.sgml head/release/doc/zh_CN.GB2312/share/xml/ - copied from r241094, head/release/doc/zh_CN.GB2312/share/sgml/ Deleted: head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml head/release/doc/de_DE.ISO8859-1/errata/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml head/release/doc/de_DE.ISO8859-1/installation/common/layout.sgml head/release/doc/de_DE.ISO8859-1/installation/common/trouble.sgml head/release/doc/de_DE.ISO8859-1/installation/common/upgrade.sgml head/release/doc/de_DE.ISO8859-1/installation/i386/article.sgml head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml head/release/doc/de_DE.ISO8859-1/readme/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml head/release/doc/de_DE.ISO8859-1/share/sgml/ head/release/doc/en_US.ISO8859-1/errata/article.sgml head/release/doc/en_US.ISO8859-1/hardware/article.sgml head/release/doc/en_US.ISO8859-1/readme/article.sgml head/release/doc/en_US.ISO8859-1/relnotes/article.sgml head/release/doc/en_US.ISO8859-1/share/sgml/ head/release/doc/fr_FR.ISO8859-1/early-adopter/article.sgml head/release/doc/fr_FR.ISO8859-1/errata/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/alpha/proc-alpha.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/dev.sgml head/release/doc/fr_FR.ISO8859-1/hardware/common/intro.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/i386/proc-i386.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/ia64/proc-ia64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/pc98/proc-pc98.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/dev-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/proc-sparc64.sgml head/release/doc/fr_FR.ISO8859-1/installation/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/abstract.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/artheader.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/install.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/layout.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/trouble.sgml head/release/doc/fr_FR.ISO8859-1/installation/common/upgrade.sgml head/release/doc/fr_FR.ISO8859-1/installation/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/pc98/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/article.sgml head/release/doc/fr_FR.ISO8859-1/installation/sparc64/install.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/article.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/common/new.sgml head/release/doc/fr_FR.ISO8859-1/relnotes/i386/article.sgml head/release/doc/fr_FR.ISO8859-1/share/sgml/ head/release/doc/ja_JP.eucJP/errata/article.sgml head/release/doc/ja_JP.eucJP/hardware/alpha/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/article.sgml head/release/doc/ja_JP.eucJP/hardware/amd64/proc-amd64.sgml head/release/doc/ja_JP.eucJP/hardware/common/artheader.sgml head/release/doc/ja_JP.eucJP/hardware/common/dev.sgml head/release/doc/ja_JP.eucJP/hardware/common/intro.sgml head/release/doc/ja_JP.eucJP/hardware/i386/article.sgml head/release/doc/ja_JP.eucJP/hardware/i386/proc-i386.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/article.sgml head/release/doc/ja_JP.eucJP/hardware/ia64/proc-ia64.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/article.sgml head/release/doc/ja_JP.eucJP/hardware/pc98/proc-pc98.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/article.sgml head/release/doc/ja_JP.eucJP/hardware/sparc64/proc-sparc64.sgml head/release/doc/ja_JP.eucJP/relnotes/alpha/article.sgml head/release/doc/ja_JP.eucJP/relnotes/amd64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/common/new.sgml head/release/doc/ja_JP.eucJP/relnotes/i386/article.sgml head/release/doc/ja_JP.eucJP/relnotes/ia64/article.sgml head/release/doc/ja_JP.eucJP/relnotes/pc98/article.sgml head/release/doc/ja_JP.eucJP/relnotes/sparc64/article.sgml head/release/doc/ja_JP.eucJP/share/sgml/ head/release/doc/ja_JP.eucJP/share/xml/dev-auto-ja.sgml head/release/doc/ru_RU.KOI8-R/errata/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/amd64/proc-amd64.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/dev.sgml head/release/doc/ru_RU.KOI8-R/hardware/common/intro.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/i386/proc-i386.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/ia64/proc-ia64.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/pc98/proc-pc98.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/hardware/sparc64/proc-sparc64.sgml head/release/doc/ru_RU.KOI8-R/installation/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/installation/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/common/abstract.sgml head/release/doc/ru_RU.KOI8-R/installation/common/artheader.sgml head/release/doc/ru_RU.KOI8-R/installation/common/install.sgml head/release/doc/ru_RU.KOI8-R/installation/common/layout.sgml head/release/doc/ru_RU.KOI8-R/installation/common/trouble.sgml head/release/doc/ru_RU.KOI8-R/installation/common/upgrade.sgml head/release/doc/ru_RU.KOI8-R/installation/i386/article.sgml head/release/doc/ru_RU.KOI8-R/installation/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/installation/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/installation/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/readme/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/alpha/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/amd64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/common/new.sgml head/release/doc/ru_RU.KOI8-R/relnotes/i386/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/ia64/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/pc98/article.sgml head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/article.sgml head/release/doc/ru_RU.KOI8-R/share/sgml/ head/release/doc/ru_RU.KOI8-R/share/xml/dev-auto-ru.sgml head/release/doc/share/sgml/ head/release/doc/zh_CN.GB2312/errata/article.sgml head/release/doc/zh_CN.GB2312/hardware/article.sgml head/release/doc/zh_CN.GB2312/readme/article.sgml head/release/doc/zh_CN.GB2312/relnotes/article.sgml head/release/doc/zh_CN.GB2312/share/sgml/ Modified: head/release/doc/Makefile head/release/doc/README head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile head/release/doc/de_DE.ISO8859-1/errata/Makefile head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile head/release/doc/de_DE.ISO8859-1/hardware/common/hw.ent head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile head/release/doc/de_DE.ISO8859-1/installation/common/install.ent head/release/doc/de_DE.ISO8859-1/installation/i386/Makefile head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile head/release/doc/de_DE.ISO8859-1/readme/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile head/release/doc/de_DE.ISO8859-1/share/xml/catalog head/release/doc/de_DE.ISO8859-1/share/xml/release.dsl head/release/doc/en_US.ISO8859-1/errata/Makefile head/release/doc/en_US.ISO8859-1/hardware/Makefile head/release/doc/en_US.ISO8859-1/readme/Makefile head/release/doc/en_US.ISO8859-1/relnotes/Makefile head/release/doc/fr_FR.ISO8859-1/early-adopter/Makefile head/release/doc/fr_FR.ISO8859-1/errata/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/common/hw.ent head/release/doc/fr_FR.ISO8859-1/hardware/i386/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/ia64/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/pc98/Makefile head/release/doc/fr_FR.ISO8859-1/hardware/sparc64/Makefile head/release/doc/fr_FR.ISO8859-1/installation/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/installation/common/install.ent head/release/doc/fr_FR.ISO8859-1/installation/i386/Makefile head/release/doc/fr_FR.ISO8859-1/installation/pc98/Makefile head/release/doc/fr_FR.ISO8859-1/installation/sparc64/Makefile head/release/doc/fr_FR.ISO8859-1/relnotes/alpha/Makefile head/release/doc/fr_FR.ISO8859-1/relnotes/common/relnotes.ent head/release/doc/fr_FR.ISO8859-1/relnotes/i386/Makefile head/release/doc/ja_JP.eucJP/errata/Makefile head/release/doc/ja_JP.eucJP/hardware/alpha/Makefile head/release/doc/ja_JP.eucJP/hardware/amd64/Makefile head/release/doc/ja_JP.eucJP/hardware/common/hw.ent head/release/doc/ja_JP.eucJP/hardware/i386/Makefile head/release/doc/ja_JP.eucJP/hardware/ia64/Makefile head/release/doc/ja_JP.eucJP/hardware/pc98/Makefile head/release/doc/ja_JP.eucJP/hardware/sparc64/Makefile head/release/doc/ja_JP.eucJP/relnotes/alpha/Makefile head/release/doc/ja_JP.eucJP/relnotes/amd64/Makefile head/release/doc/ja_JP.eucJP/relnotes/common/relnotes.ent head/release/doc/ja_JP.eucJP/relnotes/i386/Makefile head/release/doc/ja_JP.eucJP/relnotes/ia64/Makefile head/release/doc/ja_JP.eucJP/relnotes/pc98/Makefile head/release/doc/ja_JP.eucJP/relnotes/sparc64/Makefile head/release/doc/ja_JP.eucJP/share/xml/catalog head/release/doc/ru_RU.KOI8-R/errata/Makefile head/release/doc/ru_RU.KOI8-R/hardware/alpha/Makefile head/release/doc/ru_RU.KOI8-R/hardware/amd64/Makefile head/release/doc/ru_RU.KOI8-R/hardware/common/hw.ent head/release/doc/ru_RU.KOI8-R/hardware/i386/Makefile head/release/doc/ru_RU.KOI8-R/hardware/ia64/Makefile head/release/doc/ru_RU.KOI8-R/hardware/pc98/Makefile head/release/doc/ru_RU.KOI8-R/hardware/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/installation/alpha/Makefile head/release/doc/ru_RU.KOI8-R/installation/amd64/Makefile head/release/doc/ru_RU.KOI8-R/installation/common/install.ent head/release/doc/ru_RU.KOI8-R/installation/i386/Makefile head/release/doc/ru_RU.KOI8-R/installation/ia64/Makefile head/release/doc/ru_RU.KOI8-R/installation/pc98/Makefile head/release/doc/ru_RU.KOI8-R/installation/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/readme/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/alpha/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/amd64/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/common/relnotes.ent head/release/doc/ru_RU.KOI8-R/relnotes/i386/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/ia64/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/pc98/Makefile head/release/doc/ru_RU.KOI8-R/relnotes/sparc64/Makefile head/release/doc/ru_RU.KOI8-R/share/examples/dev-auto-translate.pl head/release/doc/ru_RU.KOI8-R/share/xml/catalog head/release/doc/ru_RU.KOI8-R/share/xml/release.dsl head/release/doc/share/mk/doc.relnotes.mk head/release/doc/share/xml/Makefile head/release/doc/share/xml/catalog head/release/doc/zh_CN.GB2312/errata/Makefile head/release/doc/zh_CN.GB2312/hardware/Makefile head/release/doc/zh_CN.GB2312/readme/Makefile head/release/doc/zh_CN.GB2312/relnotes/Makefile Modified: head/release/doc/Makefile ============================================================================== --- head/release/doc/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -8,7 +8,7 @@ SUBDIR+= ${RELNOTES_LANG} .else SUBDIR+= en_US.ISO8859-1 .endif -SUBDIR+= share/sgml +SUBDIR+= share/xml RELN_ROOT?= ${.CURDIR} Modified: head/release/doc/README ============================================================================== --- head/release/doc/README Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/README Mon Oct 1 11:26:49 2012 (r241096) @@ -24,34 +24,34 @@ share/mk/doc.relnotes.mk Common Makefile definitions for RELNOTESng. These definitions mostly accommodate the fact that we're building DocProj-like documents outside the doc/ tree. -share/sgml/catalog +share/xml/catalog Main SGML catalog for all language-neutral (and default EN) stylesheet and entity files. Can be overridden if needed for translations. -share/sgml/default.dsl +share/xml/default.dsl All documents build with this file as a stylesheet. All it does is to make it possible to use the document catalogs to locate the "real" stylesheet by reference, rather than having to specify it by pathname. -share/sgml/release.dsl +share/xml/release.dsl Language-neutral stylesheet. This stylesheet supports the arch= attribute on (all?) DocBook elements; elements with an arch= attribute are only included in the output if their value is equal to the value of the &arch; entity. In the future, arch= could be a list of possible &arch; entity values that match, such as "i386,sparc64". -share/sgml/release.ent +share/xml/release.ent Release information. Need to update the entry definitions in this file when rolling new revisions; these should take effect in all documents. -en_US.ISO8859-1/share/sgml/release.dsl +en_US.ISO8859-1/share/xml/release.dsl Language-dependent stylesheet for en, but also the default for translations if they don't override the settings here. This stylesheet sets the email footer at the bottom of HTML pages, as well as a few other parameters. If necessary for translations, this file can be overridden with - */share/sgml/release.dsl and */share/sgml/catalog. + */share/xml/release.dsl and */share/xml/catalog. */relnotes/common/ Directory for multi-architecture release notes files. @@ -88,7 +88,7 @@ tree. For example: % make DOC_PREFIX=/usr/doc all All definition of the "current" version of FreeBSD is contained in the -share/sgml/release.ent file; release engineers should peruse the +share/xml/release.ent file; release engineers should peruse the contents of this file carefully when doing version number bumps. When creating content for the architecture-dependent files, authors @@ -108,9 +108,9 @@ When creating a translation, make a new directory with a language code (paralleling the DocProj directory structure). If necessary, new language-dependent HTML footers can be generated by making a new language-dependent -${LANG}/share/sgml/release.dsl, a ${LANG}/share/sgml/catalog that +${LANG}/share/xml/release.dsl, a ${LANG}/share/xml/catalog that points to it, and a new definition in the Makefiles that adds -${LANG}/share/sgml/catalog to EXTRA_CATALOGS. Except for the Makefile +${LANG}/share/xml/catalog to EXTRA_CATALOGS. Except for the Makefile changes, this is the same procedure that is used for creating a new translation for DocProj files. Modified: head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -17,7 +17,7 @@ FORMATS?= html INSTALL_COMPRESSED?=gz INSTALL_ONLY_COMPRESSED?= -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/early-adopter/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/early-adopter/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -13,7 +13,7 @@ The FreeBSD Documentation Project The FreeBSD German Documentation Project $FreeBSD$ - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/early-adopter/article.sgml,v 1.24 2003/05/25 12:44:41 mheinen Exp $ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/early-adopter/article.xml,v 1.24 2003/05/25 12:44:41 mheinen Exp $ basiert auf: 1.15 --> Modified: head/release/doc/de_DE.ISO8859-1/errata/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/errata/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/errata/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -16,7 +16,7 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/errata/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/errata/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/errata/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/errata/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -16,7 +16,7 @@ (If we didn't do this, then the file with the datestamp might not be the one that received the last change in the document.) - $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/errata/article.sgml,v 1.39 2003/05/24 13:23:46 ue Exp $ + $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/errata/article.xml,v 1.39 2003/05/24 13:23:46 ue Exp $ basiert auf: 1.38 --> Modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,11 +13,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-alpha.sgml +SRCS+= article.xml +SRCS+= proc-alpha.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/alpha/proc-alpha.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/artheader.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/dev.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/dev.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ - - - - - - - - + + + + + + + + Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/common/intro.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/common/intro.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,11 +13,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-i386.sgml +SRCS+= article.xml +SRCS+= proc-i386.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/i386/proc-i386.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,11 +13,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -# SRCS+= proc-ia64.sgml +SRCS+= article.xml +# SRCS+= proc-ia64.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/ia64/proc-ia64.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,11 +12,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-pc98.sgml +SRCS+= article.xml +SRCS+= proc-pc98.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/pc98/proc-pc98.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,11 +12,11 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml -SRCS+= proc-sparc64.sgml +SRCS+= article.xml +SRCS+= proc-sparc64.xml SRCS+= ../common/hw.ent -SRCS+= ../common/artheader.sgml -SRCS+= ../common/dev.sgml +SRCS+= ../common/artheader.xml +SRCS+= ../common/dev.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/dev-sparc64.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml (from r241094, head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/hardware/sparc64/proc-sparc64.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -11,13 +11,13 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/abstract.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml -SRCS+= ../common/trouble.sgml -SRCS+= ../common/upgrade.sgml +SRCS+= article.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/abstract.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml +SRCS+= ../common/trouble.xml +SRCS+= ../common/upgrade.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/alpha/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/alpha/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/abstract.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/common/abstract.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,7 +1,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/artheader.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/common/artheader.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.ent ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.ent Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.ent Mon Oct 1 11:26:49 2012 (r241096) @@ -11,10 +11,10 @@ - - - - - - + + + + + + Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/common/install.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/common/install.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/common/install.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,10 +1,10 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/ia64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -10,13 +10,13 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/abstract.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml -SRCS+= ../common/trouble.sgml -SRCS+= ../common/upgrade.sgml +SRCS+= article.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/abstract.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml +SRCS+= ../common/trouble.xml +SRCS+= ../common/upgrade.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/ia64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/ia64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/pc98/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -10,13 +10,13 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/abstract.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml -SRCS+= ../common/trouble.sgml -SRCS+= ../common/upgrade.sgml +SRCS+= article.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/abstract.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml +SRCS+= ../common/trouble.xml +SRCS+= ../common/upgrade.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/pc98/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/pc98/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -10,11 +10,11 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml -SRCS+= install.sgml -SRCS+= ../common/artheader.sgml -SRCS+= ../common/install.sgml -SRCS+= ../common/layout.sgml +SRCS+= article.xml +SRCS+= install.xml +SRCS+= ../common/artheader.xml +SRCS+= ../common/install.xml +SRCS+= ../common/layout.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -15,7 +15,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml (from r241094, head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/installation/sparc64/install.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/de_DE.ISO8859-1/readme/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/readme/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/readme/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -21,7 +21,7 @@ INSTALL_ONLY_COMPRESSED?= # # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/readme/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/readme/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/readme/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/readme/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -9,7 +9,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/alpha/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,9 +13,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/alpha/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/common/new.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/common/new.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -1,5 +1,5 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/common/relnotes.ent Mon Oct 1 11:26:49 2012 (r241096) @@ -16,4 +16,4 @@ - + Modified: head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/i386/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,9 +13,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/i386/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -15,7 +15,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/ia64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,9 +12,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/ia64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -13,7 +13,7 @@ ]> Modified: head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/pc98/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -12,9 +12,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/pc98/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -15,7 +15,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,9 +13,9 @@ INSTALL_ONLY_COMPRESSED?= JADEFLAGS+= -V %generate-article-toc% # SGML content -SRCS+= article.sgml +SRCS+= article.xml SRCS+= ../common/relnotes.ent -SRCS+= ../common/new.sgml +SRCS+= ../common/new.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied and modified: head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml (from r241094, head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml) ============================================================================== --- head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.sgml Mon Oct 1 10:54:04 2012 (r241094, copy source) +++ head/release/doc/de_DE.ISO8859-1/relnotes/sparc64/article.xml Mon Oct 1 11:26:49 2012 (r241096) @@ -14,7 +14,7 @@ Modified: head/release/doc/de_DE.ISO8859-1/share/xml/catalog ============================================================================== --- head/release/doc/de_DE.ISO8859-1/share/sgml/catalog Mon Oct 1 10:54:04 2012 (r241094) +++ head/release/doc/de_DE.ISO8859-1/share/xml/catalog Mon Oct 1 11:26:49 2012 (r241096) @@ -2,7 +2,7 @@ -- Language-specific -- -- $FreeBSD$ -- - -- $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/share/sgml/catalog,v 1.6 2002/10/12 18:02:25 ue Exp $ -- + -- $FreeBSDde: de-docproj/relnotes/de_DE.ISO8859-1/share/xml/catalog,v 1.6 2002/10/12 18:02:25 ue Exp $ -- -- basiert auf: 1.1 -- PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Stylesheet//EN" Modified: head/release/doc/de_DE.ISO8859-1/share/xml/release.dsl ============================================================================== --- head/release/doc/de_DE.ISO8859-1/share/sgml/release.dsl Mon Oct 1 10:54:04 2012 (r241094) +++ head/release/doc/de_DE.ISO8859-1/share/xml/release.dsl Mon Oct 1 11:26:49 2012 (r241096) @@ -1,6 +1,6 @@ Modified: head/release/doc/en_US.ISO8859-1/errata/Makefile ============================================================================== --- head/release/doc/en_US.ISO8859-1/errata/Makefile Mon Oct 1 11:16:22 2012 (r241095) +++ head/release/doc/en_US.ISO8859-1/errata/Makefile Mon Oct 1 11:26:49 2012 (r241096) @@ -13,7 +13,7 @@ INSTALL_COMPRESSED?= gz INSTALL_ONLY_COMPRESSED?= # SGML content -SRCS+= article.sgml +SRCS+= article.xml .include "${RELN_ROOT}/share/mk/doc.relnotes.mk" .include "${DOC_PREFIX}/share/mk/doc.project.mk" Copied: head/release/doc/en_US.ISO8859-1/errata/article.xml (from r241094, head/release/doc/en_US.ISO8859-1/errata/article.sgml) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/doc/en_US.ISO8859-1/errata/article.xml Mon Oct 1 11:26:49 2012 (r241096, copy of r241094, head/release/doc/en_US.ISO8859-1/errata/article.sgml) @@ -0,0 +1,180 @@ + + +%entities; + + +%release; + + +]]> + +]]> + +]]> +]> + + + +
+ + &os; &release; Errata + + + The &os; Project + + + $FreeBSD$ + + + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + + This document lists errata items for &os; + + + + containing significant information discovered after the release + or too late in the release cycle to be otherwise included in the + release documentation. + This information includes security advisories, as well as news + relating to the software or documentation that could affect its + operation or usability. An up-to-date version of this document + should always be consulted before installing this version of + &os;. + + This errata document for &os; + + + + will be maintained until the release of &os; &release.next;. + + + + Introduction + + This errata document contains late-breaking news + about &os; + + + + Before installing this version, it is important to consult this + document to learn about any post-release discoveries or problems + that may already have been found and fixed. + + Any version of this errata document actually distributed + with the release (for example, on a CDROM distribution) will be + out of date by definition, but other copies are kept updated on + the Internet and should be consulted as the current + errata for this release. These other copies of the + errata are located at , plus any sites + which keep up-to-date mirrors of this location. + + Source and binary snapshots of &os; &release.branch; also + contain up-to-date copies of this document (as of the time of + the snapshot). + + For a list of all &os; CERT security advisories, see or . + + + + + Security Advisories + +No advisories. +]]> + +No advisories. +]]> + +No advisories. +]]> + + + + + Open Issues + +No open issues. +]]> + +No open issues. +]]> + +No open issues. +]]> + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 12:28:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 229CD106566C; Mon, 1 Oct 2012 12:28:59 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DCBB8FC14; Mon, 1 Oct 2012 12:28:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91CSw4G046364; Mon, 1 Oct 2012 12:28:58 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91CSwJA046362; Mon, 1 Oct 2012 12:28:58 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201210011228.q91CSwJA046362@svn.freebsd.org> From: Rick Macklem Date: Mon, 1 Oct 2012 12:28: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: r241097 - head/sys/rpc/rpcsec_gss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 12:28:59 -0000 Author: rmacklem Date: Mon Oct 1 12:28:58 2012 New Revision: 241097 URL: http://svn.freebsd.org/changeset/base/241097 Log: Attila Bogar and Herbert Poeckl both reported similar problems w.r.t. a Linux NFS client doing a krb5 NFS mount against the FreeBSD server. We determined this was a Linux bug: http://www.spinics.net/lists/linux-nfs/msg32466.html, however the mount failed to work, because the Destroy operation with a bogus encrypted checksum destroyed the authenticator handle. This patch changes the rpcsec_gss code so that it doesn't Destroy the authenticator handle for this case and, as such, the Linux mount will work. Tested by: Attila Bogar and Herbert Poeckl MFC after: 2 weeks Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Modified: head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c ============================================================================== --- head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 1 11:26:49 2012 (r241096) +++ head/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c Mon Oct 1 12:28:58 2012 (r241097) @@ -984,7 +984,7 @@ svc_rpc_gss_accept_sec_context(struct sv static bool_t svc_rpc_gss_validate(struct svc_rpc_gss_client *client, struct rpc_msg *msg, - gss_qop_t *qop) + gss_qop_t *qop, rpc_gss_proc_t gcproc) { struct opaque_auth *oa; gss_buffer_desc rpcbuf, checksum; @@ -1024,7 +1024,8 @@ svc_rpc_gss_validate(struct svc_rpc_gss_ if (maj_stat != GSS_S_COMPLETE) { rpc_gss_log_status("gss_verify_mic", client->cl_mech, maj_stat, min_stat); - client->cl_state = CLIENT_STALE; + if (gcproc != RPCSEC_GSS_DESTROY) + client->cl_state = CLIENT_STALE; return (FALSE); } @@ -1358,7 +1359,7 @@ svc_rpc_gss(struct svc_req *rqst, struct break; } - if (!svc_rpc_gss_validate(client, msg, &qop)) { + if (!svc_rpc_gss_validate(client, msg, &qop, gc.gc_proc)) { result = RPCSEC_GSS_CREDPROBLEM; break; } From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 12:58:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCCFC1065672; Mon, 1 Oct 2012 12:58:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id A198E8FC18; Mon, 1 Oct 2012 12:58:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 084FAB939; Mon, 1 Oct 2012 08:58:16 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Mon, 1 Oct 2012 07:53:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201209291647.q8TGlvbr058837@svn.freebsd.org> In-Reply-To: <201209291647.q8TGlvbr058837@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210010753.59816.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Oct 2012 08:58:16 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 12:58:16 -0000 On Saturday, September 29, 2012 12:47:57 pm Andrey V. Elsukov wrote: > Author: ae > Date: Sat Sep 29 16:47:56 2012 > New Revision: 241053 > URL: http://svn.freebsd.org/changeset/base/241053 > > Log: > Almost each time when loader opens a file, this leads to calling > disk_open(). Very often this is called several times for one file. > This leads to reading partition table metadata for each call. To > reduce the number of disk I/O we have a simple block cache, but it > is very dumb and more than half of I/O operations related to reading > metadata, misses this cache. > > Introduce new cache layer to resolve this problem. It is independent > and doesn't need initialization like bcache, and will work by default > for all loaders which use the new DISK API. A successful disk_open() > call to each new disk or partition produces new entry in the cache. > Even more, when disk was already open, now opening of any nested > partitions does not require reading top level partition table. > So, if without this cache, partition table metadata was read around > 20-50 times during boot, now it reads only once. This affects the booting > from GPT and MBR from the UFS. ...and removes support for removable media like floppies. That may be the proper thing to do at this stage (though I think that affects PC98 still perhaps?) However, removing suppot for removable media should be an intentional decision, not a side effect. The bcache was simplistic precisely to support floppies. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 12:58:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 873611065674; Mon, 1 Oct 2012 12:58:17 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 218D88FC15; Mon, 1 Oct 2012 12:58:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7AFFCB949; Mon, 1 Oct 2012 08:58:16 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Mon, 1 Oct 2012 07:56:27 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201209301224.q8UCOG5o029237@svn.freebsd.org> In-Reply-To: <201209301224.q8UCOG5o029237@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210010756.27565.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Oct 2012 08:58:16 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241068 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 12:58:17 -0000 On Sunday, September 30, 2012 8:24:16 am Andrey V. Elsukov wrote: > Author: ae > Date: Sun Sep 30 12:24:15 2012 > New Revision: 241068 > URL: http://svn.freebsd.org/changeset/base/241068 > > Log: > Reduce the number of attempts to detect proper kld format for the amd64 > loader. Why not just put amd64 first always? To date the amd64 and i386 loaders have been identical (rather on purpose). If amd64 is the more common use case and worth optimizing for, I think it would be fine to just put amd64 first all the time (that order also makes the list sorted). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 14:56:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 996A3106567A; Mon, 1 Oct 2012 14:56:49 +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 8520D8FC2E; Mon, 1 Oct 2012 14:56:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91Eunff066300; Mon, 1 Oct 2012 14:56:49 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91EunJT066298; Mon, 1 Oct 2012 14:56:49 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210011456.q91EunJT066298@svn.freebsd.org> From: Tim Kientzle Date: Mon, 1 Oct 2012 14:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241100 - 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: Mon, 01 Oct 2012 14:56:49 -0000 Author: kientzle Date: Mon Oct 1 14:56:48 2012 New Revision: 241100 URL: http://svn.freebsd.org/changeset/base/241100 Log: Support kernel options from ubldr. Modified: head/sys/arm/conf/BEAGLEBONE Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Oct 1 14:55:22 2012 (r241099) +++ head/sys/arm/conf/BEAGLEBONE Mon Oct 1 14:56:48 2012 (r241100) @@ -46,6 +46,7 @@ options SYSVSEM #SYSV-style semaphore options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options PREEMPTION +options FREEBSD_BOOT_LOADER # Debugging makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 15:22:44 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52677106564A; Mon, 1 Oct 2012 15:22:44 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward2h.mail.yandex.net (forward2h.mail.yandex.net [IPv6:2a02:6b8:0:f05::2]) by mx1.freebsd.org (Postfix) with ESMTP id A727C8FC08; Mon, 1 Oct 2012 15:22:43 +0000 (UTC) Received: from smtp2h.mail.yandex.net (smtp2h.mail.yandex.net [84.201.187.145]) by forward2h.mail.yandex.net (Yandex) with ESMTP id 0FE797009FA; Mon, 1 Oct 2012 19:22:41 +0400 (MSK) Received: from smtp2h.mail.yandex.net (localhost [127.0.0.1]) by smtp2h.mail.yandex.net (Yandex) with ESMTP id 94B611700058; Mon, 1 Oct 2012 19:22:41 +0400 (MSK) Received: from dynamic-178-141-5-77.kirov.comstar-r.ru (dynamic-178-141-5-77.kirov.comstar-r.ru [178.141.5.77]) by smtp2h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id MeomAQX8-MfoWF5IQ; Mon, 1 Oct 2012 19:22:41 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1349104961; bh=FL2i8shoYO4qJgS3tqRV6g7iAhkccuifw33QZQLW1pU=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:X-Enigmail-Version:Content-Type: Content-Transfer-Encoding; b=j4YzVZ//w+qxX0SOW7cxA/BdX20vjNYP9UtJap5LXue56pTHbkTr9ymS9/NFve6tN KkFcodImyF7lJnLNsk+mOX8x7/r8/qiHf2nfWI9q9a4rLFYHiRpVc7hHNZK974KjSX HmhY46Bqz6XNVwaIJ8j2PYSx2+DSSALL0OMfiwOQ= Message-ID: <5069B53F.5040004@yandex.ru> Date: Mon, 01 Oct 2012 19:22:39 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <201209291647.q8TGlvbr058837@svn.freebsd.org> <201210010753.59816.jhb@freebsd.org> In-Reply-To: <201210010753.59816.jhb@freebsd.org> X-Enigmail-Version: 1.4 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 01 Oct 2012 15:29:24 +0000 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 15:22:44 -0000 On 01.10.2012 15:53, John Baldwin wrote: >> Introduce new cache layer to resolve this problem. It is independent >> and doesn't need initialization like bcache, and will work by default >> for all loaders which use the new DISK API. A successful disk_open() >> call to each new disk or partition produces new entry in the cache. >> Even more, when disk was already open, now opening of any nested >> partitions does not require reading top level partition table. >> So, if without this cache, partition table metadata was read around >> 20-50 times during boot, now it reads only once. This affects the booting >> from GPT and MBR from the UFS. > > ...and removes support for removable media like floppies. That may be the > proper thing to do at this stage (though I think that affects PC98 still > perhaps?) However, removing suppot for removable media should be an > intentional decision, not a side effect. The bcache was simplistic > precisely to support floppies. Hi, John, I think it shouldn't affect floppies support. I'm unable to test this, and I don't remember exactly, but floppies don't have partition tables, or just have simple MBR. So, when access to the floppy will be performed first time, the following cache entry will be created "disk0: -> some_offset", probably an offset will be zero. And when you change the floppy this offset still remain the same. There is a lot of other places in the libstand, where similar behavior still remain (i mean, one operation initiates several unneeded reads): * Each open() call initiates read file system metadata. * We have the support of different file systems. Some of those are real file systems, other aren't - gzip, bzip, split. During boot loader tries to open several files, which don't exists by default. Each this attempt initiates reading of metadata of each file system several times. Why? When we do first read we can determine that we have UFS on this media, why do we trying search msdos or ext2fs here? Ok, when we fail to open this file on the all of file systems, we are going to try them again with ".gz" extension... Make a new loader is very hard task, but we can optimize this and don't do these unneeded operations. I have added rdtsc() call at the beginning of the main() and before the kernel start, and I did several tests with today's loader and with old one (before all my changes). So, the results are: UFS+GPT ZFS+GPT ZFS+GPT+several disks new_loader 7,203s 20,584s 26,079s old_loader 4,334s 9,422s 11,245s -- WBR, Andrey V. Elsukov From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 15:31:10 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id A88821065678; Mon, 1 Oct 2012 15:31:10 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 3494F1509C9; Mon, 1 Oct 2012 15:31:01 +0000 (UTC) Message-ID: <5069B733.2010704@FreeBSD.org> Date: Mon, 01 Oct 2012 19:30:59 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: John Baldwin References: <201209291647.q8TGlvbr058837@svn.freebsd.org> <201210010753.59816.jhb@freebsd.org> <5069B53F.5040004@yandex.ru> In-Reply-To: <5069B53F.5040004@yandex.ru> X-Enigmail-Version: 1.4 OpenPGP: id=10C8A17A Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 15:31:10 -0000 On 01.10.2012 19:22, Andrey V. Elsukov wrote: > UFS+GPT ZFS+GPT ZFS+GPT+several disks > new_loader 7,203s 20,584s 26,079s > old_loader 4,334s 9,422s 11,245s Of course, new_loader and old_loader should switch places :) -- WBR, Andrey V. Elsukov From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 16:42:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6D231065670; Mon, 1 Oct 2012 16:42:07 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C21148FC15; Mon, 1 Oct 2012 16:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91Gg7BF080181; Mon, 1 Oct 2012 16:42:07 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91Gg7xR080179; Mon, 1 Oct 2012 16:42:07 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210011642.q91Gg7xR080179@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 1 Oct 2012 16:42: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: r241107 - head/usr.sbin/pw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 16:42:08 -0000 Author: bapt Date: Mon Oct 1 16:42:07 2012 New Revision: 241107 URL: http://svn.freebsd.org/changeset/base/241107 Log: Remove useless atoi(3), previous strspn(3) makes sure that a_name->val is a number. This also allow pw user show to work as expected. PR: bin/172112 Submitted by: "Ilya A. Arkhipov" MFC after: 1 month Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Oct 1 16:34:12 2012 (r241106) +++ head/usr.sbin/pw/pw_user.c Mon Oct 1 16:42:07 2012 (r241107) @@ -314,8 +314,7 @@ pw_user(struct userconf * cnf, int mode, * know. */ if (mode != M_ADD && pwd == NULL - && strspn(a_name->val, "0123456789") == strlen(a_name->val) - && atoi(a_name->val) > 0) { /* Assume uid */ + && strspn(a_name->val, "0123456789") == strlen(a_name->val)) { (a_uid = a_name)->ch = 'u'; a_name = NULL; } From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 17:00:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0334106564A; Mon, 1 Oct 2012 17:00:33 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8F88FC17; Mon, 1 Oct 2012 17:00:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91H0XPD082543; Mon, 1 Oct 2012 17:00:33 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91H0XhY082541; Mon, 1 Oct 2012 17:00:33 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201210011700.q91H0XhY082541@svn.freebsd.org> From: Baptiste Daroussin Date: Mon, 1 Oct 2012 17: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: r241108 - head/usr.sbin/pw X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 17:00:33 -0000 Author: bapt Date: Mon Oct 1 17:00:33 2012 New Revision: 241108 URL: http://svn.freebsd.org/changeset/base/241108 Log: Do not treat empty name as an uid 0 Reported by: Robert Bonomi Modified: head/usr.sbin/pw/pw_user.c Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Mon Oct 1 16:42:07 2012 (r241107) +++ head/usr.sbin/pw/pw_user.c Mon Oct 1 17:00:33 2012 (r241108) @@ -314,7 +314,8 @@ pw_user(struct userconf * cnf, int mode, * know. */ if (mode != M_ADD && pwd == NULL - && strspn(a_name->val, "0123456789") == strlen(a_name->val)) { + && strspn(a_name->val, "0123456789") == strlen(a_name->val) + && *a_name->val) { (a_uid = a_name)->ch = 'u'; a_name = NULL; } From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 18:38:07 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D44B2106568C; Mon, 1 Oct 2012 18:38:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8F3118FC12; Mon, 1 Oct 2012 18:38:07 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F16CDB91E; Mon, 1 Oct 2012 14:38:06 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Mon, 1 Oct 2012 14:07:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201209291647.q8TGlvbr058837@svn.freebsd.org> <201210010753.59816.jhb@freebsd.org> <5069B53F.5040004@yandex.ru> In-Reply-To: <5069B53F.5040004@yandex.ru> MIME-Version: 1.0 Content-Type: Text/Plain; charset="koi8-r" Content-Transfer-Encoding: 7bit Message-Id: <201210011407.41767.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Oct 2012 14:38:07 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241053 - in head/sys/boot: common i386/libi386 uboot/lib userboot/userboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 18:38:08 -0000 On Monday, October 01, 2012 11:22:39 am Andrey V. Elsukov wrote: > On 01.10.2012 15:53, John Baldwin wrote: > >> Introduce new cache layer to resolve this problem. It is independent > >> and doesn't need initialization like bcache, and will work by default > >> for all loaders which use the new DISK API. A successful disk_open() > >> call to each new disk or partition produces new entry in the cache. > >> Even more, when disk was already open, now opening of any nested > >> partitions does not require reading top level partition table. > >> So, if without this cache, partition table metadata was read around > >> 20-50 times during boot, now it reads only once. This affects the booting > >> from GPT and MBR from the UFS. > > > > ...and removes support for removable media like floppies. That may be the > > proper thing to do at this stage (though I think that affects PC98 still > > perhaps?) However, removing suppot for removable media should be an > > intentional decision, not a side effect. The bcache was simplistic > > precisely to support floppies. > > Hi, John, > > I think it shouldn't affect floppies support. I'm unable to test this, > and I don't remember exactly, but floppies don't have partition tables, > or just have simple MBR. So, when access to the floppy will be > performed first time, the following cache entry will be created > "disk0: -> some_offset", probably an offset will be zero. And when you > change the floppy this offset still remain the same. There is a lot of > other places in the libstand, where similar behavior still remain (i > mean, one operation initiates several unneeded reads): The floppies used in BSD either have BSD labels or are a DOS floppy with no partition table. > * Each open() call initiates read file system metadata. > > * We have the support of different file systems. Some of those are real > file systems, other aren't - gzip, bzip, split. During boot loader tries > to open several files, which don't exists by default. Each this attempt > initiates reading of metadata of each file system several times. Why? > When we do first read we can determine that we have UFS on this media, > why do we trying search msdos or ext2fs here? Think about removable media. If you have replaced the media (such as a floppy), then what was once UFS may now be FAT16. > Ok, when we fail to open this file on the all of file systems, we are > going to try them again with ".gz" extension... Yes, the current code is not very optimal. The focus on it to date has been to make sure it works. It is only used for bootstrapping, not once the main system is up and running, so at least in the past performance has been less important than correctness. One could perhaps differentiate removable vs non-removable media (and allow more caching on non-removable media) so long as one distinguish a USB stick so as to mark it as removable media. (Either that or we say that we no longer support swapping removable media during the boot process.) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 21:42:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E056D106566C; Mon, 1 Oct 2012 21:42:32 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7968FC08; Mon, 1 Oct 2012 21:42:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91LgWg2017522; Mon, 1 Oct 2012 21:42:32 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91LgWje017520; Mon, 1 Oct 2012 21:42:32 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201210012142.q91LgWje017520@svn.freebsd.org> From: "Kenneth D. Merry" Date: Mon, 1 Oct 2012 21:42: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: r241114 - head/sys/i386/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, 01 Oct 2012 21:42:33 -0000 Author: ken Date: Mon Oct 1 21:42:32 2012 New Revision: 241114 URL: http://svn.freebsd.org/changeset/base/241114 Log: Add the mps(4) driver to the i386 GENERIC config file. LSI has tested it on i386 and verified that it works. Submitted by: Harald Schmalzbauer, John Baldwin, Kashyap Desai MFC after: 3 days Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Oct 1 19:43:37 2012 (r241113) +++ head/sys/i386/conf/GENERIC Mon Oct 1 21:42:32 2012 (r241114) @@ -121,6 +121,7 @@ device hptiop # Highpoint RocketRaid 3 device isp # Qlogic family #device ispfw # Firmware for QLogic HBAs- normally a module device mpt # LSI-Logic MPT-Fusion +device mps # LSI-Logic MPT-Fusion 2 #device ncr # NCR/Symbios Logic device sym # NCR/Symbios Logic (newer chipsets + those of `ncr') device trm # Tekram DC395U/UW/F DC315U adapters From owner-svn-src-head@FreeBSD.ORG Mon Oct 1 22:27:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 86CF7106564A; Mon, 1 Oct 2012 22:27:35 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 586C18FC08; Mon, 1 Oct 2012 22:27:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q91MRZJb023326; Mon, 1 Oct 2012 22:27:35 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q91MRZcO023323; Mon, 1 Oct 2012 22:27:35 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210012227.q91MRZcO023323@svn.freebsd.org> From: Eitan Adler Date: Mon, 1 Oct 2012 22:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241115 - head/share/examples/cvsup X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 01 Oct 2012 22:27:35 -0000 Author: eadler Date: Mon Oct 1 22:27:34 2012 New Revision: 241115 URL: http://svn.freebsd.org/changeset/base/241115 Log: Indicate (loudly) that ports csup is going away. While here clarify some other portions. Approved by: cperciva (implicit) MFC after: 3 days Modified: head/share/examples/cvsup/ports-supfile Modified: head/share/examples/cvsup/ports-supfile ============================================================================== --- head/share/examples/cvsup/ports-supfile Mon Oct 1 21:42:32 2012 (r241114) +++ head/share/examples/cvsup/ports-supfile Mon Oct 1 22:27:34 2012 (r241115) @@ -1,15 +1,20 @@ # $FreeBSD$ # # This file contains all of the "CVSup collections" that make up the -# FreeBSD-current ports collection. +# ports collection. # # csup (CVS Update Protocol) allows you to download the latest CVS # tree (or any branch of development therefrom) to your system easily # and efficiently -# -# To keep your CVS tree up-to-date run: -# -# csup ports-supfile +# _ +# __ ____ _ _ __ _ __ (_)_ __ __ _ +# \ \ /\ / / _` | '__| '_ \| | '_ \ / _` | +# \ V V / (_| | | | | | | | | | | (_| | +# \_/\_/ \__,_|_| |_| |_|_|_| |_|\__, | +# |___/ +# cvsup for ports is being phased out as of 28 February 2013 and its +# use is discouraged. Users are advised to migrate to portsnap +# or svn directly. # # Note that this only updates the tree contents and does not # update what is actually installed. @@ -63,11 +68,13 @@ ports-all # These are the individual collections that make up "ports-all". If you # use these, be sure to comment out "ports-all" above. -# + # Be sure to ALWAYS cvsup the ports-base collection if you use any of the # other individual collections below. ports-base is a mandatory collection # for the ports collection, and your ports may not build correctly if it # is not kept up to date. +# +# Use of individual collections is not a supported configuration. #ports-base #ports-accessibility #ports-arabic From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 00:30:15 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA3ED1065670; Tue, 2 Oct 2012 00:30:15 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D545B8FC18; Tue, 2 Oct 2012 00:30:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q920UFlA038026; Tue, 2 Oct 2012 00:30:15 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q920UFhn038024; Tue, 2 Oct 2012 00:30:15 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020030.q920UFhn038024@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 00:30: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: r241116 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 00:30:16 -0000 Author: eadler Date: Tue Oct 2 00:30:15 2012 New Revision: 241116 URL: http://svn.freebsd.org/changeset/base/241116 Log: Correct the tip about finding all the directories on the system Add a tip about clearing the screen. Make things more consistent by removing quotes around 'make search' Approved by: cperciva MFC after: 3 days Modified: head/games/fortune/datfiles/freebsd-tips Modified: head/games/fortune/datfiles/freebsd-tips ============================================================================== --- head/games/fortune/datfiles/freebsd-tips Mon Oct 1 22:27:34 2012 (r241115) +++ head/games/fortune/datfiles/freebsd-tips Tue Oct 2 00:30:15 2012 (r241116) @@ -272,8 +272,11 @@ will search '/', and all subdirectories, % To see all of the directories on your FreeBSD system, type - ls -R / | less - -- Dru + find / -type d | less + +All the files? + + find / -type f | less % To see how long it takes a command to run, type the word "time" before the command name. @@ -315,9 +318,9 @@ and they can be combined as "ls -FG". Want to find a specific port, just type the following under /usr/ports or one its subdirectories: - "make search name=" + make search name= or - "make search key=" + make search key= % Want to know how many words, lines, or bytes are contained in a file? Type "wc filename". @@ -422,6 +425,8 @@ You can press Ctrl-D to quickly exit fro login shell. -- Konstantinos Konstantinidis % +You can press Ctrl-L while in the shell to clear the screen. +% You can press up-arrow or down-arrow to walk through a list of previous commands in tcsh. % From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 00:30:21 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CB99106568D; Tue, 2 Oct 2012 00:30:21 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 545D68FC24; Tue, 2 Oct 2012 00:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q920ULv7038077; Tue, 2 Oct 2012 00:30:21 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q920ULZw038075; Tue, 2 Oct 2012 00:30:21 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020030.q920ULZw038075@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 00:30: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: r241117 - head/usr.bin/procstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 00:30:21 -0000 Author: eadler Date: Tue Oct 2 00:30:20 2012 New Revision: 241117 URL: http://svn.freebsd.org/changeset/base/241117 Log: add SG state type PR: bin/171664 Submitted by: Jan Beich jbeich@tormail.org Approved by: cperciva MFC after: 1 week Modified: head/usr.bin/procstat/procstat.1 Modified: head/usr.bin/procstat/procstat.1 ============================================================================== --- head/usr.bin/procstat/procstat.1 Tue Oct 2 00:30:15 2012 (r241116) +++ head/usr.bin/procstat/procstat.1 Tue Oct 2 00:30:20 2012 (r241117) @@ -418,6 +418,8 @@ default device .It ph physical +.It sg +scatter/gather .It sw swap .It vn From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 00:30:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4616310657C6; Tue, 2 Oct 2012 00:30:26 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7CA98FC0C; Tue, 2 Oct 2012 00:30:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q920UQ38038127; Tue, 2 Oct 2012 00:30:26 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q920UQQ0038124; Tue, 2 Oct 2012 00:30:26 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020030.q920UQQ0038124@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 00:30: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: r241118 - head/usr.bin/mktemp X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 00:30:29 -0000 Author: eadler Date: Tue Oct 2 00:30:26 2012 New Revision: 241118 URL: http://svn.freebsd.org/changeset/base/241118 Log: Implement the Sun/GNU extension of using a default prefix when no arguments are supplied. Reviewed by: jilles Approved by: cperciva MFC after: 1 week Modified: head/usr.bin/mktemp/mktemp.1 head/usr.bin/mktemp/mktemp.c Modified: head/usr.bin/mktemp/mktemp.1 ============================================================================== --- head/usr.bin/mktemp/mktemp.1 Tue Oct 2 00:30:20 2012 (r241117) +++ head/usr.bin/mktemp/mktemp.1 Tue Oct 2 00:30:26 2012 (r241118) @@ -99,6 +99,14 @@ Care should be taken to ensure that it is appropriate to use an environment variable potentially supplied by the user. .Pp +If no arguments are passed or if only the +.Fl d +flag is passed +.Nm +behaves as if +.Fl t Li tmp +was supplied. +.Pp Any number of temporary files may be created in a single invocation, including one based on the internal template resulting from the .Fl t Modified: head/usr.bin/mktemp/mktemp.c ============================================================================== --- head/usr.bin/mktemp/mktemp.c Tue Oct 2 00:30:20 2012 (r241117) +++ head/usr.bin/mktemp/mktemp.c Tue Oct 2 00:30:26 2012 (r241118) @@ -87,6 +87,11 @@ main(int argc, char **argv) argc -= optind; argv += optind; + if (!tflag && argc < 1) { + tflag = 1; + prefix = "tmp"; + } + if (tflag) { tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) @@ -100,8 +105,6 @@ main(int argc, char **argv) else errx(1, "cannot generate template"); } - } else if (argc < 1) { - usage(); } /* generate all requested files */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 03:33:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85F6E106566B; Tue, 2 Oct 2012 03:33:42 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70F318FC0A; Tue, 2 Oct 2012 03:33:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q923XgZ3060706; Tue, 2 Oct 2012 03:33:42 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q923Xg4I060704; Tue, 2 Oct 2012 03:33:42 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210020333.q923Xg4I060704@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 03:33: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: r241119 - 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, 02 Oct 2012 03:33:42 -0000 Author: eadler Date: Tue Oct 2 03:33:41 2012 New Revision: 241119 URL: http://svn.freebsd.org/changeset/base/241119 Log: Provide a generic way to disable devices at boot time PR: kern/119202 Requested by: peterj Reviewed by: sbruno, jhb Approved by: cperciva MFC after: 1 week Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Tue Oct 2 00:30:26 2012 (r241118) +++ head/sys/kern/subr_bus.c Tue Oct 2 03:33:41 2012 (r241119) @@ -2762,6 +2762,13 @@ device_attach(device_t dev) { int error; + if (resource_disabled(dev->driver->name, dev->unit)) { + device_disable(dev); + if (bootverbose) + device_printf(dev, "disabled via hints entry\n"); + return (ENXIO); + } + device_sysctl_init(dev); if (!device_is_quiet(dev)) device_print_child(dev->parent, dev); From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 06:26:46 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 841091065672; Tue, 2 Oct 2012 06:26:46 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 308F18FC0C; Tue, 2 Oct 2012 06:26:45 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 8D4D37E84A; Tue, 2 Oct 2012 16:26:37 +1000 (EST) Message-ID: <506A891D.3040401@freebsd.org> Date: Tue, 02 Oct 2012 16:26:37 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120814 Thunderbird/14.0 MIME-Version: 1.0 To: Jun Kuriyama References: <201208190815.q7J8FWLi049955@svn.freebsd.org> In-Reply-To: <201208190815.q7J8FWLi049955@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r239382 - in head/etc: defaults rc.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 06:26:46 -0000 Hi Jun, On 08/19/12 18:15, Jun Kuriyama wrote: > Author: kuriyama > Date: Sun Aug 19 08:15:32 2012 > New Revision: 239382 > URL: http://svn.freebsd.org/changeset/base/239382 > > Log: > - Allow to pass extra parameters for each jails. > - To achieve above, convert jail(8) invocation to use new style > command line "-c" flag. > > Reviewed at: freebsd-jail@ > > Modified: > head/etc/defaults/rc.conf > head/etc/rc.d/jail Can this change be MFCed without raising any POLA issues (I suspect it can)? If yes, would you be willing to MFC it to stable/8 and stable/9? Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 07:14:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ABF11065672; Tue, 2 Oct 2012 07:14:22 +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 DC1E68FC12; Tue, 2 Oct 2012 07:14:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q927EMb7090261; Tue, 2 Oct 2012 07:14:22 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q927EMUX090257; Tue, 2 Oct 2012 07:14:22 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210020714.q927EMUX090257@svn.freebsd.org> From: Alan Cox Date: Tue, 2 Oct 2012 07:14: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: r241123 - in head/sys/mips: include mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 07:14:23 -0000 Author: alc Date: Tue Oct 2 07:14:22 2012 New Revision: 241123 URL: http://svn.freebsd.org/changeset/base/241123 Log: Introduce a new TLB invalidation function for efficiently invalidating address ranges, and use this function in pmap_remove(). Tested by: jchandra Modified: head/sys/mips/include/tlb.h head/sys/mips/mips/pmap.c head/sys/mips/mips/tlb.c Modified: head/sys/mips/include/tlb.h ============================================================================== --- head/sys/mips/include/tlb.h Tue Oct 2 06:37:46 2012 (r241122) +++ head/sys/mips/include/tlb.h Tue Oct 2 07:14:22 2012 (r241123) @@ -53,6 +53,7 @@ void tlb_insert_wired(unsigned, vm_offse void tlb_invalidate_address(struct pmap *, vm_offset_t); void tlb_invalidate_all(void); void tlb_invalidate_all_user(struct pmap *); +void tlb_invalidate_range(struct pmap *, vm_offset_t, vm_offset_t); void tlb_save(void); void tlb_update(struct pmap *, vm_offset_t, pt_entry_t); Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Tue Oct 2 06:37:46 2012 (r241122) +++ head/sys/mips/mips/pmap.c Tue Oct 2 07:14:22 2012 (r241123) @@ -190,10 +190,9 @@ static vm_page_t _pmap_allocpte(pmap_t p static int pmap_unuse_pt(pmap_t, vm_offset_t, pd_entry_t); static pt_entry_t init_pte_prot(vm_page_t m, vm_prot_t access, vm_prot_t prot); -#ifdef SMP static void pmap_invalidate_page_action(void *arg); +static void pmap_invalidate_range_action(void *arg); static void pmap_update_page_action(void *arg); -#endif #ifndef __mips_n64 /* @@ -711,6 +710,31 @@ pmap_invalidate_page(pmap_t pmap, vm_off pmap_call_on_active_cpus(pmap, pmap_invalidate_page_action, &arg); } +struct pmap_invalidate_range_arg { + pmap_t pmap; + vm_offset_t sva; + vm_offset_t eva; +}; + +static void +pmap_invalidate_range_action(void *arg) +{ + struct pmap_invalidate_range_arg *p = arg; + + tlb_invalidate_range(p->pmap, p->sva, p->eva); +} + +static void +pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) +{ + struct pmap_invalidate_range_arg arg; + + arg.pmap = pmap; + arg.sva = sva; + arg.eva = eva; + pmap_call_on_active_cpus(pmap, pmap_invalidate_range_action, &arg); +} + struct pmap_update_page_arg { pmap_t pmap; vm_offset_t va; @@ -1737,12 +1761,15 @@ pmap_remove_page(struct pmap *pmap, vm_o * rounded to the page size. */ void -pmap_remove(struct pmap *pmap, vm_offset_t sva, vm_offset_t eva) +pmap_remove(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) { - vm_offset_t va_next; pd_entry_t *pde, *pdpe; pt_entry_t *pte; + vm_offset_t va, va_next; + /* + * Perform an unsynchronized read. This is, however, safe. + */ if (pmap->pm_stats.resident_count == 0) return; @@ -1772,17 +1799,36 @@ pmap_remove(struct pmap *pmap, vm_offset va_next = eva; pde = pmap_pdpe_to_pde(pdpe, sva); - if (*pde == 0) + if (*pde == NULL) continue; + + /* + * Limit our scan to either the end of the va represented + * by the current page table page, or to the end of the + * range being removed. + */ if (va_next > eva) va_next = eva; + + va = va_next; for (pte = pmap_pde_to_pte(pde, sva); sva != va_next; pte++, sva += PAGE_SIZE) { - if (!pte_test(pte, PTE_V)) + if (!pte_test(pte, PTE_V)) { + if (va != va_next) { + pmap_invalidate_range(pmap, va, sva); + va = va_next; + } continue; - pmap_remove_pte(pmap, pte, sva, *pde); - pmap_invalidate_page(pmap, sva); + } + if (va == va_next) + va = sva; + if (pmap_remove_pte(pmap, pte, sva, *pde)) { + sva += PAGE_SIZE; + break; + } } + if (va != va_next) + pmap_invalidate_range(pmap, va, sva); } out: rw_wunlock(&pvh_global_lock); Modified: head/sys/mips/mips/tlb.c ============================================================================== --- head/sys/mips/mips/tlb.c Tue Oct 2 06:37:46 2012 (r241122) +++ head/sys/mips/mips/tlb.c Tue Oct 2 07:14:22 2012 (r241123) @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include @@ -187,6 +187,79 @@ tlb_invalidate_all_user(struct pmap *pma intr_restore(s); } +/* + * Invalidates any TLB entries that map a virtual page from the specified + * address range. If "end" is zero, then every virtual page is considered to + * be within the address range's upper bound. + */ +void +tlb_invalidate_range(pmap_t pmap, vm_offset_t start, vm_offset_t end) +{ + register_t asid, end_hi, hi, hi_pagemask, s, save_asid, start_hi; + int i; + + KASSERT(start < end || (end == 0 && start > 0), + ("tlb_invalidate_range: invalid range")); + + /* + * Truncate the virtual address "start" to an even page frame number, + * and round the virtual address "end" to an even page frame number. + */ + start &= ~((1 << TLBMASK_SHIFT) - 1); + end = (end + (1 << TLBMASK_SHIFT) - 1) & ~((1 << TLBMASK_SHIFT) - 1); + + s = intr_disable(); + save_asid = mips_rd_entryhi() & TLBHI_ASID_MASK; + + asid = pmap_asid(pmap); + start_hi = TLBHI_ENTRY(start, asid); + end_hi = TLBHI_ENTRY(end, asid); + + /* + * Select the fastest method for invalidating the TLB entries. + */ + if (end - start < num_tlbentries << TLBMASK_SHIFT || (end == 0 && + start >= -(num_tlbentries << TLBMASK_SHIFT))) { + /* + * The virtual address range is small compared to the size of + * the TLB. Probe the TLB for each even numbered page frame + * within the virtual address range. + */ + for (hi = start_hi; hi != end_hi; hi += 1 << TLBMASK_SHIFT) { + mips_wr_pagemask(0); + mips_wr_entryhi(hi); + tlb_probe(); + i = mips_rd_index(); + if (i >= 0) + tlb_invalidate_one(i); + } + } else { + /* + * The virtual address range is large compared to the size of + * the TLB. Test every non-wired TLB entry. + */ + for (i = mips_rd_wired(); i < num_tlbentries; i++) { + mips_wr_index(i); + tlb_read(); + hi = mips_rd_entryhi(); + if ((hi & TLBHI_ASID_MASK) == asid && (hi < end_hi || + end == 0)) { + /* + * If "hi" is a large page that spans + * "start_hi", then it must be invalidated. + */ + hi_pagemask = mips_rd_pagemask(); + if (hi >= (start_hi & ~(hi_pagemask << + TLBMASK_SHIFT))) + tlb_invalidate_one(i); + } + } + } + + mips_wr_entryhi(save_asid); + intr_restore(s); +} + /* XXX Only if DDB? */ void tlb_save(void) From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 09:19:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2991D106566B; Tue, 2 Oct 2012 09:19:29 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14AC48FC14; Tue, 2 Oct 2012 09:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q929JS2k008776; Tue, 2 Oct 2012 09:19:28 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q929JSUD008774; Tue, 2 Oct 2012 09:19:28 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201210020919.q929JSUD008774@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 2 Oct 2012 09:19: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: r241124 - head/usr.sbin/cron/cron X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 09:19:29 -0000 Author: pluknet Date: Tue Oct 2 09:19:28 2012 New Revision: 241124 URL: http://svn.freebsd.org/changeset/base/241124 Log: Fix build with DEBUGGING disabled. Modified: head/usr.sbin/cron/cron/cron.c Modified: head/usr.sbin/cron/cron/cron.c ============================================================================== --- head/usr.sbin/cron/cron/cron.c Tue Oct 2 07:14:22 2012 (r241123) +++ head/usr.sbin/cron/cron/cron.c Tue Oct 2 09:19:28 2012 (r241124) @@ -51,16 +51,20 @@ struct pidfh *pfh; static void usage() { +#if DEBUGGING char **dflags; +#endif fprintf(stderr, "usage: cron [-j jitter] [-J rootjitter] " "[-m mailto] [-s] [-o] [-x debugflag[,...]]\n"); +#if DEBUGGING fprintf(stderr, "\ndebugflags: "); for(dflags = DebugFlagNames; *dflags; dflags++) { fprintf(stderr, "%s ", *dflags); } fprintf(stderr, "\n"); +#endif exit(ERROR_EXIT); } From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 09:23:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F10EF1065670; Tue, 2 Oct 2012 09:23:16 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC4D28FC12; Tue, 2 Oct 2012 09:23:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q929NGBP009300; Tue, 2 Oct 2012 09:23:16 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q929NGFi009298; Tue, 2 Oct 2012 09:23:16 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201210020923.q929NGFi009298@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 2 Oct 2012 09:23: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: r241125 - head/usr.sbin/cron/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: Tue, 02 Oct 2012 09:23:17 -0000 Author: pluknet Date: Tue Oct 2 09:23:16 2012 New Revision: 241125 URL: http://svn.freebsd.org/changeset/base/241125 Log: Fix build with LOG_FILE undefined and DEBUGGING disabled. Modified: head/usr.sbin/cron/lib/misc.c Modified: head/usr.sbin/cron/lib/misc.c ============================================================================== --- head/usr.sbin/cron/lib/misc.c Tue Oct 2 09:19:28 2012 (r241124) +++ head/usr.sbin/cron/lib/misc.c Tue Oct 2 09:23:16 2012 (r241125) @@ -391,7 +391,9 @@ log_it(username, xpid, event, detail) char *event; char *detail; { +#if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; +#endif #if defined(LOG_FILE) char *msg; TIME_T now = time((TIME_T) 0); From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 09:53:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D2DEE106566C; Tue, 2 Oct 2012 09:53:50 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDB1C8FC0C; Tue, 2 Oct 2012 09:53:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q929roX7012877; Tue, 2 Oct 2012 09:53:50 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q929roWW012875; Tue, 2 Oct 2012 09:53:50 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201210020953.q929roWW012875@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 2 Oct 2012 09:53:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241126 - head/usr.sbin/fifolog/fifolog_create X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 09:53:50 -0000 Author: pluknet Date: Tue Oct 2 09:53:50 2012 New Revision: 241126 URL: http://svn.freebsd.org/changeset/base/241126 Log: mdoc: point to an existing cross reference. Modified: head/usr.sbin/fifolog/fifolog_create/fifolog.1 Modified: head/usr.sbin/fifolog/fifolog_create/fifolog.1 ============================================================================== --- head/usr.sbin/fifolog/fifolog_create/fifolog.1 Tue Oct 2 09:23:16 2012 (r241125) +++ head/usr.sbin/fifolog/fifolog_create/fifolog.1 Tue Oct 2 09:53:50 2012 (r241126) @@ -203,7 +203,7 @@ One particular useful use of is with .Xr syslogd 8 using a line such as this in -.Xr /etc/syslog.conf 5 : +.Xr syslog.conf 5 : .Pp .Dl "*.* |fifolog_writer /var/log/syslog_fifolog" .Sh HISTORY From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 10:05:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7A81065675; Tue, 2 Oct 2012 10:05:39 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA38B8FC0C; Tue, 2 Oct 2012 10:05:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92A5dht017398; Tue, 2 Oct 2012 10:05:39 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92A5dB3017396; Tue, 2 Oct 2012 10:05:39 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210021005.q92A5dB3017396@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 2 Oct 2012 10:05: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: r241127 - 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, 02 Oct 2012 10:05:39 -0000 Author: hselasky Date: Tue Oct 2 10:05:39 2012 New Revision: 241127 URL: http://svn.freebsd.org/changeset/base/241127 Log: Remove unused field. MFC after: 1 week Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Tue Oct 2 09:53:50 2012 (r241126) +++ head/sys/dev/usb/usb_hub.c Tue Oct 2 10:05:39 2012 (r241127) @@ -103,7 +103,6 @@ struct uhub_softc { struct usb_xfer *sc_xfer[UHUB_N_TRANSFER]; /* interrupt xfer */ uint8_t sc_flags; #define UHUB_FLAG_DID_EXPLORE 0x01 - char sc_name[32]; }; #define UHUB_PROTO(sc) ((sc)->sc_udev->ddesc.bDeviceProtocol) @@ -927,9 +926,6 @@ uhub_attach(device_t dev) mtx_init(&sc->sc_mtx, "USB HUB mutex", NULL, MTX_DEF); - snprintf(sc->sc_name, sizeof(sc->sc_name), "%s", - device_get_nameunit(dev)); - device_set_usb_desc(dev); DPRINTFN(2, "depth=%d selfpowered=%d, parent=%p, " From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 10:09:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CD8B106566C; Tue, 2 Oct 2012 10:09:24 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57C908FC0A; Tue, 2 Oct 2012 10:09:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92A9OB4018073; Tue, 2 Oct 2012 10:09:24 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92A9OHE018071; Tue, 2 Oct 2012 10:09:24 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201210021009.q92A9OHE018071@svn.freebsd.org> From: Hans Petter Selasky Date: Tue, 2 Oct 2012 10:09: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: r241128 - 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, 02 Oct 2012 10:09:24 -0000 Author: hselasky Date: Tue Oct 2 10:09:23 2012 New Revision: 241128 URL: http://svn.freebsd.org/changeset/base/241128 Log: Style. MFC after: 1 week Modified: head/sys/dev/usb/usb_hub.c Modified: head/sys/dev/usb/usb_hub.c ============================================================================== --- head/sys/dev/usb/usb_hub.c Tue Oct 2 10:05:39 2012 (r241127) +++ head/sys/dev/usb/usb_hub.c Tue Oct 2 10:09:23 2012 (r241128) @@ -160,7 +160,7 @@ static device_method_t uhub_methods[] = DEVMETHOD(bus_child_location_str, uhub_child_location_string), DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_string), DEVMETHOD(bus_driver_added, uhub_driver_added), - {0, 0} + DEVMETHOD_END }; static driver_t uhub_driver = { From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 12:03:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DAE71065695; Tue, 2 Oct 2012 12:03:03 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E5F58FC1F; Tue, 2 Oct 2012 12:03:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92C32e5032698; Tue, 2 Oct 2012 12:03:02 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92C3282032695; Tue, 2 Oct 2012 12:03:02 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210021203.q92C3282032695@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Oct 2012 12:03: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: r241129 - 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, 02 Oct 2012 12:03:04 -0000 Author: glebius Date: Tue Oct 2 12:03:02 2012 New Revision: 241129 URL: http://svn.freebsd.org/changeset/base/241129 Log: There is a complex race in in_pcblookup_hash() and in_pcblookup_group(). Both functions need to obtain lock on the found PCB, and they can't do classic inter-lock with the PCB hash lock, due to lock order reversal. To keep the PCB stable, these functions put a reference on it and after PCB lock is acquired drop it. If the reference was the last one, this means we've raced with in_pcbfree() and the PCB is no longer valid. This approach works okay only if we are acquiring writer-lock on the PCB. In case of reader-lock, the following scenario can happen: - 2 threads locate pcb, and do in_pcbref() on it. - These 2 threads drop the inp hash lock. - Another thread comes to delete pcb via in_pcbfree(), it obtains hash lock, does in_pcbremlists(), drops hash lock, and runs in_pcbrele_wlocked(), which doesn't free the pcb due to two references on it. Then it unlocks the pcb. - 2 aforementioned threads acquire reader lock on the pcb and run in_pcbrele_rlocked(). One gets 1 from in_pcbrele_rlocked() and continues, second gets 0 and considers pcb freed, returns. - The thread that got 1 continutes working with detached pcb, which later leads to panic in the underlying protocol level. To plumb that problem an additional INPCB flag introduced - INP_FREED. We check for that flag in the in_pcbrele_rlocked() and if it is set, we pretend that that was the last reference. Discussed with: rwatson, jhb Reported by: Vladimir Medvedkin Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Tue Oct 2 10:09:23 2012 (r241128) +++ head/sys/netinet/in_pcb.c Tue Oct 2 12:03:02 2012 (r241129) @@ -1105,8 +1105,17 @@ in_pcbrele_rlocked(struct inpcb *inp) INP_RLOCK_ASSERT(inp); - if (refcount_release(&inp->inp_refcount) == 0) + if (refcount_release(&inp->inp_refcount) == 0) { + /* + * If the inpcb has been freed, let the caller know, even if + * this isn't the last reference. + */ + if (inp->inp_flags2 & INP_FREED) { + INP_RUNLOCK(inp); + return (1); + } return (0); + } KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); @@ -1186,6 +1195,7 @@ in_pcbfree(struct inpcb *inp) inp_freemoptions(inp->inp_moptions); #endif inp->inp_vflag = 0; + inp->inp_flags2 |= INP_FREED; crfree(inp->inp_cred); #ifdef MAC mac_inpcb_destroy(inp); Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Tue Oct 2 10:09:23 2012 (r241128) +++ head/sys/netinet/in_pcb.h Tue Oct 2 12:03:02 2012 (r241129) @@ -542,6 +542,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_RT_VALID 0x00000002 /* cached rtentry is valid */ #define INP_PCBGROUPWILD 0x00000004 /* in pcbgroup wildcard list */ #define INP_REUSEPORT 0x00000008 /* SO_REUSEPORT option is set */ +#define INP_FREED 0x00000010 /* inp itself is not valid */ /* * Flags passed to in_pcblookup*() functions. From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 12:25:31 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46D0B106566B; Tue, 2 Oct 2012 12:25:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3172C8FC08; Tue, 2 Oct 2012 12:25:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92CPVG5036192; Tue, 2 Oct 2012 12:25:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92CPUEW036190; Tue, 2 Oct 2012 12:25:31 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210021225.q92CPUEW036190@svn.freebsd.org> From: John Baldwin Date: Tue, 2 Oct 2012 12:25: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: r241130 - 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: Tue, 02 Oct 2012 12:25:31 -0000 Author: jhb Date: Tue Oct 2 12:25:30 2012 New Revision: 241130 URL: http://svn.freebsd.org/changeset/base/241130 Log: Rename the module for 'device enc' to "if_enc" to avoid conflicting with the CAM "enc" peripheral (part of ses(4)). Previously the two modules used the same name, so only one was included in a linked kernel causing enc0 to not be created if you added IPSEC to GENERIC. The new module name follows the pattern of other network interfaces (e.g. "if_loop"). MFC after: 1 week Modified: head/sys/net/if_enc.c Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Tue Oct 2 12:03:02 2012 (r241129) +++ head/sys/net/if_enc.c Tue Oct 2 12:25:30 2012 (r241130) @@ -179,12 +179,12 @@ enc_modevent(module_t mod, int type, voi } static moduledata_t enc_mod = { - "enc", + "if_enc", enc_modevent, 0 }; -DECLARE_MODULE(enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); +DECLARE_MODULE(if_enc, enc_mod, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY); static int enc_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 12:44:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98AE21065674; Tue, 2 Oct 2012 12:44:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83D988FC17; Tue, 2 Oct 2012 12:44:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92CilN4039039; Tue, 2 Oct 2012 12:44:47 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92CilaR039036; Tue, 2 Oct 2012 12:44:47 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210021244.q92CilaR039036@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Oct 2012 12:44:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241131 - head/sys/netpfil/pf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 12:44:47 -0000 Author: glebius Date: Tue Oct 2 12:44:46 2012 New Revision: 241131 URL: http://svn.freebsd.org/changeset/base/241131 Log: To reduce volume of pfsync traffic: - Scan request update queue to prevent doubles. - Do not push undersized daragram in pfsync_update_request(). Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Tue Oct 2 12:25:30 2012 (r241130) +++ head/sys/netpfil/pf/if_pfsync.c Tue Oct 2 12:44:46 2012 (r241131) @@ -1832,9 +1832,15 @@ pfsync_request_update(u_int32_t creatori PFSYNC_LOCK_ASSERT(sc); /* - * This code does nothing to prevent multiple update requests for the - * same state being generated. + * This code does a bit to prevent multiple update requests for the + * same state being generated. It searches current subheader queue, + * but it doesn't lookup into queue of already packed datagrams. */ + TAILQ_FOREACH(item, &sc->sc_upd_req_list, ur_entry) + if (item->ur_msg.id == id && + item->ur_msg.creatorid == creatorid) + return; + item = malloc(sizeof(*item), M_PFSYNC, M_NOWAIT); if (item == NULL) return; /* XXX stats */ @@ -1854,8 +1860,6 @@ pfsync_request_update(u_int32_t creatori TAILQ_INSERT_TAIL(&sc->sc_upd_req_list, item, ur_entry); sc->sc_len += nlen; - - pfsync_push(sc); } static void From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 14:48:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E4B6106566C; Tue, 2 Oct 2012 14:48:04 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 58D5A8FC0A; Tue, 2 Oct 2012 14:48:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92Em4sh055255; Tue, 2 Oct 2012 14:48:04 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92Em4sJ055252; Tue, 2 Oct 2012 14:48:04 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201210021448.q92Em4sJ055252@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Oct 2012 14:48: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: r241134 - head/usr.sbin/ip6addrctl X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 14:48:04 -0000 Author: eadler Date: Tue Oct 2 14:48:03 2012 New Revision: 241134 URL: http://svn.freebsd.org/changeset/base/241134 Log: Fix alignment related warnings reported by gcc Switch from old style arguments to modern C remove WARNS as a result tested with "make universe" Approved by: cperciva MFC after: 1 week Modified: head/usr.sbin/ip6addrctl/Makefile head/usr.sbin/ip6addrctl/ip6addrctl.c Modified: head/usr.sbin/ip6addrctl/Makefile ============================================================================== --- head/usr.sbin/ip6addrctl/Makefile Tue Oct 2 13:03:11 2012 (r241133) +++ head/usr.sbin/ip6addrctl/Makefile Tue Oct 2 14:48:03 2012 (r241134) @@ -3,6 +3,4 @@ PROG= ip6addrctl MAN= ip6addrctl.8 -WARNS?= 2 - .include Modified: head/usr.sbin/ip6addrctl/ip6addrctl.c ============================================================================== --- head/usr.sbin/ip6addrctl/ip6addrctl.c Tue Oct 2 13:03:11 2012 (r241133) +++ head/usr.sbin/ip6addrctl/ip6addrctl.c Tue Oct 2 14:48:03 2012 (r241134) @@ -71,12 +71,10 @@ static void plen2mask(struct sockaddr_in static void set_policy(void); static void add_policy(char *, char *, char *); static void delete_policy(char *); -static void flush_policy(); +static void flush_policy(void); int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { TAILQ_INIT(&policyhead); @@ -107,11 +105,11 @@ main(argc, argv) } static void -get_policy() +get_policy(void) { int mib[] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_ADDRCTLPOLICY }; size_t l; - char *buf; + struct in6_addrpolicy *buf; struct in6_addrpolicy *pol, *ep; if (sysctl(mib, sizeof(mib) / sizeof(mib[0]), NULL, &l, NULL, 0) < 0) { @@ -131,8 +129,8 @@ get_policy() /* NOTREACHED */ } - ep = (struct in6_addrpolicy *)(buf + l); - for (pol = (struct in6_addrpolicy *)buf; pol + 1 <= ep; pol++) { + ep = buf + l/sizeof(*buf); + for (pol = buf; pol + 1 <= ep; pol++) { struct policyqueue *new; if ((new = malloc(sizeof(*new))) == NULL) @@ -145,7 +143,7 @@ get_policy() } static void -dump_policy() +dump_policy(void) { size_t addrlen; char addrbuf[NI_MAXHOST]; @@ -201,8 +199,7 @@ dump_policy() } while (0); static void -make_policy_fromfile(conf) - char *conf; +make_policy_fromfile(char *conf) { char line[_POSIX2_LINE_MAX], *cp; char *addrstr; @@ -257,9 +254,7 @@ make_policy_fromfile(conf) } static int -parse_prefix(prefix0, pol) - const char *prefix0; - struct in6_addrpolicy *pol; +parse_prefix(const char *prefix0, struct in6_addrpolicy *pol) { int e = 0, plen; char *prefix, *plenstr; @@ -299,11 +294,9 @@ parse_prefix(prefix0, pol) } static void -plen2mask(mask, plen) - struct sockaddr_in6 *mask; - int plen; +plen2mask(struct sockaddr_in6 *mask, int plen) { - u_char *cp = (char *)&mask->sin6_addr; + u_char *cp = (unsigned char *)&mask->sin6_addr; memset(mask, 0, sizeof(*mask)); mask->sin6_family = AF_INET6; /* just in case */ @@ -316,7 +309,7 @@ plen2mask(mask, plen) } static void -set_policy() +set_policy(void) { struct policyqueue *ent; int s; @@ -334,8 +327,7 @@ set_policy() } static int -mask2plen(mask) - struct sockaddr_in6 *mask; +mask2plen(struct sockaddr_in6 *mask) { int masklen, final = 0; u_char *p, *lim; @@ -394,8 +386,7 @@ mask2plen(mask) } static void -add_policy(prefix, prec, label) - char *prefix, *prec, *label; +add_policy(char *prefix, char *prec, char *label) { struct in6_addrpolicy p; int s; @@ -416,8 +407,7 @@ add_policy(prefix, prec, label) } static void -delete_policy(prefix) - char *prefix; +delete_policy(char *prefix) { struct in6_addrpolicy p; int s; @@ -436,7 +426,7 @@ delete_policy(prefix) } static void -flush_policy() +flush_policy(void) { struct policyqueue *ent; int s; @@ -454,7 +444,7 @@ flush_policy() } static void -usage() +usage(void) { fprintf(stderr, "usage: ip6addrctl [show]\n"); fprintf(stderr, " ip6addrctl add " From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 17:44:09 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32BCE106566C; Tue, 2 Oct 2012 17:44:09 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D6418FC08; Tue, 2 Oct 2012 17:44:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92Hi8hO077998; Tue, 2 Oct 2012 17:44:08 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92Hi8dt077996; Tue, 2 Oct 2012 17:44:08 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201210021744.q92Hi8dt077996@svn.freebsd.org> From: "Andrey A. Chernov" Date: Tue, 2 Oct 2012 17:44: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: r241137 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 17:44:09 -0000 Author: ache Date: Tue Oct 2 17:44:08 2012 New Revision: 241137 URL: http://svn.freebsd.org/changeset/base/241137 Log: Using putenv() and later direct pointer contents modification it is possibe to craft environment variables with similar names like that: a=1 a=2 ... unsetenv("a") should remove them all to make later getenv("a") impossible. Fix it to do so (this is GNU autoconf test #3 failure too). PR: 172273 MFC after: 1 week Modified: head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/stdlib/getenv.c ============================================================================== --- head/lib/libc/stdlib/getenv.c Tue Oct 2 17:05:20 2012 (r241136) +++ head/lib/libc/stdlib/getenv.c Tue Oct 2 17:44:08 2012 (r241137) @@ -675,11 +675,13 @@ unsetenv(const char *name) /* Deactivate specified variable. */ envNdx = envVarsTotal - 1; - if (__findenv(name, nameLen, &envNdx, true) != NULL) { + /* Remove all occurrences. */ + while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); __rebuild_environ(envActive - 1); + envNdx = envVarsTotal - 1; } return (0); From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 17:45:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66377106566B; Tue, 2 Oct 2012 17:45:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 502598FC12; Tue, 2 Oct 2012 17:45:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92HjKEJ078193; Tue, 2 Oct 2012 17:45:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92HjKlK078184; Tue, 2 Oct 2012 17:45:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210021745.q92HjKlK078184@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Oct 2012 17:45: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: r241138 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 17:45:20 -0000 Author: adrian Date: Tue Oct 2 17:45:19 2012 New Revision: 241138 URL: http://svn.freebsd.org/changeset/base/241138 Log: Migrate the power-save functions to be overridable VAP methods. This turns ieee80211_node_pwrsave(), ieee80211_sta_pwrsave() and ieee80211_recv_pspoll() into methods. The intent is to let drivers override these and tie into the power save management pathway. For ath(4), this is the beginning of forcing a node software queue to stop and start as needed, as well as supporting "leaking" single frames from the software queue to the hardware. Right now, ieee80211_recv_pspoll() will attempt to transmit a single frame to the hardware (whether it be a data frame on the power-save queue or a NULL data frame) but the driver may have hardware/software queued frames queued up. This initial work is an attempt at providing the hooks required to implement correct behaviour. Allowing ieee80211_node_pwrsave() to be overridden allows the ath(4) driver to pause and unpause the entire software queue for a given node. It doesn't make sense to transmit anything whilst the node is asleep. Please note that there are other corner cases to correctly handle - specifically, setting the MORE data bit correctly on frames to a station, as well as keeping the TIM updated. Those particular issues can be addressed later. Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_hostap.h head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_power.h head/sys/net80211/ieee80211_scan.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_adhoc.c Tue Oct 2 17:45:19 2012 (r241138) @@ -242,7 +242,7 @@ adhoc_newstate(struct ieee80211vap *vap, ic->ic_newassoc(ni, ostate != IEEE80211_S_RUN); break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); break; default: invalid: Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_hostap.c Tue Oct 2 17:45:19 2012 (r241138) @@ -73,7 +73,6 @@ static void hostap_deliver_data(struct i static void hostap_recv_mgmt(struct ieee80211_node *, struct mbuf *, int subtype, int rssi, int nf); static void hostap_recv_ctl(struct ieee80211_node *, struct mbuf *, int); -static void hostap_recv_pspoll(struct ieee80211_node *, struct mbuf *); void ieee80211_hostap_attach(struct ieee80211com *ic) @@ -100,6 +99,7 @@ hostap_vattach(struct ieee80211vap *vap) vap->iv_recv_ctl = hostap_recv_ctl; vap->iv_opdetach = hostap_vdetach; vap->iv_deliver_data = hostap_deliver_data; + vap->iv_recv_pspoll = ieee80211_recv_pspoll; } static void @@ -645,7 +645,7 @@ hostap_input(struct ieee80211_node *ni, */ if (((wh->i_fc[1] & IEEE80211_FC1_PWR_MGT) ^ (ni->ni_flags & IEEE80211_NODE_PWR_MGT))) - ieee80211_node_pwrsave(ni, + vap->iv_node_ps(ni, wh->i_fc[1] & IEEE80211_FC1_PWR_MGT); /* * For 4-address packets handle WDS discovery @@ -2240,7 +2240,7 @@ hostap_recv_ctl(struct ieee80211_node *n { switch (subtype) { case IEEE80211_FC0_SUBTYPE_PS_POLL: - hostap_recv_pspoll(ni, m); + ni->ni_vap->iv_recv_pspoll(ni, m); break; case IEEE80211_FC0_SUBTYPE_BAR: ieee80211_recv_bar(ni, m); @@ -2251,8 +2251,8 @@ hostap_recv_ctl(struct ieee80211_node *n /* * Process a received ps-poll frame. */ -static void -hostap_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0) +void +ieee80211_recv_pspoll(struct ieee80211_node *ni, struct mbuf *m0) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame_min *wh; Modified: head/sys/net80211/ieee80211_hostap.h ============================================================================== --- head/sys/net80211/ieee80211_hostap.h Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_hostap.h Tue Oct 2 17:45:19 2012 (r241138) @@ -32,4 +32,10 @@ */ void ieee80211_hostap_attach(struct ieee80211com *); void ieee80211_hostap_detach(struct ieee80211com *); + +/* + * This method can be overridden + */ +void ieee80211_recv_pspoll(struct ieee80211_node *, struct mbuf *); + #endif /* !_NET80211_IEEE80211_HOSTAP_H_ */ Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_power.c Tue Oct 2 17:45:19 2012 (r241138) @@ -69,6 +69,8 @@ ieee80211_power_vattach(struct ieee80211 vap->iv_update_ps = ieee80211_update_ps; vap->iv_set_tim = ieee80211_set_tim; } + vap->iv_node_ps = ieee80211_node_pwrsave; + vap->iv_sta_ps = ieee80211_sta_pwrsave; } void Modified: head/sys/net80211/ieee80211_power.h ============================================================================== --- head/sys/net80211/ieee80211_power.h Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_power.h Tue Oct 2 17:45:19 2012 (r241138) @@ -71,6 +71,11 @@ void ieee80211_power_latevattach(struct struct mbuf *ieee80211_node_psq_dequeue(struct ieee80211_node *ni, int *qlen); int ieee80211_node_psq_drain(struct ieee80211_node *); int ieee80211_node_psq_age(struct ieee80211_node *); + +/* + * Don't call these directly from the stack; they are vap methods + * that should be overridden. + */ int ieee80211_pwrsave(struct ieee80211_node *, struct mbuf *); void ieee80211_node_pwrsave(struct ieee80211_node *, int enable); void ieee80211_sta_pwrsave(struct ieee80211vap *, int enable); Modified: head/sys/net80211/ieee80211_scan.c ============================================================================== --- head/sys/net80211/ieee80211_scan.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_scan.c Tue Oct 2 17:45:19 2012 (r241138) @@ -866,7 +866,7 @@ scan_task(void *arg, int pending) vap->iv_state == IEEE80211_S_RUN) { if ((vap->iv_bss->ni_flags & IEEE80211_NODE_PWR_MGT) == 0) { /* Enable station power save mode */ - ieee80211_sta_pwrsave(vap, 1); + vap->iv_sta_ps(vap, 1); /* * Use an 1ms delay so the null data frame has a chance * to go out. @@ -1047,7 +1047,7 @@ done: * waiting for us. */ if (scandone) { - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); if (ss->ss_next >= ss->ss_last) { ieee80211_notify_scan_done(vap); ic->ic_flags_ext &= ~IEEE80211_FEXT_BGSCAN; Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_sta.c Tue Oct 2 17:45:19 2012 (r241138) @@ -402,7 +402,7 @@ sta_newstate(struct ieee80211vap *vap, e arg == IEEE80211_FC0_SUBTYPE_ASSOC_RESP); break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); break; default: goto invalid; @@ -438,7 +438,7 @@ sta_newstate(struct ieee80211vap *vap, e goto invalid; break; case IEEE80211_S_SLEEP: - ieee80211_sta_pwrsave(vap, 1); + vap->iv_sta_ps(vap, 1); break; default: invalid: @@ -1396,7 +1396,7 @@ sta_recv_mgmt(struct ieee80211_node *ni, * we are expecting data. */ ic->ic_lastdata = ticks; - ieee80211_sta_pwrsave(vap, 0); + vap->iv_sta_ps(vap, 0); } #endif ni->ni_dtim_count = tim->tim_count; Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Tue Oct 2 17:44:08 2012 (r241137) +++ head/sys/net80211/ieee80211_var.h Tue Oct 2 17:45:19 2012 (r241138) @@ -486,6 +486,11 @@ struct ieee80211vap { /* power save handling */ void (*iv_update_ps)(struct ieee80211vap *, int); int (*iv_set_tim)(struct ieee80211_node *, int); + void (*iv_node_ps)(struct ieee80211_node *, int); + void (*iv_sta_ps)(struct ieee80211vap *, int); + void (*iv_recv_pspoll)(struct ieee80211_node *, + struct mbuf *); + /* state machine processing */ int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int); From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 17:46:33 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 760D61065675; Tue, 2 Oct 2012 17:46:33 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613778FC17; Tue, 2 Oct 2012 17:46:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92HkXWP078388; Tue, 2 Oct 2012 17:46:33 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92HkX9T078386; Tue, 2 Oct 2012 17:46:33 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210021746.q92HkX9T078386@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Oct 2012 17:46: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: r241139 - 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: Tue, 02 Oct 2012 17:46:33 -0000 Author: adrian Date: Tue Oct 2 17:46:32 2012 New Revision: 241139 URL: http://svn.freebsd.org/changeset/base/241139 Log: Update UPDATING with the ABI change for net80211. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Oct 2 17:45:19 2012 (r241138) +++ head/UPDATING Tue Oct 2 17:46:32 2012 (r241139) @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121001: + The net80211(4) ABI has been changed to allow for improved driver + PS-POLL and power-save support. All wireless drivers need to be + recompiled to work with the new kernel. + 20120913: The random(4) support for the VIA hardware random number generator (`PADLOCK') is no longer enabled unconditionally. From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 18:38:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 419241065672; Tue, 2 Oct 2012 18:38:06 +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 2BEE08FC19; Tue, 2 Oct 2012 18:38:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92Ic6fj085390; Tue, 2 Oct 2012 18:38:06 GMT (envelope-from wollman@svn.freebsd.org) Received: (from wollman@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92Ic55R085388; Tue, 2 Oct 2012 18:38:05 GMT (envelope-from wollman@svn.freebsd.org) Message-Id: <201210021838.q92Ic55R085388@svn.freebsd.org> From: Garrett Wollman Date: Tue, 2 Oct 2012 18:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241140 - 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, 02 Oct 2012 18:38:06 -0000 Author: wollman Date: Tue Oct 2 18:38:05 2012 New Revision: 241140 URL: http://svn.freebsd.org/changeset/base/241140 Log: Fix spelling of the function name in two assertion messages. Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Oct 2 17:46:32 2012 (r241139) +++ head/sys/kern/uipc_socket.c Tue Oct 2 18:38:05 2012 (r241140) @@ -995,9 +995,9 @@ sosend_dgram(struct socket *so, struct s int atomic = sosendallatonce(so) || top; #endif - KASSERT(so->so_type == SOCK_DGRAM, ("sodgram_send: !SOCK_DGRAM")); + KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); KASSERT(so->so_proto->pr_flags & PR_ATOMIC, - ("sodgram_send: !PR_ATOMIC")); + ("sosend_dgram: !PR_ATOMIC")); if (uio != NULL) resid = uio->uio_resid; From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 19:00:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7DD1106564A; Tue, 2 Oct 2012 19:00:56 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A820A8FC08; Tue, 2 Oct 2012 19:00:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92J0uMI088557; Tue, 2 Oct 2012 19:00:56 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92J0uHT088549; Tue, 2 Oct 2012 19:00:56 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210021900.q92J0uHT088549@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 2 Oct 2012 19:00: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: r241141 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:00:56 -0000 Author: pfg Date: Tue Oct 2 19:00:56 2012 New Revision: 241141 URL: http://svn.freebsd.org/changeset/base/241141 Log: RPC: Convert all uid and gid variables of the type uid_t and gid_t. This matches what upstream (OpenSolaris) does. Tested by: David Wolfskill Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) MFC after: 3 days Modified: head/include/rpc/auth.h head/include/rpc/auth_unix.h head/lib/libc/rpc/auth_unix.c head/lib/libc/rpc/authunix_prot.c head/lib/libc/rpc/rpc_soc.3 head/lib/libc/rpc/svc_auth_unix.c head/sys/rpc/auth.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Tue Oct 2 18:38:05 2012 (r241140) +++ head/include/rpc/auth.h Tue Oct 2 19:00:56 2012 (r241141) @@ -243,14 +243,13 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * uid_t uid; + * gid_t gid; * int len; - * int *aup_gids; + * gid_t *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Tue Oct 2 18:38:05 2012 (r241140) +++ head/include/rpc/auth_unix.h Tue Oct 2 19:00:56 2012 (r241141) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - int aup_uid; - int aup_gid; + uid_t aup_uid; + gid_t aup_gid; u_int aup_len; - int *aup_gids; + gid_t *aup_gids; }; #define authsys_parms authunix_parms Modified: head/lib/libc/rpc/auth_unix.c ============================================================================== --- head/lib/libc/rpc/auth_unix.c Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/auth_unix.c Tue Oct 2 19:00:56 2012 (r241141) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - int uid; - int gid; + uid_t uid; + gid_t gid; int len; - int *aup_gids; + gid_t *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,9 +207,7 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; - /* XXX: interface problem; those should all have been unsigned */ - auth = authunix_create(machname, (int)uid, (int)gid, ngids, - (int *)gids); + auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); return (auth); } Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/authunix_prot.c Tue Oct 2 19:00:56 2012 (r241141) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - int **paup_gids; + gid_t **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_int(xdrs, &(p->aup_uid)) - && xdr_int(xdrs, &(p->aup_gid)) + && xdr_u_int(xdrs, &(p->aup_uid)) + && xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); Modified: head/lib/libc/rpc/rpc_soc.3 ============================================================================== --- head/lib/libc/rpc/rpc_soc.3 Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/rpc_soc.3 Tue Oct 2 19:00:56 2012 (r241141) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "int uid" "int gid" "int len" "int *aup_gids" +.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" .Xc .Pp Create and return an Modified: head/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- head/lib/libc/rpc/svc_auth_unix.c Tue Oct 2 18:38:05 2012 (r241140) +++ head/lib/libc/rpc/svc_auth_unix.c Tue Oct 2 19:00:56 2012 (r241141) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - int area_gids[NGRPS]; + gid_t area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: head/sys/rpc/auth.h ============================================================================== --- head/sys/rpc/auth.h Tue Oct 2 18:38:05 2012 (r241140) +++ head/sys/rpc/auth.h Tue Oct 2 19:00:56 2012 (r241141) @@ -234,18 +234,17 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * int uid; - * int gid; + * uid_t uid; + * gid_t gid; * int len; - * int *aup_gids; + * gid_t *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, int, int, int, - int *); +extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 19:03:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 042B0106566B; Tue, 2 Oct 2012 19:03:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E37BA8FC14; Tue, 2 Oct 2012 19:03:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92J3L7g088931; Tue, 2 Oct 2012 19:03:21 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92J3LIe088928; Tue, 2 Oct 2012 19:03:21 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210021903.q92J3LIe088928@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 2 Oct 2012 19:03: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: r241142 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:03:22 -0000 Author: pfg Date: Tue Oct 2 19:03:21 2012 New Revision: 241142 URL: http://svn.freebsd.org/changeset/base/241142 Log: Fix __rpc_getconfip __rpc_getconfip is supposed to return the first netconf entry supporting tcp or udp, respectively. The code will currently return the *last* entry, plus it will leak memory when there is more than one such entry. This change matches the reference (OpenSolaris) implementation. Tested by: David Wolfskill Obtained from: Bull GNU/linux NFSv4 Project (libtirpc) MFC after: 1 week Modified: head/lib/libc/rpc/rpc_generic.c Modified: head/lib/libc/rpc/rpc_generic.c ============================================================================== --- head/lib/libc/rpc/rpc_generic.c Tue Oct 2 19:00:56 2012 (r241141) +++ head/lib/libc/rpc/rpc_generic.c Tue Oct 2 19:03:21 2012 (r241142) @@ -269,7 +269,8 @@ __rpc_getconfip(nettype) } while ((nconf = getnetconfig(confighandle)) != NULL) { if (strcmp(nconf->nc_protofmly, NC_INET) == 0) { - if (strcmp(nconf->nc_proto, NC_TCP) == 0) { + if (strcmp(nconf->nc_proto, NC_TCP) == 0 && + netid_tcp == NULL) { netid_tcp = strdup(nconf->nc_netid); if (main_thread) netid_tcp_main = netid_tcp; @@ -277,7 +278,8 @@ __rpc_getconfip(nettype) thr_setspecific(tcp_key, (void *) netid_tcp); } else - if (strcmp(nconf->nc_proto, NC_UDP) == 0) { + if (strcmp(nconf->nc_proto, NC_UDP) == 0 && + netid_udp == NULL) { netid_udp = strdup(nconf->nc_netid); if (main_thread) netid_udp_main = netid_udp; From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 19:10:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 632CB106566B; Tue, 2 Oct 2012 19:10:20 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EACA8FC08; Tue, 2 Oct 2012 19:10:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92JAKEx089967; Tue, 2 Oct 2012 19:10:20 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92JAKAL089964; Tue, 2 Oct 2012 19:10:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210021910.q92JAKAL089964@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Tue, 2 Oct 2012 19:10: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: r241143 - in head: lib/libc/rpc sys/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 19:10:20 -0000 Author: pfg Date: Tue Oct 2 19:10:19 2012 New Revision: 241143 URL: http://svn.freebsd.org/changeset/base/241143 Log: libtirpc: be sure to free cl_netid and cl_tp When creating a client with clnt_tli_create, it uses strdup to copy strings for these fields if nconf is passed in. clnt_dg_destroy frees these strings already. Make sure clnt_vc_destroy frees them in the same way. This change matches the reference (OpenSolaris) implementation. Tested by: David Wolfskill Obtained from: Bull GNU/Linux NFSv4 Project (libtirpc) MFC after: 2 weeks Modified: head/lib/libc/rpc/clnt_vc.c head/sys/rpc/clnt_vc.c Modified: head/lib/libc/rpc/clnt_vc.c ============================================================================== --- head/lib/libc/rpc/clnt_vc.c Tue Oct 2 19:03:21 2012 (r241142) +++ head/lib/libc/rpc/clnt_vc.c Tue Oct 2 19:10:19 2012 (r241143) @@ -672,6 +672,10 @@ clnt_vc_destroy(cl) if (ct->ct_addr.buf) free(ct->ct_addr.buf); mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); mutex_unlock(&clnt_fd_lock); thr_sigsetmask(SIG_SETMASK, &(mask), NULL); Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Tue Oct 2 19:03:21 2012 (r241142) +++ head/sys/rpc/clnt_vc.c Tue Oct 2 19:10:19 2012 (r241143) @@ -836,6 +836,10 @@ clnt_vc_destroy(CLIENT *cl) soclose(so); } mem_free(ct, sizeof(struct ct_data)); + if (cl->cl_netid && cl->cl_netid[0]) + mem_free(cl->cl_netid, strlen(cl->cl_netid) +1); + if (cl->cl_tp && cl->cl_tp[0]) + mem_free(cl->cl_tp, strlen(cl->cl_tp) +1); mem_free(cl, sizeof(CLIENT)); } From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 19:38:49 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 02E2B106566C; Tue, 2 Oct 2012 19:38:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 7100F8FC08; Tue, 2 Oct 2012 19:38:48 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q92JckeF030613; Tue, 2 Oct 2012 23:38:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q92Jck7V030612; Tue, 2 Oct 2012 23:38:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 2 Oct 2012 23:38:46 +0400 From: Gleb Smirnoff To: Garrett Wollman Message-ID: <20121002193846.GX50433@FreeBSD.org> References: <201210021838.q92Ic55R085388@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201210021838.q92Ic55R085388@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241140 - 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, 02 Oct 2012 19:38:49 -0000 On Tue, Oct 02, 2012 at 06:38:05PM +0000, Garrett Wollman wrote: G> Author: wollman G> Date: Tue Oct 2 18:38:05 2012 G> New Revision: 241140 G> URL: http://svn.freebsd.org/changeset/base/241140 G> G> Log: G> Fix spelling of the function name in two assertion messages. G> G> Modified: G> head/sys/kern/uipc_socket.c G> G> Modified: head/sys/kern/uipc_socket.c G> ============================================================================== G> --- head/sys/kern/uipc_socket.c Tue Oct 2 17:46:32 2012 (r241139) G> +++ head/sys/kern/uipc_socket.c Tue Oct 2 18:38:05 2012 (r241140) G> @@ -995,9 +995,9 @@ sosend_dgram(struct socket *so, struct s G> int atomic = sosendallatonce(so) || top; G> #endif G> G> - KASSERT(so->so_type == SOCK_DGRAM, ("sodgram_send: !SOCK_DGRAM")); G> + KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); G> KASSERT(so->so_proto->pr_flags & PR_ATOMIC, G> - ("sodgram_send: !PR_ATOMIC")); G> + ("sosend_dgram: !PR_ATOMIC")); G> G> if (uio != NULL) G> resid = uio->uio_resid; Why not to use just __func__ here? -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 20:50:03 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BFBC106564A; Tue, 2 Oct 2012 20:50:03 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1.freebsd.org (Postfix) with ESMTP id BE31B8FC0A; Tue, 2 Oct 2012 20:50:02 +0000 (UTC) Received: by ieak10 with SMTP id k10so14636518iea.13 for ; Tue, 02 Oct 2012 13:50:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=avfHUzGBqaRGl64d/c2cscE44H74ZoA3zoa9Tat3+wE=; b=SbZleYT5VoamMNgtOhf4Owqu8suYkQ5SS0Q/PQQTr019nURGx+Qbv4IHU4EpGFr0Du +OLp8wDk43HSEijoFzli1S4NtTlTUvRE4tGotQX+IKzvnBN81BxYbyDKO6RrRb4Bd2Ka YcKSZe7ELvOwV6k8uZR7RgycO7qFEIpdlxEUbeJjV5++jLVux1yBY2q1Ccjtozv4HG3c CiGBrB1GBnVmgTefJZj6nZ641ME4IxCe+5jJQAv9nu7oDq1krB+i+B+4jK9cceX/dKVR v8AUeqBETYCZ7a9LZdj0c+PDaFsaSHMmDMPRVqSuuEmKKwThbt9LmdWRZ7HSoJ/ev78C r5Dw== MIME-Version: 1.0 Received: by 10.50.184.129 with SMTP id eu1mr13743igc.0.1349211001880; Tue, 02 Oct 2012 13:50:01 -0700 (PDT) Received: by 10.64.51.39 with HTTP; Tue, 2 Oct 2012 13:50:01 -0700 (PDT) In-Reply-To: <20121002193846.GX50433@FreeBSD.org> References: <201210021838.q92Ic55R085388@svn.freebsd.org> <20121002193846.GX50433@FreeBSD.org> Date: Tue, 2 Oct 2012 13:50:01 -0700 Message-ID: From: Garrett Cooper To: Gleb Smirnoff Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Wollman Subject: Re: svn commit: r241140 - 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, 02 Oct 2012 20:50:03 -0000 On Tue, Oct 2, 2012 at 12:38 PM, Gleb Smirnoff wrote: > On Tue, Oct 02, 2012 at 06:38:05PM +0000, Garrett Wollman wrote: > G> Author: wollman > G> Date: Tue Oct 2 18:38:05 2012 > G> New Revision: 241140 > G> URL: http://svn.freebsd.org/changeset/base/241140 > G> > G> Log: > G> Fix spelling of the function name in two assertion messages. > G> > G> Modified: > G> head/sys/kern/uipc_socket.c > G> > G> Modified: head/sys/kern/uipc_socket.c > G> ============================================================================== > G> --- head/sys/kern/uipc_socket.c Tue Oct 2 17:46:32 2012 (r241139) > G> +++ head/sys/kern/uipc_socket.c Tue Oct 2 18:38:05 2012 (r241140) > G> @@ -995,9 +995,9 @@ sosend_dgram(struct socket *so, struct s > G> int atomic = sosendallatonce(so) || top; > G> #endif > G> > G> - KASSERT(so->so_type == SOCK_DGRAM, ("sodgram_send: !SOCK_DGRAM")); > G> + KASSERT(so->so_type == SOCK_DGRAM, ("sosend_dgram: !SOCK_DGRAM")); > G> KASSERT(so->so_proto->pr_flags & PR_ATOMIC, > G> - ("sodgram_send: !PR_ATOMIC")); > G> + ("sosend_dgram: !PR_ATOMIC")); > G> > G> if (uio != NULL) > G> resid = uio->uio_resid; > > Why not to use just __func__ here? Just reiterating the argument that was posed before: it's harder to grep that way (even though, technically one could do better with __func__ and __LINE__, etc if they were truly looking for readability). Thanks, -Garrett From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 22:03:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FA3C10656D0; Tue, 2 Oct 2012 22:03:22 +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 100AB8FC12; Tue, 2 Oct 2012 22:03:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92M3Lxg011913; Tue, 2 Oct 2012 22:03:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92M3LBk011908; Tue, 2 Oct 2012 22:03:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210022203.q92M3LBk011908@svn.freebsd.org> From: Alexander Motin Date: Tue, 2 Oct 2012 22:03: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: r241144 - in head: share/man/man4 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: Tue, 02 Oct 2012 22:03:22 -0000 Author: mav Date: Tue Oct 2 22:03:21 2012 New Revision: 241144 URL: http://svn.freebsd.org/changeset/base/241144 Log: Implement SATA revision (speed) control for legacy SATA controller for both boot (via loader tunables) and run-time (via `camcontrol negotiate`). Tested to work at least on NVIDIA MCP55 chipset. H/w provided by: glebius Modified: head/share/man/man4/ata.4 head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-sata.c Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Tue Oct 2 19:10:19 2012 (r241143) +++ head/share/man/man4/ata.4 Tue Oct 2 22:03:21 2012 (r241144) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2012 +.Dd October 3, 2012 .Dt ATA 4 .Os .Sh NAME @@ -99,7 +99,7 @@ set to 0 to disable the 80pin cable chec set to 1 to allow Message Signalled Interrupts (MSI) to be used by the specified PCI ATA controller, if supported. .It Va hint.ata.X.devX.mode -limits the initial ATA mode for the specified device on specified the channel. +limits the initial ATA mode for the specified device on the specified channel. .It Va hint.ata.X.mode limits the initial ATA mode for every device on the specified channel. .It Va hint.ata.X.pm_level @@ -120,6 +120,12 @@ host initiates SLUMBER PM state transiti .El .Pp Modes 2 and 3 are only supported for AHCI. +.It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev +limits the initial SATA revision (speed) for the specified device +on the specified channel. +Values 1, 2 and 3 are respectively 1.5, 3 and 6Gbps. +.It Va hint.ata. Ns Ar X Ns Va .sata_rev +Same, but for every device on the specified channel. .El .Sh DESCRIPTION The Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Tue Oct 2 19:10:19 2012 (r241143) +++ head/sys/dev/ata/ata-all.c Tue Oct 2 22:03:21 2012 (r241144) @@ -172,6 +172,15 @@ ata_attach(device_t dev) TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); #ifdef ATA_CAM for (i = 0; i < 16; i++) { + ch->user[i].revision = 0; + snprintf(buf, sizeof(buf), "dev%d.sata_rev", i); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), buf, &mode) != 0 && + resource_int_value(device_get_name(dev), + device_get_unit(dev), "sata_rev", &mode) != 0) + mode = -1; + if (mode >= 0) + ch->user[i].revision = mode; ch->user[i].mode = 0; snprintf(buf, sizeof(buf), "dev%d.mode", i); if (resource_string_value(device_get_name(dev), Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Tue Oct 2 19:10:19 2012 (r241143) +++ head/sys/dev/ata/ata-all.h Tue Oct 2 22:03:21 2012 (r241144) @@ -142,6 +142,7 @@ #define ATA_SC_SPD_NO_SPEED 0x00000000 #define ATA_SC_SPD_SPEED_GEN1 0x00000010 #define ATA_SC_SPD_SPEED_GEN2 0x00000020 +#define ATA_SC_SPD_SPEED_GEN3 0x00000040 #define ATA_SC_IPM_MASK 0x00000f00 #define ATA_SC_IPM_NONE 0x00000000 Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Tue Oct 2 19:10:19 2012 (r241143) +++ head/sys/dev/ata/ata-sata.c Tue Oct 2 22:03:21 2012 (r241144) @@ -152,8 +152,12 @@ int ata_sata_phy_reset(device_t dev, int port, int quick) { struct ata_channel *ch = device_get_softc(dev); - int loop, retry; - uint32_t val; + int loop, retry, sata_rev; + uint32_t val, val1; + + sata_rev = ch->user[port < 0 ? 0 : port].revision; + if (sata_rev > 0) + quick = 0; if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) @@ -173,9 +177,18 @@ ata_sata_phy_reset(device_t dev, int por device_printf(dev, "p%d: hard reset ...\n", port); } } + if (sata_rev == 1) + val1 = ATA_SC_SPD_SPEED_GEN1; + else if (sata_rev == 2) + val1 = ATA_SC_SPD_SPEED_GEN2; + else if (sata_rev == 3) + val1 = ATA_SC_SPD_SPEED_GEN3; + else + val1 = 0; for (retry = 0; retry < 10; retry++) { for (loop = 0; loop < 10; loop++) { - if (ata_sata_scr_write(ch, port, ATA_SCONTROL, ATA_SC_DET_RESET)) + if (ata_sata_scr_write(ch, port, ATA_SCONTROL, ATA_SC_DET_RESET | + val1 | ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER)) goto fail; ata_udelay(100); if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) @@ -186,7 +199,7 @@ ata_sata_phy_reset(device_t dev, int por ata_udelay(5000); for (loop = 0; loop < 10; loop++) { if (ata_sata_scr_write(ch, port, ATA_SCONTROL, - ATA_SC_DET_IDLE | ((ch->pm_level > 0) ? 0 : + ATA_SC_DET_IDLE | val1 | ((ch->pm_level > 0) ? 0 : ATA_SC_IPM_DIS_PARTIAL | ATA_SC_IPM_DIS_SLUMBER))) goto fail; ata_udelay(100); From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 22:19:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36FE2106566B; Tue, 2 Oct 2012 22:19:38 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by mx1.freebsd.org (Postfix) with ESMTP id BED308FC0C; Tue, 2 Oct 2012 22:19:37 +0000 (UTC) Received: from c122-106-157-84.carlnfd1.nsw.optusnet.com.au (c122-106-157-84.carlnfd1.nsw.optusnet.com.au [122.106.157.84]) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q92MJYD8017365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Oct 2012 08:19:35 +1000 Date: Wed, 3 Oct 2012 08:19:34 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" In-Reply-To: <201210021900.q92J0uHT088549@svn.freebsd.org> Message-ID: <20121003075143.N938@besplex.bde.org> References: <201210021900.q92J0uHT088549@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241141 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Oct 2012 22:19:38 -0000 On Tue, 2 Oct 2012, Pedro F. Giffuni wrote: > Log: > RPC: Convert all uid and gid variables of the type uid_t and gid_t. > > This matches what upstream (OpenSolaris) does. > > Tested by: David Wolfskill > Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) > MFC after: 3 days This still assumes that uid_t and gid_t are precisely u_int, in stronger ways than before. > Modified: head/lib/libc/rpc/authunix_prot.c > ============================================================================== > --- head/lib/libc/rpc/authunix_prot.c Tue Oct 2 18:38:05 2012 (r241140) > +++ head/lib/libc/rpc/authunix_prot.c Tue Oct 2 19:00:56 2012 (r241141) > @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) > XDR *xdrs; > struct authunix_parms *p; > { > - int **paup_gids; > + gid_t **paup_gids; > > assert(xdrs != NULL); > assert(p != NULL); > @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) > > if (xdr_u_long(xdrs, &(p->aup_time)) > && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) > - && xdr_int(xdrs, &(p->aup_uid)) > - && xdr_int(xdrs, &(p->aup_gid)) > + && xdr_u_int(xdrs, &(p->aup_uid)) > + && xdr_u_int(xdrs, &(p->aup_gid)) > && xdr_array(xdrs, (char **) paup_gids, > &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { > return (TRUE); > xdr doesn't support arbitrary types. Here the very name of xdr_u_int() indicates that it only works on u_int's. Its second arg must be a pointer to u_int (misspelled unsigned in the man page, so it doesn't match the function name in a different, harmless way). The arg used to be a pointer to an int, and the call to xdr_int() used to match that. The arg is now a pointer to a uid_t or gid_t, and the call to xdr_u_int() only matches that accidentally. (The types happen to be uint32_t, which happens to be u_int.) More careful code would select an xdr translation function based on sizeof(uid_t) etc. The above xdr_array() call takes a element size arg that is necessary for stepping through the array, but isn't careful to use sizeof() on the correct type. It uses sizeof() on a hard-coded type, and you just changed the element type without changing the hard-coded type. It used to match (int == int), but now doesn't (int != gid_t). sizeof() should be applied to objects and not types to get the object size right without hard-coding its type. The first type of type error should be detected at compile time. The second one (the hard-coded sizeof(int)) probably cannot be. And there is yet another new type error in the xdr_array() call. It takes a pointer to a translation function. The function used to match the elemennt type, but now doesn't (int != gid_t, and also int != underlying type of gid_t == u_int). The API requires casting the pointer to a generic one using an obfuscated typedef, so the compiler cannot detect this type mismatch at compile time (without breaking the API generally). Bruce From owner-svn-src-head@FreeBSD.ORG Tue Oct 2 23:04:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0CCE106566C; Tue, 2 Oct 2012 23:04:12 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC64E8FC0A; Tue, 2 Oct 2012 23:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q92N4C1u019484; Tue, 2 Oct 2012 23:04:12 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q92N4CHB019481; Tue, 2 Oct 2012 23:04:12 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201210022304.q92N4CHB019481@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 2 Oct 2012 23:04: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: r241145 - head/sys/dev/mps X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 02 Oct 2012 23:04:13 -0000 Author: ken Date: Tue Oct 2 23:04:12 2012 New Revision: 241145 URL: http://svn.freebsd.org/changeset/base/241145 Log: Add casts to unbreak the i386 PAE build for the mps(4) driver. MFC after: 3 days Prompted by: Garrett Cooper Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Tue Oct 2 22:03:21 2012 (r241144) +++ head/sys/dev/mps/mps_sas.c Tue Oct 2 23:04:12 2012 (r241145) @@ -2730,7 +2730,7 @@ mpssas_send_smpcmd(struct mpssas_softc * bus_dma_segment_t *req_sg; req_sg = (bus_dma_segment_t *)ccb->smpio.smp_request; - request = (uint8_t *)req_sg[0].ds_addr; + request = (uint8_t *)(uintptr_t)req_sg[0].ds_addr; } else request = ccb->smpio.smp_request; @@ -2738,7 +2738,7 @@ mpssas_send_smpcmd(struct mpssas_softc * bus_dma_segment_t *rsp_sg; rsp_sg = (bus_dma_segment_t *)ccb->smpio.smp_response; - response = (uint8_t *)rsp_sg[0].ds_addr; + response = (uint8_t *)(uintptr_t)rsp_sg[0].ds_addr; } else response = ccb->smpio.smp_response; } else { From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 00:41:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23AE5106564A; Wed, 3 Oct 2012 00:41:47 +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 E9AB88FC15; Wed, 3 Oct 2012 00:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q930fkIw030096; Wed, 3 Oct 2012 00:41:46 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q930fk9r030075; Wed, 3 Oct 2012 00:41:46 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210030041.q930fk9r030075@svn.freebsd.org> From: Marcel Moolenaar Date: Wed, 3 Oct 2012 00:41: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: r241146 - head/contrib/bmake X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 00:41:47 -0000 Author: marcel Date: Wed Oct 3 00:41:46 2012 New Revision: 241146 URL: http://svn.freebsd.org/changeset/base/241146 Log: Merge bmake-20120831 from vendor/NetBSD/bmake/dist. Provenance: ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg Added: head/contrib/bmake/ - copied from r241077, vendor/NetBSD/bmake/dist/ From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 01:52:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F06BF1065670 for ; Wed, 3 Oct 2012 01:52:31 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm3-vm2.bullet.mail.ne1.yahoo.com (nm3-vm2.bullet.mail.ne1.yahoo.com [98.138.91.19]) by mx1.freebsd.org (Postfix) with SMTP id 72A3D8FC12 for ; Wed, 3 Oct 2012 01:52:31 +0000 (UTC) Received: from [98.138.90.52] by nm3.bullet.mail.ne1.yahoo.com with NNFMP; 03 Oct 2012 01:47:03 -0000 Received: from [98.138.226.124] by tm5.bullet.mail.ne1.yahoo.com with NNFMP; 03 Oct 2012 01:47:03 -0000 Received: from [127.0.0.1] by smtp203.mail.ne1.yahoo.com with NNFMP; 03 Oct 2012 01:47:03 -0000 X-Yahoo-Newman-Id: 103667.39632.bm@smtp203.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: BvwRHK0VM1mGHOwifzX1J.Sj_1TxxEn68J6GfEm2DGeeKAq kttTPVL3wuYGgYvAwZwoPL7M6L9bOllY_vAuCC.4v23ojHwKEqzZHQr5u6D6 Ggg1kbFlOz3B4pcgS_1VDNUciG2GcRjEt9vpvfPeR1wgYx24fhCXEttWIeXC 0DnUHbxNt_9.GJpLFCFYJ.i8zKp9a4kR2_kEQ.dYG_eNv6.bzrcSwvOonLvP ylQ9ng86.XPwbInPrHgMzOL_fzPoslcbiM1FZDIZeZHUQEgb4t7boH_CigNY V6C9u2AJmpLgePJHwXzTPIe1rQxXA1XQyHggAPPfoF1KpgfGv0cQU8l1I5mh d0gnXy0TQ34KNhlheEHBgPGcY9pH6.7IfuA0HdaGBB6hiAJAEYYvC9Ch0qQc z5YQeXkprdzSLOJsLrSDUKEiB1CH7KFjjlBV.kUbc9f18OMIlBYpW1ca5Bzr B1bGIS0ygz7k- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Received: from [192.168.10.101] (pfg@200.118.157.7 with plain) by smtp203.mail.ne1.yahoo.com with SMTP; 02 Oct 2012 18:47:02 -0700 PDT Message-ID: <506B991E.6010207@FreeBSD.org> Date: Tue, 02 Oct 2012 20:47:10 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120621 Thunderbird/13.0.1 MIME-Version: 1.0 To: Bruce Evans References: <201210021900.q92J0uHT088549@svn.freebsd.org> <20121003075143.N938@besplex.bde.org> In-Reply-To: <20121003075143.N938@besplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241141 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 01:52:32 -0000 Thank you Bruce; On 10/02/2012 17:19, Bruce Evans wrote: > On Tue, 2 Oct 2012, Pedro F. Giffuni wrote: > >> Log: >> RPC: Convert all uid and gid variables of the type uid_t and gid_t. >> >> This matches what upstream (OpenSolaris) does. >> >> Tested by: David Wolfskill >> Obtained from: Bull GNU/Linux NFSv4 project (libtirpc) >> MFC after: 3 days > > This still assumes that uid_t and gid_t are precisely u_int, in stronger > ways than before. > >> Modified: head/lib/libc/rpc/authunix_prot.c >> ============================================================================== >> >> --- head/lib/libc/rpc/authunix_prot.c Tue Oct 2 18:38:05 2012 >> (r241140) >> +++ head/lib/libc/rpc/authunix_prot.c Tue Oct 2 19:00:56 2012 >> (r241141) >> @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) >> XDR *xdrs; >> struct authunix_parms *p; >> { >> - int **paup_gids; >> + gid_t **paup_gids; >> >> assert(xdrs != NULL); >> assert(p != NULL); >> @@ -69,8 +69,8 @@ xdr_authunix_parms(xdrs, p) >> >> if (xdr_u_long(xdrs, &(p->aup_time)) >> && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) >> - && xdr_int(xdrs, &(p->aup_uid)) >> - && xdr_int(xdrs, &(p->aup_gid)) >> + && xdr_u_int(xdrs, &(p->aup_uid)) >> + && xdr_u_int(xdrs, &(p->aup_gid)) >> && xdr_array(xdrs, (char **) paup_gids, >> &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { >> return (TRUE); >> > > xdr doesn't support arbitrary types. Here the very name of xdr_u_int() > indicates that it only works on u_int's. Its second arg must be a > pointer to u_int (misspelled unsigned in the man page, so it doesn't > match the function name in a different, harmless way). The arg used > to be a pointer to an int, and the call to xdr_int() used to match that. > The arg is now a pointer to a uid_t or gid_t, and the call to xdr_u_int() > only matches that accidentally. (The types happen to be uint32_t, which > happens to be u_int.) > OK, to solve this I was thinking of adding a cast to uint32_t, but this is ugly and doesn't really do nothing. Looking at OpenSolaris they do a cast but more than a cosmetical fix it is a requirement because they still use xdr_int there. This sounds like a better approach for us too. > More careful code would select an xdr translation function based on > sizeof(uid_t) etc. > > The above xdr_array() call takes a element size arg that is necessary > for stepping through the array, but isn't careful to use sizeof() on > the correct type. It uses sizeof() on a hard-coded type, and you just > changed the element type without changing the hard-coded type. It used > to match (int == int), but now doesn't (int != gid_t). sizeof() should > be applied to objects and not types to get the object size right without > hard-coding its type. > Nice catch, that is certainly wrong, and libtirpc still has it. This isn't necessary when adopting the solution above though. > The first type of type error should be detected at compile time. The > second one (the hard-coded sizeof(int)) probably cannot be. And there > is yet another new type error in the xdr_array() call. It takes a > pointer to a translation function. The function used to match the > elemennt > type, but now doesn't (int != gid_t, and also int != underlying type > of gid_t == u_int). The API requires casting the pointer to a generic > one using an obfuscated typedef, so the compiler cannot detect this > type mismatch at compile time (without breaking the API generally). > I only changed authunix_create and its parameters, any other underlying issue is preexistent :). Pedro. From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 02:32:47 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE8DE106564A; Wed, 3 Oct 2012 02:32:47 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7E408FC12; Wed, 3 Oct 2012 02:32:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q932Wl3G044302; Wed, 3 Oct 2012 02:32:47 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q932Wlfs044296; Wed, 3 Oct 2012 02:32:47 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201210030232.q932Wlfs044296@svn.freebsd.org> From: Devin Teske Date: Wed, 3 Oct 2012 02:32: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: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 02:32:48 -0000 Author: dteske Date: Wed Oct 3 02:32:47 2012 New Revision: 241149 URL: http://svn.freebsd.org/changeset/base/241149 Log: Import sysutils/sysrc from the ports tree (current version 5.1). Importing disconnected under the WITH_BSDCONFIG flag (a good idea since this version of sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)). Multiple reasons sysrc should not simply continue to live in ports. The most important being that it is tightly coupled with the base. Approved by: adrian (co-mentor) Added: head/usr.sbin/sysrc/ head/usr.sbin/sysrc/Makefile (contents, props changed) head/usr.sbin/sysrc/sysrc (contents, props changed) head/usr.sbin/sysrc/sysrc.8 (contents, props changed) Modified: head/usr.sbin/Makefile head/usr.sbin/bsdconfig/share/sysrc.subr Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Wed Oct 3 01:18:51 2012 (r241148) +++ head/usr.sbin/Makefile Wed Oct 3 02:32:47 2012 (r241149) @@ -147,6 +147,7 @@ SUBDIR+= bluetooth .if ${MK_BSDCONFIG} != "no" SUBDIR+= bsdconfig +SUBDIR+= sysrc .endif .if ${MK_BSNMP} != "no" Modified: head/usr.sbin/bsdconfig/share/sysrc.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/sysrc.subr Wed Oct 3 01:18:51 2012 (r241148) +++ head/usr.sbin/bsdconfig/share/sysrc.subr Wed Oct 3 02:32:47 2012 (r241149) @@ -29,10 +29,10 @@ if [ ! "$_SYSRC_SUBR" ]; then _SYSRC_SUB ############################################################ INCLUDES BSDCFG_SHARE="/usr/share/bsdconfig" -. $BSDCFG_SHARE/common.subr || exit 1 +[ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1 BSDCFG_LIBE="/usr/libexec/bsdconfig" -f_include_lang $BSDCFG_LIBE/include/messages.subr +[ ! "$_SYSRC_JAILED" ] && f_include_lang $BSDCFG_LIBE/include/messages.subr ############################################################ CONFIGURATION Added: head/usr.sbin/sysrc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sysrc/Makefile Wed Oct 3 02:32:47 2012 (r241149) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +NO_OBJ= + +SCRIPTS= sysrc + +MAN= sysrc.8 + +beforeinstall: + mkdir -p ${DESTDIR}${SCRIPTSDIR} + mkdir -p ${DESTDIR}${MANDIR}8 + +.include Added: head/usr.sbin/sysrc/sysrc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sysrc/sysrc Wed Oct 3 02:32:47 2012 (r241149) @@ -0,0 +1,618 @@ +#!/bin/sh +#- +# Copyright (c) 2010-2012 Devin Teske +# 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$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +[ "$_COMMON_SUBR" ] || . $BSDCFG_SHARE/common.subr || exit 1 +[ "$_SYSRC_SUBR" ] || f_include $BSDCFG_SHARE/sysrc.subr + +############################################################ CONFIGURATION + +# +# Default verbosity. +# +: ${SYSRC_VERBOSE:=} + +############################################################ GLOBALS + +# +# Options +# +DELETE= +DESCRIBE= +IGNORE_UNKNOWNS= +JAIL= +QUIET= +ROOTDIR= +SHOW_ALL= +SHOW_EQUALS= +SHOW_FILE= +SHOW_NAME=1 +SHOW_VALUE=1 + +############################################################ FUNCTIONS + +# die [ $fmt [ $opts ... ]] +# +# Optionally print a message to stderr before exiting with failure status. +# +die() +{ + local fmt="$1" + [ $# -gt 0 ] && shift 1 + [ "$fmt" ] && f_err "$fmt\n" "$@" + + exit $FAILURE +} + +# usage +# +# Prints a short syntax statement and exits. +# +usage() +{ + f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + f_err "Try \`%s --help' for more information.\n" "$pgm" + die +} + +# help +# +# Prints a full syntax statement and exits. +# +help() +{ + local optfmt="\t%-11s%s\n" + local envfmt="\t%-17s%s\n" + + f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + + f_err "OPTIONS:\n" + f_err "$optfmt" "-a" \ + "Dump a list of all non-default configuration variables." + f_err "$optfmt" "-A" \ + "Dump a list of all configuration variables (incl. defaults)." + f_err "$optfmt" "-d" \ + "Print a description of the given variable." + f_err "$optfmt" "-D" \ + "Show default value(s) only (this is the same as setting" + f_err "$optfmt" "" \ + "RC_CONFS to NULL or passing \`-f' with a NULL file-argument)." + f_err "$optfmt" "-e" \ + "Print query results as \`var=value' (useful for producing" + f_err "$optfmt" "" \ + "output to be fed back in). Ignored if \`-n' is specified." + f_err "$optfmt" "-f file" \ + "Operate on the specified file(s) instead of rc_conf_files." + f_err "$optfmt" "" \ + "Can be specified multiple times for additional files." + f_err "$optfmt" "-F" \ + "Show only the last rc.conf(5) file each directive is in." + f_err "$optfmt" "-h" \ + "Print a short usage statement to stderr and exit." + f_err "$optfmt" "--help" \ + "Print this message to stderr and exit." + f_err "$optfmt" "-i" \ + "Ignore unknown variables." + f_err "$optfmt" "-j jail" \ + "The jid or name of the jail to operate within (overrides" + f_err "$optfmt" "" \ + "\`-R dir'; requires jexec(8))." + f_err "$optfmt" "-n" \ + "Show only variable values, not their names." + f_err "$optfmt" "-N" \ + "Show only variable names, not their values." + f_err "$optfmt" "-q" \ + "Quiet. Ignore previous \`-v' and/or SYSRC_VERBOSE." + f_err "$optfmt" "-R dir" \ + "Operate within the root directory \`dir' rather than \`/'." + f_err "$optfmt" "-v" \ + "Verbose. Print the pathname of the specific rc.conf(5)" + f_err "$optfmt" "" \ + "file where the directive was found." + f_err "$optfmt" "-x" \ + "Remove variable(s) from specified file(s)." + f_err "\n" + + f_err "ENVIRONMENT:\n" + f_err "$envfmt" "RC_CONFS" \ + "Override default rc_conf_files (even if set to NULL)." + f_err "$envfmt" "RC_DEFAULTS" \ + "Location of \`/etc/defaults/rc.conf' file." + f_err "$envfmt" "SYSRC_VERBOSE" \ + "Default verbosity. Set to non-NULL to enable." + + die +} + +# jail_depend +# +# Dump dependencies such as language-file variables and include files to stdout +# to be piped-into sh(1) running via jexec(8)/chroot(8). As a security measure, +# this prevents existing language files and library files from being loaded in +# the jail. This also relaxes the requirement to have these files in every jail +# before sysrc can be used on said jail. +# +jail_depend() +{ + # + # Indicate that we are jailed + # + echo export _SYSRC_JAILED=1 + + # + # Print i18n language variables (their current values are sanitized + # and re-printed for interpretation so that the i18n language files + # do not need to exist within the jail). + # + local var val + for var in \ + msg_cannot_create_permission_denied \ + msg_permission_denied \ + msg_previous_syntax_errors \ + ; do + val=$( eval echo \"\$$var\" | + awk '{ gsub(/'\''/, "'\''\\'\'\''"); print }' ) + echo $var="'$val'" + done + + # + # Print include dependencies + # + cat $BSDCFG_SHARE/common.subr + cat $BSDCFG_SHARE/sysrc.subr +} + +############################################################ MAIN SOURCE + +# +# Perform sanity checks +# +[ $# -gt 0 ] || usage + +# +# Check for `--help' command-line option +# +( # Operate in sub-shell to protect $@ in parent + while [ $# -gt 0 ]; do + case "$1" in + --help) exit 1;; + -[fRj]) # These flags take an argument + shift 1;; + esac + shift 1 + done + exit 0 +) || help + +# +# Process command-line flags +# +while getopts aAdDef:Fhij:nNqR:vxX flag; do + case "$flag" in + a) SHOW_ALL=${SHOW_ALL:-1};; + A) SHOW_ALL=2;; + d) DESCRIBE=1;; + D) RC_CONFS=;; + e) SHOW_EQUALS=1;; + f) RC_CONFS="$RC_CONFS${RC_CONFS:+ }$OPTARG";; + F) SHOW_FILE=1;; + h) usage;; + i) IGNORE_UNKNOWNS=1;; + j) [ "$OPTARG" ] || die \ + "%s: Missing or null argument to \`-j' flag" "$pgm" + JAIL="$OPTARG";; + n) SHOW_NAME=;; + N) SHOW_VALUE=;; + q) QUIET=1 SYSRC_VERBOSE=;; + R) [ "$OPTARG" ] || die \ + "%s: Missing or null argument to \`-R' flag" "$pgm" + ROOTDIR="$OPTARG";; + v) SYSRC_VERBOSE=1 QUIET=;; + x) DELETE=${DELETE:-1};; + X) DELETE=2;; + \?) usage;; + esac +done +shift $(( $OPTIND - 1 )) + +# +# [More] Sanity checks (e.g., "sysrc --") +# +[ $# -eq 0 -a ! "$SHOW_ALL" ] && usage + +# +# Taint-check all rc.conf(5) files +# +errmsg="$pgm: Exiting due to previous syntax errors" +if ( : ${RC_CONFS?} ) > /dev/null 2>&1; then + ( for i in $RC_CONFS; do + [ -e "$i" ] || continue + /bin/sh -n "$i" || exit $FAILURE + done + exit $SUCCESS + ) || die "$errmsg" +else + /bin/sh -n "$RC_DEFAULTS" || die "$errmsg" + ( . "$RC_DEFAULTS" + for i in $rc_conf_files; do + [ -e "$i" ] || continue + /bin/sh -n "$i" || exit $FAILURE + done + exit $SUCCESS + ) || die "$errmsg" +fi + +# +# Process `-x' (and secret `-X') command-line options +# +errmsg="$pgm: \`-x' option incompatible with \`-a'/\`-A' options" +errmsg="$errmsg (use \`-X' to override)" +if [ "$DELETE" -a "$SHOW_ALL" ]; then + [ "$DELETE" = "2" ] || die "$errmsg" +fi + +# +# Process `-e', `-n', and `-N' command-line options +# +SEP=': ' +[ "$SHOW_EQUALS" ] && SEP='="' +[ "$SHOW_NAME" ] || SHOW_EQUALS= +[ "$SYSRC_VERBOSE" = "0" ] && SYSRC_VERBOSE= +if [ ! "$SHOW_VALUE" ]; then + SHOW_NAME=1 + SHOW_EQUALS= +fi + +# +# Process `-j jail' and `-R dir' command-line options +# +if [ "$JAIL" -o "$ROOTDIR" ]; then + # + # Reconstruct the arguments that we want to carry-over + # + args=" + ${SYSRC_VERBOSE:+-v} + ${QUIET:+-q} + $( [ "$DELETE" = "1" ] && echo \ -x ) + $( [ "$DELETE" = "2" ] && echo \ -X ) + $( [ "$SHOW_ALL" = "1" ] && echo \ -a ) + $( [ "$SHOW_ALL" = "2" ] && echo \ -A ) + ${DESCRIBE:+-d} + ${SHOW_EQUALS:+-e} + ${IGNORE_UNKNOWNS:+-i} + $( [ "$SHOW_NAME" ] || echo \ -n ) + $( [ "$SHOW_VALUE" ] || echo \ -N ) + $( [ "$SHOW_FILE" ] && echo \ -F ) + " + if ( : ${RC_CONFS?} ) > /dev/null 2>&1; then + args="$args -f '$RC_CONFS'" + fi + for arg in "$@"; do + args="$args '$arg'" + done + + # + # If both are supplied, `-j jail' supercedes `-R dir' + # + if [ "$JAIL" ]; then + # + # Re-execute ourselves with sh(1) via jexec(8) + # + ( echo set -- $args + jail_depend + cat $0 + ) | env - RC_DEFAULTS="$RC_DEFAULTS" \ + /usr/sbin/jexec "$JAIL" /bin/sh + exit $? + elif [ "$ROOTDIR" ]; then + # + # Make sure that the root directory specified is not to any + # running jails. + # + # NOTE: To maintain backward compatibility with older jails on + # older systems, we will not perform this check if either the + # jls(1) or jexec(8) utilities are missing. + # + if f_have jexec && f_have jls; then + jid="`jls jid path | \ + ( + while read JID JROOT; do + [ "$JROOT" = "$ROOTDIR" ] || continue + echo $JID + done + )`" + + # + # If multiple running jails match the specified root + # directory, exit with error. + # + if [ "$jid" -a "${jid%[$IFS]*}" != "$jid" ]; then + die "%s: %s: %s" "$pgm" "$ROOTDIR" \ + "$( echo "Multiple jails claim this" \ + "directory as their root." \ + "(use \`-j jail' instead)" )" + fi + + # + # If only a single running jail matches the specified + # root directory, implicitly use `-j jail'. + # + if [ "$jid" ]; then + # + # Re-execute outselves with sh(1) via jexec(8) + # + ( echo set -- $args + jail_depend + cat $0 + ) | env - RC_DEFAULTS="$RC_DEFAULTS" \ + /usr/sbin/jexec "$jid" /bin/sh + exit $? + fi + + # Otherwise, fall through and allow chroot(8) + fi + + # + # Re-execute ourselves with sh(1) via chroot(8) + # + ( echo set -- $args + jail_depend + cat $0 + ) | env - RC_DEFAULTS="$RC_DEFAULTS" \ + /usr/sbin/chroot "$ROOTDIR" /bin/sh + exit $? + fi +fi + +# +# Process `-a' or `-A' command-line options +# +if [ "$SHOW_ALL" ]; then + # + # Get a list of variables that are currently set in the rc.conf(5) + # files (included `/etc/defaults/rc.conf') by performing a call to + # source_rc_confs() in a clean environment. + # + ( # Operate in a sub-shell to protect the parent environment + # + # Set which variables we want to preserve in the environment. + # Append the pipe-character (|) to the list of internal field + # separation (IFS) characters, allowing us to use the below + # list both as an extended grep (-E) pattern and argument list + # (required to first get f_clean_env() to preserve these in the + # environment and then later to prune them from the list of + # variables produced by set(1)). + # + IFS="$IFS|" + EXCEPT="IFS|EXCEPT|PATH|RC_DEFAULTS|OPTIND|DESCRIBE|SEP" + EXCEPT="$EXCEPT|DELETE|SHOW_ALL|SHOW_EQUALS|SHOW_NAME" + EXCEPT="$EXCEPT|SHOW_VALUE|SHOW_FILE|SYSRC_VERBOSE|RC_CONFS" + EXCEPT="$EXCEPT|pgm|SUCCESS|FAILURE" + EXCEPT="$EXCEPT|f_sysrc_desc_awk|f_sysrc_delete_awk" + + # + # Clean the environment (except for our required variables) + # and then source the required files. + # + f_clean_env --except $EXCEPT + if [ -f "$RC_DEFAULTS" -a -r "$RC_DEFAULTS" ]; then + . "$RC_DEFAULTS" + + # + # If passed `-a' (rather than `-A'), re-purge the + # environment, removing the rc.conf(5) defaults. + # + [ "$SHOW_ALL" = "1" ] \ + && f_clean_env --except rc_conf_files $EXCEPT + + # + # If `-f file' was passed, set $rc_conf_files to an + # explicit value, modifying the default behavior of + # source_rc_confs(). + # + ( : ${RC_CONFS?} ) > /dev/null 2>&1 && + rc_conf_files="$RC_CONFS" + + source_rc_confs + + # + # If passed `-a' (rather than `-A'), remove + # `rc_conf_files' unless it was defined somewhere + # other than rc.conf(5) defaults. + # + [ "$SHOW_ALL" = "1" -a \ + "$( f_sysrc_find rc_conf_files )" = "$RC_DEFAULTS" \ + ] \ + && unset rc_conf_files + fi + + for NAME in $( set | + awk -F= '/^[[:alpha:]_][[:alnum:]_]*=/ {print $1}' | + grep -Ev "^($EXCEPT)$" + ); do + # + # If enabled, describe rather than expand value + # + if [ "$DESCRIBE" ]; then + echo "$NAME: $( f_sysrc_desc "$NAME" )" + continue + fi + + # + # If `-F' is passed, find it and move on + # + if [ "$SHOW_FILE" ]; then + [ "$SHOW_NAME" ] && echo -n "$NAME: " + f_sysrc_find "$NAME" + continue + fi + + # + # If `-X' is passed, delete the variables + # + if [ "$DELETE" = "2" ]; then + f_sysrc_delete "$NAME" + continue + fi + + [ "$SYSRC_VERBOSE" ] && \ + echo -n "$( f_sysrc_find "$NAME" ): " + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + continue + fi + + echo "${SHOW_NAME:+$NAME$SEP}$( + f_sysrc_get "$NAME" )${SHOW_EQUALS:+\"}" + + done + ) + + # + # Ignore the remainder of positional arguments. + # + exit $SUCCESS +fi + +# +# Process command-line arguments +# +while [ $# -gt 0 ]; do + NAME="${1%%=*}" + + [ "$DESCRIBE" ] && \ + echo "$NAME: $( f_sysrc_desc "$NAME" )" + + case "$1" in + *=*) + # + # Like sysctl(8), if both `-d' AND "name=value" is passed, + # first describe, then attempt to set + # + + if [ "$SYSRC_VERBOSE" ]; then + file=$( f_sysrc_find "$NAME" ) + [ "$file" = "$RC_DEFAULTS" -o ! "$file" ] && \ + file=$( f_sysrc_get 'rc_conf_files%%[$IFS]*' ) + echo -n "$file: " + fi + + # + # If `-x' or `-X' is passed, delete the variable and ignore the + # desire to set some value + # + if [ "$DELETE" ]; then + f_sysrc_delete "$NAME" + shift 1 + continue + fi + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + f_sysrc_set "$NAME" "${1#*}" + else + if [ "$SHOW_FILE" ]; then + before=$( f_sysrc_find "$NAME" ) + else + before=$( f_sysrc_get "$NAME" ) + fi + if f_sysrc_set "$NAME" "${1#*=}"; then + if [ "$SHOW_FILE" ]; then + after=$( f_sysrc_find "$NAME" ) + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo -n "$before${SHOW_EQUALS:+\"}" + echo " -> $after" + else + after=$( f_sysrc_get "$NAME" ) + echo -n "${SHOW_NAME:+$NAME$SEP}" + echo "$before -> $after" + fi + fi + fi + ;; + *) + if ! IGNORED="$( f_sysrc_get "$NAME?" )"; then + [ "$IGNORE_UNKNOWNS" ] \ + || echo "$pgm: unknown variable '$NAME'" + shift 1 + continue + fi + + # + # Like sysctl(8), when `-d' is passed, + # desribe it rather than expanding it + # + + if [ "$DESCRIBE" ]; then + shift 1 + continue + fi + + # + # If `-x' or `-X' is passed, delete the variable + # + if [ "$DELETE" ]; then + f_sysrc_delete "$NAME" + shift 1 + continue + fi + + # + # If `-F' is passed, find it and move on + # + if [ "$SHOW_FILE" ]; then + [ "$SHOW_NAME" ] && echo -n "$NAME: " + f_sysrc_find "$NAME" + shift 1 + continue + fi + + [ "$SYSRC_VERBOSE" ] && \ + echo -n "$( f_sysrc_find "$NAME" ): " + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + else + echo "${SHOW_NAME:+$NAME$SEP}$( + f_sysrc_get "$NAME" )${SHOW_EQUALS:+\"}" + fi + esac + shift 1 +done Added: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 02:32:47 2012 (r241149) @@ -0,0 +1,290 @@ +.\" Copyright (c) 2011-2012 Devin Teske +.\" 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 Aug 24, 2012 +.Dt SYSRC 8 +.Os +.Sh NAME +.Nm sysrc +.Nd safely edit system rc files +.Sh SYNOPSIS +.Nm +.Op Fl dDeFhinNqvx +.Op Fl f Ar file +.Op Fl j Ar jail | Fl R Ar dir +.Ar name Ns Op = Ns Ar value +.Ar ... +.Nm +.Op Fl dDeFhinNqvx +.Op Fl f Ar file +.Op Fl j Ar jail | Fl R Ar dir +.Fl a | A +.Sh DESCRIPTION +The +.Nm +utility retrieves +.Xr rc.conf 5 +variables from the collection of system rc files and allows processes with +appropriate privilege to change values in a safe and effective manner. +.Pp +The following options are available: +.Bl -tag -width indent+ +.It Fl a +Dump a list of all non-default configuration variables. +.It Fl A +Dump a list of all configuration variables +.Pq incl. defaults . +.It Fl d +Print a description of the given variable. +.It Fl D +Show default value(s) only (this is the same as setting RC_CONFS to NULL or +passing `-f' with a NULL file-argument). +.It Fl e +Print query results as +.Ql var=value +.Pq useful for producing output to be fed back in . +Ignored if +.Fl n +is specified. +.It Fl f Ar file +Operate on the specified file(s) instead of the files obtained by reading the +.Sq rc_conf_files +entry in the +.Ev RC_DEFAULTS +file. +This option can be specified multiple times for additional files. +.It Fl F +Show only the last +.Xr rc.conf 5 +file each directive is in. +.It Fl h +Print a short usage message to stderr and exit. +.It Fl -help +Print a full usage statement to stderr and exit. +.It Fl i +Ignore unknown variables. +.It Fl j Ar jail +The +.Ar jid +or name of the +.Ar jail +to operate within +.Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . +.It Fl n +Show only variable values, not their names. +.It Fl N +Show only variable names, not their values. +.It Fl q +Quiet. Ignore previous +.Fl v +and/or +.Ev SYSRC_VERBOSE . +.It Fl R Ar dir +Operate within the root directory +.Pq Sq Ar dir +rather than +.Pq Sq / . +.It Fl v +Verbose. Print the pathname of the specific +.Xr rc.conf 5 +file where the directive was found. +.It Fl x +Remove variable(s) from specified file(s). +.El +.Pp +This utility works similar to +.Xr sysctl 8 . +It shares the `-e' and `-n' options +.Pq detailed above +and also has the same +.Ql name[=value] +syntax for querying/setting configuration options. +.Pp +However, while +.Xr sysctl 8 +serves to query/modify MIBs in the entrant kernel, +.Xr sysrc 8 +instead works on values in the system +.Xr rc.conf 5 +configuration files. +.Pp +The list of system configuration files is configured in the file +.Ql /etc/defaults/rc.conf +within the variable +.Ql rc_conf_files , +which by-default contains a space-separated list of pathnames. On all FreeBSD +systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each +pathname is sourced in-order upon startup. It is in the same fashion that +.Nm +sources the configuration files before returning the value of the given +variable. +.Pp +When supplied a variable name, +.Nm +will return the value of the variable. If the variable does not appear in any +of the configured +.Ql rc_conf_files , +an error is printed and error status is returned. +.Pp +When changing values of a given variable, it does not matter if the variable +appears in any of the +.Ql rc_conf_files +or not. If the variable does not appear in any of the files, it is appended to +the end of the first pathname in the +.Ql rc_conf_files +variable. Otherwise, +.Nm +will replace only the last-occurrence in the last-file found to contain the +variable. This gets the value to take effect next boot without heavily +modifying these integral files (yet taking care not to allow the file to +grow unwieldy should +.Nm +be called repeatedly). +.Sh ENVIRONMENT +The following environment variables are referenced by +.Nm : +.Bl -tag -width ".Ev SYSRC_VERBOSE" +.It Ev RC_CONFS +Override default +.Ql rc_conf_files +.Pq even if set to NULL . +.It Ev RC_DEFAULTS +Location of +.Ql /etc/defaults/rc.conf +file. +.It Ev SYSRC_VERBOSE +Default verbosity. Set to non-NULL to enable. +.El +.Sh DEPENDENCIES +The following standard commands are required by +.Nm : +.Pp +.Xr awk 1 , +.Xr cat 1 , +.Xr chmod 1 , +.Xr chown 8 , +.Xr env 1 , +.Xr grep 1 , +.Xr jexec 8 , +.Xr jls 1 , +.Xr mktemp 1 , +.Xr mv 1 , +.Xr rm 1 , +.Xr sh 1 , +.Xr stat 1 , +.Xr tail 1 +.Sh FILES +.Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact +.It Pa /etc/defaults/rc.conf +.It Pa /etc/rc.conf +.It Pa /etc/rc.conf.local +.El +.Sh EXAMPLES +Below are some simple examples of how +.Nm +can be used to query certain values from the +.Xr rc.conf 5 +collection of system configuration files: +.Pp +.Nm +sshd_enable +.Dl returns the value of $sshd_enable, usually YES or NO . +.Pp +.Nm +defaultrouter +.Dl returns IP address of default router Pq if configured . +.Pp +Working on other files, such as +.Xr crontab 5 : +.Pp +.Nm +-f /etc/crontab MAILTO +.Dl returns the value of the MAILTO setting Pq if configured . +.Pp +In addition to the above syntax, +.Nm +also supports inline +.Xr sh 1 +PARAMETER expansion for changing the way values are reported, shown below: +.Pp +.Nm +\&'hostname%%.*' +.Dl returns $hostname up to (but not including) first `.' . +.Pp +.Nm +\&'network_interfaces%%[$IFS]*' +.Dl returns first word of $network_interfaces . +.Pp +.Nm +\&'ntpdate_flags##*[$IFS]' +.Dl returns last word of $ntpdate_flags (time server address) . +.Pp +.Nm +usbd_flags-"default" +.Dl returns $usbd_flags or "default" if unset or NULL . +.Pp +.Nm +cloned_interfaces+"alternate" +.Dl returns "alternate" if $cloned_interfaces is set . +.Pp +.Nm +\&'#kern_securelevel' +.Dl returns length in characters of $kern_securelevel . +.Pp +.Nm +\&'hostname?' +.Dl returns NULL and error status 2 if $hostname is unset Pq or if set, returns the value of $hostname with no error status . +.Pp +.Nm +\&'hostname:?' +.Dl returns NULL and error status 2 if $hostname is unset or NULL Pq or if set and non-NULL, returns value without error status . +.Sh LIMITATIONS +The +.Nm +utility presently does not support the +.Ql rc.conf.d +collection of system configuration files +.Pq which requires a service name to be known during execution . +.Pp +This will be corrected by a future enhancement. +.Sh SEE ALSO +.Xr jail 8 , +.Xr jexec 8 , +.Xr jls 1 , +.Xr rc 8 , +.Xr rc.conf 5 , +.Xr sysctl 8 +.Sh HISTORY +A +.Nm +utility first appeared in +.Bx 10.0 . +.Sh AUTHORS +.An Devin Teske Aq dteske@FreeBSD.org +.Sh THANKS TO +Brandon Gooch, Garrett Cooper, Julian Elischer, Pawel Jakub Dawidek, +Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, and Jilles Tjoelker +for suggestions and help. From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 03:20:58 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80D871065670; Wed, 3 Oct 2012 03:20:58 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 3DFCD8FC0A; Wed, 3 Oct 2012 03:20:58 +0000 (UTC) Received: from lstewart.caia.swin.edu.au (lstewart.caia.swin.edu.au [136.186.229.95]) by lauren.room52.net (Postfix) with ESMTPSA id 60D667E84A; Wed, 3 Oct 2012 13:20:56 +1000 (EST) Message-ID: <506BAF17.7080903@freebsd.org> Date: Wed, 03 Oct 2012 13:20:55 +1000 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:14.0) Gecko/20120814 Thunderbird/14.0 MIME-Version: 1.0 To: Martin Matuska References: <201202231851.q1NIpOxH018329@svn.freebsd.org> In-Reply-To: <201202231851.q1NIpOxH018329@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.0 required=5.0 tests=UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r232059 - in head: sys/fs/devfs sys/fs/nullfs sys/kern sys/sys usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 03:20:58 -0000 Hi Martin, On 02/24/12 05:51, Martin Matuska wrote: > Author: mm > Date: Thu Feb 23 18:51:24 2012 > New Revision: 232059 > URL: http://svn.freebsd.org/changeset/base/232059 > > Log: > To improve control over the use of mount(8) inside a jail(8), introduce > a new jail parameter node with the following parameters: > > allow.mount.devfs: > allow mounting the devfs filesystem inside a jail > > allow.mount.nullfs: > allow mounting the nullfs filesystem inside a jail > > Both parameters are disabled by default (equals the behavior before > devfs and nullfs in jails). Administrators have to explicitly allow > mounting devfs and nullfs for each jail. The value "-1" of the > devfs_ruleset parameter is removed in favor of the new allow setting. > > Reviewed by: jamie > Suggested by: pjd > MFC after: 2 weeks Is there any reason this and the other related commits (e.g. r232186, 232247,232278,232291,230129 and maybe others I missed) haven't been MFCed to stable/8? I'm seeing an interesting bug on an 8.3-STABLE (built mid August) machine whereby a zfs dataset with jailed=on can be managed and mounted inside the jail with enable_statfs=1, but shows up in the primary host's mount list instead of the jail's. I then can't zfs unmount the filesystem from within the jail or the primary host. The same set up works fine on 9.1-RC1. Would you mind MFCing all relevant jail-related ZFS commits to stable/8 which are currently only in 9 and head? Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 03:44:24 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EA1106566B; Wed, 3 Oct 2012 03:44:24 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 601248FC0C; Wed, 3 Oct 2012 03:44:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q933iOVo054465; Wed, 3 Oct 2012 03:44:24 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q933iOdn054463; Wed, 3 Oct 2012 03:44:24 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210030344.q933iOdn054463@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 3 Oct 2012 03:44: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: r241152 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 03:44:24 -0000 Author: pfg Date: Wed Oct 3 03:44:23 2012 New Revision: 241152 URL: http://svn.freebsd.org/changeset/base/241152 Log: rpc: convert all uid and gid variables of the type uid_t and gid_t. As part of the previous commit, uses of xdr_int() were replaced with xdr_u_int(). This has undesired effects as the second argument doesn't match exactly uid_t or gid_t. It also breaks assumptions in the size of the provided types. To work around those issues we revert back to the use of xdr_int() but provide proper casting so the behaviour doesn't change. While here fix a style issue in the affected lines. Reported by: bde Modified: head/lib/libc/rpc/authunix_prot.c Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:00:37 2012 (r241151) +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:44:23 2012 (r241152) @@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p) paup_gids = &p->aup_gids; - if (xdr_u_long(xdrs, &(p->aup_time)) - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) - && xdr_u_int(xdrs, &(p->aup_uid)) - && xdr_u_int(xdrs, &(p->aup_gid)) - && xdr_array(xdrs, (char **) paup_gids, + if (xdr_u_long(xdrs, &(p->aup_time)) && + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && + xdr_int(xdrs, (int *) &(p->aup_uid)) && + xdr_int(xdrs, (int *) &(p->aup_gid)) && + xdr_array(xdrs, (char **) paup_gids, &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { return (TRUE); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 04:46:59 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AE39106564A; Wed, 3 Oct 2012 04:46:59 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7F78FC12; Wed, 3 Oct 2012 04:46:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q934kwko064504; Wed, 3 Oct 2012 04:46:58 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q934kwKO064502; Wed, 3 Oct 2012 04:46:58 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201210030446.q934kwKO064502@svn.freebsd.org> From: "Andrey A. Chernov" Date: Wed, 3 Oct 2012 04:46: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: r241154 - head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 04:46:59 -0000 Author: ache Date: Wed Oct 3 04:46:58 2012 New Revision: 241154 URL: http://svn.freebsd.org/changeset/base/241154 Log: Optimize prev. commit for speed. 1) Don't iterate the loop from the environment array beginning each time, iterate it under the last place we deactivate instead. 2) Call __rebuild_environ() not on each iteration but once, only at the end of whole loop (of course, only in case if something is changed). MFC after: 1 week Modified: head/lib/libc/stdlib/getenv.c Modified: head/lib/libc/stdlib/getenv.c ============================================================================== --- head/lib/libc/stdlib/getenv.c Wed Oct 3 04:22:39 2012 (r241153) +++ head/lib/libc/stdlib/getenv.c Wed Oct 3 04:46:58 2012 (r241154) @@ -662,6 +662,7 @@ unsetenv(const char *name) { int envNdx; size_t nameLen; + int newEnvActive; /* Check for malformed name. */ if (name == NULL || (nameLen = __strleneq(name)) == 0) { @@ -674,15 +675,18 @@ unsetenv(const char *name) return (-1); /* Deactivate specified variable. */ - envNdx = envVarsTotal - 1; /* Remove all occurrences. */ + envNdx = envVarsTotal - 1; + newEnvActive = envActive; while (__findenv(name, nameLen, &envNdx, true) != NULL) { envVars[envNdx].active = false; if (envVars[envNdx].putenv) __remove_putenv(envNdx); - __rebuild_environ(envActive - 1); - envNdx = envVarsTotal - 1; + envNdx--; + newEnvActive--; } + if (newEnvActive != envActive) + __rebuild_environ(newEnvActive); return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 05:06:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1CE94106566B; Wed, 3 Oct 2012 05:06:46 +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 055858FC0A; Wed, 3 Oct 2012 05:06:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9356jT6067585; Wed, 3 Oct 2012 05:06:45 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9356jkU067582; Wed, 3 Oct 2012 05:06:45 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210030506.q9356jkU067582@svn.freebsd.org> From: Alan Cox Date: Wed, 3 Oct 2012 05:06: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: r241155 - 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: Wed, 03 Oct 2012 05:06:46 -0000 Author: alc Date: Wed Oct 3 05:06:45 2012 New Revision: 241155 URL: http://svn.freebsd.org/changeset/base/241155 Log: Tidy up a bit: Update some of the comments. In particular, use "sleep" in preference to "block" where appropriate. Eliminate some unnecessary casts. Make a few whitespace changes for consistency. Reviewed by: kib MFC after: 3 days Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Oct 3 04:46:58 2012 (r241154) +++ head/sys/vm/vm_page.c Wed Oct 3 05:06:45 2012 (r241155) @@ -851,11 +851,10 @@ vm_page_splay(vm_pindex_t pindex, vm_pag * * The pagetables are not updated but will presumably fault the page * in if necessary, or if a kernel page the caller will at some point - * enter the page into the kernel's pmap. We are not allowed to block + * enter the page into the kernel's pmap. We are not allowed to sleep * here so we *can't* do this anyway. * - * The object and page must be locked. - * This routine may not block. + * The object must be locked. */ void vm_page_insert(vm_page_t m, vm_object_t object, vm_pindex_t pindex) @@ -899,14 +898,15 @@ vm_page_insert(vm_page_t m, vm_object_t object->root = m; /* - * show that the object has one more resident page. + * Show that the object has one more resident page. */ object->resident_page_count++; + /* * Hold the vnode until the last page is released. */ if (object->resident_page_count == 1 && object->type == OBJT_VNODE) - vhold((struct vnode *)object->handle); + vhold(object->handle); /* * Since we are inserting a new and possibly dirty page, @@ -918,15 +918,14 @@ vm_page_insert(vm_page_t m, vm_object_t /* * vm_page_remove: - * NOTE: used by device pager as well -wfj * * Removes the given mem entry from the object/offset-page * table and the object page list, but do not invalidate/terminate * the backing store. * - * The object and page must be locked. * The underlying pmap entry (if any) is NOT removed here. - * This routine may not block. + * + * The object must be locked. The page must be locked if it is managed. */ void vm_page_remove(vm_page_t m) @@ -989,11 +988,12 @@ vm_page_remove(vm_page_t m) * And show that the object has one fewer resident page. */ object->resident_page_count--; + /* * The vnode may now be recycled. */ if (object->resident_page_count == 0 && object->type == OBJT_VNODE) - vdrop((struct vnode *)object->handle); + vdrop(object->handle); m->object = NULL; } @@ -1005,8 +1005,6 @@ vm_page_remove(vm_page_t m) * pair specified; if none is found, NULL is returned. * * The object must be locked. - * This routine may not block. - * This is a critical path routine */ vm_page_t vm_page_lookup(vm_object_t object, vm_pindex_t pindex) @@ -1029,7 +1027,6 @@ vm_page_lookup(vm_object_t object, vm_pi * greater than or equal to the parameter pindex, or NULL. * * The object must be locked. - * The routine may not block. */ vm_page_t vm_page_find_least(vm_object_t object, vm_pindex_t pindex) @@ -1089,9 +1086,6 @@ vm_page_prev(vm_page_t m) * Move the given memory entry from its * current object to the specified target object/offset. * - * The object must be locked. - * This routine may not block. - * * Note: swap associated with the page must be invalidated by the move. We * have to do this for several reasons: (1) we aren't freeing the * page, (2) we are dirtying the page, (3) the VM system is probably @@ -1103,6 +1097,8 @@ vm_page_prev(vm_page_t m) * swap. If the page is on the cache, we have to deactivate it * or vm_page_dirty() will panic. Dirty pages are not allowed * on the cache. + * + * The objects must be locked. The page must be locked if it is managed. */ void vm_page_rename(vm_page_t m, vm_object_t new_object, vm_pindex_t new_pindex) @@ -1828,7 +1824,7 @@ vm_page_alloc_freelist(int flind, int re /* * vm_wait: (also see VM_WAIT macro) * - * Block until free pages are available for allocation + * Sleep until free pages are available for allocation. * - Called in various places before memory allocations. */ void @@ -1853,7 +1849,7 @@ vm_wait(void) /* * vm_waitpfault: (also see VM_WAITPFAULT macro) * - * Block until free pages are available for allocation + * Sleep until free pages are available for allocation. * - Called only in vm_fault so that processes page faulting * can be easily tracked. * - Sleeps at a lower priority than vm_wait() so that vm_wait()ing @@ -1920,7 +1916,6 @@ vm_page_queue_remove(int queue, vm_page_ * Remove a page from its queue. * * The given page must be locked. - * This routine may not block. */ void vm_pageq_remove(vm_page_t m) @@ -1962,7 +1957,6 @@ vm_page_enqueue(int queue, vm_page_t m) * mess with it. * * The page must be locked. - * This routine may not block. */ void vm_page_activate(vm_page_t m) @@ -1997,7 +1991,6 @@ vm_page_activate(vm_page_t m) * queues. * * The page queues must be locked. - * This routine may not block. */ static inline void vm_page_free_wakeup(void) @@ -2030,10 +2023,8 @@ vm_page_free_wakeup(void) * Returns the given page to the free list, * disassociating it with any VM object. * - * Object and page must be locked prior to entry. - * This routine may not block. + * The object must be locked. The page must be locked if it is managed. */ - void vm_page_free_toq(vm_page_t m) { @@ -2051,7 +2042,7 @@ vm_page_free_toq(vm_page_t m) panic("vm_page_free: freeing busy page %p", m); /* - * unqueue, then remove page. Note that we cannot destroy + * Unqueue, then remove page. Note that we cannot destroy * the page here because we do not want to call the pager's * callback routine until after we've put the page on the * appropriate free queue. @@ -2117,7 +2108,6 @@ vm_page_free_toq(vm_page_t m) * If the page is fictitious, then its wire count must remain one. * * The page must be locked. - * This routine may not block. */ void vm_page_wire(vm_page_t m) @@ -2206,7 +2196,7 @@ vm_page_unwire(vm_page_t m, int activate * to 1 if we want this page to be 'as if it were placed in the cache', * except without unmapping it from the process address space. * - * This routine may not block. + * The page must be locked. */ static inline void _vm_page_deactivate(vm_page_t m, int athead) @@ -2298,7 +2288,7 @@ vm_page_try_to_free(vm_page_t m) * * Put the specified page onto the page cache queue (if appropriate). * - * This routine may not block. + * The object and page must be locked. */ void vm_page_cache(vm_page_t m) @@ -2455,6 +2445,8 @@ vm_page_cache(vm_page_t m) * system to balance the queues, potentially recovering other unrelated * space from active. The idea is to not force this to happen too * often. + * + * The object and page must be locked. */ void vm_page_dontneed(vm_page_t m) @@ -2518,7 +2510,10 @@ vm_page_dontneed(vm_page_t m) * The caller must always specify the VM_ALLOC_RETRY flag. This is intended * to facilitate its eventual removal. * - * This routine may block. + * This routine may sleep. + * + * The object must be locked on entry. The lock will, however, be released + * and reacquired if the routine sleeps. */ vm_page_t vm_page_grab(vm_object_t object, vm_pindex_t pindex, int allocflags) @@ -2566,8 +2561,7 @@ retrylookup: } /* - * Mapping function for valid bits or for dirty bits in - * a page. May not block. + * Mapping function for valid or dirty bits in a page. * * Inputs are required to range within a page. */ @@ -2706,8 +2700,6 @@ vm_page_clear_dirty_mask(vm_page_t m, vm * of any partial chunks touched by the range. The invalid portion of * such chunks will be zero'd. * - * This routine may not block. - * * (base + size) must be less then or equal to PAGE_SIZE. */ void @@ -2800,8 +2792,6 @@ vm_page_clear_dirty(vm_page_t m, int bas * * Invalidates DEV_BSIZE'd chunks within a page. Both the * valid and dirty bits for the effected areas are cleared. - * - * May not block. */ void vm_page_set_invalid(vm_page_t m, int base, int size) @@ -2870,8 +2860,6 @@ vm_page_zero_invalid(vm_page_t m, boolea * Is (partial) page valid? Note that the case where size == 0 * will return FALSE in the degenerate case where the page is * entirely invalid, and TRUE otherwise. - * - * May not block. */ int vm_page_is_valid(vm_page_t m, int base, int size) @@ -2887,7 +2875,7 @@ vm_page_is_valid(vm_page_t m, int base, } /* - * update dirty bits from pmap/mmu. May not block. + * Set the page's dirty bits if the page is modified. */ void vm_page_test_dirty(vm_page_t m) From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 05:42:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E91F106564A; Wed, 3 Oct 2012 05:42:16 +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 0964D8FC14; Wed, 3 Oct 2012 05:42:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q935gFBd072751; Wed, 3 Oct 2012 05:42:15 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q935gFqQ072749; Wed, 3 Oct 2012 05:42:15 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210030542.q935gFqQ072749@svn.freebsd.org> From: Alan Cox Date: Wed, 3 Oct 2012 05:42: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: r241156 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 05:42:16 -0000 Author: alc Date: Wed Oct 3 05:42:15 2012 New Revision: 241156 URL: http://svn.freebsd.org/changeset/base/241156 Log: Reimplement pmap_qremove() using the new TLB invalidation function for efficiently invalidating address ranges. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Oct 3 05:06:45 2012 (r241155) +++ head/sys/mips/mips/pmap.c Wed Oct 3 05:42:15 2012 (r241156) @@ -930,15 +930,19 @@ pmap_qenter(vm_offset_t va, vm_page_t *m void pmap_qremove(vm_offset_t va, int count) { - /* - * No need to wb/inv caches here, - * pmap_kremove will do it for us - */ + pt_entry_t *pte; + vm_offset_t origva; - while (count-- > 0) { - pmap_kremove(va); + if (count < 1) + return; + mips_dcache_wbinv_range_index(va, PAGE_SIZE * count); + origva = va; + do { + pte = pmap_pte(kernel_pmap, va); + *pte = PTE_G; va += PAGE_SIZE; - } + } while (--count > 0); + pmap_invalidate_range(kernel_pmap, origva, va); } /*************************************************** From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 10:06:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 12E73106564A; Wed, 3 Oct 2012 10:06:49 +0000 (UTC) (envelope-from gber@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F30F58FC18; Wed, 3 Oct 2012 10:06:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93A6mQq005463; Wed, 3 Oct 2012 10:06:48 GMT (envelope-from gber@svn.freebsd.org) Received: (from gber@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93A6mZg005461; Wed, 3 Oct 2012 10:06:48 GMT (envelope-from gber@svn.freebsd.org) Message-Id: <201210031006.q93A6mZg005461@svn.freebsd.org> From: Grzegorz Bernacki Date: Wed, 3 Oct 2012 10:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241157 - head/lib/libstand X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 10:06:49 -0000 Author: gber Date: Wed Oct 3 10:06:48 2012 New Revision: 241157 URL: http://svn.freebsd.org/changeset/base/241157 Log: Correct detection of a superblock. Obtained from: Smartcom Bulgaria AD Modified: head/lib/libstand/nandfs.c Modified: head/lib/libstand/nandfs.c ============================================================================== --- head/lib/libstand/nandfs.c Wed Oct 3 05:42:15 2012 (r241156) +++ head/lib/libstand/nandfs.c Wed Oct 3 10:06:48 2012 (r241157) @@ -175,7 +175,7 @@ static int nandfs_find_super_block(struct nandfs *fs, struct open_file *f) { struct nandfs_super_block *sb; - int i, j, n; + int i, j, n, s; int sectors_to_read, error; sb = malloc(fs->nf_sectorsize); @@ -196,23 +196,22 @@ nandfs_find_super_block(struct nandfs *f continue; } n = fs->nf_sectorsize / sizeof(struct nandfs_super_block); + s = 0; if ((i * fs->nf_sectorsize) % fs->nf_fsdata->f_erasesize == 0) { if (fs->nf_sectorsize == sizeof(struct nandfs_fsdata)) continue; else { - sb += (sizeof(struct nandfs_fsdata) / - sizeof(struct nandfs_super_block)); - n -= (sizeof(struct nandfs_fsdata) / + s += (sizeof(struct nandfs_fsdata) / sizeof(struct nandfs_super_block)); } } - for (j = 0; j < n; j++) { + for (j = s; j < n; j++) { if (!nandfs_check_superblock_crc(fs->nf_fsdata, &sb[j])) continue; - NANDFS_DEBUG("magic %x wtime %jd\n", sb->s_magic, - sb->s_wtime); - if (sb[j].s_wtime > fs->nf_sb->s_wtime) + NANDFS_DEBUG("magic %x wtime %jd, lastcp 0x%jx\n", + sb[j].s_magic, sb[j].s_wtime, sb[j].s_last_cno); + if (sb[j].s_last_cno > fs->nf_sb->s_last_cno) memcpy(fs->nf_sb, &sb[j], sizeof(*fs->nf_sb)); } } From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 12:43:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96440106566C; Wed, 3 Oct 2012 12:43:27 +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 81C4A8FC19; Wed, 3 Oct 2012 12:43:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93ChRqH029655; Wed, 3 Oct 2012 12:43:27 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93ChRQj029653; Wed, 3 Oct 2012 12:43:27 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210031243.q93ChRQj029653@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Oct 2012 12:43: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: r241160 - 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: Wed, 03 Oct 2012 12:43:27 -0000 Author: mav Date: Wed Oct 3 12:43:26 2012 New Revision: 241160 URL: http://svn.freebsd.org/changeset/base/241160 Log: Fix build without `options ATA_CAM`, broken by r241144. Modified: head/sys/dev/ata/ata-sata.c Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Wed Oct 3 11:56:18 2012 (r241159) +++ head/sys/dev/ata/ata-sata.c Wed Oct 3 12:43:26 2012 (r241160) @@ -155,9 +155,13 @@ ata_sata_phy_reset(device_t dev, int por int loop, retry, sata_rev; uint32_t val, val1; +#ifdef ATA_CAM sata_rev = ch->user[port < 0 ? 0 : port].revision; if (sata_rev > 0) quick = 0; +#else + sata_rev = 0; +#endif if (quick) { if (ata_sata_scr_read(ch, port, ATA_SCONTROL, &val)) From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 13:49:18 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA84D106564A; Wed, 3 Oct 2012 13:49:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 4DA628FC16; Wed, 3 Oct 2012 13:49:17 +0000 (UTC) Received: from c122-106-157-84.carlnfd1.nsw.optusnet.com.au (c122-106-157-84.carlnfd1.nsw.optusnet.com.au [122.106.157.84]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q93Dn8wj020377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Oct 2012 23:49:09 +1000 Date: Wed, 3 Oct 2012 23:49:08 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" In-Reply-To: <201210030344.q933iOdn054463@svn.freebsd.org> Message-ID: <20121003224737.V46116@besplex.bde.org> References: <201210030344.q933iOdn054463@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241152 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 13:49:18 -0000 On Wed, 3 Oct 2012, Pedro F. Giffuni wrote: > Log: > rpc: convert all uid and gid variables of the type uid_t and gid_t. > > As part of the previous commit, uses of xdr_int() were replaced > with xdr_u_int(). This has undesired effects as the second > argument doesn't match exactly uid_t or gid_t. It also breaks > assumptions in the size of the provided types. > > To work around those issues we revert back to the use of xdr_int() > but provide proper casting so the behaviour doesn't change. Er, this makes the problem worse. It doesn't actually make the argument match, but uses a bogus cast whose main effect is to hide the type mismatch from the compiler (the compiler might still consider the cast invalid). > Modified: head/lib/libc/rpc/authunix_prot.c > ============================================================================== > --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:00:37 2012 (r241151) > +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:44:23 2012 (r241152) > @@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p) > > paup_gids = &p->aup_gids; > > - if (xdr_u_long(xdrs, &(p->aup_time)) > - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) > - && xdr_u_int(xdrs, &(p->aup_uid)) > - && xdr_u_int(xdrs, &(p->aup_gid)) > - && xdr_array(xdrs, (char **) paup_gids, > + if (xdr_u_long(xdrs, &(p->aup_time)) && The old code was closer to being correct, and is still used for aup_time. For times it still works almost correctly as follows: - times have type time_t, which is always signed and sometimes 64 bits in FreeBSD - aup_time has type u_long, which is always unsigned and sometimes 64 bits in FreeBSD. It is 64 bits for some arches that don't have 64- bit u_longs (mips and arm), because time_t on these arches was bloated to practice the transition to a 64-bit time_t (this is very unnecessary since 32 bits unsigned work until 2106). - the current time in seconds (in a time_t) is assigned to aup_time, without any bounds checking of course - after that, the time as a u_long in aup_time us usable. Add the overflow checking and it would work correctly. > + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && > + xdr_int(xdrs, (int *) &(p->aup_uid)) && > + xdr_int(xdrs, (int *) &(p->aup_gid)) && For ids it used to work almost correctly as follows: - ids have type uid_t and gid_t, which are always uint32_t in FreeBSD - aup_uid and aup_gid used to have type int - the ids (in a uid_t or gid_t) were assigned to aup*_idm without any bounds checking of course. The sign mismatch is a larger problem in practice that for times. Times after 2038 shouldn't actually occur, but ids above INT_MAX can. But in practice, the same benign overflow will probably allow both to work when there is a sign error. - after that, the time as a u_long in aup_time us usable. Add the overflow checking and it would work correctly, but u_int's should be used throughout so that supported ids like ((uid_t)-2) don't have to rejected by the bounds check. Now it works very incorrectly: - the types in the assignment are now the same (uid_t or gid_t), so there is no problem in the assignment, but this gives types that are unusable here - despite being unusable here, they are used here. &(p->aup_*id)) is a pointer to a uid_t or a gid_t. Pretending that it is a pointer to an int doesn't make it one. Without the (int *) cast, the compiler would detect the type mismatch as a sign mismatch at certain warning levels (the (int *) taken by xdr_int is incompatible with the object pointer ([ug]id_t *). If the conversion is reasonable, then xdr_int()'s prototype would do it, and the has no effect except to possibly do the same thing without a warning or with a different warning. > + xdr_array(xdrs, (char **) paup_gids, > &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { > return (TRUE); > } It already used a bogus cast on paup_gids. I'm surprised that compiles (paup_gids has type gid_t **). I didn't notice that before, or that the sizeof() always matched the xdr_int. The elements need to be ints to work (as above), but now have type gid_t. If the xdr_array() API had been invented after 1980, then it would have used void ** instead of char **, something like the following: - it apparently wants to pass the array pointer indirectly. The pointer must have type void *, not gid_t *. Then we take its address and get a void **. The pointer must be coverted from its original type to void *, and the code already does a conversion, but with nonsense types: - aup_gids used to have type int * and now has type gid_t * - this must be converted to void * (or char * to match the pre-1980 API). "void *vaup_gids = p->aup_gids;" might work. - now we have a void *, we can point to it using void **. Take the address of the local variable vaup_gids instead of p->aup_gids. - xdr_array() needs to convert from the void ** back to the original pointer. Indirecting the void ** only gives the void *. The technically least incorrect way (without changing the API much) is to switch on the element size. Bruce From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 13:51:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34BA91065670; Wed, 3 Oct 2012 13:51:04 +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 0632A8FC08; Wed, 3 Oct 2012 13:51:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93Dp3Ox038587; Wed, 3 Oct 2012 13:51:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93Dp35B038584; Wed, 3 Oct 2012 13:51:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201210031351.q93Dp35B038584@svn.freebsd.org> From: Ed Schouten Date: Wed, 3 Oct 2012 13:51: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: r241161 - 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: Wed, 03 Oct 2012 13:51:04 -0000 Author: ed Date: Wed Oct 3 13:51:03 2012 New Revision: 241161 URL: http://svn.freebsd.org/changeset/base/241161 Log: Fix faulty error code handling in read(2) on TTYs. When performing a non-blocking read(2), on a TTY while no data is available, we should return EAGAIN. But if there's a modem disconnect, we should return 0. Right now we only return 0 when doing a blocking read, which is wrong. MFC after: 1 month Modified: head/sys/kern/tty_ttydisc.c Modified: head/sys/kern/tty_ttydisc.c ============================================================================== --- head/sys/kern/tty_ttydisc.c Wed Oct 3 12:43:26 2012 (r241160) +++ head/sys/kern/tty_ttydisc.c Wed Oct 3 13:51:03 2012 (r241161) @@ -149,10 +149,10 @@ ttydisc_read_canonical(struct tty *tp, s /* No more data. */ if (clen == 0) { - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_wait(tp, &tp->t_inwait); if (error) @@ -200,10 +200,10 @@ ttydisc_read_raw_no_timer(struct tty *tp return (0); /* We have to wait for more. */ - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_wait(tp, &tp->t_inwait); if (error) @@ -248,10 +248,10 @@ ttydisc_read_raw_read_timer(struct tty * * We have to wait for more. If the timer expires, we * should return a 0-byte read. */ - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_timedwait(tp, &tp->t_inwait, hz); if (error) @@ -293,10 +293,10 @@ ttydisc_read_raw_interbyte_timer(struct break; /* We have to wait for more. */ - if (ioflag & IO_NDELAY) - return (EWOULDBLOCK); - else if (tp->t_flags & TF_ZOMBIE) + if (tp->t_flags & TF_ZOMBIE) return (0); + else if (ioflag & IO_NDELAY) + return (EWOULDBLOCK); error = tty_wait(tp, &tp->t_inwait); if (error) From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 16:48:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D1AC106564A; Wed, 3 Oct 2012 16:48:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 377928FC08; Wed, 3 Oct 2012 16:48:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93GmT8N060388; Wed, 3 Oct 2012 16:48:29 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93GmSET060386; Wed, 3 Oct 2012 16:48:28 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201210031648.q93GmSET060386@svn.freebsd.org> From: Dimitry Andric Date: Wed, 3 Oct 2012 16: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: r241163 - head/contrib/llvm/tools/clang/lib/Driver X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 16:48:29 -0000 Author: dim Date: Wed Oct 3 16:48:28 2012 New Revision: 241163 URL: http://svn.freebsd.org/changeset/base/241163 Log: Pull in r164717 from upstream clang trunk: Allow -MF to be used in combination with -E -M or -E -MM. This should help with building the lang/ghc port. MFC after: 1 week Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Wed Oct 3 14:28:55 2012 (r241162) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Wed Oct 3 16:48:28 2012 (r241163) @@ -219,11 +219,11 @@ void Clang::AddPreprocessingOptions(Comp (A = Args.getLastArg(options::OPT_MMD))) { // Determine the output location. const char *DepFile; - if (Output.getType() == types::TY_Dependencies) { - DepFile = Output.getFilename(); - } else if (Arg *MF = Args.getLastArg(options::OPT_MF)) { + if (Arg *MF = Args.getLastArg(options::OPT_MF)) { DepFile = MF->getValue(Args); C.addFailureResultFile(DepFile); + } else if (Output.getType() == types::TY_Dependencies) { + DepFile = Output.getFilename(); } else if (A->getOption().matches(options::OPT_M) || A->getOption().matches(options::OPT_MM)) { DepFile = "-"; From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 16:58:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 090E81065670; Wed, 3 Oct 2012 16:58:43 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id B6F048FC1A; Wed, 3 Oct 2012 16:58:39 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id 68865D4802A; Wed, 3 Oct 2012 18:58:32 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id 5129BDBF; Wed, 3 Oct 2012 18:58:31 +0200 (CEST) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id 43F1B10A62; Wed, 3 Oct 2012 16:58:31 +0000 (UTC) Date: Wed, 3 Oct 2012 18:58:31 +0200 From: Jeremie Le Hen To: Devin Teske Message-ID: <20121003165831.GA25291@felucia.tataz.chchile.org> Mail-Followup-To: Devin Teske , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201210030232.q932Wlfs044296@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201210030232.q932Wlfs044296@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 16:58:43 -0000 Hi Devin, On Wed, Oct 03, 2012 at 02:32:47AM +0000, Devin Teske wrote: > Author: dteske > Date: Wed Oct 3 02:32:47 2012 > New Revision: 241149 > URL: http://svn.freebsd.org/changeset/base/241149 > > Log: > Import sysutils/sysrc from the ports tree (current version 5.1). Importing > disconnected under the WITH_BSDCONFIG flag (a good idea since this version of > sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)). > > Multiple reasons sysrc should not simply continue to live in ports. The most > important being that it is tightly coupled with the base. > > Approved by: adrian (co-mentor) Don't you expect to MFC this? Thanks. Regards, -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 17:20:35 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEEFF106564A; Wed, 3 Oct 2012 17:20:34 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF5A58FC08; Wed, 3 Oct 2012 17:20:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93HKY7V064476; Wed, 3 Oct 2012 17:20:34 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93HKYUp064470; Wed, 3 Oct 2012 17:20:34 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201210031720.q93HKYUp064470@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 3 Oct 2012 17:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241164 - in head/sys/boot/userboot: . test userboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 17:20:35 -0000 Author: ae Date: Wed Oct 3 17:20:34 2012 New Revision: 241164 URL: http://svn.freebsd.org/changeset/base/241164 Log: Replace all references to loader_callbacks_v1 with loader_callbacks. Suggested by: grehan@ Modified: head/sys/boot/userboot/test/test.c head/sys/boot/userboot/userboot.h head/sys/boot/userboot/userboot/libuserboot.h head/sys/boot/userboot/userboot/main.c Modified: head/sys/boot/userboot/test/test.c ============================================================================== --- head/sys/boot/userboot/test/test.c Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/test/test.c Wed Oct 3 17:20:34 2012 (r241164) @@ -364,7 +364,7 @@ test_getmem(void *arg, uint64_t *lowmem, *highmem = 0; } -struct loader_callbacks_v1 cb = { +struct loader_callbacks cb = { .putc = test_putc, .getc = test_getc, .poll = test_poll, @@ -405,7 +405,7 @@ int main(int argc, char** argv) { void *h; - void (*func)(struct loader_callbacks_v1 *, void *, int, int); + void (*func)(struct loader_callbacks *, void *, int, int); int opt; char *disk_image = NULL; Modified: head/sys/boot/userboot/userboot.h ============================================================================== --- head/sys/boot/userboot/userboot.h Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/userboot.h Wed Oct 3 17:20:34 2012 (r241164) @@ -38,7 +38,7 @@ #define USERBOOT_EXIT_QUIT 1 #define USERBOOT_EXIT_REBOOT 2 -struct loader_callbacks_v1 { +struct loader_callbacks { /* * Console i/o */ Modified: head/sys/boot/userboot/userboot/libuserboot.h ============================================================================== --- head/sys/boot/userboot/userboot/libuserboot.h Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/userboot/libuserboot.h Wed Oct 3 17:20:34 2012 (r241164) @@ -28,7 +28,7 @@ #include "userboot.h" -extern struct loader_callbacks_v1 *callbacks; +extern struct loader_callbacks *callbacks; extern void *callbacks_arg; #define CALLBACK(fn, args...) (callbacks->fn(callbacks_arg , ##args)) Modified: head/sys/boot/userboot/userboot/main.c ============================================================================== --- head/sys/boot/userboot/userboot/main.c Wed Oct 3 16:48:28 2012 (r241163) +++ head/sys/boot/userboot/userboot/main.c Wed Oct 3 17:20:34 2012 (r241164) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); #define USERBOOT_VERSION USERBOOT_VERSION_2 -struct loader_callbacks_v1 *callbacks; +struct loader_callbacks *callbacks; void *callbacks_arg; extern char bootprog_name[]; @@ -67,7 +67,7 @@ exit(int v) } void -loader_main(struct loader_callbacks_v1 *cb, void *arg, int version, int ndisks) +loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { static char malloc[512*1024]; int i; From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 18:51:02 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 937C51065672; Wed, 3 Oct 2012 18:51:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from [127.0.0.1] (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id DEB0D14E9EF; Wed, 3 Oct 2012 18:50:59 +0000 (UTC) Message-ID: <506C8912.8050301@FreeBSD.org> Date: Wed, 03 Oct 2012 11:50:58 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: Devin Teske References: <201210030232.q932Wlfs044296@svn.freebsd.org> In-Reply-To: <201210030232.q932Wlfs044296@svn.freebsd.org> X-Enigmail-Version: 1.4.4 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 18:51:02 -0000 Was this discussed on freebsd-rc@ at some point, and I just missed it? From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 20:18:49 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6B6C106564A; Wed, 3 Oct 2012 20:18:49 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 88C198FC12; Wed, 3 Oct 2012 20:18:49 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.15]) by ltcfislmsgpa07.fnfis.com (8.14.4/8.14.4) with ESMTP id q93KIjdJ027924 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Oct 2012 15:18:45 -0500 Received: from dtwin (10.14.152.52) by smtp.fisglobal.com (10.132.206.15) with Microsoft SMTP Server (TLS) id 14.2.309.2; Wed, 3 Oct 2012 15:18:14 -0500 From: Sender: Devin Teske To: "'Doug Barton'" , "'Devin Teske'" References: <201210030232.q932Wlfs044296@svn.freebsd.org> <506C8912.8050301@FreeBSD.org> In-Reply-To: <506C8912.8050301@FreeBSD.org> Date: Wed, 3 Oct 2012 13:18:23 -0700 Message-ID: <031a01cda1a4$3db87660$b9296320$@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Content-Language: en-us Thread-index: AQGVzjdEdWWKA4yJI4j6DLfvvhMpDQGnbln5mApuKUA= X-Originating-IP: [10.14.152.52] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-03_02:2012-10-03, 2012-10-02, 1970-01-01 signatures=0 Cc: svn-src-head@freebsd.org, Devin Teske , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: RE: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 20:18:49 -0000 > -----Original Message----- > From: Doug Barton [mailto:dougb@FreeBSD.org] > Sent: Wednesday, October 03, 2012 11:51 AM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc > > Was this discussed on freebsd-rc@ at some point, and I just missed it? Everybody seems to suggest some other list. -arch, -rc, -hackers, -sysinstall, etc. With respect to -rc ... it's very much possible this was discussed there too. I can recall bringing up the topic at least 3 times in the past 2 years (on various lists). It was always met with the same enthusiastic "YES" If we want to rehash this yet again one more time, let's pick a list and have at-it one last time. -- Devin P.S. You'd be right to claim that there aren't any _recent_ discussions on importing this code, and that's entirely because it took me a _really_ long time to prepare the code once it was decided that we were going to import it. I spent more than 6 months reworking the code for this purpose (import to base). _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 20:30:17 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 849C9106564A; Wed, 3 Oct 2012 20:30:17 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 46E668FC0A; Wed, 3 Oct 2012 20:30:16 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa07.fnfis.com (8.14.4/8.14.4) with ESMTP id q93KU72Z011331 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Oct 2012 15:30:16 -0500 Received: from dtwin (10.14.152.52) by smtp.fisglobal.com (10.132.206.31) with Microsoft SMTP Server (TLS) id 14.2.309.2; Wed, 3 Oct 2012 15:30:12 -0500 From: Sender: Devin Teske To: "'Jeremie Le Hen'" , "'Devin Teske'" References: <201210030232.q932Wlfs044296@svn.freebsd.org> <20121003165831.GA25291@felucia.tataz.chchile.org> In-Reply-To: <20121003165831.GA25291@felucia.tataz.chchile.org> Date: Wed, 3 Oct 2012 13:30:20 -0700 Message-ID: <032001cda1a5$e95303e0$bbf90ba0$@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Content-Language: en-us Thread-index: AQGVzjdEdWWKA4yJI4j6DLfvvhMpDQGTqtTemAsOvhA= X-Originating-IP: [10.14.152.52] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855, 1.0.431, 0.0.0000 definitions=2012-10-03_02:2012-10-03, 2012-10-02, 1970-01-01 signatures=0 Cc: svn-src-head@freebsd.org, Devin Teske , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: RE: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 20:30:17 -0000 > -----Original Message----- > From: Jeremie Le Hen [mailto:jlh@FreeBSD.org] > Sent: Wednesday, October 03, 2012 9:59 AM > To: Devin Teske > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r241149 - in head/usr.sbin: . bsdconfig/share sysrc > > Hi Devin, > > On Wed, Oct 03, 2012 at 02:32:47AM +0000, Devin Teske wrote: > > Author: dteske > > Date: Wed Oct 3 02:32:47 2012 > > New Revision: 241149 > > URL: http://svn.freebsd.org/changeset/base/241149 > > > > Log: > > Import sysutils/sysrc from the ports tree (current version 5.1). Importing > > disconnected under the WITH_BSDCONFIG flag (a good idea since this version > of > > sysrc(8) indeed requires the `sysrc.subr' module installed by bsdconfig(8)). > > > > Multiple reasons sysrc should not simply continue to live in ports. The most > > important being that it is tightly coupled with the base. > > > > Approved by: adrian (co-mentor) > > Don't you expect to MFC this? > Neither bsdconfig(8) nor sysrc(8) are actually shipping with FreeBSD _yet_, so there's technically nothing to MFC (other than disconnected code). Currently, at the time of this writing, you need to use WITH_BSDCONFIG when compiling/installing the operating system from source to get this great software. The suggestion to import this code "disconnected" was made by both Julian and phk based on the fact that nobody was available (after months of waiting, searching, and pleading) to review the >20k lines of code. Furthermore, the code should not be "connected" (taking away the need to set WITH_BSDCONFIG to get this software) until bsdconfig(8) can function as a "full and complete" replacement to sysinstall(8). Currently, what's missing from bsdconfig(8) that makes it a less-than-ideal replacement for sysinstall is: a. The lack of package management (discussions on -hackers led to the predisposition that we should focus our efforts on embracing PKGNG) b. help-file integration ("*.help" files used by sysinstall(8) need to be brought over and hooked-into bsdconfig(8)) When those two tasks are done, then bsdconfig(8) will be ready to take on active-duty as *the* replacement to sysinstall(8) -- meaning, we'll remove the need to have WITH_BSDCONFIG declared). At that moment, bsdconfig(8) ought to be a candidate for MFC -- but until then, the only thing an MFC buys me is double-work maintaining two disconnected branches instead of one. For those that want to test bsdconfig(8) and sysrc(8) on a STABLE release, never fear: you can simply execute the following to install these to any release (but do note that bsdconfig(8) requires dialog(1) from 9.0 or higher): # Assuming /usr/src holds a HEAD release cd /usr/src/usr.sbin/bsdconfig make all install cd ../sysrc make all install Last, but not least, you may be asking what bsdconfig(8) has to do with sysrc(8). Quite simply, sysrc(8) requires /usr/share/bsdconfig/sysrc.subr as-provided by bsdconfig(8). -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 20:39:11 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7C591065670; Wed, 3 Oct 2012 20:39:11 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C38248FC12; Wed, 3 Oct 2012 20:39:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93KdB6C089734; Wed, 3 Oct 2012 20:39:11 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93KdBOr089732; Wed, 3 Oct 2012 20:39:11 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210032039.q93KdBOr089732@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Wed, 3 Oct 2012 20:39: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: r241165 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 20:39:12 -0000 Author: pfg Date: Wed Oct 3 20:39:11 2012 New Revision: 241165 URL: http://svn.freebsd.org/changeset/base/241165 Log: rpc: convert all uid and gid variables of the type uid_t and gid_t. The previous change (based on Solaris) doesn't work properly either as the casting only has the effect of quieting the compiler. Move back to the previous solution but adjust the sizeof() type in xdr_array(). This should mostly work (by accident). Reported by: bde Modified: head/lib/libc/rpc/authunix_prot.c Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 17:20:34 2012 (r241164) +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 20:39:11 2012 (r241165) @@ -69,10 +69,10 @@ xdr_authunix_parms(xdrs, p) if (xdr_u_long(xdrs, &(p->aup_time)) && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && - xdr_int(xdrs, (int *) &(p->aup_uid)) && - xdr_int(xdrs, (int *) &(p->aup_gid)) && + xdr_u_int(xdrs, &(p->aup_uid)) && + xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, - &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { + &(p->aup_len), NGRPS, sizeof(gid_t), (xdrproc_t)xdr_int) ) { return (TRUE); } return (FALSE); From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 21:41:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8ECC106564A; Wed, 3 Oct 2012 21:41:20 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4A5E8FC0A; Wed, 3 Oct 2012 21:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93LfKiM097322; Wed, 3 Oct 2012 21:41:20 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93LfK51097319; Wed, 3 Oct 2012 21:41:20 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210032141.q93LfK51097319@svn.freebsd.org> From: Ed Maste Date: Wed, 3 Oct 2012 21:41: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: r241166 - 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: Wed, 03 Oct 2012 21:41:20 -0000 Author: emaste Date: Wed Oct 3 21:41:20 2012 New Revision: 241166 URL: http://svn.freebsd.org/changeset/base/241166 Log: Cast through void * to silence compiler warning The base netmap pointer and offsets involved are provided by the kernel side of the netmap interface and will have appropriate alignment. Sponsored by: ADARA Networks MFC After: 2 weeks Modified: head/sys/net/netmap_user.h Modified: head/sys/net/netmap_user.h ============================================================================== --- head/sys/net/netmap_user.h Wed Oct 3 20:39:11 2012 (r241165) +++ head/sys/net/netmap_user.h Wed Oct 3 21:41:20 2012 (r241166) @@ -62,15 +62,16 @@ #ifndef _NET_NETMAP_USER_H_ #define _NET_NETMAP_USER_H_ -#define NETMAP_IF(b, o) (struct netmap_if *)((char *)(b) + (o)) +#define _NETMAP_OFFSET(type, ptr, offset) \ + ((type)(void *)((char *)(ptr) + (offset))) -#define NETMAP_TXRING(nifp, index) \ - ((struct netmap_ring *)((char *)(nifp) + \ - (nifp)->ring_ofs[index] ) ) - -#define NETMAP_RXRING(nifp, index) \ - ((struct netmap_ring *)((char *)(nifp) + \ - (nifp)->ring_ofs[index + (nifp)->ni_tx_rings + 1] ) ) +#define NETMAP_IF(b, o) _NETMAP_OFFSET(struct netmap_if *, b, o) + +#define NETMAP_TXRING(nifp, index) _NETMAP_OFFSET(struct netmap_ring *, \ + nifp, (nifp)->ring_ofs[index] ) + +#define NETMAP_RXRING(nifp, index) _NETMAP_OFFSET(struct netmap_ring *, \ + nifp, (nifp)->ring_ofs[index + (nifp)->ni_tx_rings + 1] ) #define NETMAP_BUF(ring, index) \ ((char *)(ring) + (ring)->buf_ofs + ((index)*(ring)->nr_buf_size)) From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 21:42:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23C801065674; Wed, 3 Oct 2012 21:42:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4A09A8FC15; Wed, 3 Oct 2012 21:42:45 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EANywbFCDaFvO/2dsb2JhbABFhg+1JoRRgiABAQUjBFIbDgoCAg0ZAlkGiBilP5JhgSGKAoUogRIDlWmQK4MJgXs X-IronPort-AV: E=Sophos;i="4.80,530,1344225600"; d="scan'208";a="184532583" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 03 Oct 2012 17:42:15 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 553CDB4022; Wed, 3 Oct 2012 17:42:15 -0400 (EDT) Date: Wed, 3 Oct 2012 17:42:15 -0400 (EDT) From: Rick Macklem To: Bruce Evans Message-ID: <740058841.1682948.1349300535316.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20121003224737.V46116@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.201] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - FF3.0 (Win)/6.0.10_GA_2692) Cc: svn-src-head@FreeBSD.org, "Pedro F. Giffuni" , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r241152 - head/lib/libc/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 21:42:46 -0000 Bruce Evans wrote: > On Wed, 3 Oct 2012, Pedro F. Giffuni wrote: > > > Log: > > rpc: convert all uid and gid variables of the type uid_t and gid_t. > > > > As part of the previous commit, uses of xdr_int() were replaced > > with xdr_u_int(). This has undesired effects as the second > > argument doesn't match exactly uid_t or gid_t. It also breaks > > assumptions in the size of the provided types. > > > > To work around those issues we revert back to the use of xdr_int() > > but provide proper casting so the behaviour doesn't change. > > Er, this makes the problem worse. It doesn't actually make the > argument > match, but uses a bogus cast whose main effect is to hide the type > mismatch from the compiler (the compiler might still consider the cast > invalid). > > > Modified: head/lib/libc/rpc/authunix_prot.c > > ============================================================================== > > --- head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:00:37 2012 > > (r241151) > > +++ head/lib/libc/rpc/authunix_prot.c Wed Oct 3 03:44:23 2012 > > (r241152) > > @@ -67,11 +67,11 @@ xdr_authunix_parms(xdrs, p) > > > > paup_gids = &p->aup_gids; > > > > - if (xdr_u_long(xdrs, &(p->aup_time)) > > - && xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) > > - && xdr_u_int(xdrs, &(p->aup_uid)) > > - && xdr_u_int(xdrs, &(p->aup_gid)) > > - && xdr_array(xdrs, (char **) paup_gids, > > + if (xdr_u_long(xdrs, &(p->aup_time)) && > > The old code was closer to being correct, and is still used for > aup_time. > For times it still works almost correctly as follows: > - times have type time_t, which is always signed and sometimes 64 bits > in FreeBSD > - aup_time has type u_long, which is always unsigned and sometimes 64 > bits in FreeBSD. It is 64 bits for some arches that don't have 64- > bit u_longs (mips and arm), because time_t on these arches was > bloated to practice the transition to a 64-bit time_t (this is very > unnecessary since 32 bits unsigned work until 2106). > - the current time in seconds (in a time_t) is assigned to aup_time, > without any bounds checking of course > - after that, the time as a u_long in aup_time us usable. > Add the overflow checking and it would work correctly. > > > + xdr_string(xdrs, &(p->aup_machname), MAX_MACHINE_NAME) && > > + xdr_int(xdrs, (int *) &(p->aup_uid)) && > > + xdr_int(xdrs, (int *) &(p->aup_gid)) && > > For ids it used to work almost correctly as follows: > - ids have type uid_t and gid_t, which are always uint32_t in FreeBSD > - aup_uid and aup_gid used to have type int > - the ids (in a uid_t or gid_t) were assigned to aup*_idm without any > bounds checking of course. The sign mismatch is a larger problem in > practice that for times. Times after 2038 shouldn't actually occur, > but ids above INT_MAX can. But in practice, the same benign overflow > will probably allow both to work when there is a sign error. > - after that, the time as a u_long in aup_time us usable. > Add the overflow checking and it would work correctly, but u_int's > should > be used throughout so that supported ids like ((uid_t)-2) don't have > to > rejected by the bounds check. > > Now it works very incorrectly: > - the types in the assignment are now the same (uid_t or gid_t), so > there > is no problem in the assignment, but this gives types that are > unusable > here > - despite being unusable here, they are used here. &(p->aup_*id)) is a > pointer to a uid_t or a gid_t. Pretending that it is a pointer to an > int doesn't make it one. Without the (int *) cast, the compiler would > detect the type mismatch as a sign mismatch at certain warning levels > (the (int *) taken by xdr_int is incompatible with the object pointer > ([ug]id_t *). If the conversion is reasonable, then xdr_int()'s > prototype would do it, and the has no effect except to possibly do > the same thing without a warning or with a different warning. > > > + xdr_array(xdrs, (char **) paup_gids, > > &(p->aup_len), NGRPS, sizeof(int), (xdrproc_t)xdr_int) ) { > > return (TRUE); > > } > > It already used a bogus cast on paup_gids. I'm surprised that compiles > (paup_gids has type gid_t **). I didn't notice that before, or that > the > sizeof() always matched the xdr_int. The elements need to be ints to > work (as above), but now have type gid_t. > > If the xdr_array() API had been invented after 1980, then it would > have > used void ** instead of char **, something like the following: > - it apparently wants to pass the array pointer indirectly. The > pointer > must have type void *, not gid_t *. Then we take its address and get > a void **. The pointer must be coverted from its original type to > void *, and the code already does a conversion, but with nonsense > types: > - aup_gids used to have type int * and now has type gid_t * > - this must be converted to void * (or char * to match the pre-1980 > API). > "void *vaup_gids = p->aup_gids;" might work. > - now we have a void *, we can point to it using void **. Take the > address > of the local variable vaup_gids instead of p->aup_gids. > - xdr_array() needs to convert from the void ** back to the original > pointer. > Indirecting the void ** only gives the void *. The technically least > incorrect way (without changing the API much) is to switch on the > element > size. > > Bruce I haven't been looking at these patches (and don't really have any time to do so). I was just going to note that Sun RPC puts 32bit uid and gids on the wire. As such, I think you'll want the "on the wire" defined as 32bit #s (maybe uint32_t or int32_t) and the xdr conversion routines should be ones that handle 32bits. (I'd have to look at them to remember which ones are correct for 32bits on all arches. I think they once used the naming where "long" ws considered to be 32bits. Ah, the good old days;-) Anyhow, good luck with it guys, rick From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 21:50:54 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F210106566B; Wed, 3 Oct 2012 21:50:54 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7165D8FC16; Wed, 3 Oct 2012 21:50:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93Losj0098556; Wed, 3 Oct 2012 21:50:54 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93LosnL098554; Wed, 3 Oct 2012 21:50:54 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201210032150.q93LosnL098554@svn.freebsd.org> From: Niclas Zeising Date: Wed, 3 Oct 2012 21:50:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241167 - head/usr.sbin/sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 21:50:54 -0000 Author: zeising (doc,ports committer) Date: Wed Oct 3 21:50:53 2012 New Revision: 241167 URL: http://svn.freebsd.org/changeset/base/241167 Log: Remove whitespace at EOL Approved by: joel (mentor) Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:41:20 2012 (r241166) +++ head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:50:53 2012 (r241167) @@ -55,7 +55,7 @@ The following options are available: .It Fl a Dump a list of all non-default configuration variables. .It Fl A -Dump a list of all configuration variables +Dump a list of all configuration variables .Pq incl. defaults . .It Fl d Print a description of the given variable. @@ -66,14 +66,14 @@ passing `-f' with a NULL file-argument). Print query results as .Ql var=value .Pq useful for producing output to be fed back in . -Ignored if +Ignored if .Fl n is specified. .It Fl f Ar file -Operate on the specified file(s) instead of the files obtained by reading the -.Sq rc_conf_files -entry in the -.Ev RC_DEFAULTS +Operate on the specified file(s) instead of the files obtained by reading the +.Sq rc_conf_files +entry in the +.Ev RC_DEFAULTS file. This option can be specified multiple times for additional files. .It Fl F @@ -89,9 +89,9 @@ Ignore unknown variables. .It Fl j Ar jail The .Ar jid -or name of the -.Ar jail -to operate within +or name of the +.Ar jail +to operate within .Pq overrides So Fl R Ar dir Sc ; requires Xr jexec 8 . .It Fl n Show only variable values, not their names. @@ -103,13 +103,13 @@ Quiet. Ignore previous and/or .Ev SYSRC_VERBOSE . .It Fl R Ar dir -Operate within the root directory +Operate within the root directory .Pq Sq Ar dir -rather than +rather than .Pq Sq / . .It Fl v -Verbose. Print the pathname of the specific -.Xr rc.conf 5 +Verbose. Print the pathname of the specific +.Xr rc.conf 5 file where the directive was found. .It Fl x Remove variable(s) from specified file(s). @@ -133,7 +133,7 @@ configuration files. .Pp The list of system configuration files is configured in the file .Ql /etc/defaults/rc.conf -within the variable +within the variable .Ql rc_conf_files , which by-default contains a space-separated list of pathnames. On all FreeBSD systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each @@ -172,14 +172,14 @@ Override default .Ql rc_conf_files .Pq even if set to NULL . .It Ev RC_DEFAULTS -Location of +Location of .Ql /etc/defaults/rc.conf file. .It Ev SYSRC_VERBOSE Default verbosity. Set to non-NULL to enable. .El .Sh DEPENDENCIES -The following standard commands are required by +The following standard commands are required by .Nm : .Pp .Xr awk 1 , From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 21:56:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C17F9106566C; Wed, 3 Oct 2012 21:56:16 +0000 (UTC) (envelope-from zeising@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAC688FC14; Wed, 3 Oct 2012 21:56:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93LuGxC099268; Wed, 3 Oct 2012 21:56:16 GMT (envelope-from zeising@svn.freebsd.org) Received: (from zeising@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93LuG16099266; Wed, 3 Oct 2012 21:56:16 GMT (envelope-from zeising@svn.freebsd.org) Message-Id: <201210032156.q93LuG16099266@svn.freebsd.org> From: Niclas Zeising Date: Wed, 3 Oct 2012 21:56: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: r241168 - head/usr.sbin/sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 21:56:16 -0000 Author: zeising (doc,ports committer) Date: Wed Oct 3 21:56:16 2012 New Revision: 241168 URL: http://svn.freebsd.org/changeset/base/241168 Log: Sort manual page cross references. Approved by: joel (mentor) Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:50:53 2012 (r241167) +++ head/usr.sbin/sysrc/sysrc.8 Wed Oct 3 21:56:16 2012 (r241168) @@ -185,17 +185,18 @@ The following standard commands are requ .Xr awk 1 , .Xr cat 1 , .Xr chmod 1 , -.Xr chown 8 , .Xr env 1 , .Xr grep 1 , -.Xr jexec 8 , .Xr jls 1 , .Xr mktemp 1 , .Xr mv 1 , .Xr rm 1 , .Xr sh 1 , .Xr stat 1 , -.Xr tail 1 +.Xr tail 1 , +.Xr chown 8 +and +.Xr jexec 8 . .Sh FILES .Bl -tag -width ".Pa /etc/defaults/rc.conf" -compact .It Pa /etc/defaults/rc.conf @@ -271,11 +272,11 @@ collection of system configuration files .Pp This will be corrected by a future enhancement. .Sh SEE ALSO +.Xr jls 1 , +.Xr rc.conf 5 , .Xr jail 8 , .Xr jexec 8 , -.Xr jls 1 , .Xr rc 8 , -.Xr rc.conf 5 , .Xr sysctl 8 .Sh HISTORY A From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 22:02:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA24D106566C; Wed, 3 Oct 2012 22:02:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CDF88FC12; Wed, 3 Oct 2012 22:02:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93M2G9L000142; Wed, 3 Oct 2012 22:02:16 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93M2G6K000140; Wed, 3 Oct 2012 22:02:16 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201210032202.q93M2G6K000140@svn.freebsd.org> From: Ed Maste Date: Wed, 3 Oct 2012 22:02: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: r241169 - head/tools/tools/netmap X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 03 Oct 2012 22:02:16 -0000 Author: emaste Date: Wed Oct 3 22:02:16 2012 New Revision: 241169 URL: http://svn.freebsd.org/changeset/base/241169 Log: Clean up compiler warnings. More work is needed here but this now builds with WARNS=6. Sponsored by: ADARA Networks MFC after: 2 weeks Modified: head/tools/tools/netmap/pcap.c Modified: head/tools/tools/netmap/pcap.c ============================================================================== --- head/tools/tools/netmap/pcap.c Wed Oct 3 21:56:16 2012 (r241168) +++ head/tools/tools/netmap/pcap.c Wed Oct 3 22:02:16 2012 (r241169) @@ -38,7 +38,7 @@ #define MIN(a, b) ((a) < (b) ? (a) : (b)) -char *version = "$Id$"; +const char *version = "$Id$"; int verbose = 0; /* debug support */ @@ -135,13 +135,12 @@ typedef enum { PCAP_D_OUT } pcap_direction_t; +struct bpf_program; typedef void (*pcap_handler)(u_char *user, const struct pcap_pkthdr *h, const u_char *bytes); -char errbuf[PCAP_ERRBUF_SIZE]; - pcap_t *pcap_open_live(const char *device, int snaplen, int promisc, int to_ms, char *errbuf); @@ -155,6 +154,24 @@ char *pcap_lookupdev(char *errbuf); int pcap_inject(pcap_t *p, const void *buf, size_t size); int pcap_fileno(pcap_t *p); const char *pcap_lib_version(void); +void pcap_freealldevs(pcap_if_t *); +pcap_t *pcap_create(const char *, char *); +int pcap_activate(pcap_t *); +int pcap_can_set_rfmon(pcap_t *); +int pcap_set_snaplen(pcap_t *, int); +int pcap_snapshot(pcap_t *); +int pcap_lookupnet(const char *, uint32_t *, uint32_t *, char *); +int pcap_set_promisc(pcap_t *, int); +int pcap_set_timeout(pcap_t *, int); +int pcap_compile(pcap_t *, struct bpf_program *, const char *, int, + uint32_t); +int pcap_setfilter(pcap_t *, struct bpf_program *); +int pcap_datalink(pcap_t *); +const char *pcap_datalink_val_to_name(int); +const char *pcap_datalink_val_to_description(int); +int pcap_stats(pcap_t *, struct pcap_stat *); +int pcap_loop(pcap_t *, int, pcap_handler, u_char *); +char *pcap_geterr(pcap_t *); struct eproto { @@ -739,7 +756,8 @@ pcap_loop(pcap_t *p, int cnt, pcap_handl #endif /* __PIC__ */ #ifndef __PIC__ -void do_send(u_char *user, const struct pcap_pkthdr *h, const u_char *buf) +static void +do_send(u_char *user, const struct pcap_pkthdr *h, const u_char *buf) { pcap_inject((pcap_t *)user, buf, h->caplen); } From owner-svn-src-head@FreeBSD.ORG Wed Oct 3 23:23:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4EB0D106566B; Wed, 3 Oct 2012 23:23:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 387D78FC0A; Wed, 3 Oct 2012 23:23:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93NNkHi011485; Wed, 3 Oct 2012 23:23:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93NNjAw011479; Wed, 3 Oct 2012 23:23:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210032323.q93NNjAw011479@svn.freebsd.org> From: Adrian Chadd Date: Wed, 3 Oct 2012 23:23: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: r241170 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 23:23:46 -0000 Author: adrian Date: Wed Oct 3 23:23:45 2012 New Revision: 241170 URL: http://svn.freebsd.org/changeset/base/241170 Log: Pause and unpause the software queues for a given node based on the net80211 node power save state. * Add an ATH_NODE_UNLOCK_ASSERT() check * Add a new node field - an_is_powersave * Pause/unpause the queue based on the node state * Attempt to handle net80211 concurrency issues so the queue doesn't get paused/unpaused more than once at a time from the net80211 power save code. Whilst here (and breaking my usual rule), set CLRDMASK when a queue is unpaused, regardless of whether the queue has some pending traffic. This means the first frame from that TID (now or later) will hvae CLRDMASK set. Also whilst here, bump the swretrymax counters whenever the filtered frames code expires a frame. Again, breaking my rule, but this is just a statistics thing rather than a functional change. This doesn't fix ps-poll (but it doesn't break it too much worse than it is at the present) or correcting the TID updates. That's next on the list. Tested: * AR9220 AP (Atheros AP96 reference design) * Macbook Pro and LG Optimus 1 Android phone, both setting and clearing power save state (but not using PS-POLL.) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_debug.h head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx.h head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath.c Wed Oct 3 23:23:45 2012 (r241170) @@ -199,6 +199,7 @@ static void ath_setcurmode(struct ath_so static void ath_announce(struct ath_softc *); static void ath_dfs_tasklet(void *, int); +static void ath_node_powersave(struct ieee80211_node *, int); #ifdef IEEE80211_SUPPORT_TDMA #include @@ -1138,6 +1139,9 @@ ath_vap_create(struct ieee80211com *ic, avp->av_bmiss = vap->iv_bmiss; vap->iv_bmiss = ath_bmiss_vap; + avp->av_node_ps = vap->iv_node_ps; + vap->iv_node_ps = ath_node_powersave; + /* Set default parameters */ /* @@ -5335,6 +5339,37 @@ ath_dfs_tasklet(void *p, int npending) } } +/* + * Enable/disable power save. This must be called with + * no TX driver locks currently held, so it should only + * be called from the RX path (which doesn't hold any + * TX driver locks.) + */ +static void +ath_node_powersave(struct ieee80211_node *ni, int enable) +{ + struct ath_node *an = ATH_NODE(ni); + struct ieee80211com *ic = ni->ni_ic; + struct ath_softc *sc = ic->ic_ifp->if_softc; + struct ath_vap *avp = ATH_VAP(ni->ni_vap); + + ATH_NODE_UNLOCK_ASSERT(an); + /* XXX and no TXQ locks should be held here */ + + DPRINTF(sc, ATH_DEBUG_NODE_PWRSAVE, "%s: ni=%p, enable=%d\n", + __func__, ni, enable); + + /* Suspend or resume software queue handling */ + if (enable) + ath_tx_node_sleep(sc, an); + else + ath_tx_node_wakeup(sc, an); + + /* Update net80211 state */ + avp->av_node_ps(ni, enable); +} + + MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ #if defined(IEEE80211_ALQ) || defined(AH_DEBUG_ALQ) Modified: head/sys/dev/ath/if_ath_debug.h ============================================================================== --- head/sys/dev/ath/if_ath_debug.h Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath_debug.h Wed Oct 3 23:23:45 2012 (r241170) @@ -66,6 +66,7 @@ enum { ATH_DEBUG_SW_TX_BAR = 0x100000000ULL, /* BAR TX */ ATH_DEBUG_EDMA_RX = 0x200000000ULL, /* RX EDMA state */ ATH_DEBUG_SW_TX_FILT = 0x400000000ULL, /* SW TX FF */ + ATH_DEBUG_NODE_PWRSAVE = 0x800000000ULL, /* node powersave */ ATH_DEBUG_ANY = 0xffffffffffffffffULL }; Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath_tx.c Wed Oct 3 23:23:45 2012 (r241170) @@ -111,6 +111,9 @@ __FBSDID("$FreeBSD$"); */ #define ATH_NONQOS_TID_AC WME_AC_VO +#if 0 +static int ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an); +#endif static int ath_tx_ampdu_pending(struct ath_softc *sc, struct ath_node *an, int tid); static int ath_tx_ampdu_running(struct ath_softc *sc, struct ath_node *an, @@ -2902,9 +2905,17 @@ ath_tx_tid_resume(struct ath_softc *sc, DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: unpaused = %d\n", __func__, tid->paused); - if (tid->paused || tid->axq_depth == 0) { + if (tid->paused) + return; + + /* + * Override the clrdmask configuration for the next frame + * from this TID, just to get the ball rolling. + */ + tid->clrdmask = 1; + + if (tid->axq_depth == 0) return; - } /* XXX isfiltered shouldn't ever be 0 at this point */ if (tid->isfiltered == 1) { @@ -2912,12 +2923,6 @@ ath_tx_tid_resume(struct ath_softc *sc, return; } - /* - * Override the clrdmask configuration for the next frame, - * just to get the ball rolling. - */ - tid->clrdmask = 1; - ath_tx_tid_sched(sc, tid); /* Punt some frames to the hardware if needed */ //ath_txq_sched(sc, sc->sc_ac2q[tid->ac]); @@ -3021,6 +3026,7 @@ ath_tx_tid_filt_comp_single(struct ath_s * Don't allow a filtered frame to live forever. */ if (bf->bf_state.bfs_retries > SWMAX_RETRIES) { + sc->sc_stats.ast_tx_swretrymax++; DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: bf=%p, seqno=%d, exceeded retries\n", __func__, @@ -3073,6 +3079,7 @@ ath_tx_tid_filt_comp_aggr(struct ath_sof * Don't allow a filtered frame to live forever. */ if (bf->bf_state.bfs_retries > SWMAX_RETRIES) { + sc->sc_stats.ast_tx_swretrymax++; DPRINTF(sc, ATH_DEBUG_SW_TX_FILT, "%s: bf=%p, seqno=%d, exceeded retries\n", __func__, @@ -5282,6 +5289,145 @@ ath_addba_response_timeout(struct ieee80 ATH_TXQ_UNLOCK(sc->sc_ac2q[atid->ac]); } +#if 0 +/* + * Check if a node is asleep or not. + */ +static int +ath_tx_node_is_asleep(struct ath_softc *sc, struct ath_node *an) +{ + + ATH_NODE_LOCK_ASSERT(an); + + return (an->an_is_powersave); +} +#endif + +/* + * Mark a node as currently "in powersaving." + * This suspends all traffic on the node. + * + * This must be called with the node/tx locks free. + * + * XXX TODO: the locking silliness below is due to how the node + * locking currently works. Right now, the node lock is grabbed + * to do rate control lookups and these are done with the TX + * queue lock held. This means the node lock can't be grabbed + * first here or a LOR will occur. + * + * Eventually (hopefully!) the TX path code will only grab + * the TXQ lock when transmitting and the ath_node lock when + * doing node/TID operations. There are other complications - + * the sched/unsched operations involve walking the per-txq + * 'active tid' list and this requires both locks to be held. + */ +void +ath_tx_node_sleep(struct ath_softc *sc, struct ath_node *an) +{ + struct ath_tid *atid; + struct ath_txq *txq; + int tid; + + ATH_NODE_UNLOCK_ASSERT(an); + + /* + * It's possible that a parallel call to ath_tx_node_wakeup() + * will unpause these queues. + * + * The node lock can't just be grabbed here, as there's places + * in the driver where the node lock is grabbed _within_ a + * TXQ lock. + * So, we do this delicately and unwind state if needed. + * + * + Pause all the queues + * + Grab the node lock + * + If the queue is already asleep, unpause and quit + * + else just mark as asleep. + * + * A parallel sleep() call will just pause and then + * find they're already paused, so undo it. + * + * A parallel wakeup() call will check if asleep is 1 + * and if it's not (ie, it's 0), it'll treat it as already + * being awake. If it's 1, it'll mark it as 0 and then + * unpause everything. + * + * (Talk about a delicate hack.) + */ + + /* Suspend all traffic on the node */ + for (tid = 0; tid < IEEE80211_TID_SIZE; tid++) { + atid = &an->an_tid[tid]; + txq = sc->sc_ac2q[atid->ac]; + + ATH_TXQ_LOCK(txq); + ath_tx_tid_pause(sc, atid); + ATH_TXQ_UNLOCK(txq); + } + + ATH_NODE_LOCK(an); + + /* In case of concurrency races from net80211.. */ + if (an->an_is_powersave == 1) { + ATH_NODE_UNLOCK(an); + device_printf(sc->sc_dev, + "%s: an=%p: node was already asleep\n", + __func__, an); + for (tid = 0; tid < IEEE80211_TID_SIZE; tid++) { + atid = &an->an_tid[tid]; + txq = sc->sc_ac2q[atid->ac]; + + ATH_TXQ_LOCK(txq); + ath_tx_tid_resume(sc, atid); + ATH_TXQ_UNLOCK(txq); + } + return; + } + + /* Mark node as in powersaving */ + an->an_is_powersave = 1; + + ATH_NODE_UNLOCK(an); +} + +/* + * Mark a node as currently "awake." + * This resumes all traffic to the node. + */ +void +ath_tx_node_wakeup(struct ath_softc *sc, struct ath_node *an) +{ + struct ath_tid *atid; + struct ath_txq *txq; + int tid; + + ATH_NODE_UNLOCK_ASSERT(an); + ATH_NODE_LOCK(an); + + /* In case of concurrency races from net80211.. */ + if (an->an_is_powersave == 0) { + ATH_NODE_UNLOCK(an); + device_printf(sc->sc_dev, + "%s: an=%p: node was already awake\n", + __func__, an); + return; + } + + /* Mark node as awake */ + an->an_is_powersave = 0; + + ATH_NODE_UNLOCK(an); + + for (tid = 0; tid < IEEE80211_TID_SIZE; tid++) { + atid = &an->an_tid[tid]; + txq = sc->sc_ac2q[atid->ac]; + + ATH_TXQ_LOCK(txq); + ath_tx_tid_resume(sc, atid); + ATH_TXQ_UNLOCK(txq); + } +} + static int ath_legacy_dma_txsetup(struct ath_softc *sc) { Modified: head/sys/dev/ath/if_ath_tx.h ============================================================================== --- head/sys/dev/ath/if_ath_tx.h Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_ath_tx.h Wed Oct 3 23:23:45 2012 (r241170) @@ -124,6 +124,12 @@ extern void ath_addba_response_timeout(s struct ieee80211_tx_ampdu *tap); /* + * AP mode power save handling (of stations) + */ +extern void ath_tx_node_sleep(struct ath_softc *sc, struct ath_node *an); +extern void ath_tx_node_wakeup(struct ath_softc *sc, struct ath_node *an); + +/* * Setup path */ #define ath_txdma_setup(_sc) \ Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Wed Oct 3 22:02:16 2012 (r241169) +++ head/sys/dev/ath/if_athvar.h Wed Oct 3 23:23:45 2012 (r241170) @@ -170,6 +170,7 @@ struct ath_node { struct ieee80211_node an_node; /* base class */ u_int8_t an_mgmtrix; /* min h/w rate index */ u_int8_t an_mcastrix; /* mcast h/w rate index */ + uint32_t an_is_powersave; /* node is sleeping */ struct ath_buf *an_ff_buf[WME_NUM_AC]; /* ff staging area */ struct ath_tid an_tid[IEEE80211_TID_SIZE]; /* per-TID state */ char an_name[32]; /* eg "wlan0_a1" */ @@ -332,6 +333,8 @@ struct ath_txq { #define ATH_NODE_LOCK(_an) mtx_lock(&(_an)->an_mtx) #define ATH_NODE_UNLOCK(_an) mtx_unlock(&(_an)->an_mtx) #define ATH_NODE_LOCK_ASSERT(_an) mtx_assert(&(_an)->an_mtx, MA_OWNED) +#define ATH_NODE_UNLOCK_ASSERT(_an) mtx_assert(&(_an)->an_mtx, \ + MA_NOTOWNED) #define ATH_TXQ_LOCK_INIT(_sc, _tq) do { \ snprintf((_tq)->axq_name, sizeof((_tq)->axq_name), "%s_txq%u", \ @@ -379,6 +382,7 @@ struct ath_vap { int (*av_newstate)(struct ieee80211vap *, enum ieee80211_state, int); void (*av_bmiss)(struct ieee80211vap *); + void (*av_node_ps)(struct ieee80211_node *, int); }; #define ATH_VAP(vap) ((struct ath_vap *)(vap)) From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 04:15:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87A55106564A; Thu, 4 Oct 2012 04:15:19 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 673F78FC15; Thu, 4 Oct 2012 04:15:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q944FJEh059478; Thu, 4 Oct 2012 04:15:19 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q944FJWK059470; Thu, 4 Oct 2012 04:15:19 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201210040415.q944FJWK059470@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 4 Oct 2012 04:15: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: r241181 - in head: include/rpc lib/libc/rpc sys/rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 04:15:19 -0000 Author: pfg Date: Thu Oct 4 04:15:18 2012 New Revision: 241181 URL: http://svn.freebsd.org/changeset/base/241181 Log: rpc: convert all uid and gid variables to u_int. After further discussion, instead of pretending to use uid_t and gid_t as upstream Solaris and linux try to, we are better using u_int, which is in fact what the code can handle and best approaches the range of values used by uid and gid. Discussed with: bde Reviewed by: bde Modified: head/include/rpc/auth.h head/include/rpc/auth_unix.h head/lib/libc/rpc/auth_unix.c head/lib/libc/rpc/authunix_prot.c head/lib/libc/rpc/rpc_soc.3 head/lib/libc/rpc/svc_auth_unix.c head/sys/rpc/auth.h Modified: head/include/rpc/auth.h ============================================================================== --- head/include/rpc/auth.h Thu Oct 4 03:59:45 2012 (r241180) +++ head/include/rpc/auth.h Thu Oct 4 04:15:18 2012 (r241181) @@ -243,13 +243,13 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * u_int uid; + * u_int gid; * int len; - * gid_t *aup_gids; + * u_int *aup_gids; */ __BEGIN_DECLS -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, u_int, u_int, int, u_int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ extern AUTH *authnone_create(void); /* takes no parameters */ __END_DECLS Modified: head/include/rpc/auth_unix.h ============================================================================== --- head/include/rpc/auth_unix.h Thu Oct 4 03:59:45 2012 (r241180) +++ head/include/rpc/auth_unix.h Thu Oct 4 04:15:18 2012 (r241181) @@ -60,10 +60,10 @@ struct authunix_parms { u_long aup_time; char *aup_machname; - uid_t aup_uid; - gid_t aup_gid; + u_int aup_uid; + u_int aup_gid; u_int aup_len; - gid_t *aup_gids; + u_int *aup_gids; }; #define authsys_parms authunix_parms Modified: head/lib/libc/rpc/auth_unix.c ============================================================================== --- head/lib/libc/rpc/auth_unix.c Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/auth_unix.c Thu Oct 4 04:15:18 2012 (r241181) @@ -94,10 +94,10 @@ struct audata { AUTH * authunix_create(machname, uid, gid, len, aup_gids) char *machname; - uid_t uid; - gid_t gid; + u_int uid; + u_int gid; int len; - gid_t *aup_gids; + u_int *aup_gids; { struct authunix_parms aup; char mymem[MAX_AUTH_BYTES]; @@ -207,6 +207,7 @@ authunix_create_default() abort(); if (ngids > NGRPS) ngids = NGRPS; + /* XXX: interface problem; we should translate from uid_t and gid_t */ auth = authunix_create(machname, uid, gid, ngids, gids); free(gids); return (auth); Modified: head/lib/libc/rpc/authunix_prot.c ============================================================================== --- head/lib/libc/rpc/authunix_prot.c Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/authunix_prot.c Thu Oct 4 04:15:18 2012 (r241181) @@ -60,7 +60,7 @@ xdr_authunix_parms(xdrs, p) XDR *xdrs; struct authunix_parms *p; { - gid_t **paup_gids; + u_int **paup_gids; assert(xdrs != NULL); assert(p != NULL); @@ -72,7 +72,7 @@ xdr_authunix_parms(xdrs, p) xdr_u_int(xdrs, &(p->aup_uid)) && xdr_u_int(xdrs, &(p->aup_gid)) && xdr_array(xdrs, (char **) paup_gids, - &(p->aup_len), NGRPS, sizeof(gid_t), (xdrproc_t)xdr_int) ) { + &(p->aup_len), NGRPS, sizeof(u_int), (xdrproc_t)xdr_u_int) ) { return (TRUE); } return (FALSE); Modified: head/lib/libc/rpc/rpc_soc.3 ============================================================================== --- head/lib/libc/rpc/rpc_soc.3 Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/rpc_soc.3 Thu Oct 4 04:15:18 2012 (r241181) @@ -148,7 +148,7 @@ default authentication used by .Ft "AUTH *" .Xc .It Xo -.Fn authunix_create "char *host" "uid_t uid" "gid_t gid" "int len" "gid_t *aup_gids" +.Fn authunix_create "char *host" "u_int uid" "u_int gid" "int len" "u_int *aup_gids" .Xc .Pp Create and return an Modified: head/lib/libc/rpc/svc_auth_unix.c ============================================================================== --- head/lib/libc/rpc/svc_auth_unix.c Thu Oct 4 03:59:45 2012 (r241180) +++ head/lib/libc/rpc/svc_auth_unix.c Thu Oct 4 04:15:18 2012 (r241181) @@ -68,7 +68,7 @@ _svcauth_unix(rqst, msg) struct area { struct authunix_parms area_aup; char area_machname[MAX_MACHINE_NAME+1]; - gid_t area_gids[NGRPS]; + u_int area_gids[NGRPS]; } *area; u_int auth_len; size_t str_len, gid_len; Modified: head/sys/rpc/auth.h ============================================================================== --- head/sys/rpc/auth.h Thu Oct 4 03:59:45 2012 (r241180) +++ head/sys/rpc/auth.h Thu Oct 4 04:15:18 2012 (r241181) @@ -234,17 +234,17 @@ __END_DECLS * System style authentication * AUTH *authunix_create(machname, uid, gid, len, aup_gids) * char *machname; - * uid_t uid; - * gid_t gid; + * u_int uid; + * u_int gid; * int len; - * gid_t *aup_gids; + * u_int *aup_gids; */ __BEGIN_DECLS #ifdef _KERNEL struct ucred; extern AUTH *authunix_create(struct ucred *); #else -extern AUTH *authunix_create(char *, uid_t, gid_t, int, gid_t *); +extern AUTH *authunix_create(char *, u_int, u_int, int, u_int *); extern AUTH *authunix_create_default(void); /* takes no parameters */ #endif extern AUTH *authnone_create(void); /* takes no parameters */ From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 06:42:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19A2810656D9; Thu, 4 Oct 2012 06:42:08 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EDA98FCC6; Thu, 4 Oct 2012 06:33:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q946X5cP083787; Thu, 4 Oct 2012 06:33:05 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q946X42x083785; Thu, 4 Oct 2012 06:33:04 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210040633.q946X42x083785@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Oct 2012 06:33: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: r241182 - head/usr.sbin/sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 04 Oct 2012 06:42:08 -0000 Author: joel (doc committer) Date: Thu Oct 4 06:33:03 2012 New Revision: 241182 URL: http://svn.freebsd.org/changeset/base/241182 Log: Fix HISTORY. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Thu Oct 4 04:15:18 2012 (r241181) +++ head/usr.sbin/sysrc/sysrc.8 Thu Oct 4 06:33:03 2012 (r241182) @@ -282,7 +282,7 @@ This will be corrected by a future enhan A .Nm utility first appeared in -.Bx 10.0 . +.Fx 10.0 . .Sh AUTHORS .An Devin Teske Aq dteske@FreeBSD.org .Sh THANKS TO From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 07:40:56 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 13DAD1065670; Thu, 4 Oct 2012 07:40:56 +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 F34188FC20; Thu, 4 Oct 2012 07:40:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q947etN0096855; Thu, 4 Oct 2012 07:40:55 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q947etAE096853; Thu, 4 Oct 2012 07:40:55 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201210040740.q947etAE096853@svn.freebsd.org> From: Andrew Thompson Date: Thu, 4 Oct 2012 07:40: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: r241183 - 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, 04 Oct 2012 07:40:56 -0000 Author: thompsa Date: Thu Oct 4 07:40:55 2012 New Revision: 241183 URL: http://svn.freebsd.org/changeset/base/241183 Log: Remove the M_NOWAIT from bridge_rtable_init as it isn't needed. The function return value is not even checked and could lead to a panic on a null sc_rthash. MFC after: 2 weeks Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Thu Oct 4 06:33:03 2012 (r241182) +++ head/sys/net/if_bridge.c Thu Oct 4 07:40:55 2012 (r241183) @@ -270,7 +270,7 @@ static void bridge_rtflush(struct bridge static int bridge_rtdaddr(struct bridge_softc *, const uint8_t *, uint16_t); -static int bridge_rtable_init(struct bridge_softc *); +static void bridge_rtable_init(struct bridge_softc *); static void bridge_rtable_fini(struct bridge_softc *); static int bridge_rtnode_addr_cmp(const uint8_t *, const uint8_t *); @@ -2736,24 +2736,19 @@ bridge_rtdelete(struct bridge_softc *sc, * * Initialize the route table for this bridge. */ -static int +static void bridge_rtable_init(struct bridge_softc *sc) { int i; sc->sc_rthash = malloc(sizeof(*sc->sc_rthash) * BRIDGE_RTHASH_SIZE, - M_DEVBUF, M_NOWAIT); - if (sc->sc_rthash == NULL) - return (ENOMEM); + M_DEVBUF, M_WAITOK); for (i = 0; i < BRIDGE_RTHASH_SIZE; i++) LIST_INIT(&sc->sc_rthash[i]); sc->sc_rthash_key = arc4random(); - LIST_INIT(&sc->sc_rtlist); - - return (0); } /* From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 08:53:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 155C01065672; Thu, 4 Oct 2012 08:53:06 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E203F8FC4B; Thu, 4 Oct 2012 08:53:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q948r5vY010764; Thu, 4 Oct 2012 08:53:05 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q948r5TN010762; Thu, 4 Oct 2012 08:53:05 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201210040853.q948r5TN010762@svn.freebsd.org> From: Tijl Coosemans Date: Thu, 4 Oct 2012 08:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241190 - 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: Thu, 04 Oct 2012 08:53:06 -0000 Author: tijl Date: Thu Oct 4 08:53:05 2012 New Revision: 241190 URL: http://svn.freebsd.org/changeset/base/241190 Log: Define clang feature test macro __has_extension. It's used in stdatomic.h. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Oct 4 08:49:41 2012 (r241189) +++ head/sys/sys/cdefs.h Thu Oct 4 08:53:05 2012 (r241190) @@ -675,6 +675,9 @@ #endif #endif +#ifndef __has_extension +#define __has_extension __has_feature +#endif #ifndef __has_feature #define __has_feature(x) 0 #endif From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 15:42:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50338106566B; Thu, 4 Oct 2012 15:42:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 398128FC08; Thu, 4 Oct 2012 15:42:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94FgkDS079114; Thu, 4 Oct 2012 15:42:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94FgkLs079111; Thu, 4 Oct 2012 15:42:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210041542.q94FgkLs079111@svn.freebsd.org> From: Adrian Chadd Date: Thu, 4 Oct 2012 15:42: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: r241195 - in head/sys/dev/ath/ath_hal: ar5416 ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 04 Oct 2012 15:42:46 -0000 Author: adrian Date: Thu Oct 4 15:42:45 2012 New Revision: 241195 URL: http://svn.freebsd.org/changeset/base/241195 Log: Implement the quarter rate fractional channel programming for the AR5416 and AR9280, but leave it disabled by default. TL;DR: don't enable this code at all unless you go through the process of getting the NIC re-certified. This is purely to be used as a reference and NOT a certified solution by any stretch of the imagination. The background: The AR5112 RF synth right up to the AR5133 RF synth (used on the AR5416, derivative is used for the AR9130/AR9160) only implement down to 2.5MHz channel spacing in 5GHz. Ie, the RF synth is programmed in steps of 2.5MHz (or 5, 10, 20MHz.) So they can't represent the quarter rate channels in the 4.9GHz PSB (which end in xxx2MHz and xxx7MHz). They support fractional spacing in 2GHz (1MHz spacing) (or things wouldn't work, right?) So instead of doing this, the RF synth programming for the AR5112 and later code will round to the nearest available frequency. If all NICs were RF5112 or later, they'll inter-operate fine - they all program the same. (And for reference, only the latest revision of the RF5111 NICs do it, but the driver doesn't yet implement the programming.) However: * The AR5416 programming didn't at all implement the fractional synth work around as above; * The AR9280 programming actually programmed the accurate centre frequency and thus wouldn't inter-operate with the legacy NICs. So this patch: * Implements the 4.9GHz PSB fractional synth workaround, exactly as the RF5112 and later code does; * Adds a very dirty workaround from me to calculate the same channel centre "fudge" to the AR9280 code when operating on fractional frequencies in 5GHz. HOWEVER however: It is disabled by default. Since the HAL didn't implement this feature, it's highly unlikely that the AR5416 and AR928x has been tested in these centre frequencies. There's a lot of regulatory compliance testing required before a NIC can have this enabled - checking for centre frequency, for drift, for synth spurs, for distortion and spectral mask compliance. There's likely a lot of other things that need testing so please don't treat this as an exhaustive, authoritative list. There's a perfectly good process out there to get a NIC certified by your regulatory domain, please go and engage someone to do that for you and pay the relevant fees. If a company wishes to grab this work and certify existing 802.11n NICs for work in these bands then please be my guest. The AR9280 works fine on the correct fractional synth channels (49x2 and 49x7Mhz) so you don't need to get certification for that. But the 500KHz offset hack may have the above issues (spur, distortion, accuracy, etc) so you will need to get the NIC recertified. Please note that it's also CARD dependent. Just because the RF synth will behave correctly doesn't at all mean that the card design will also behave correctly. So no, I won't enable this by default if someone verifies a specific AR5416/AR9280 NIC works. Please don't ask. Tested: I used the following NICs to do basic interoperability testing at half and quarter rates. However, I only did very minimal spectrum analyser testing (mostly "am I about to blow things up" testing; not "certification ready" testing): * AR5212 + AR5112 synth * AR5413 + AR5413 synth * AR5416 + AR5113 synth * AR9280 Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c head/sys/dev/ath/ath_hal/ar9002/ar9280.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar2133.c Thu Oct 4 12:43:45 2012 (r241194) +++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c Thu Oct 4 15:42:45 2012 (r241195) @@ -163,6 +163,33 @@ ar2133SetChannel(struct ath_hal *ah, con OS_REG_WRITE(ah, AR_PHY_CCK_TX_CTRL, txctl &~ AR_PHY_CCK_TX_CTRL_JAPAN); } + /* + * Handle programming the RF synth for odd frequencies in the + * 4.9->5GHz range. This matches the programming from the + * later model 802.11abg RF synths. + * + * This interoperates on the quarter rate channels with the + * AR5112 and later RF synths. Please note that the synthesiser + * isn't able to completely accurately represent these frequencies + * (as the resolution in this reference is 2.5MHz) and thus it will + * be slightly "off centre." This matches the same slightly + * incorrect * centre frequency behaviour that the AR5112 and later + * channel selection code has. + * + * This is disabled because it hasn't been tested for regulatory + * compliance and neither have the NICs which would use it. + * So if you enable this code, you must first ensure that you've + * re-certified the NICs in question beforehand or you will be + * violating your local regulatory rules and breaking the law. + */ +#if 0 + } else if (((freq % 5) == 2) && (freq <= 5435)) { + freq = freq - 2; + channelSel = ath_hal_reverseBits( + (uint32_t) (((freq - 4800) * 10) / 25 + 1), 8); + /* XXX what about for Howl/Sowl? */ + aModeRefSel = ath_hal_reverseBits(0, 2); +#endif } else if ((freq % 20) == 0 && freq >= 5120) { channelSel = ath_hal_reverseBits(((freq - 4800) / 20 << 2), 8); if (AR_SREV_HOWL(ah) || AR_SREV_SOWL_10_OR_LATER(ah)) @@ -179,7 +206,8 @@ ar2133SetChannel(struct ath_hal *ah, con channelSel = ath_hal_reverseBits((freq - 4800) / 5, 8); aModeRefSel = ath_hal_reverseBits(1, 2); } else { - HALDEBUG(ah, HAL_DEBUG_ANY, "%s: invalid channel %u MHz\n", + HALDEBUG(ah, HAL_DEBUG_UNMASKABLE, + "%s: invalid channel %u MHz\n", __func__, freq); return AH_FALSE; } Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280.c Thu Oct 4 12:43:45 2012 (r241194) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280.c Thu Oct 4 15:42:45 2012 (r241195) @@ -132,9 +132,63 @@ ar9280SetChannel(struct ath_hal *ah, con default: aModeRefSel = 0; /* Enable 2G (fractional) mode for channels which are 5MHz spaced */ - fracMode = 1; - refDivA = 1; - channelSel = (freq * 0x8000)/15; + + /* + * Workaround for talking on PSB non-5MHz channels; + * the pre-Merlin chips only had a 2.5MHz channel + * spacing so some channels aren't reachable. + + * + * This interoperates on the quarter rate channels + * with the AR5112 and later RF synths. Please note + * that the synthesiser isn't able to completely + * accurately represent these frequencies (as the + * resolution in this reference is 2.5MHz) and thus + * it will be slightly "off centre." This matches + * the same slightly incorrect centre frequency + * behaviour that the AR5112 and later channel + * selection code has. + * + * This also interoperates with the AR5416 + * synthesiser modification for programming + * fractional frequencies in 5GHz mode. However + * that modification is also disabled by default. + * + * This is disabled because it hasn't been tested for + * regulatory compliance and neither have the NICs + * which would use it. So if you enable this code, + * you must first ensure that you've re-certified the + * NICs in question beforehand or you will be + * violating your local regulatory rules and breaking + * the law. + */ +#if 0 + if (freq % 5 == 0) { +#endif + /* Normal */ + fracMode = 1; + refDivA = 1; + channelSel = (freq * 0x8000)/15; +#if 0 + } else { + /* Offset by 500KHz */ + uint32_t f, ch, ch2; + + fracMode = 1; + refDivA = 1; + + /* Calculate the "adjusted" frequency */ + f = freq - 2; + ch = (((f - 4800) * 10) / 25) + 1; + + ch2 = ((ch * 25) / 5) + 9600; + channelSel = (ch2 * 0x4000) / 15; + //ath_hal_printf(ah, + // "%s: freq=%d, ch=%d, ch2=%d, " + // "channelSel=%d\n", + // __func__, freq, ch, ch2, channelSel); + } +#endif /* RefDivA setting */ OS_A_REG_RMW_FIELD(ah, AR_AN_SYNTH9, From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 18:59:46 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E78991065672; Thu, 4 Oct 2012 18:59:46 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D19D08FC0A; Thu, 4 Oct 2012 18:59:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94IxkdE007217; Thu, 4 Oct 2012 18:59:46 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94IxkKj007214; Thu, 4 Oct 2012 18:59:46 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201210041859.q94IxkKj007214@svn.freebsd.org> From: Jamie Gritton Date: Thu, 4 Oct 2012 18:59:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241196 - head/usr.sbin/jail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Oct 2012 18:59:47 -0000 Author: jamie Date: Thu Oct 4 18:59:46 2012 New Revision: 241196 URL: http://svn.freebsd.org/changeset/base/241196 Log: Move properly to the next parameter when jailparam_init fails (i.e. on an unknown parameter), to avoid freeing bogus pointers. Modified: head/usr.sbin/jail/config.c Modified: head/usr.sbin/jail/config.c ============================================================================== --- head/usr.sbin/jail/config.c Thu Oct 4 15:42:45 2012 (r241195) +++ head/usr.sbin/jail/config.c Thu Oct 4 18:59:46 2012 (r241196) @@ -690,6 +690,7 @@ import_params(struct cfjail *j) if (jailparam_init(jp, p->name) < 0) { error = -1; jail_warnx(j, "%s", jail_errmsg); + jp++; continue; } if (TAILQ_EMPTY(&p->val)) From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 19:07:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A672B106566C; Thu, 4 Oct 2012 19:07:06 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7761D8FC12; Thu, 4 Oct 2012 19:07:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94J76MV008261; Thu, 4 Oct 2012 19:07:06 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94J76GC008259; Thu, 4 Oct 2012 19:07:06 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201210041907.q94J76GC008259@svn.freebsd.org> From: Jamie Gritton Date: Thu, 4 Oct 2012 19:07: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: r241197 - head/lib/libjail X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 04 Oct 2012 19:07:06 -0000 Author: jamie Date: Thu Oct 4 19:07:05 2012 New Revision: 241197 URL: http://svn.freebsd.org/changeset/base/241197 Log: Fix some memory allocation errors: * jail_setv will leak a parameter name if jailparam_import fails. * jailparam_all loses the jailparam pointer on realloc error (a clear freshman mistake). * If jailparam_init fails, the caller doesn't need to jailparam_free the buffer. That's not really clear, so set things to NULL allowing jailparam_free to work without error (though it's still not required). Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c ============================================================================== --- head/lib/libjail/jail.c Thu Oct 4 18:59:46 2012 (r241196) +++ head/lib/libjail/jail.c Thu Oct 4 19:07:05 2012 (r241197) @@ -85,19 +85,22 @@ jail_setv(int flags, ...) (void)va_arg(tap, char *); va_end(tap); jp = alloca(njp * sizeof(struct jailparam)); - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + for (njp = 0; (name = va_arg(ap, char *)) != NULL;) { value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - va_end(ap); - return (-1); - } + if (jailparam_init(jp + njp, name) < 0) + goto error; + if (jailparam_import(jp + njp++, value) < 0) + goto error; } va_end(ap); jid = jailparam_set(jp, njp, flags); jailparam_free(jp, njp); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -195,7 +198,7 @@ jail_getv(int flags, ...) int jailparam_all(struct jailparam **jpp) { - struct jailparam *jp; + struct jailparam *jp, *tjp; size_t mlen1, mlen2, buflen; int njp, nlist; int mib1[CTL_MAXNAME], mib2[CTL_MAXNAME - 2]; @@ -242,11 +245,10 @@ jailparam_all(struct jailparam **jpp) /* Add the parameter to the list */ if (njp >= nlist) { nlist *= 2; - jp = realloc(jp, nlist * sizeof(*jp)); - if (jp == NULL) { - jailparam_free(jp, njp); - return (-1); - } + tjp = realloc(jp, nlist * sizeof(*jp)); + if (tjp == NULL) + goto error; + jp = tjp; } if (jailparam_init(jp + njp, buf + sizeof(SJPARAM)) < 0) goto error; @@ -277,6 +279,8 @@ jailparam_init(struct jailparam *jp, con } if (jailparam_type(jp) < 0) { jailparam_free(jp, 1); + jp->jp_name = NULL; + jp->jp_value = NULL; return (-1); } return (0); From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 20:00:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CCBFA106566B; Thu, 4 Oct 2012 20:00:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EFC78FC0A; Thu, 4 Oct 2012 20:00:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q94K0WOW015666; Thu, 4 Oct 2012 20:00:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q94K0W7b015664; Thu, 4 Oct 2012 20:00:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210042000.q94K0W7b015664@svn.freebsd.org> From: John Baldwin Date: Thu, 4 Oct 2012 20:00: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: r241198 - head/usr.sbin/acpi/acpidump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 04 Oct 2012 20:00:32 -0000 Author: jhb Date: Thu Oct 4 20:00:32 2012 New Revision: 241198 URL: http://svn.freebsd.org/changeset/base/241198 Log: Display the matrix of inter-domain distances in the SLIT table. This is used to complement the SRAT table on NUMA machines. MFC after: 1 week Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Thu Oct 4 19:07:05 2012 (r241197) +++ head/usr.sbin/acpi/acpidump/acpi.c Thu Oct 4 20:00:32 2012 (r241198) @@ -63,6 +63,7 @@ static void acpi_handle_madt(ACPI_TABLE_ static void acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp); static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp); static void acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp); +static void acpi_handle_slit(ACPI_TABLE_HEADER *sdp); static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags); static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp); @@ -519,6 +520,33 @@ acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp) } static void +acpi_handle_slit(ACPI_TABLE_HEADER *sdp) +{ + ACPI_TABLE_SLIT *slit; + UINT64 i, j; + + printf(BEGIN_COMMENT); + acpi_print_sdt(sdp); + slit = (ACPI_TABLE_SLIT *)sdp; + printf("\tLocality Count=%jd\n", slit->LocalityCount); + printf("\n\t "); + for (i = 0; i < slit->LocalityCount; i++) + printf(" %3jd", i); + printf("\n\t +"); + for (i = 0; i < slit->LocalityCount; i++) + printf("----"); + printf("\n"); + for (i = 0; i < slit->LocalityCount; i++) { + printf("\t %3jd |", i); + for (j = 0; j < slit->LocalityCount; j++) + printf(" %3d", + slit->Entry[i * slit->LocalityCount + j]); + printf("\n"); + } + printf(END_COMMENT); +} + +static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain, uint32_t flags) { @@ -1092,6 +1120,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp acpi_handle_ecdt(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_MCFG, 4)) acpi_handle_mcfg(sdp); + else if (!memcmp(sdp->Signature, ACPI_SIG_SLIT, 4)) + acpi_handle_slit(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_SRAT, 4)) acpi_handle_srat(sdp); else if (!memcmp(sdp->Signature, ACPI_SIG_TCPA, 4)) From owner-svn-src-head@FreeBSD.ORG Thu Oct 4 21:08:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A5F2E1065700; Thu, 4 Oct 2012 21:08:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7B2818FC12; Thu, 4 Oct 2012 21:08:32 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E19CFB972; Thu, 4 Oct 2012 17:08:31 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Date: Thu, 4 Oct 2012 17:05:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p20; KDE/4.5.5; amd64; ; ) References: <201210042000.q94K0W7b015664@svn.freebsd.org> In-Reply-To: <201210042000.q94K0W7b015664@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201210041705.49131.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 04 Oct 2012 17:08:32 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r241198 - head/usr.sbin/acpi/acpidump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 04 Oct 2012 21:08:32 -0000 On Thursday, October 04, 2012 4:00:32 pm John Baldwin wrote: > Author: jhb > Date: Thu Oct 4 20:00:32 2012 > New Revision: 241198 > URL: http://svn.freebsd.org/changeset/base/241198 > > Log: > Display the matrix of inter-domain distances in the SLIT table. This is > used to complement the SRAT table on NUMA machines. A very simplistic example from a dual-socket Sandy-Bridge EP (I don't have a quad-socket box handy): /* SLIT: Length=48, Revision=1, Checksum=228, OEMID=A M I, OEM Table ID=AMI SLIT, OEM Revision=0x0, Creator ID=AMI., Creator Revision=0x0 Locality Count=2 0 1 +-------- 0 | 10 21 1 | 21 10 */ -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 00:08:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 821BF106566C; Fri, 5 Oct 2012 00:08:18 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id BF6C48FC0C; Fri, 5 Oct 2012 00:08:17 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so1526902obb.13 for ; Thu, 04 Oct 2012 17:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=IPthyT5vKssHXX4SFZqPrSj/fRVLrSy00sasitiFACE=; b=EkogAwIIjZ7AU5dN1OdRwj8FzzO01gHRPNY6iWYJpUWEmTIEPXjGdJhJRlFr/Q46ZG ytrFMb9c4oA3ZdZq/ixAOEAIeCd3RxT33i0XrqC2R4HhahrbxRytbDnwvuSxgDq7U9H/ r+kMzpPZB5s4ng4fQ05naryCBVhlN9ZEyrLnLb/rk7CalTQO27rl7N010KNgJ4k9MahS RE4uUghxGcOU3M85SnRjgvcDIDUg7QXWwc1mmBdGsG6V5r6alT3d2R8GP/qmne/Wmz+j hONA3YH7gWhr27wrgOU1DNrwouyHcEmyY4frKn2HRLX8GEY01OwaNdo4hANQxcyV+zBO sfdQ== MIME-Version: 1.0 Received: by 10.60.171.134 with SMTP id au6mr5761915oec.69.1349395690886; Thu, 04 Oct 2012 17:08:10 -0700 (PDT) Received: by 10.76.142.201 with HTTP; Thu, 4 Oct 2012 17:08:10 -0700 (PDT) In-Reply-To: <201209242035.q8OKZvUM093772@svn.freebsd.org> References: <201209242035.q8OKZvUM093772@svn.freebsd.org> Date: Thu, 4 Oct 2012 17:08:10 -0700 Message-ID: From: Garrett Cooper To: Adrian Chadd Content-Type: multipart/mixed; boundary=bcaec550b604d1145e04cb44aa73 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240899 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 00:08:18 -0000 --bcaec550b604d1145e04cb44aa73 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 24, 2012 at 1:35 PM, Adrian Chadd wrote: > Author: adrian > Date: Mon Sep 24 20:35:56 2012 > New Revision: 240899 > URL: http://svn.freebsd.org/changeset/base/240899 > > Log: > Migrate the ath(4) KTR logging to use an ATH_KTR() macro. > > This should eventually be unified with ATH_DEBUG() so I can get both > from one macro; that may take some time. > > Add some new probes for TX and TX completion. This commit broke the non-IEEE80211_SUPPORT_TDMA case. My attached patch fixes it by better unifying the IEEE80211_SUPPORT_TDMA and non-IEEE80211_SUPPORT_TDMA cases where it made sense (it could be further unified, but that might make things more convoluted). Thanks! -Garrett --bcaec550b604d1145e04cb44aa73 Content-Type: application/octet-stream; name="fix-if_ath_tx-non-IEEE80211_SUPPORT_TDMA.patch" Content-Disposition: attachment; filename="fix-if_ath_tx-non-IEEE80211_SUPPORT_TDMA.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_h7wjb0230 SW5kZXg6IGRldi9hdGgvaWZfYXRoX3R4LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZGV2L2F0aC9pZl9hdGhf dHguYwkocmV2aXNpb24gMjQxMjEzKQorKysgZGV2L2F0aC9pZl9hdGhfdHguYwkod29ya2luZyBj b3B5KQpAQCAtNzI1LDE1ICs3MjUsMTkgQEAKIAogCS8qIEZvciBub3csIHNvIG5vdCB0byBnZW5l cmF0ZSB3aGl0ZXNwYWNlIGRpZmZzICovCiAJaWYgKDEpIHsKLSNpZmRlZiBJRUVFODAyMTFfU1VQ UE9SVF9URE1BCiAJCWludCBxYnVzeTsKIAogCQlBVEhfVFhRX0lOU0VSVF9UQUlMKHR4cSwgYmYs IGJmX2xpc3QpOwogCQlxYnVzeSA9IGF0aF9oYWxfdHhxZW5hYmxlZChhaCwgdHhxLT5heHFfcW51 bSk7Ci0KIAkJQVRIX0tUUihzYywgQVRIX0tUUl9UWCwgNCwKLQkJICAgICJhdGhfdHhfaGFuZG9m ZjogdHhxPSV1LCBhZGQgYmY9JXAsIHFidXN5PSVkLCBkZXB0aD0lZCIsCisJCSAgICAiYXRoX3R4 X2hhbmRvZmYlczogdHhxPSV1LCBhZGQgYmY9JXAsIHFidXN5PSVkLCBkZXB0aD0lZCIsCisjaWZk ZWYgSUVFRTgwMjExX1NVUFBPUlRfVERNQQorCQkgICAgIiIKKyNlbHNlCisJCSAgICAiOiBub24t dGRtYSIKKyNlbmRpZgogCQkgICAgdHhxLT5heHFfcW51bSwgYmYsIHFidXN5LCB0eHEtPmF4cV9k ZXB0aCk7CisjaWZkZWYgSUVFRTgwMjExX1NVUFBPUlRfVERNQQogCQlpZiAodHhxLT5heHFfbGlu ayA9PSBOVUxMKSB7CiAJCQkvKgogCQkJICogQmUgY2FyZWZ1bCB3cml0aW5nIHRoZSBhZGRyZXNz IHRvIFRYRFAuICBJZgpAQCAtODA4LDE0ICs4MTIsNiBAQAogCQkJfQogCQl9CiAjZWxzZQotCQlB VEhfVFhRX0lOU0VSVF9UQUlMKHR4cSwgYmYsIGJmX2xpc3QpOwotCQlBVEhfS1RSKHNjLCBBVEhf S1RSX1RYLCA0LAotCQkgICAgImF0aF90eF9oYW5kb2ZmOiBub24tdGRtYTogdHhxPSV1LCBhZGQg YmY9JXAsIHFidXN5PSVkLCAiCi0JCSAgICAiZGVwdGg9JWQiLAotCQkgICAgdHhxLT5heHFfcW51 bSwKLQkJICAgIGJmLAotCQkgICAgcWJ1c3ksCi0JCSAgICB0eHEtPmF4cV9kZXB0aCk7CiAJCWlm ICh0eHEtPmF4cV9saW5rID09IE5VTEwpIHsKIAkJCWF0aF9oYWxfcHV0dHhidWYoYWgsIHR4cS0+ YXhxX3FudW0sIGJmLT5iZl9kYWRkcik7CiAJCQlEUFJJTlRGKHNjLCBBVEhfREVCVUdfWE1JVCwK --bcaec550b604d1145e04cb44aa73-- From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 00:35:14 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B400106564A; Fri, 5 Oct 2012 00:35:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458558FC17; Fri, 5 Oct 2012 00:35:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q950ZEwM052731; Fri, 5 Oct 2012 00:35:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q950ZERI052728; Fri, 5 Oct 2012 00:35:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201210050035.q950ZERI052728@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 5 Oct 2012 00:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241214 - in head: . lib/clang/include X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 00:35:14 -0000 Author: jkim Date: Fri Oct 5 00:35:13 2012 New Revision: 241214 URL: http://svn.freebsd.org/changeset/base/241214 Log: Do not install incomplete unwind.h from clang. This header file was meant to be a wrapper for the canonical system header file. Unfortunately, we do not have one (yet) and some times it is causing weird failures when clang is used for building ports. More complete and correct file will come from libcxxrt in the future. Discussed with: dim, kib, theraven MFC after: 1 week Modified: head/ObsoleteFiles.inc head/lib/clang/include/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Oct 4 22:56:15 2012 (r241213) +++ head/ObsoleteFiles.inc Fri Oct 5 00:35:13 2012 (r241214) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20121004: remove incomplete unwind.h +OLD_FILES+=usr/include/clang/3.2/unwind.h # 20120908: pf cleanup OLD_FILES+=usr/include/net/if_pflow.h # 20120816: new clang import which bumps version from 3.1 to 3.2 Modified: head/lib/clang/include/Makefile ============================================================================== --- head/lib/clang/include/Makefile Thu Oct 4 22:56:15 2012 (r241213) +++ head/lib/clang/include/Makefile Fri Oct 5 00:35:13 2012 (r241214) @@ -25,7 +25,6 @@ INCS= altivec.h \ popcntintrin.h \ smmintrin.h \ tmmintrin.h \ - unwind.h \ wmmintrin.h \ x86intrin.h \ xmmintrin.h \ From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 03:35:39 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71619106566B; Fri, 5 Oct 2012 03:35:39 +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 5C75E8FC08; Fri, 5 Oct 2012 03:35:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q953Zdfm079043; Fri, 5 Oct 2012 03:35:39 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q953ZdLs079041; Fri, 5 Oct 2012 03:35:39 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050335.q953ZdLs079041@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 03:35: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: r241215 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 03:35:39 -0000 Author: yongari Date: Fri Oct 5 03:35:38 2012 New Revision: 241215 URL: http://svn.freebsd.org/changeset/base/241215 Log: Don't touch EMAC Mode and TX/RX MAC Mode register when driver is not running. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 00:35:13 2012 (r241214) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 03:35:38 2012 (r241215) @@ -896,7 +896,10 @@ bge_miibus_statchg(device_t dev) { struct bge_softc *sc; struct mii_data *mii; + sc = device_get_softc(dev); + if ((sc->bge_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; mii = device_get_softc(sc->bge_miibus); if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == @@ -5054,11 +5057,11 @@ bge_init_locked(struct bge_softc *sc) bge_writembx(sc, BGE_MBX_IRQ0_LO, 0); } - bge_ifmedia_upd_locked(ifp); - ifp->if_drv_flags |= IFF_DRV_RUNNING; ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + bge_ifmedia_upd_locked(ifp); + callout_reset(&sc->bge_stat_ch, hz, bge_tick, sc); } From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 03:46:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 183FD1065670; Fri, 5 Oct 2012 03:46:28 +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 B953D8FC08; Fri, 5 Oct 2012 03:46:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q953kPu7080590; Fri, 5 Oct 2012 03:46:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q953kPdK080588; Fri, 5 Oct 2012 03:46:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050346.q953kPdK080588@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 03:46: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: r241216 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 03:46:28 -0000 Author: yongari Date: Fri Oct 5 03:46:25 2012 New Revision: 241216 URL: http://svn.freebsd.org/changeset/base/241216 Log: APE firmware touches EMAC Mode and TX/RX MAC Mode registers to keep the MAC connected to the outside world. So keep the accesses atomic. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 03:35:38 2012 (r241215) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 03:46:25 2012 (r241216) @@ -896,6 +896,7 @@ bge_miibus_statchg(device_t dev) { struct bge_softc *sc; struct mii_data *mii; + uint32_t mac_mode, rx_mode, tx_mode; sc = device_get_softc(dev); if ((sc->bge_ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) @@ -925,30 +926,39 @@ bge_miibus_statchg(device_t dev) sc->bge_link = 0; if (sc->bge_link == 0) return; - BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_PORTMODE); + + /* + * APE firmware touches these registers to keep the MAC + * connected to the outside world. Try to keep the + * accesses atomic. + */ + + /* Set the port mode (MII/GMII) to match the link speed. */ + mac_mode = CSR_READ_4(sc, BGE_MAC_MODE) & + ~(BGE_MACMODE_PORTMODE | BGE_MACMODE_HALF_DUPLEX); + tx_mode = CSR_READ_4(sc, BGE_TX_MODE); + rx_mode = CSR_READ_4(sc, BGE_RX_MODE); + if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T || IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_SX) - BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_GMII); + mac_mode |= BGE_PORTMODE_GMII; else - BGE_SETBIT(sc, BGE_MAC_MODE, BGE_PORTMODE_MII); + mac_mode |= BGE_PORTMODE_MII; + /* Set MAC flow control behavior to match link flow control settings. */ + tx_mode &= ~BGE_TXMODE_FLOWCTL_ENABLE; + rx_mode &= ~BGE_RXMODE_FLOWCTL_ENABLE; if (IFM_OPTIONS(mii->mii_media_active & IFM_FDX) != 0) { - BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - if ((IFM_OPTIONS(mii->mii_media_active) & - IFM_ETH_TXPAUSE) != 0) - BGE_SETBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - else - BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - if ((IFM_OPTIONS(mii->mii_media_active) & - IFM_ETH_RXPAUSE) != 0) - BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); - else - BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); - } else { - BGE_SETBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); - BGE_CLRBIT(sc, BGE_TX_MODE, BGE_TXMODE_FLOWCTL_ENABLE); - BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_FLOWCTL_ENABLE); - } + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_TXPAUSE) != 0) + tx_mode |= BGE_TXMODE_FLOWCTL_ENABLE; + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_ETH_RXPAUSE) != 0) + rx_mode |= BGE_RXMODE_FLOWCTL_ENABLE; + } else + mac_mode |= BGE_MACMODE_HALF_DUPLEX; + + CSR_WRITE_4(sc, BGE_MAC_MODE, mac_mode); + CSR_WRITE_4(sc, BGE_TX_MODE, tx_mode); + CSR_WRITE_4(sc, BGE_RX_MODE, rx_mode); } /* From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 04:35:20 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA539106566B; Fri, 5 Oct 2012 04:35:20 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B55E68FC1A; Fri, 5 Oct 2012 04:35:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q954ZK7b088209; Fri, 5 Oct 2012 04:35:20 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q954ZKxg088207; Fri, 5 Oct 2012 04:35:20 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210050435.q954ZKxg088207@svn.freebsd.org> From: Alan Cox Date: Fri, 5 Oct 2012 04:35: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: r241217 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 04:35:20 -0000 Author: alc Date: Fri Oct 5 04:35:20 2012 New Revision: 241217 URL: http://svn.freebsd.org/changeset/base/241217 Log: Eliminate a stale and a duplicated comment. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Fri Oct 5 03:46:25 2012 (r241216) +++ head/sys/mips/mips/pmap.c Fri Oct 5 04:35:20 2012 (r241217) @@ -1621,13 +1621,6 @@ retry: return (pv); } -/* - * If it is the first entry on the list, it is actually - * in the header and we must copy the following entry up - * to the header. Otherwise we must search the list for - * the entry. In either case we free the now unused entry. - */ - static pv_entry_t pmap_pvh_remove(struct md_page *pvh, pmap_t pmap, vm_offset_t va) { @@ -2945,13 +2938,6 @@ pmap_clear_reference(vm_page_t m) * address space. Return a pointer to where it is mapped. This * routine is intended to be used for mapping device memory, * NOT real memory. - */ - -/* - * Map a set of physical memory pages into the kernel virtual - * address space. Return a pointer to where it is mapped. This - * routine is intended to be used for mapping device memory, - * NOT real memory. * * Use XKPHYS uncached for 64 bit, and KSEG1 where possible for 32 bit. */ From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 05:01:43 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 909281065672; Fri, 5 Oct 2012 05:01:43 +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 6FE3C8FC0A; Fri, 5 Oct 2012 05:01:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9551hpB092358; Fri, 5 Oct 2012 05:01:43 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9551hCL092356; Fri, 5 Oct 2012 05:01:43 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201210050501.q9551hCL092356@svn.freebsd.org> From: Doug Barton Date: Fri, 5 Oct 2012 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: r241218 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 05:01:43 -0000 Author: dougb Date: Fri Oct 5 05:01:42 2012 New Revision: 241218 URL: http://svn.freebsd.org/changeset/base/241218 Log: Remove references to CVS so that people will stop bringing it up For -p: The localtime update should have been excluded in the first place The make.conf comparison has been OBE for some time now, and there is no src.conf equivalent to share/examples/make.conf, so remove the whole thing. Update copyright Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Oct 5 04:35:20 2012 (r241217) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Oct 5 05:01:42 2012 (r241218) @@ -5,8 +5,8 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2011 Douglas Barton -# dougb@FreeBSD.org +# Copyright (c) 1998-2012 Douglas Barton, All rights reserved +# Please see detailed copyright below # $FreeBSD$ @@ -532,9 +532,9 @@ if [ -t 0 ]; then esac fi -# Define what CVS $Id tag to look for to aid portability. +# Define what $Id tag to look for to aid portability. # -CVS_ID_TAG=FreeBSD +ID_TAG=FreeBSD delete_temproot () { rm -rf "${TEMPROOT}" 2>/dev/null @@ -1095,17 +1095,17 @@ for COMPFILE in `find . -type f | sort`; case "${STRICT}" in '' | [Nn][Oo]) - # Compare CVS $Id's first so if the file hasn't been modified + # Compare $Id's first so if the file hasn't been modified # local changes will be ignored. # If the files have the same $Id, delete the one in temproot so the # user will have less to wade through if files are left to merge by hand. # - CVSID1=`grep "[$]${CVS_ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` - CVSID2=`grep "[$]${CVS_ID_TAG}:" ${COMPFILE} 2>/dev/null` || CVSID2=none + ID1=`grep "[$]${ID_TAG}:" ${DESTDIR}${COMPFILE#.} 2>/dev/null` + ID2=`grep "[$]${ID_TAG}:" ${COMPFILE} 2>/dev/null` || ID2=none - case "${CVSID2}" in - "${CVSID1}") - echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" + case "${ID2}" in + "${ID1}") + echo " *** Temp ${COMPFILE} and installed have the same Id, deleting" rm "${COMPFILE}" ;; esac @@ -1334,7 +1334,7 @@ case "${NEED_PWD_MKDB}" in ;; esac -if [ -e "${DESTDIR}/etc/localtime" ]; then # Ignore if TZ == UTC +if [ -e "${DESTDIR}/etc/localtime" -a -z "${PRE_WORLD}" ]; then # Ignore if TZ == UTC echo '' [ -n "${DESTDIR}" ] && tzs_args="-C ${DESTDIR}" if [ -f "${DESTDIR}/var/db/zoneinfo" ]; then @@ -1380,29 +1380,35 @@ case "${COMP_CONFS}" in ;; esac -case "${PRE_WORLD}" in -'') ;; -*) - MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" - - (echo '' - echo '*** Comparing make variables' - echo '' - echo "*** From ${DESTDIR}/etc/make.conf" - echo "*** From ${MAKE_CONF}" - - for MAKE_VAR in `grep -i ^[a-z] ${DESTDIR}/etc/make.conf | cut -d '=' -f 1`; do - echo '' - grep -w ^${MAKE_VAR} ${DESTDIR}/etc/make.conf - grep -w ^#${MAKE_VAR} ${MAKE_CONF} || - echo ' * No example variable with this name' - done) | ${PAGER} - ;; -esac - if [ -n "${PRESERVE_FILES}" ]; then find -d $PRESERVE_FILES_DIR -type d -empty -delete 2>/dev/null rmdir $PRESERVE_FILES_DIR 2>/dev/null fi exit 0 + +#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Copyright (c) 1998-2012 Douglas Barton +# 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. From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 06:24:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4F9531065672; Fri, 5 Oct 2012 06:24:23 +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 209738FC08; Fri, 5 Oct 2012 06:24:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q956OMjK006078; Fri, 5 Oct 2012 06:24:22 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q956OM06006076; Fri, 5 Oct 2012 06:24:22 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050624.q956OM06006076@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 06:24: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: r241219 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 06:24:23 -0000 Author: yongari Date: Fri Oct 5 06:24:22 2012 New Revision: 241219 URL: http://svn.freebsd.org/changeset/base/241219 Log: Add 40 microseconds delay after updating EMAC Mode register as recommended by Broadcom data sheet. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 05:01:42 2012 (r241218) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 06:24:22 2012 (r241219) @@ -957,6 +957,7 @@ bge_miibus_statchg(device_t dev) mac_mode |= BGE_MACMODE_HALF_DUPLEX; CSR_WRITE_4(sc, BGE_MAC_MODE, mac_mode); + DELAY(40); CSR_WRITE_4(sc, BGE_TX_MODE, tx_mode); CSR_WRITE_4(sc, BGE_RX_MODE, rx_mode); } @@ -1434,6 +1435,7 @@ bge_chipinit(struct bge_softc *sc) /* Clear the MAC control register */ CSR_WRITE_4(sc, BGE_MAC_MODE, 0); + DELAY(40); /* * Clear the MAC statistics block in the NIC's @@ -2046,6 +2048,7 @@ bge_blockinit(struct bge_softc *sc) /* Turn on DMA, clear stats */ CSR_WRITE_4(sc, BGE_MAC_MODE, val); + DELAY(40); /* Set misc. local control, enable interrupts on attentions */ CSR_WRITE_4(sc, BGE_MISC_LOCAL_CTL, BGE_MLC_INTR_ONATTN); @@ -3752,6 +3755,7 @@ bge_reset(struct bge_softc *sc) BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_STACKUP); CSR_WRITE_4(sc, BGE_MAC_MODE, 0); + DELAY(40); /* * The 5704 in TBI mode apparently needs some special @@ -5148,6 +5152,7 @@ bge_ifmedia_upd_locked(struct ifnet *ifp BGE_SETBIT(sc, BGE_MAC_MODE, BGE_MACMODE_HALF_DUPLEX); } + DELAY(40); break; default: return (EINVAL); @@ -5623,9 +5628,11 @@ bge_link_upd(struct bge_softc *sc) if (status & BGE_MACSTAT_TBI_PCS_SYNCHED) { if (!sc->bge_link) { sc->bge_link++; - if (sc->bge_asicrev == BGE_ASICREV_BCM5704) + if (sc->bge_asicrev == BGE_ASICREV_BCM5704) { BGE_CLRBIT(sc, BGE_MAC_MODE, BGE_MACMODE_TBI_SEND_CFGS); + DELAY(40); + } CSR_WRITE_4(sc, BGE_MAC_STS, 0xFFFFFFFF); if (bootverbose) if_printf(sc->bge_ifp, "link UP\n"); From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 07:13:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EF8DA106564A; Fri, 5 Oct 2012 07:13:21 +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 DAEC58FC0C; Fri, 5 Oct 2012 07:13:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q957DLMR014267; Fri, 5 Oct 2012 07:13:21 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q957DLi4014265; Fri, 5 Oct 2012 07:13:21 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201210050713.q957DLi4014265@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 5 Oct 2012 07:13: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: r241220 - head/sys/dev/bge X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 07:13:22 -0000 Author: yongari Date: Fri Oct 5 07:13:21 2012 New Revision: 241220 URL: http://svn.freebsd.org/changeset/base/241220 Log: Follow Broadcom datasheet: Delay 100 microseconds after enabling transmit MAC. Delay 10 microseconds after enabling receive MAC. Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Fri Oct 5 06:24:22 2012 (r241219) +++ head/sys/dev/bge/if_bge.c Fri Oct 5 07:13:21 2012 (r241220) @@ -5033,9 +5033,11 @@ bge_init_locked(struct bge_softc *sc) } /* Turn on transmitter. */ CSR_WRITE_4(sc, BGE_TX_MODE, mode | BGE_TXMODE_ENABLE); + DELAY(100); /* Turn on receiver. */ BGE_SETBIT(sc, BGE_RX_MODE, BGE_RXMODE_ENABLE); + DELAY(10); /* * Set the number of good frames to receive after RX MBUF From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 07:51:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3EC39106566B; Fri, 5 Oct 2012 07:51:22 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22DD58FC1D; Fri, 5 Oct 2012 07:51:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q957pMom020738; Fri, 5 Oct 2012 07:51:22 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q957pL1X020732; Fri, 5 Oct 2012 07:51:21 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210050751.q957pL1X020732@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 5 Oct 2012 07:51: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: r241221 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 07:51:22 -0000 Author: glebius Date: Fri Oct 5 07:51:21 2012 New Revision: 241221 URL: http://svn.freebsd.org/changeset/base/241221 Log: Provide ability for printing and decoding pfsync(4) traffic. This doesn't mean supporting IFT_PFSYNC (which I hope will eventually die). This means decoding packets with IP protocol of 240 caught on any normal interface like Ethernet. The code is based on couple of files from OpenBSD, significantly modified by myself. Parser differentiates for four levels of verbosity: no -v, -v, -vv and -vvv. We don't yet forward this code upstream, because currently it strongly relies on if_pfsync.h and even on pfvar.h. I hope that this can be fixed in future. Reviewed by: gnn, delphij Added: head/contrib/tcpdump/print-pfsync.c (contents, props changed) Modified: head/contrib/tcpdump/interface.h head/contrib/tcpdump/ipproto.c head/contrib/tcpdump/print-ip.c head/usr.sbin/tcpdump/tcpdump/Makefile Modified: head/contrib/tcpdump/interface.h ============================================================================== --- head/contrib/tcpdump/interface.h Fri Oct 5 07:13:21 2012 (r241220) +++ head/contrib/tcpdump/interface.h Fri Oct 5 07:51:21 2012 (r241221) @@ -183,6 +183,7 @@ extern void dvmrp_print(const u_char *, extern void egp_print(const u_char *, u_int); extern u_int enc_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int pflog_if_print(const struct pcap_pkthdr *, const u_char *); +extern void pfsync_ip_print(const u_char *, u_int); extern u_int arcnet_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int arcnet_linux_if_print(const struct pcap_pkthdr *, const u_char *); extern u_int token_print(const u_char *, u_int, u_int); Modified: head/contrib/tcpdump/ipproto.c ============================================================================== --- head/contrib/tcpdump/ipproto.c Fri Oct 5 07:13:21 2012 (r241220) +++ head/contrib/tcpdump/ipproto.c Fri Oct 5 07:51:21 2012 (r241221) @@ -56,6 +56,7 @@ const struct tok ipproto_values[] = { { IPPROTO_SCTP, "SCTP" }, { IPPROTO_MOBILITY, "Mobility" }, { IPPROTO_CARP, "CARP" }, + { IPPROTO_PFSYNC, "pfsync" }, { 0, NULL } }; Modified: head/contrib/tcpdump/print-ip.c ============================================================================== --- head/contrib/tcpdump/print-ip.c Fri Oct 5 07:13:21 2012 (r241220) +++ head/contrib/tcpdump/print-ip.c Fri Oct 5 07:51:21 2012 (r241221) @@ -483,6 +483,10 @@ again: pgm_print(ipds->cp, ipds->len, (const u_char *)ipds->ip); break; + case IPPROTO_PFSYNC: + pfsync_ip_print(ipds->cp, ipds->len); + break; + default: if ((proto = getprotobynumber(ipds->nh)) != NULL) ND_PRINT((ndo, " %s", proto->p_name)); Added: head/contrib/tcpdump/print-pfsync.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/tcpdump/print-pfsync.c Fri Oct 5 07:51:21 2012 (r241221) @@ -0,0 +1,451 @@ +/* + * Copyright (c) 2012 Gleb Smirnoff + * Copyright (c) 2002 Michael Shalayeff + * Copyright (c) 2001 Daniel Hartmeier + * 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 OR HIS RELATIVES 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 MIND, 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. + * + * $OpenBSD: print-pfsync.c,v 1.38 2012/09/19 13:50:36 mikeb Exp $ + * $OpenBSD: pf_print_state.c,v 1.11 2012/07/08 17:48:37 lteo Exp $ + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include +#include +#include /* XXX */ +#include +#include +#define TCPSTATES +#include + +#include + +#include "interface.h" +#include "addrtoname.h" + +static void pfsync_print(struct pfsync_header *, const u_char *, u_int); +static void print_src_dst(const struct pfsync_state_peer *, + const struct pfsync_state_peer *, uint8_t); +static void print_state(struct pfsync_state *); + +#ifdef notyet +void +pfsync_if_print(u_char *user, const struct pcap_pkthdr *h, + register const u_char *p) +{ + u_int caplen = h->caplen; + + ts_print(&h->ts); + + if (caplen < PFSYNC_HDRLEN) { + printf("[|pfsync]"); + goto out; + } + + pfsync_print((struct pfsync_header *)p, + p + sizeof(struct pfsync_header), + caplen - sizeof(struct pfsync_header)); +out: + if (xflag) { + default_print((const u_char *)p, caplen); + } + putchar('\n'); +} +#endif /* notyet */ + +void +pfsync_ip_print(const u_char *bp, u_int len) +{ + struct pfsync_header *hdr = (struct pfsync_header *)bp; + + if (len < PFSYNC_HDRLEN) + printf("[|pfsync]"); + else + pfsync_print(hdr, bp + sizeof(struct pfsync_header), + len - sizeof(struct pfsync_header)); +} + +struct pfsync_actions { + const char *name; + size_t len; + void (*print)(const void *); +}; + +static void pfsync_print_clr(const void *); +static void pfsync_print_state(const void *); +static void pfsync_print_ins_ack(const void *); +static void pfsync_print_upd_c(const void *); +static void pfsync_print_upd_req(const void *); +static void pfsync_print_del_c(const void *); +static void pfsync_print_bus(const void *); +static void pfsync_print_tdb(const void *); + +struct pfsync_actions actions[] = { + { "clear all", sizeof(struct pfsync_clr), pfsync_print_clr }, + { "insert", sizeof(struct pfsync_state), pfsync_print_state }, + { "insert ack", sizeof(struct pfsync_ins_ack), pfsync_print_ins_ack }, + { "update", sizeof(struct pfsync_ins_ack), pfsync_print_state }, + { "update compressed", sizeof(struct pfsync_upd_c), + pfsync_print_upd_c }, + { "request uncompressed", sizeof(struct pfsync_upd_req), + pfsync_print_upd_req }, + { "delete", sizeof(struct pfsync_state), pfsync_print_state }, + { "delete compressed", sizeof(struct pfsync_del_c), + pfsync_print_del_c }, + { "frag insert", 0, NULL }, + { "frag delete", 0, NULL }, + { "bulk update status", sizeof(struct pfsync_bus), + pfsync_print_bus }, + { "tdb", 0, pfsync_print_tdb }, + { "eof", 0, NULL }, +}; + +static void +pfsync_print(struct pfsync_header *hdr, const u_char *bp, u_int len) +{ + struct pfsync_subheader *subh; + int count, plen, i; + u_int alen; + + plen = ntohs(hdr->len); + + printf("PFSYNCv%d len %d", hdr->version, plen); + + if (hdr->version != PFSYNC_VERSION) + return; + + plen -= sizeof(*hdr); + + while (plen > 0) { + if (len < sizeof(*subh)) + break; + + subh = (struct pfsync_subheader *)bp; + bp += sizeof(*subh); + len -= sizeof(*subh); + plen -= sizeof(*subh); + + if (subh->action >= PFSYNC_ACT_MAX) { + printf("\n act UNKNOWN id %d", subh->action); + return; + } + + count = ntohs(subh->count); + printf("\n %s count %d", actions[subh->action].name, count); + alen = actions[subh->action].len; + + if (subh->action == PFSYNC_ACT_EOF) + return; + + if (actions[subh->action].print == NULL) { + printf("\n unimplemented action %hhu", subh->action); + return; + } + + for (i = 0; i < count; i++) { + if (len < alen) { + len = 0; + break; + } + + if (vflag) + actions[subh->action].print(bp); + + bp += alen; + len -= alen; + plen -= alen; + } + } + + if (plen > 0) { + printf("\n ..."); + return; + } + if (plen < 0) { + printf("\n invalid header length"); + return; + } + if (len > 0) + printf("\n invalid packet length"); +} + +static void +pfsync_print_clr(const void *bp) +{ + const struct pfsync_clr *clr = bp; + + printf("\n\tcreatorid: %08x", htonl(clr->creatorid)); + if (clr->ifname[0] != '\0') + printf(" interface: %s", clr->ifname); +} + +static void +pfsync_print_state(const void *bp) +{ + struct pfsync_state *st = (struct pfsync_state *)bp; + + putchar('\n'); + print_state(st); +} + +static void +pfsync_print_ins_ack(const void *bp) +{ + const struct pfsync_ins_ack *iack = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(iack->id), + ntohl(iack->creatorid)); +} + +static void +pfsync_print_upd_c(const void *bp) +{ + const struct pfsync_upd_c *u = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(u->id), + ntohl(u->creatorid)); + if (vflag > 2) { + printf("\n\tTCP? :"); + print_src_dst(&u->src, &u->dst, IPPROTO_TCP); + } +} + +static void +pfsync_print_upd_req(const void *bp) +{ + const struct pfsync_upd_req *ur = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(ur->id), + ntohl(ur->creatorid)); +} + +static void +pfsync_print_del_c(const void *bp) +{ + const struct pfsync_del_c *d = bp; + + printf("\n\tid: %016jx creatorid: %08x", (uintmax_t )be64toh(d->id), + ntohl(d->creatorid)); +} + +static void +pfsync_print_bus(const void *bp) +{ + const struct pfsync_bus *b = bp; + uint32_t endtime; + int min, sec; + const char *status; + + endtime = ntohl(b->endtime); + sec = endtime % 60; + endtime /= 60; + min = endtime % 60; + endtime /= 60; + + switch (b->status) { + case PFSYNC_BUS_START: + status = "start"; + break; + case PFSYNC_BUS_END: + status = "end"; + break; + default: + status = "UNKNOWN"; + break; + } + + printf("\n\tcreatorid: %08x age: %.2u:%.2u:%.2u status: %s", + htonl(b->creatorid), endtime, min, sec, status); +} + +static void +pfsync_print_tdb(const void *bp) +{ + const struct pfsync_tdb *t = bp; + + printf("\n\tspi: 0x%08x rpl: %ju cur_bytes: %ju", + ntohl(t->spi), (uintmax_t )be64toh(t->rpl), + (uintmax_t )be64toh(t->cur_bytes)); +} + +static void +print_host(struct pf_addr *addr, uint16_t port, sa_family_t af, + const char *proto) +{ + char buf[48]; + + if (inet_ntop(af, addr, buf, sizeof(buf)) == NULL) + printf("?"); + else + printf("%s", buf); + + if (port) + printf(".%hu", ntohs(port)); +} + +static void +print_seq(const struct pfsync_state_peer *p) +{ + if (p->seqdiff) + printf("[%u + %u](+%u)", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo), ntohl(p->seqdiff)); + else + printf("[%u + %u]", ntohl(p->seqlo), + ntohl(p->seqhi) - ntohl(p->seqlo)); +} + +static void +print_src_dst(const struct pfsync_state_peer *src, + const struct pfsync_state_peer *dst, uint8_t proto) +{ + + if (proto == IPPROTO_TCP) { + if (src->state <= TCPS_TIME_WAIT && + dst->state <= TCPS_TIME_WAIT) + printf(" %s:%s", tcpstates[src->state], + tcpstates[dst->state]); + else if (src->state == PF_TCPS_PROXY_SRC || + dst->state == PF_TCPS_PROXY_SRC) + printf(" PROXY:SRC"); + else if (src->state == PF_TCPS_PROXY_DST || + dst->state == PF_TCPS_PROXY_DST) + printf(" PROXY:DST"); + else + printf(" ", + src->state, dst->state); + if (vflag > 1) { + printf("\n\t"); + print_seq(src); + if (src->wscale && dst->wscale) + printf(" wscale %u", + src->wscale & PF_WSCALE_MASK); + printf(" "); + print_seq(dst); + if (src->wscale && dst->wscale) + printf(" wscale %u", + dst->wscale & PF_WSCALE_MASK); + } + } else if (proto == IPPROTO_UDP && src->state < PFUDPS_NSTATES && + dst->state < PFUDPS_NSTATES) { + const char *states[] = PFUDPS_NAMES; + + printf(" %s:%s", states[src->state], states[dst->state]); + } else if (proto != IPPROTO_ICMP && src->state < PFOTHERS_NSTATES && + dst->state < PFOTHERS_NSTATES) { + /* XXX ICMP doesn't really have state levels */ + const char *states[] = PFOTHERS_NAMES; + + printf(" %s:%s", states[src->state], states[dst->state]); + } else { + printf(" %u:%u", src->state, dst->state); + } +} + +static void +print_state(struct pfsync_state *s) +{ + struct pfsync_state_peer *src, *dst; + struct pfsync_state_key *sk, *nk; + int min, sec; + + if (s->direction == PF_OUT) { + src = &s->src; + dst = &s->dst; + sk = &s->key[PF_SK_STACK]; + nk = &s->key[PF_SK_WIRE]; + if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) + sk->port[0] = nk->port[0]; + } else { + src = &s->dst; + dst = &s->src; + sk = &s->key[PF_SK_WIRE]; + nk = &s->key[PF_SK_STACK]; + if (s->proto == IPPROTO_ICMP || s->proto == IPPROTO_ICMPV6) + sk->port[1] = nk->port[1]; + } + printf("\t%s ", s->ifname); + printf("proto %u ", s->proto); + + print_host(&nk->addr[1], nk->port[1], s->af, NULL); + if (PF_ANEQ(&nk->addr[1], &sk->addr[1], s->af) || + nk->port[1] != sk->port[1]) { + printf(" ("); + print_host(&sk->addr[1], sk->port[1], s->af, NULL); + printf(")"); + } + if (s->direction == PF_OUT) + printf(" -> "); + else + printf(" <- "); + print_host(&nk->addr[0], nk->port[0], s->af, NULL); + if (PF_ANEQ(&nk->addr[0], &sk->addr[0], s->af) || + nk->port[0] != sk->port[0]) { + printf(" ("); + print_host(&sk->addr[0], sk->port[0], s->af, NULL); + printf(")"); + } + + print_src_dst(src, dst, s->proto); + + if (vflag > 1) { + uint64_t packets[2]; + uint64_t bytes[2]; + uint32_t creation = ntohl(s->creation); + uint32_t expire = ntohl(s->expire); + + sec = creation % 60; + creation /= 60; + min = creation % 60; + creation /= 60; + printf("\n\tage %.2u:%.2u:%.2u", creation, min, sec); + sec = expire % 60; + expire /= 60; + min = expire % 60; + expire /= 60; + printf(", expires in %.2u:%.2u:%.2u", expire, min, sec); + + bcopy(s->packets[0], &packets[0], sizeof(uint64_t)); + bcopy(s->packets[1], &packets[1], sizeof(uint64_t)); + bcopy(s->bytes[0], &bytes[0], sizeof(uint64_t)); + bcopy(s->bytes[1], &bytes[1], sizeof(uint64_t)); + printf(", %ju:%ju pkts, %ju:%ju bytes", + be64toh(packets[0]), be64toh(packets[1]), + be64toh(bytes[0]), be64toh(bytes[1])); + if (s->anchor != ntohl(-1)) + printf(", anchor %u", ntohl(s->anchor)); + if (s->rule != ntohl(-1)) + printf(", rule %u", ntohl(s->rule)); + } + if (vflag > 1) { + uint64_t id; + + bcopy(&s->id, &id, sizeof(uint64_t)); + printf("\n\tid: %016jx creatorid: %08x", + (uintmax_t )be64toh(id), ntohl(s->creatorid)); + } +} Modified: head/usr.sbin/tcpdump/tcpdump/Makefile ============================================================================== --- head/usr.sbin/tcpdump/tcpdump/Makefile Fri Oct 5 07:13:21 2012 (r241220) +++ head/usr.sbin/tcpdump/tcpdump/Makefile Fri Oct 5 07:51:21 2012 (r241221) @@ -25,6 +25,7 @@ SRCS = addrtoname.c af.c checksum.c cpac print-lwapp.c print-lwres.c print-mobile.c print-mpls.c print-msdp.c \ print-mpcp.c \ print-nfs.c print-ntp.c print-null.c print-olsr.c print-ospf.c \ + print-pfsync.c \ print-pgm.c print-pim.c print-ppi.c print-ppp.c print-pppoe.c \ print-pptp.c print-radius.c print-raw.c print-rip.c \ print-rpki-rtr.c \ From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 14:42:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D6A0F1065672; Fri, 5 Oct 2012 14:42:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1E758FC24; Fri, 5 Oct 2012 14:42:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95EgcHA087280; Fri, 5 Oct 2012 14:42:38 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95Egcaf087278; Fri, 5 Oct 2012 14:42:38 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210051442.q95Egcaf087278@svn.freebsd.org> From: Andriy Gapon Date: Fri, 5 Oct 2012 14:42: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: r241225 - 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: Fri, 05 Oct 2012 14:42:39 -0000 Author: avg Date: Fri Oct 5 14:42:38 2012 New Revision: 241225 URL: http://svn.freebsd.org/changeset/base/241225 Log: mount.h: MNTK_VGONE_UPPER and MNTK_VGONE_WAITER were supposed to be different ... otherwise a waiter is never woken up. Reported by: swills Discussed with: jhb Approved by: kib MFC after: 3 days Modified: head/sys/sys/mount.h Modified: head/sys/sys/mount.h ============================================================================== --- head/sys/sys/mount.h Fri Oct 5 14:20:53 2012 (r241224) +++ head/sys/sys/mount.h Fri Oct 5 14:42:38 2012 (r241225) @@ -376,9 +376,9 @@ void __mnt_vnode_markerfree(str and writes. Filesystem shall properly handle i/o state on EFAULT. */ #define MNTK_VGONE_UPPER 0x00000200 -#define MNTK_VGONE_WAITER 0x00000200 -#define MNTK_MARKER 0x00000400 +#define MNTK_VGONE_WAITER 0x00000400 #define MNTK_LOOKUP_EXCL_DOTDOT 0x00000800 +#define MNTK_MARKER 0x00001000 #define MNTK_NOASYNC 0x00800000 /* disable async */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 15:52:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57541106566C; Fri, 5 Oct 2012 15:52:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 419F18FC08; Fri, 5 Oct 2012 15:52:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95FqWZE096206; Fri, 5 Oct 2012 15:52:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95FqWNM096204; Fri, 5 Oct 2012 15:52:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201210051552.q95FqWNM096204@svn.freebsd.org> From: John Baldwin Date: Fri, 5 Oct 2012 15:52: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: r241228 - head/sys/dev/amr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 15:52:32 -0000 Author: jhb Date: Fri Oct 5 15:52:31 2012 New Revision: 241228 URL: http://svn.freebsd.org/changeset/base/241228 Log: Further adjust the workaround in r234501. Rounding all small requests up to 32k swamped the controller causing firmware hangs. Instead, round requests smaller than 64k up to the next power of 2 as a general rule. To handle the one known special case of a command that accepts a 12k buffer returning a 24k-ish reply, round requests between 8k and 16k up to 32k rather than 16k. The result is that commands less than 8k should now be rounded up to a smaller size (either 4k or 8k) rather than 32k. PR: kern/155658 Tested by: Andreas Longwitz MFC after: 1 week Modified: head/sys/dev/amr/amr.c Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Fri Oct 5 15:36:30 2012 (r241227) +++ head/sys/dev/amr/amr.c Fri Oct 5 15:52:31 2012 (r241228) @@ -533,13 +533,19 @@ shutdown_out: * The amr(4) firmware relies on this feature. In fact, it assumes * the buffer is always a power of 2 up to a max of 64k. There is * also at least one case where it assumes a buffer less than 16k is - * greater than 16k. Force a minimum buffer size of 32k and round - * sizes between 32k and 64k up to 64k as a workaround. + * greater than 16k. However, forcing all buffers to a size of 32k + * causes stalls in the firmware. Force each command smaller than + * 64k up to the next power of two except that commands between 8k + * and 16k are rounded up to 32k instead of 16k. */ static unsigned long amr_ioctl_buffer_length(unsigned long len) { + if (len <= 4 * 1024) + return (4 * 1024); + if (len <= 8 * 1024) + return (8 * 1024); if (len <= 32 * 1024) return (32 * 1024); if (len <= 64 * 1024) From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 16:44:01 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAFAD1065716; Fri, 5 Oct 2012 16:44:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB478FC14; Fri, 5 Oct 2012 16:44:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95Gi1wM003600; Fri, 5 Oct 2012 16:44:01 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95Gi1j0003598; Fri, 5 Oct 2012 16:44:01 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210051644.q95Gi1j0003598@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Oct 2012 16:44: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: r241229 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Oct 2012 16:44:01 -0000 Author: adrian Date: Fri Oct 5 16:44:00 2012 New Revision: 241229 URL: http://svn.freebsd.org/changeset/base/241229 Log: Initialise an uninitialised variable. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Oct 5 15:52:31 2012 (r241228) +++ head/sys/dev/ath/if_ath.c Fri Oct 5 16:44:00 2012 (r241229) @@ -4350,7 +4350,7 @@ ath_calibrate(void *arg) struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - HAL_BOOL longCal, isCalDone; + HAL_BOOL longCal, isCalDone = AH_TRUE; HAL_BOOL aniCal, shortCal = AH_FALSE; int nextcal; @@ -4400,6 +4400,7 @@ ath_calibrate(void *arg) /* Only call if we're doing a short/long cal, not for ANI calibration */ if (shortCal || longCal) { + isCalDone = AH_FALSE; if (ath_hal_calibrateN(ah, sc->sc_curchan, longCal, &isCalDone)) { if (longCal) { /* From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 17:54:27 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A07BB106566B; Fri, 5 Oct 2012 17:54:27 +0000 (UTC) (envelope-from cracauer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B3E78FC08; Fri, 5 Oct 2012 17:54:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95HsRPH014585; Fri, 5 Oct 2012 17:54:27 GMT (envelope-from cracauer@svn.freebsd.org) Received: (from cracauer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95HsRi8014583; Fri, 5 Oct 2012 17:54:27 GMT (envelope-from cracauer@svn.freebsd.org) Message-Id: <201210051754.q95HsRi8014583@svn.freebsd.org> From: Martin Cracauer Date: Fri, 5 Oct 2012 17:54: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: r241230 - head/usr.bin/at X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 17:54:27 -0000 Author: cracauer Date: Fri Oct 5 17:54:27 2012 New Revision: 241230 URL: http://svn.freebsd.org/changeset/base/241230 Log: Allow time offsets to be negative, e.g. `at 1530 - 15 minutes`. This is useful if you have been given some time for some event in some format and you want your computer to do something to prepare for it. Without having to do time arithmetic in a shellscript. The syntax matches what the at(1) usually used on Linux supports. Modified: head/usr.bin/at/parsetime.c Modified: head/usr.bin/at/parsetime.c ============================================================================== --- head/usr.bin/at/parsetime.c Fri Oct 5 16:44:00 2012 (r241229) +++ head/usr.bin/at/parsetime.c Fri Oct 5 17:54:27 2012 (r241230) @@ -64,7 +64,7 @@ enum { /* symbols */ MIDNIGHT, NOON, TEATIME, PM, AM, TOMORROW, TODAY, NOW, MINUTES, HOURS, DAYS, WEEKS, MONTHS, YEARS, - NUMBER, PLUS, DOT, SLASH, ID, JUNK, + NUMBER, PLUS, MINUS, DOT, SLASH, ID, JUNK, JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC, SUN, MON, TUE, WED, THU, FRI, SAT @@ -246,6 +246,8 @@ token(void) return sc_tokid = DOT; else if (sc_token[0] == '+') return sc_tokid = PLUS; + else if (sc_token[0] == '-') + return sc_tokid = MINUS; else if (sc_token[0] == '/') return sc_tokid = SLASH; else @@ -277,22 +279,14 @@ expect(int desired) /* - * plus() parses a now + time - * - * at [NOW] PLUS NUMBER [MINUTES|HOURS|DAYS|WEEKS|MONTHS|YEARS] - * + * plus_or_minus() holds functionality common to plus() and minus() */ - static void -plus(struct tm *tm) +plus_or_minus(struct tm *tm, int delay) { - int delay; int expectplur; - expect(NUMBER); - - delay = atoi(sc_token); - expectplur = (delay != 1) ? 1 : 0; + expectplur = (delay != 1 && delay != -1) ? 1 : 0; switch (token()) { case YEARS: @@ -323,11 +317,43 @@ plus(struct tm *tm) tm->tm_isdst = -1; if (mktime(tm) < 0) plonk(sc_tokid); +} /* plus_or_minus */ + + +/* + * plus() parses a now + time + * + * at [NOW] PLUS NUMBER [MINUTES|HOURS|DAYS|WEEKS|MONTHS|YEARS] + * + */ +static void +plus(struct tm *tm) +{ + int delay; + + expect(NUMBER); + delay = atoi(sc_token); + plus_or_minus(tm, delay); } /* plus */ /* + * minus() is like plus but can not be used with NOW + */ +static void +minus(struct tm *tm) +{ + int delay; + + expect(NUMBER); + + delay = -atoi(sc_token); + plus_or_minus(tm, delay); +} /* minus */ + + +/* * tod() computes the time of day * [NUMBER [DOT NUMBER] [AM|PM]] */ @@ -379,7 +405,8 @@ tod(struct tm *tm) * if we've gone past that time - but if we're specifying a time plus * a relative offset, it's okay to bump things */ - if ((sc_tokid == EOF || sc_tokid == PLUS) && tm->tm_hour > hour) { + if ((sc_tokid == EOF || sc_tokid == PLUS || sc_tokid == MINUS) && + tm->tm_hour > hour) { tm->tm_mday++; tm->tm_wday++; } @@ -456,6 +483,9 @@ month(struct tm *tm) case PLUS: plus(tm); break; + case MINUS: + minus(tm); + break; case TOMORROW: /* do something tomorrow */ @@ -588,6 +618,12 @@ parsetime(int argc, char **argv) plus(&runtime); break; + /* MINUS is different from PLUS in that NOW is not + * an optional prefix for it + */ + case MINUS: + minus(&runtime); + break; case NUMBER: tod(&runtime); month(&runtime); From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 18:42:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 97B17106566C; Fri, 5 Oct 2012 18:42:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7ECF18FC1E; Fri, 5 Oct 2012 18:42:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95IgpDp021863; Fri, 5 Oct 2012 18:42:51 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95IgpDO021855; Fri, 5 Oct 2012 18:42:51 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210051842.q95IgpDO021855@svn.freebsd.org> From: Xin LI Date: Fri, 5 Oct 2012 18:42: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: r241231 - in head: contrib/libpcap contrib/libpcap/net contrib/libpcap/packaging contrib/libpcap/pcap contrib/libpcap/test contrib/libpcap/tests lib/libpcap 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: Fri, 05 Oct 2012 18:42:51 -0000 Author: delphij Date: Fri Oct 5 18:42:50 2012 New Revision: 241231 URL: http://svn.freebsd.org/changeset/base/241231 Log: MFV: libpcap 1.3.0. MFC after: 4 weeks Added: head/contrib/libpcap/pcap-canusb-linux.c - copied unchanged from r241200, vendor/libpcap/dist/pcap-canusb-linux.c head/contrib/libpcap/pcap-canusb-linux.h - copied unchanged from r241200, vendor/libpcap/dist/pcap-canusb-linux.h head/contrib/libpcap/tests/ - copied from r241200, vendor/libpcap/dist/tests/ Deleted: head/contrib/libpcap/net/ head/contrib/libpcap/test/ Modified: head/contrib/libpcap/CHANGES head/contrib/libpcap/CREDITS head/contrib/libpcap/Makefile.in head/contrib/libpcap/VERSION head/contrib/libpcap/config.h.in head/contrib/libpcap/configure head/contrib/libpcap/configure.in head/contrib/libpcap/gencode.c head/contrib/libpcap/gencode.h head/contrib/libpcap/optimize.c head/contrib/libpcap/packaging/pcap.spec.in head/contrib/libpcap/pcap-bpf.c head/contrib/libpcap/pcap-common.c head/contrib/libpcap/pcap-linux.c head/contrib/libpcap/pcap-netfilter-linux.c head/contrib/libpcap/pcap.c head/contrib/libpcap/pcap/bpf.h head/lib/libpcap/config.h head/sys/net/bpf.h Directory Properties: head/contrib/libpcap/ (props changed) Modified: head/contrib/libpcap/CHANGES ============================================================================== --- head/contrib/libpcap/CHANGES Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/CHANGES Fri Oct 5 18:42:50 2012 (r241231) @@ -1,3 +1,22 @@ +Friday March 30, 2012. mcr@sandelman.ca +Summary for 1.3.0 libpcap release + Handle DLT_PFSYNC in {FreeBSD, other *BSD+Mac OS X, other}. + Linux: Don't fail if netfilter isn't enabled in the kernel. + Add new link-layer type for NFC Forum LLCP. + Put the CANUSB stuff into EXTRA_DIST, so it shows up in the release tarball. + Add LINKTYPE_NG40/DLT_NG40. + Add DLT_MPEG_2_TS/LINKTYPE_MPEG_2_TS for MPEG-2 transport streams. + [PATCH] Fix AIX-3.5 crash with read failure during stress + AIX fixes. + Introduce --disable-shared configure option. + Added initial support for canusb devices. + Include the pcap(3PCAP) additions as 1.2.1 changes. + many updates to documentation: pcap.3pcap.in + Improve 'inbound'/'outbound' capture filters under Linux. + Note the cleanup of handling of new DLT_/LINKTYPE_ values. + On Lion, don't build for PPC. + For mac80211 devices we need to clean up monitor mode on exit. + Friday December 9, 2011. guy@alum.mit.edu. Summary for 1.2.1 libpcap release Update README file. Modified: head/contrib/libpcap/CREDITS ============================================================================== --- head/contrib/libpcap/CREDITS Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/CREDITS Fri Oct 5 18:42:50 2012 (r241231) @@ -34,6 +34,7 @@ Additional people who have contributed p David Kaelbling David Young Dean Gaudet + dhruv Don Ebright Dug Song Dustin Spicuzza Modified: head/contrib/libpcap/Makefile.in ============================================================================== --- head/contrib/libpcap/Makefile.in Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/Makefile.in Fri Oct 5 18:42:50 2012 (r241231) @@ -82,7 +82,7 @@ YACC = @V_YACC@ @rm -f $@ $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c -PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ +PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ @NETFILTER_SRC@ @CANUSB_SRC@ FSRC = fad-@V_FINDALLDEVS@.c SSRC = @SSRC@ CSRC = pcap.c inet.c gencode.c optimize.c nametoaddr.c etherent.c \ @@ -289,6 +289,8 @@ EXTRA_DIST = \ pcap-bt-linux.h \ pcap-can-linux.c \ pcap-can-linux.h \ + pcap-canusb-linux.c \ + pcap-canusb-linux.h \ pcap-config.in \ pcap-dag.c \ pcap-dag.h \ Modified: head/contrib/libpcap/VERSION ============================================================================== --- head/contrib/libpcap/VERSION Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/VERSION Fri Oct 5 18:42:50 2012 (r241231) @@ -1 +1 @@ -1.2.1 +1.3.0 Modified: head/contrib/libpcap/config.h.in ============================================================================== --- head/contrib/libpcap/config.h.in Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/config.h.in Fri Oct 5 18:42:50 2012 (r241231) @@ -232,6 +232,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -244,6 +247,9 @@ /* target host supports CAN sniffing */ #undef PCAP_SUPPORT_CAN +/* target host supports canusb */ +#undef PCAP_SUPPORT_CANUSB + /* target host supports netfilter sniffing */ #undef PCAP_SUPPORT_NETFILTER Modified: head/contrib/libpcap/configure ============================================================================== --- head/contrib/libpcap/configure Fri Oct 5 17:54:27 2012 (r241230) +++ head/contrib/libpcap/configure Fri Oct 5 18:42:50 2012 (r241231) @@ -1,61 +1,84 @@ #! /bin/sh # From configure.in Revision: 1.168 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61. +# Generated by GNU Autoconf 2.67. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -64,20 +87,18 @@ fi # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -88,354 +109,321 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -if as_func_ret_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_ret_success failed. + as_expr=false fi -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -452,8 +440,7 @@ test \$exitcode = 0") || { s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -463,49 +450,40 @@ test \$exitcode = 0") || { exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -513,7 +491,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -530,12 +508,12 @@ else as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -549,11 +527,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -568,7 +546,6 @@ cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= @@ -576,6 +553,7 @@ PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= +PACKAGE_URL= ac_unique_file="pcap.c" # Factoring default headers for most tests. @@ -614,100 +592,128 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Oct 5 20:19:29 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3D8181065673; Fri, 5 Oct 2012 20:19:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 268548FC12; Fri, 5 Oct 2012 20:19:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q95KJTBD035583; Fri, 5 Oct 2012 20:19:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q95KJSxv035569; Fri, 5 Oct 2012 20:19:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201210052019.q95KJSxv035569@svn.freebsd.org> From: Xin LI Date: Fri, 5 Oct 2012 20:19: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: r241235 - in head: contrib/tcpdump usr.sbin/tcpdump/tcpdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 05 Oct 2012 20:19:29 -0000 Author: delphij Date: Fri Oct 5 20:19:28 2012 New Revision: 241235 URL: http://svn.freebsd.org/changeset/base/241235 Log: MFV: tcpdump 4.3.0. MFC after: 4 weeks Added: head/contrib/tcpdump/print-tipc.c - copied unchanged from r241231, vendor/tcpdump/dist/print-tipc.c Modified: head/contrib/tcpdump/CHANGES head/contrib/tcpdump/CREDITS head/contrib/tcpdump/Makefile.in head/contrib/tcpdump/VERSION head/contrib/tcpdump/configure head/contrib/tcpdump/configure.in head/contrib/tcpdump/decode_prefix.h head/contrib/tcpdump/ethertype.h head/contrib/tcpdump/forces.h head/contrib/tcpdump/netdissect.h head/contrib/tcpdump/print-802_11.c head/contrib/tcpdump/print-bgp.c head/contrib/tcpdump/print-ether.c head/contrib/tcpdump/print-forces.c head/contrib/tcpdump/print-icmp6.c head/contrib/tcpdump/print-igmp.c head/contrib/tcpdump/print-ip.c head/contrib/tcpdump/print-ip6opts.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-lldp.c head/contrib/tcpdump/print-lwapp.c head/contrib/tcpdump/print-ospf6.c head/contrib/tcpdump/print-pim.c head/contrib/tcpdump/print-pppoe.c head/contrib/tcpdump/print-rrcp.c head/contrib/tcpdump/tcpdump.1.in head/contrib/tcpdump/tcpdump.c head/usr.sbin/tcpdump/tcpdump/Makefile head/usr.sbin/tcpdump/tcpdump/tcpdump.1 Directory Properties: head/contrib/tcpdump/ (props changed) Modified: head/contrib/tcpdump/CHANGES ============================================================================== --- head/contrib/tcpdump/CHANGES Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/CHANGES Fri Oct 5 20:19:28 2012 (r241235) @@ -1,3 +1,19 @@ +Friday April 3, 2011. mcr@sandelman.ca. + Summary for 4.3.0 tcpdump release + fixes for forces: SPARSE data (per RFC 5810) + some more test cases added + updates to documentation on -l, -U and -w flags. + Fix printing of BGP optional headers. + Tried to include DLT_PFSYNC support, failed due to headers required. + added TIPC support. + Fix LLDP Network Policy bit definitions. + fixes for IGMPv3's Max Response Time: it is in units of 0.1 second. + SIGUSR1 can be used rather than SIGINFO for stats + permit -n flag to affect print-ip for protocol numbers + ND_OPT_ADVINTERVAL is in milliseconds, not seconds + Teach PPPoE parser about RFC 4638 + + Friday December 9, 2011. guy@alum.mit.edu. Summary for 4.2.1 tcpdump release Only build the Babel printer if IPv6 is enabled. Modified: head/contrib/tcpdump/CREDITS ============================================================================== --- head/contrib/tcpdump/CREDITS Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/CREDITS Fri Oct 5 20:19:28 2012 (r241235) @@ -43,6 +43,7 @@ Additional people who have contributed p Chris Larson Christian Sievers Christophe Rhodes + Cliff Frey Craig Rodrigues Crist J. Clark Daniel Hagerty @@ -102,6 +103,7 @@ Additional people who have contributed p Kelly Carmichael Ken Hornstein Kevin Steves + Kenichi Maehashi Klaus Klein Kris Kennaway Krzysztof Halasa @@ -176,6 +178,7 @@ Additional people who have contributed p Sepherosa Ziehau Seth Webster Shinsuke Suzuki + Simon Ruderich Steinar Haug Swaminathan Chandrasekaran Takashi Yamamoto Modified: head/contrib/tcpdump/Makefile.in ============================================================================== --- head/contrib/tcpdump/Makefile.in Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/Makefile.in Fri Oct 5 20:19:28 2012 (r241235) @@ -77,7 +77,7 @@ CSRC = addrtoname.c af.c checksum.c cpac print-chdlc.c print-cip.c print-cnfp.c print-dccp.c print-decnet.c \ print-domain.c print-dtp.c print-dvmrp.c print-enc.c print-egp.c \ print-eap.c print-eigrp.c\ - print-esp.c print-ether.c print-fddi.c print-fr.c \ + print-esp.c print-ether.c print-fddi.c print-forces.c print-fr.c \ print-gre.c print-hsrp.c print-icmp.c print-igmp.c \ print-igrp.c print-ip.c print-ipcomp.c print-ipfc.c print-ipnet.c \ print-ipx.c print-isoclns.c print-juniper.c print-krb.c \ @@ -91,8 +91,8 @@ CSRC = addrtoname.c af.c checksum.c cpac print-rx.c print-sctp.c print-sflow.c print-sip.c print-sl.c print-sll.c \ print-slow.c print-snmp.c print-stp.c print-sunatm.c print-sunrpc.c \ print-symantec.c print-syslog.c print-tcp.c print-telnet.c print-tftp.c \ - print-timed.c print-token.c print-udld.c print-udp.c print-usb.c \ - print-vjc.c print-vqp.c print-vrrp.c print-vtp.c print-forces.c \ + print-timed.c print-tipc.c print-token.c print-udld.c print-udp.c \ + print-usb.c print-vjc.c print-vqp.c print-vrrp.c print-vtp.c \ print-wb.c print-zephyr.c signature.c setsignal.c tcpdump.c util.c LIBNETDISSECT_SRC=print-isakmp.c @@ -304,10 +304,11 @@ EXTRA_DIST = \ tests/forces1.pcap \ tests/forces1vvv.out \ tests/forces1vvvv.out \ - tests/forces2.out \ tests/forces2v.out \ tests/forces2vv.out \ tests/forces3vvv.out \ + tests/icmpv6.out \ + tests/icmpv6.pcap \ tests/ikev2four.out \ tests/ikev2four.pcap \ tests/ikev2fourv.out \ @@ -335,6 +336,8 @@ EXTRA_DIST = \ tests/mpls-traceroute.pcap \ tests/ospf-gmpls.out \ tests/ospf-gmpls.pcap \ + tests/pppoe.out \ + tests/pppoe.pcap \ tests/print-A.out \ tests/print-AA.out \ tests/print-capX.out \ Modified: head/contrib/tcpdump/VERSION ============================================================================== --- head/contrib/tcpdump/VERSION Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/VERSION Fri Oct 5 20:19:28 2012 (r241235) @@ -1 +1 @@ -4.2.1 +4.3.0 Modified: head/contrib/tcpdump/configure ============================================================================== --- head/contrib/tcpdump/configure Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/configure Fri Oct 5 20:19:28 2012 (r241235) @@ -7554,9 +7554,23 @@ if test $ac_cv_func_pcap_loop = yes; the else { { echo "$as_me:$LINENO: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&5 +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&5 echo "$as_me: error: Report this to tcpdump-workers@lists.tcpdump.org, and include the -config.log file in your report" >&2;} +config.log file in your report. If you have downloaded libpcap from +tcpdump.org, and built it yourself, please also include the config.log +file from the libpcap source directory, the Makefile from the libpcap +source directory, and the output of the make process for libpcap, as +this could be a problem with the libpcap that was built, and we will +not be able to determine why this is happening, and thus will not be +able to fix it, without that information, as we have not been able to +reproduce this problem ourselves." >&2;} { (exit 1); exit 1; }; } fi @@ -9330,7 +9344,7 @@ fi done if test $ac_cv_func_pcap_findalldevs = "yes" ; then - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" { echo "$as_me:$LINENO: checking for pcap_if_t" >&5 echo $ECHO_N "checking for pcap_if_t... $ECHO_C" >&6; } @@ -11748,7 +11762,7 @@ _ACEOF fi - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" for ac_header in openssl/evp.h Modified: head/contrib/tcpdump/configure.in ============================================================================== --- head/contrib/tcpdump/configure.in Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/configure.in Fri Oct 5 20:19:28 2012 (r241235) @@ -732,7 +732,7 @@ if test $ac_cv_func_pcap_findalldevs = " dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't dnl have pcap_if_t. - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_TYPES(pcap_if_t, , , [#include ]) CPPFLAGS="$savedcppflags" @@ -1067,7 +1067,7 @@ if test "$want_libcrypto" != "no"; then fi AC_CHECK_LIB(crypto, DES_cbc_encrypt) - savedppflags="$CPPLAGS" + savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_HEADERS(openssl/evp.h) CPPFLAGS="$savedcppflags" Modified: head/contrib/tcpdump/decode_prefix.h ============================================================================== --- head/contrib/tcpdump/decode_prefix.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/decode_prefix.h Fri Oct 5 20:19:28 2012 (r241235) @@ -33,9 +33,9 @@ #ifndef tcpdump_decode_prefix_h #define tcpdump_decode_prefix_h -extern int decode_prefix4(const u_char *pptr, char *buf, u_int buflen); +extern int decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen); #ifdef INET6 -extern int decode_prefix6(const u_char *pd, char *buf, u_int buflen); +extern int decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen); #endif #endif Modified: head/contrib/tcpdump/ethertype.h ============================================================================== --- head/contrib/tcpdump/ethertype.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/ethertype.h Fri Oct 5 20:19:28 2012 (r241235) @@ -101,6 +101,9 @@ #ifndef ETHERTYPE_AARP #define ETHERTYPE_AARP 0x80f3 #endif +#ifndef ETHERTYPE_TIPC +#define ETHERTYPE_TIPC 0x88ca +#endif #ifndef ETHERTYPE_8021Q #define ETHERTYPE_8021Q 0x8100 #endif Modified: head/contrib/tcpdump/forces.h ============================================================================== --- head/contrib/tcpdump/forces.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/forces.h Fri Oct 5 20:19:28 2012 (r241235) @@ -308,7 +308,7 @@ static const struct optlv_h OPTLV_msg[F_ /* F_OP_GET */ {ZERO_TTLV, 0, " Get", recpdoptlv_print}, /* F_OP_GETPROP */ {ZERO_TTLV, 0, " GetProp", recpdoptlv_print}, /* F_OP_GETRESP */ - {TTLV_T2, B_FULLD | B_RESTV, " GetResp", recpdoptlv_print}, + {TTLV_T2, B_FULLD | B_SPARD | B_RESTV, " GetResp", recpdoptlv_print}, /* F_OP_GETPRESP */ {TTLV_T2, B_FULLD | B_RESTV, " GetPropResp", recpdoptlv_print}, /* F_OP_REPORT */ Modified: head/contrib/tcpdump/netdissect.h ============================================================================== --- head/contrib/tcpdump/netdissect.h Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/netdissect.h Fri Oct 5 20:19:28 2012 (r241235) @@ -280,6 +280,7 @@ extern int esp_print(netdissect_options register const u_char *bp, int len, register const u_char *bp2, int *nhdr, int *padlen); extern void arp_print(netdissect_options *,const u_char *, u_int, u_int); +extern void tipc_print(netdissect_options *, const u_char *, u_int, u_int); extern void icmp6_print(netdissect_options *ndo, const u_char *, u_int, const u_char *, int); extern void isakmp_print(netdissect_options *,const u_char *, Modified: head/contrib/tcpdump/print-802_11.c ============================================================================== --- head/contrib/tcpdump/print-802_11.c Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/print-802_11.c Fri Oct 5 20:19:28 2012 (r241235) @@ -485,7 +485,7 @@ static const char *auth_alg_text[]={"Ope #define NUM_AUTH_ALGS (sizeof auth_alg_text / sizeof auth_alg_text[0]) static const char *status_text[] = { - "Succesful", /* 0 */ + "Successful", /* 0 */ "Unspecified failure", /* 1 */ "Reserved", /* 2 */ "Reserved", /* 3 */ Modified: head/contrib/tcpdump/print-bgp.c ============================================================================== --- head/contrib/tcpdump/print-bgp.c Fri Oct 5 20:15:30 2012 (r241234) +++ head/contrib/tcpdump/print-bgp.c Fri Oct 5 20:19:28 2012 (r241235) @@ -93,8 +93,7 @@ struct bgp_opt { /* variable length */ }; #define BGP_OPT_SIZE 2 /* some compilers may pad to 4 bytes */ - -#define BGP_UPDATE_MINSIZE 23 +#define BGP_CAP_HEADER_SIZE 2 /* some compilers may pad to 4 bytes */ struct bgp_notification { u_int8_t bgpn_marker[16]; @@ -115,19 +114,10 @@ struct bgp_route_refresh { }; /* EXTRACT_16BITS(&bgp_route_refresh->afi) (sigh) */ #define BGP_ROUTE_REFRESH_SIZE 23 -struct bgp_attr { - u_int8_t bgpa_flags; - u_int8_t bgpa_type; - union { - u_int8_t len; - u_int16_t elen; - } bgpa_len; -#define bgp_attr_len(p) \ - (((p)->bgpa_flags & 0x10) ? \ - EXTRACT_16BITS(&(p)->bgpa_len.elen) : (p)->bgpa_len.len) -#define bgp_attr_off(p) \ - (((p)->bgpa_flags & 0x10) ? 4 : 3) -}; +#define bgp_attr_lenlen(flags, p) \ + (((flags) & 0x10) ? 2 : 1) +#define bgp_attr_len(flags, p) \ + (((flags) & 0x10) ? EXTRACT_16BITS(p) : *(p)) #define BGPTYPE_ORIGIN 1 #define BGPTYPE_AS_PATH 2 @@ -493,38 +483,49 @@ as_printf (char *str, int size, u_int as return str; } +#define ITEMCHECK(minlen) if (itemlen < minlen) goto badtlv; + int -decode_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pptr[0]); + ITEMCHECK(1); plen = pptr[0]; if (32 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[1], (plen + 7) / 8); - memcpy(&addr, &pptr[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[1], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix4(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix4(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ /* this is one of the weirdnesses of rfc3107 @@ -542,12 +543,15 @@ decode_labeled_prefix4(const u_char *ppt if (32 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - ((u_char *)&addr)[(plen + 7) / 8 - 1] &= + ((u_char *)&addr)[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -557,10 +561,13 @@ decode_labeled_prefix4(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } /* @@ -1041,37 +1048,46 @@ trunc: #ifdef INET6 int -decode_prefix6(const u_char *pd, char *buf, u_int buflen) +decode_prefix6(const u_char *pd, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; TCHECK(pd[0]); + ITEMCHECK(1); plen = pd[0]; if (128 < plen) return -1; + itemlen -= 1; memset(&addr, 0, sizeof(addr)); - TCHECK2(pd[1], (plen + 7) / 8); - memcpy(&addr, &pd[1], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pd[1], plenbytes); + ITEMCHECK(plenbytes); + memcpy(&addr, &pd[1], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen); - return 1 + (plen + 7) / 8; + return 1 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int -decode_labeled_prefix6(const u_char *pptr, char *buf, u_int buflen) +decode_labeled_prefix6(const u_char *pptr, u_int itemlen, char *buf, u_int buflen) { struct in6_addr addr; - u_int plen; + u_int plen, plenbytes; - TCHECK(pptr[0]); + /* prefix length and label = 4 bytes */ + TCHECK2(pptr[0], 4); + ITEMCHECK(4); plen = pptr[0]; /* get prefix length */ if (24 > plen) @@ -1081,12 +1097,14 @@ decode_labeled_prefix6(const u_char *ppt if (128 < plen) return -1; + itemlen -= 4; memset(&addr, 0, sizeof(addr)); - TCHECK2(pptr[4], (plen + 7) / 8); - memcpy(&addr, &pptr[4], (plen + 7) / 8); + plenbytes = (plen + 7) / 8; + TCHECK2(pptr[4], plenbytes); + memcpy(&addr, &pptr[4], plenbytes); if (plen % 8) { - addr.s6_addr[(plen + 7) / 8 - 1] &= + addr.s6_addr[plenbytes - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } /* the label may get offsetted by 4 bits so lets shift it right */ @@ -1096,10 +1114,13 @@ decode_labeled_prefix6(const u_char *ppt EXTRACT_24BITS(pptr+1)>>4, ((pptr[3]&1)==0) ? "(BOGUS: Bottom of Stack NOT set!)" : "(bottom)" ); - return 4 + (plen + 7) / 8; + return 4 + plenbytes; trunc: return -2; + +badtlv: + return -3; } static int @@ -1266,7 +1287,7 @@ trunc: } static int -bgp_attr_print(const struct bgp_attr *attr, const u_char *pptr, int len) +bgp_attr_print(u_int atype, const u_char *pptr, u_int len) { int i; u_int16_t af; @@ -1276,7 +1297,7 @@ bgp_attr_print(const struct bgp_attr *at u_int32_t i; } bw; int advance; - int tlen; + u_int tlen; const u_char *tptr; char buf[MAXHOSTNAMELEN + 100]; char tokbuf[TOKBUFSIZE]; @@ -1285,7 +1306,7 @@ bgp_attr_print(const struct bgp_attr *at tptr = pptr; tlen=len; - switch (attr->bgpa_type) { + switch (atype) { case BGPTYPE_ORIGIN: if (len != 1) printf("invalid len"); @@ -1321,7 +1342,7 @@ bgp_attr_print(const struct bgp_attr *at * 2 bytes first, and it does not pass, assume that ASs are * encoded in 4 bytes format and move on. */ - as_size = bgp_attr_get_as_size(attr->bgpa_type, pptr, len); + as_size = bgp_attr_get_as_size(atype, pptr, len); while (tptr < pptr + len) { TCHECK(tptr[0]); @@ -1657,20 +1678,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1718,20 +1743,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1821,20 +1850,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET<<8 | SAFNUM_UNICAST): case (AFNUM_INET<<8 | SAFNUM_MULTICAST): case (AFNUM_INET<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix4(tptr, buf, sizeof(buf)); + advance = decode_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix4(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix4(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -1853,20 +1886,24 @@ bgp_attr_print(const struct bgp_attr *at case (AFNUM_INET6<<8 | SAFNUM_UNICAST): case (AFNUM_INET6<<8 | SAFNUM_MULTICAST): case (AFNUM_INET6<<8 | SAFNUM_UNIMULTICAST): - advance = decode_prefix6(tptr, buf, sizeof(buf)); + advance = decode_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; case (AFNUM_INET6<<8 | SAFNUM_LABUNICAST): - advance = decode_labeled_prefix6(tptr, buf, sizeof(buf)); + advance = decode_labeled_prefix6(tptr, len, buf, sizeof(buf)); if (advance == -1) printf("\n\t (illegal prefix length)"); else if (advance == -2) goto trunc; + else if (advance == -3) + break; /* bytes left, but not enough */ else printf("\n\t %s", buf); break; @@ -2097,40 +2134,50 @@ bgp_attr_print(const struct bgp_attr *at } case BGPTYPE_ATTR_SET: TCHECK2(tptr[0], 4); + if (len < 4) + goto trunc; printf("\n\t Origin AS: %s", as_printf(astostr, sizeof(astostr), EXTRACT_32BITS(tptr))); tptr+=4; len -=4; - while (len >= 2 ) { - int alen; - struct bgp_attr bgpa; + while (len) { + u_int aflags, atype, alenlen, alen; - TCHECK2(tptr[0], sizeof(bgpa)); - memcpy(&bgpa, tptr, sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - tptr += bgp_attr_off(&bgpa); - len -= bgp_attr_off(&bgpa); + TCHECK2(tptr[0], 2); + if (len < 2) + goto trunc; + aflags = *tptr; + atype = *(tptr + 1); + tptr += 2; + len -= 2; + alenlen = bgp_attr_lenlen(aflags, tptr); + TCHECK2(tptr[0], alenlen); + if (len < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, tptr); + tptr += alenlen; + len -= alenlen; printf("\n\t %s (%u), length: %u", tok2strbuf(bgp_attr_values, - "Unknown Attribute", bgpa.bgpa_type, - tokbuf, sizeof(tokbuf)), - bgpa.bgpa_type, + "Unknown Attribute", atype, + tokbuf, sizeof(tokbuf)), + atype, alen); - if (bgpa.bgpa_flags) { + if (aflags) { printf(", Flags [%s%s%s%s", - bgpa.bgpa_flags & 0x80 ? "O" : "", - bgpa.bgpa_flags & 0x40 ? "T" : "", - bgpa.bgpa_flags & 0x20 ? "P" : "", - bgpa.bgpa_flags & 0x10 ? "E" : ""); - if (bgpa.bgpa_flags & 0xf) - printf("+%x", bgpa.bgpa_flags & 0xf); + aflags & 0x80 ? "O" : "", + aflags & 0x40 ? "T" : "", + aflags & 0x20 ? "P" : "", + aflags & 0x10 ? "E" : ""); + if (aflags & 0xf) + printf("+%x", aflags & 0xf); printf("]: "); } /* FIXME check for recursion */ - if (!bgp_attr_print(&bgpa, tptr, alen)) + if (!bgp_attr_print(atype, tptr, alen)) return 0; tptr += alen; len -= alen; @@ -2140,7 +2187,7 @@ bgp_attr_print(const struct bgp_attr *at default: TCHECK2(*pptr,len); - printf("\n\t no Attribute %u decoder",attr->bgpa_type); /* we have no decoder for the attribute */ + printf("\n\t no Attribute %u decoder",atype); /* we have no decoder for the attribute */ if (vflag <= 1) print_unknown_data(pptr,"\n\t ",len); break; @@ -2156,14 +2203,97 @@ trunc: } static void +bgp_capabilities_print(const u_char *opt, int caps_len) +{ + char tokbuf[TOKBUFSIZE]; + char tokbuf2[TOKBUFSIZE]; + int cap_type, cap_len, tcap_len, cap_offset; + int i = 0; + + while (i < caps_len) { + TCHECK2(opt[i], BGP_CAP_HEADER_SIZE); + cap_type=opt[i]; + cap_len=opt[i+1]; + tcap_len=cap_len; + printf("\n\t %s (%u), length: %u", + tok2strbuf(bgp_capcode_values, "Unknown", + cap_type, tokbuf, sizeof(tokbuf)), + cap_type, + cap_len); + TCHECK2(opt[i+2], cap_len); + switch (cap_type) { + case BGP_CAPCODE_MP: + printf("\n\t\tAFI %s (%u), SAFI %s (%u)", + tok2strbuf(af_values, "Unknown", + EXTRACT_16BITS(opt+i+2), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+2), + tok2strbuf(bgp_safi_values, "Unknown", + opt[i+5], + tokbuf, sizeof(tokbuf)), + opt[i+5]); + break; + case BGP_CAPCODE_RESTART: + printf("\n\t\tRestart Flags: [%s], Restart Time %us", + ((opt[i+2])&0x80) ? "R" : "none", + EXTRACT_16BITS(opt+i+2)&0xfff); + tcap_len-=2; + cap_offset=4; + while(tcap_len>=4) { + printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", + tok2strbuf(af_values,"Unknown", + EXTRACT_16BITS(opt+i+cap_offset), + tokbuf, sizeof(tokbuf)), + EXTRACT_16BITS(opt+i+cap_offset), + tok2strbuf(bgp_safi_values,"Unknown", + opt[i+cap_offset+2], + tokbuf2, sizeof(tokbuf2)), + opt[i+cap_offset+2], + ((opt[i+cap_offset+3])&0x80) ? "yes" : "no" ); + tcap_len-=4; + cap_offset+=4; + } + break; + case BGP_CAPCODE_RR: + case BGP_CAPCODE_RR_CISCO: + break; + case BGP_CAPCODE_AS_NEW: + + /* + * Extract the 4 byte AS number encoded. + */ + if (cap_len == 4) { + printf("\n\t\t 4 Byte AS %s", + as_printf(astostr, sizeof(astostr), + EXTRACT_32BITS(opt + i + 2))); + } + break; + default: + printf("\n\t\tno decoder for Capability %u", + cap_type); + if (vflag <= 1) + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + break; + } + if (vflag > 1 && cap_len > 0) { + print_unknown_data(&opt[i+2],"\n\t\t",cap_len); + } + i += BGP_CAP_HEADER_SIZE + cap_len; + } + return; + +trunc: + printf("[|BGP]"); +} + +static void bgp_open_print(const u_char *dat, int length) { struct bgp_open bgpo; struct bgp_opt bgpopt; const u_char *opt; - int i,cap_type,cap_len,tcap_len,cap_offset; + int i; char tokbuf[TOKBUFSIZE]; - char tokbuf2[TOKBUFSIZE]; TCHECK2(dat[0], BGP_OPEN_SIZE); memcpy(&bgpo, dat, BGP_OPEN_SIZE); @@ -2188,96 +2318,31 @@ bgp_open_print(const u_char *dat, int le TCHECK2(opt[i], BGP_OPT_SIZE); memcpy(&bgpopt, &opt[i], BGP_OPT_SIZE); if (i + 2 + bgpopt.bgpopt_len > bgpo.bgpo_optlen) { - printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); + printf("\n\t Option %d, length: %u", bgpopt.bgpopt_type, bgpopt.bgpopt_len); break; } printf("\n\t Option %s (%u), length: %u", - tok2strbuf(bgp_opt_values,"Unknown", + tok2strbuf(bgp_opt_values,"Unknown", bgpopt.bgpopt_type, tokbuf, sizeof(tokbuf)), - bgpopt.bgpopt_type, - bgpopt.bgpopt_len); + bgpopt.bgpopt_type, + bgpopt.bgpopt_len); - /* now lets decode the options we know*/ - switch(bgpopt.bgpopt_type) { - case BGP_OPT_CAP: - cap_type=opt[i+BGP_OPT_SIZE]; - cap_len=opt[i+BGP_OPT_SIZE+1]; - tcap_len=cap_len; - printf("\n\t %s (%u), length: %u", - tok2strbuf(bgp_capcode_values, "Unknown", - cap_type, tokbuf, sizeof(tokbuf)), - cap_type, - cap_len); - switch(cap_type) { - case BGP_CAPCODE_MP: - printf("\n\t\tAFI %s (%u), SAFI %s (%u)", - tok2strbuf(af_values, "Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2), - tok2strbuf(bgp_safi_values, "Unknown", - opt[i+BGP_OPT_SIZE+5], - tokbuf, sizeof(tokbuf)), - opt[i+BGP_OPT_SIZE+5]); - break; - case BGP_CAPCODE_RESTART: - printf("\n\t\tRestart Flags: [%s], Restart Time %us", - ((opt[i+BGP_OPT_SIZE+2])&0x80) ? "R" : "none", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+2)&0xfff); - tcap_len-=2; - cap_offset=4; - while(tcap_len>=4) { - printf("\n\t\t AFI %s (%u), SAFI %s (%u), Forwarding state preserved: %s", - tok2strbuf(af_values,"Unknown", - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tokbuf, sizeof(tokbuf)), - EXTRACT_16BITS(opt+i+BGP_OPT_SIZE+cap_offset), - tok2strbuf(bgp_safi_values,"Unknown", - opt[i+BGP_OPT_SIZE+cap_offset+2], - tokbuf2, sizeof(tokbuf2)), - opt[i+BGP_OPT_SIZE+cap_offset+2], - ((opt[i+BGP_OPT_SIZE+cap_offset+3])&0x80) ? "yes" : "no" ); - tcap_len-=4; - cap_offset+=4; - } - break; - case BGP_CAPCODE_RR: - case BGP_CAPCODE_RR_CISCO: - break; - case BGP_CAPCODE_AS_NEW: + /* now let's decode the options we know*/ + switch(bgpopt.bgpopt_type) { - /* - * Extract the 4 byte AS number encoded. - */ - TCHECK2(opt[i + BGP_OPT_SIZE + 2], cap_len); - if (cap_len == 4) { - printf("\n\t\t 4 Byte AS %s", - as_printf(astostr, sizeof(astostr), - EXTRACT_32BITS(opt + i + BGP_OPT_SIZE + 2))); - } - break; - default: - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - printf("\n\t\tno decoder for Capability %u", - cap_type); - if (vflag <= 1) - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - break; - } - if (vflag > 1) { - TCHECK2(opt[i+BGP_OPT_SIZE+2],cap_len); - print_unknown_data(&opt[i+BGP_OPT_SIZE+2],"\n\t\t",cap_len); - } - break; - case BGP_OPT_AUTH: - default: - printf("\n\t no decoder for option %u", - bgpopt.bgpopt_type); - break; - } + case BGP_OPT_CAP: + bgp_capabilities_print(&opt[i+BGP_OPT_SIZE], + bgpopt.bgpopt_len); + break; + case BGP_OPT_AUTH: + default: + printf("\n\t no decoder for option %u", + bgpopt.bgpopt_type); + break; + } i += BGP_OPT_SIZE + bgpopt.bgpopt_len; } return; @@ -2289,107 +2354,163 @@ static void bgp_update_print(const u_char *dat, int length) { struct bgp bgp; - struct bgp_attr bgpa; const u_char *p; + int withdrawn_routes_len; int len; int i; char tokbuf[TOKBUFSIZE]; +#ifndef INET6 + char buf[MAXHOSTNAMELEN + 100]; + int wpfx; +#endif TCHECK2(dat[0], BGP_SIZE); + if (length < BGP_SIZE) + goto trunc; memcpy(&bgp, dat, BGP_SIZE); p = dat + BGP_SIZE; /*XXX*/ + length -= BGP_SIZE; /* Unfeasible routes */ - len = EXTRACT_16BITS(p); - if (len) { + TCHECK2(p[0], 2); + if (length < 2) + goto trunc; + withdrawn_routes_len = EXTRACT_16BITS(p); + p += 2; + length -= 2; + if (withdrawn_routes_len) { /* * Without keeping state from the original NLRI message, * it's not possible to tell if this a v4 or v6 route, * so only try to decode it if we're not v6 enabled. */ + TCHECK2(p[0], withdrawn_routes_len); + if (length < withdrawn_routes_len) + goto trunc; #ifdef INET6 - printf("\n\t Withdrawn routes: %d bytes", len); + printf("\n\t Withdrawn routes: %d bytes", withdrawn_routes_len); + p += withdrawn_routes_len; + length -= withdrawn_routes_len; #else - char buf[MAXHOSTNAMELEN + 100]; - int wpfx; + if (withdrawn_routes_len < 2) + goto trunc; + length -= 2; + withdrawn_routes_len -= 2; - TCHECK2(p[2], len); - i = 2; printf("\n\t Withdrawn routes:"); - while(i < 2 + len) { - wpfx = decode_prefix4(&p[i], buf, sizeof(buf)); + while(withdrawn_routes_len > 0) { + wpfx = decode_prefix4(p, withdrawn_routes_len, buf, sizeof(buf)); if (wpfx == -1) { printf("\n\t (illegal prefix length)"); break; } else if (wpfx == -2) goto trunc; + else if (wpfx == -3) + goto trunc; /* bytes left, but not enough */ else { - i += wpfx; printf("\n\t %s", buf); + p += wpfx; + length -= wpfx; + withdrawn_routes_len -= wpfx; } } #endif } - p += 2 + len; TCHECK2(p[0], 2); + if (length < 2) + goto trunc; len = EXTRACT_16BITS(p); + p += 2; + length -= 2; - if (len == 0 && length == BGP_UPDATE_MINSIZE) { + if (withdrawn_routes_len == 0 && len == 0 && length == 0) { + /* No withdrawn routes, no path attributes, no NLRI */ printf("\n\t End-of-Rib Marker (empty NLRI)"); return; } if (len) { /* do something more useful!*/ - i = 2; - while (i < 2 + len) { - int alen, aoff; - - TCHECK2(p[i], sizeof(bgpa)); - memcpy(&bgpa, &p[i], sizeof(bgpa)); - alen = bgp_attr_len(&bgpa); - aoff = bgp_attr_off(&bgpa); + while (len) { + int aflags, atype, alenlen, alen; + + TCHECK2(p[0], 2); + if (len < 2) + goto trunc; + if (length < 2) + goto trunc; + aflags = *p; + atype = *(p + 1); + p += 2; + len -= 2; + length -= 2; + alenlen = bgp_attr_lenlen(aflags, p); + TCHECK2(p[0], alenlen); + if (len < alenlen) + goto trunc; + if (length < alenlen) + goto trunc; + alen = bgp_attr_len(aflags, p); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 05:54:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EDD0B106566C; Sat, 6 Oct 2012 05:54:41 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF13A8FC0C; Sat, 6 Oct 2012 05:54:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q965sftr008059; Sat, 6 Oct 2012 05:54:41 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q965sfAO008057; Sat, 6 Oct 2012 05:54:41 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210060554.q965sfAO008057@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Oct 2012 05:54: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: r241241 - head/usr.sbin/sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 05:54:42 -0000 Author: joel (doc committer) Date: Sat Oct 6 05:54:41 2012 New Revision: 241241 URL: http://svn.freebsd.org/changeset/base/241241 Log: Remove trailing whitespace. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Fri Oct 5 22:42:57 2012 (r241240) +++ head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 05:54:41 2012 (r241241) @@ -87,7 +87,7 @@ Print a full usage statement to stderr a .It Fl i Ignore unknown variables. .It Fl j Ar jail -The +The .Ar jid or name of the .Ar jail From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 06:02:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 99A48106564A; Sat, 6 Oct 2012 06:02:30 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83B8D8FC17; Sat, 6 Oct 2012 06:02:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9662Ugo009081; Sat, 6 Oct 2012 06:02:30 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9662URT009079; Sat, 6 Oct 2012 06:02:30 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210060602.q9662URT009079@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Oct 2012 06:02: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: r241242 - head/usr.sbin/sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 06:02:30 -0000 Author: joel (doc committer) Date: Sat Oct 6 06:02:29 2012 New Revision: 241242 URL: http://svn.freebsd.org/changeset/base/241242 Log: Minor mdoc fix. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 05:54:41 2012 (r241241) +++ head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 06:02:29 2012 (r241242) @@ -126,7 +126,7 @@ syntax for querying/setting configuratio However, while .Xr sysctl 8 serves to query/modify MIBs in the entrant kernel, -.Xr sysrc 8 +.Nm instead works on values in the system .Xr rc.conf 5 configuration files. From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 06:07:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 37A841065672; Sat, 6 Oct 2012 06:07:33 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C06328FC12; Sat, 6 Oct 2012 06:07:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9667X7l009805; Sat, 6 Oct 2012 06:07:33 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9667Xex009803; Sat, 6 Oct 2012 06:07:33 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201210060607.q9667Xex009803@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Oct 2012 06:07: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: r241243 - head/usr.sbin/sysrc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 06:07:34 -0000 Author: joel (doc committer) Date: Sat Oct 6 06:07:33 2012 New Revision: 241243 URL: http://svn.freebsd.org/changeset/base/241243 Log: mdoc: begin sentences on a new line. Modified: head/usr.sbin/sysrc/sysrc.8 Modified: head/usr.sbin/sysrc/sysrc.8 ============================================================================== --- head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 06:02:29 2012 (r241242) +++ head/usr.sbin/sysrc/sysrc.8 Sat Oct 6 06:07:33 2012 (r241243) @@ -98,7 +98,8 @@ Show only variable values, not their nam .It Fl N Show only variable names, not their values. .It Fl q -Quiet. Ignore previous +Quiet. +Ignore previous .Fl v and/or .Ev SYSRC_VERBOSE . @@ -108,7 +109,8 @@ Operate within the root directory rather than .Pq Sq / . .It Fl v -Verbose. Print the pathname of the specific +Verbose. +Print the pathname of the specific .Xr rc.conf 5 file where the directive was found. .It Fl x @@ -135,16 +137,20 @@ The list of system configuration files i .Ql /etc/defaults/rc.conf within the variable .Ql rc_conf_files , -which by-default contains a space-separated list of pathnames. On all FreeBSD -systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". Each -pathname is sourced in-order upon startup. It is in the same fashion that +which by-default contains a space-separated list of pathnames. +On all FreeBSD +systems, this defaults to the value "/etc/rc.conf /etc/rc.conf.local". +Each +pathname is sourced in-order upon startup. +It is in the same fashion that .Nm sources the configuration files before returning the value of the given variable. .Pp When supplied a variable name, .Nm -will return the value of the variable. If the variable does not appear in any +will return the value of the variable. +If the variable does not appear in any of the configured .Ql rc_conf_files , an error is printed and error status is returned. @@ -152,13 +158,16 @@ an error is printed and error status is When changing values of a given variable, it does not matter if the variable appears in any of the .Ql rc_conf_files -or not. If the variable does not appear in any of the files, it is appended to +or not. +If the variable does not appear in any of the files, it is appended to the end of the first pathname in the .Ql rc_conf_files -variable. Otherwise, +variable. +Otherwise, .Nm will replace only the last-occurrence in the last-file found to contain the -variable. This gets the value to take effect next boot without heavily +variable. +This gets the value to take effect next boot without heavily modifying these integral files (yet taking care not to allow the file to grow unwieldy should .Nm @@ -176,7 +185,8 @@ Location of .Ql /etc/defaults/rc.conf file. .It Ev SYSRC_VERBOSE -Default verbosity. Set to non-NULL to enable. +Default verbosity. +Set to non-NULL to enable. .El .Sh DEPENDENCIES The following standard commands are required by From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 07:06:58 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4DD521065673; Sat, 6 Oct 2012 07:06:58 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38ABD8FC0C; Sat, 6 Oct 2012 07:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9676wuv017274; Sat, 6 Oct 2012 07:06:58 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9676wpo017272; Sat, 6 Oct 2012 07:06:58 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210060706.q9676wpo017272@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 6 Oct 2012 07:06: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: r241244 - head/sys/netpfil/pf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 07:06:58 -0000 Author: glebius Date: Sat Oct 6 07:06:57 2012 New Revision: 241244 URL: http://svn.freebsd.org/changeset/base/241244 Log: The pfil(9) layer guarantees us presence of the protocol header, so remove extra check, that is always false. P.S. Also, goto there lead to unlocking a not locked rwlock. Modified: head/sys/netpfil/pf/pf.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sat Oct 6 06:07:33 2012 (r241243) +++ head/sys/netpfil/pf/pf.c Sat Oct 6 07:06:57 2012 (r241244) @@ -5620,13 +5620,6 @@ pf_test(int dir, struct ifnet *ifp, stru if (m->m_flags & M_SKIP_FIREWALL) return (PF_PASS); - if (m->m_pkthdr.len < (int)sizeof(struct ip)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_SHORT); - log = 1; - goto done; - } - pd.pf_mtag = pf_find_mtag(m); PF_RULES_RLOCK(); @@ -5992,13 +5985,6 @@ pf_test6(int dir, struct ifnet *ifp, str if (kif->pfik_flags & PFI_IFLAG_SKIP) return (PF_PASS); - if (m->m_pkthdr.len < (int)sizeof(*h)) { - action = PF_DROP; - REASON_SET(&reason, PFRES_SHORT); - log = 1; - goto done; - } - PF_RULES_RLOCK(); /* We do IP header normalization and packet reassembly here */ From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 10:02:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DF50106566B; Sat, 6 Oct 2012 10:02:12 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451888FC0C; Sat, 6 Oct 2012 10:02:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96A2CSs039784; Sat, 6 Oct 2012 10:02:12 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96A2BFf039772; Sat, 6 Oct 2012 10:02:11 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201210061002.q96A2BFf039772@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 6 Oct 2012 10:02: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: r241245 - in head: . share/man/man9 sys/contrib/ipfilter/netinet sys/net sys/netinet sys/netpfil/ipfw sys/netpfil/pf 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: Sat, 06 Oct 2012 10:02:12 -0000 Author: glebius Date: Sat Oct 6 10:02:11 2012 New Revision: 241245 URL: http://svn.freebsd.org/changeset/base/241245 Log: A step in resolving mess with byte ordering for AF_INET. After this change: - All packets in NETISR_IP queue are in net byte order. - ip_input() is entered in net byte order and converts packet to host byte order right _after_ processing pfil(9) hooks. - ip_output() is entered in host byte order and converts packet to net byte order right _before_ processing pfil(9) hooks. - ip_fragment() accepts and emits packet in net byte order. - ip_forward(), ip_mloopback() use host byte order (untouched actually). - ip_fastforward() no longer modifies packet at all (except ip_ttl). - Swapping of byte order there and back removed from the following modules: pf(4), ipfw(4), enc(4), if_bridge(4). - Swapping of byte order added to ipfilter(4), based on __FreeBSD_version - __FreeBSD_version bumped. - pfil(9) manual page updated. Reviewed by: ray, luigi, eri, melifaro Tested by: glebius (LE), ray (BE) Modified: head/UPDATING head/share/man/man9/pfil.9 head/sys/contrib/ipfilter/netinet/fil.c head/sys/net/if_bridge.c head/sys/net/if_enc.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netpfil/ipfw/ip_fw_pfil.c head/sys/netpfil/pf/pf_ioctl.c head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Oct 6 07:06:57 2012 (r241244) +++ head/UPDATING Sat Oct 6 10:02:11 2012 (r241245) @@ -24,6 +24,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20121006: + The pfil(9) API/ABI for AF_INET family has been changed. Packet + filtering modules: pf(4), ipfw(4), ipfilter(4) need to be recompiled + with new kernel. + 20121001: The net80211(4) ABI has been changed to allow for improved driver PS-POLL and power-save support. All wireless drivers need to be Modified: head/share/man/man9/pfil.9 ============================================================================== --- head/share/man/man9/pfil.9 Sat Oct 6 07:06:57 2012 (r241244) +++ head/share/man/man9/pfil.9 Sat Oct 6 10:02:11 2012 (r241245) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 16, 2012 +.Dd October 6, 2012 .Dt PFIL 9 .Os .Sh NAME @@ -127,10 +127,9 @@ Currently, filtering points are implemen .Pp .Bl -tag -width "AF_INET6" -offset XXX -compact .It AF_INET +IPv4 packets. .It AF_INET6 -IPv4 and IPv6 packets. Note that packet header is already -.Cm converted to host format. -Host format has to be preserved in case of header modifications. +IPv6 packets. .It AF_LINK Link-layer packets. .El Modified: head/sys/contrib/ipfilter/netinet/fil.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/contrib/ipfilter/netinet/fil.c Sat Oct 6 10:02:11 2012 (r241245) @@ -2513,7 +2513,7 @@ int out; } else #endif { -#if (defined(OpenBSD) && (OpenBSD >= 200311)) && defined(_KERNEL) +#if ((defined(OpenBSD) && (OpenBSD >= 200311)) || (defined(FreeBSD) && (__FreeBSD_version >= 1000019))) && defined(_KERNEL) ip->ip_len = ntohs(ip->ip_len); ip->ip_off = ntohs(ip->ip_off); #endif @@ -2777,7 +2777,7 @@ finished: RWLOCK_EXIT(&ipf_global); #ifdef _KERNEL -# if (defined(OpenBSD) && (OpenBSD >= 200311)) +# if (defined(OpenBSD) && (OpenBSD >= 200311)) || (defined(FreeBSD) && (__FreeBSD_version >= 1000019)) if (FR_ISPASS(pass) && (v == 4)) { ip = fin->fin_ip; ip->ip_len = ntohs(ip->ip_len); Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/net/if_bridge.c Sat Oct 6 10:02:11 2012 (r241245) @@ -3093,15 +3093,6 @@ bridge_pfil(struct mbuf **mp, struct ifn switch (ether_type) { case ETHERTYPE_IP: /* - * before calling the firewall, swap fields the same as - * IP does. here we assume the header is contiguous - */ - ip = mtod(*mp, struct ip *); - - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - - /* * Run pfil on the member interface and the bridge, both can * be skipped by clearing pfil_member or pfil_bridge. * @@ -3139,7 +3130,7 @@ bridge_pfil(struct mbuf **mp, struct ifn } } - /* Recalculate the ip checksum and restore byte ordering */ + /* Recalculate the ip checksum. */ ip = mtod(*mp, struct ip *); hlen = ip->ip_hl << 2; if (hlen < sizeof(struct ip)) @@ -3151,8 +3142,6 @@ bridge_pfil(struct mbuf **mp, struct ifn if (ip == NULL) goto bad; } - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); ip->ip_sum = 0; if (hlen == sizeof(struct ip)) ip->ip_sum = in_cksum_hdr(ip); Modified: head/sys/net/if_enc.c ============================================================================== --- head/sys/net/if_enc.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/net/if_enc.c Sat Oct 6 10:02:11 2012 (r241245) @@ -270,23 +270,8 @@ ipsec_filter(struct mbuf **mp, int dir, switch (ip->ip_v) { #ifdef INET case 4: - /* - * before calling the firewall, swap fields the same as - * IP does. here we assume the header is contiguous - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - error = pfil_run_hooks(&V_inet_pfil_hook, mp, encif, dir, NULL); - - if (*mp == NULL || error != 0) - break; - - /* restore byte ordering */ - ip = mtod(*mp, struct ip *); - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); break; #endif #ifdef INET6 Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netinet/ip_fastfwd.c Sat Oct 6 10:02:11 2012 (r241245) @@ -164,7 +164,7 @@ ip_fastforward(struct mbuf *m) struct sockaddr_in *dst = NULL; struct ifnet *ifp; struct in_addr odest, dest; - u_short sum, ip_len; + uint16_t sum, ip_len, ip_off; int error = 0; int hlen, mtu; #ifdef IPFIREWALL_FORWARD @@ -340,12 +340,6 @@ ip_fastforward(struct mbuf *m) * Step 3: incoming packet firewall processing */ - /* - * Convert to host representation - */ - ip->ip_len = ntohs(ip->ip_len); - ip->ip_off = ntohs(ip->ip_off); - odest.s_addr = dest.s_addr = ip->ip_dst.s_addr; /* @@ -472,8 +466,6 @@ passin: forwardlocal: /* * Return packet for processing by ip_input(). - * Keep host byte order as expected at ip_input's - * "ours"-label. */ m->m_flags |= M_FASTFWD_OURS; if (ro.ro_rt) @@ -500,6 +492,8 @@ passout: /* * Step 6: send off the packet */ + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); /* * Check if route is dampned (when ARP is unable to resolve) @@ -515,7 +509,7 @@ passout: /* * Check if there is enough space in the interface queue */ - if ((ifp->if_snd.ifq_len + ip->ip_len / ifp->if_mtu + 1) >= + if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= ifp->if_snd.ifq_maxlen) { IPSTAT_INC(ips_odropped); /* would send source quench here but that is depreciated */ @@ -539,13 +533,8 @@ passout: else mtu = ifp->if_mtu; - if (ip->ip_len <= mtu || - (ifp->if_hwassist & CSUM_FRAGMENT && (ip->ip_off & IP_DF) == 0)) { - /* - * Restore packet header fields to original values - */ - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); + if (ip_len <= mtu || + (ifp->if_hwassist & CSUM_FRAGMENT && (ip_off & IP_DF) == 0)) { /* * Send off the packet via outgoing interface */ @@ -555,7 +544,7 @@ passout: /* * Handle EMSGSIZE with icmp reply needfrag for TCP MTU discovery */ - if (ip->ip_off & IP_DF) { + if (ip_off & IP_DF) { IPSTAT_INC(ips_cantfrag); icmp_error(m, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0, mtu); @@ -565,10 +554,6 @@ passout: * We have to fragment the packet */ m->m_pkthdr.csum_flags |= CSUM_IP; - /* - * ip_fragment expects ip_len and ip_off in host byte - * order but returns all packets in network byte order - */ if (ip_fragment(ip, &m, mtu, ifp->if_hwassist, (~ifp->if_hwassist & CSUM_DELAY_IP))) { goto drop; Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netinet/ip_input.c Sat Oct 6 10:02:11 2012 (r241245) @@ -380,20 +380,18 @@ ip_input(struct mbuf *m) struct ifaddr *ifa; struct ifnet *ifp; int checkif, hlen = 0; - u_short sum; + uint16_t sum, ip_len; int dchg = 0; /* dest changed after fw */ struct in_addr odst; /* original dst address */ M_ASSERTPKTHDR(m); if (m->m_flags & M_FASTFWD_OURS) { - /* - * Firewall or NAT changed destination to local. - * We expect ip_len and ip_off to be in host byte order. - */ m->m_flags &= ~M_FASTFWD_OURS; /* Set up some basics that will be used later. */ ip = mtod(m, struct ip *); + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); hlen = ip->ip_hl << 2; goto ours; } @@ -458,15 +456,11 @@ ip_input(struct mbuf *m) return; #endif - /* - * Convert fields to host representation. - */ - ip->ip_len = ntohs(ip->ip_len); - if (ip->ip_len < hlen) { + ip_len = ntohs(ip->ip_len); + if (ip_len < hlen) { IPSTAT_INC(ips_badlen); goto bad; } - ip->ip_off = ntohs(ip->ip_off); /* * Check that the amount of data in the buffers @@ -474,17 +468,17 @@ ip_input(struct mbuf *m) * Trim mbufs if longer than we expect. * Drop packet if shorter than we expect. */ - if (m->m_pkthdr.len < ip->ip_len) { + if (m->m_pkthdr.len < ip_len) { tooshort: IPSTAT_INC(ips_tooshort); goto bad; } - if (m->m_pkthdr.len > ip->ip_len) { + if (m->m_pkthdr.len > ip_len) { if (m->m_len == m->m_pkthdr.len) { - m->m_len = ip->ip_len; - m->m_pkthdr.len = ip->ip_len; + m->m_len = ip_len; + m->m_pkthdr.len = ip_len; } else - m_adj(m, ip->ip_len - m->m_pkthdr.len); + m_adj(m, ip_len - m->m_pkthdr.len); } #ifdef IPSEC /* @@ -519,6 +513,8 @@ tooshort: #ifdef IPFIREWALL_FORWARD if (m->m_flags & M_FASTFWD_OURS) { m->m_flags &= ~M_FASTFWD_OURS; + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); goto ours; } if ((dchg = (m_tag_find(m, PACKET_TAG_IPFORWARD, NULL) != NULL)) != 0) { @@ -527,6 +523,8 @@ tooshort: * packets originally destined to us to some other directly * connected host. */ + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); ip_forward(m, dchg); return; } @@ -534,6 +532,13 @@ tooshort: passin: /* + * From now and up to output pfil(9) processing in ip_output() + * the header is in host byte order. + */ + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); + + /* * Process options and, if not destined for us, * ship it on. ip_dooptions returns 1 when an * error was detected (causing an icmp message @@ -1360,6 +1365,8 @@ u_char inetctlerrmap[PRC_NCMDS] = { * * The srcrt parameter indicates whether the packet is being forwarded * via a source route. + * + * IP header in host byte order. */ void ip_forward(struct mbuf *m, int srcrt) Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netinet/ip_output.c Sat Oct 6 10:02:11 2012 (r241245) @@ -125,7 +125,8 @@ ip_output(struct mbuf *m, struct mbuf *o int error = 0; struct sockaddr_in *dst; struct in_ifaddr *ia; - int isbroadcast, sw_csum; + int isbroadcast; + uint16_t ip_len, ip_off, sw_csum; struct route iproute; struct rtentry *rte; /* cache for ro->ro_rt */ struct in_addr odst; @@ -501,6 +502,12 @@ sendit: hlen = ip->ip_hl << 2; #endif /* IPSEC */ + /* + * To network byte order. pfil(9) hooks and ip_fragment() expect this. + */ + ip->ip_len = htons(ip->ip_len); + ip->ip_off = htons(ip->ip_off); + /* Jump over all PFIL processing if hooks are not active. */ if (!PFIL_HOOKED(&V_inet_pfil_hook)) goto passout; @@ -537,6 +544,8 @@ sendit: } else { if (ia != NULL) ifa_free(&ia->ia_ifa); + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); goto again; /* Redo the routing table lookup. */ } } @@ -570,11 +579,16 @@ sendit: m_tag_delete(m, fwd_tag); if (ia != NULL) ifa_free(&ia->ia_ifa); + ip->ip_len = ntohs(ip->ip_len); + ip->ip_off = ntohs(ip->ip_off); goto again; } #endif /* IPFIREWALL_FORWARD */ passout: + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); + /* 127/8 must not appear on wire - RFC1122. */ if ((ntohl(ip->ip_dst.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET || (ntohl(ip->ip_src.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) { @@ -603,11 +617,9 @@ passout: * If small enough for interface, or the interface will take * care of the fragmentation for us, we can just send directly. */ - if (ip->ip_len <= mtu || + if (ip_len <= mtu || (m->m_pkthdr.csum_flags & ifp->if_hwassist & CSUM_TSO) != 0 || - ((ip->ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { - ip->ip_len = htons(ip->ip_len); - ip->ip_off = htons(ip->ip_off); + ((ip_off & IP_DF) == 0 && (ifp->if_hwassist & CSUM_FRAGMENT))) { ip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) ip->ip_sum = in_cksum(m, hlen); @@ -641,7 +653,7 @@ passout: } /* Balk when DF bit is set or the interface didn't support TSO. */ - if ((ip->ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { + if ((ip_off & IP_DF) || (m->m_pkthdr.csum_flags & CSUM_TSO)) { error = EMSGSIZE; IPSTAT_INC(ips_cantfrag); goto bad; @@ -710,8 +722,12 @@ ip_fragment(struct ip *ip, struct mbuf * int firstlen; struct mbuf **mnext; int nfrags; + uint16_t ip_len, ip_off; + + ip_len = ntohs(ip->ip_len); + ip_off = ntohs(ip->ip_off); - if (ip->ip_off & IP_DF) { /* Fragmentation not allowed */ + if (ip_off & IP_DF) { /* Fragmentation not allowed */ IPSTAT_INC(ips_cantfrag); return EMSGSIZE; } @@ -785,7 +801,7 @@ smart_frag_failure: * The fragments are linked off the m_nextpkt of the original * packet, which after processing serves as the first fragment. */ - for (nfrags = 1; off < ip->ip_len; off += len, nfrags++) { + for (nfrags = 1; off < ip_len; off += len, nfrags++) { struct ip *mhip; /* ip header on the fragment */ struct mbuf *m; int mhlen = sizeof (struct ip); @@ -811,10 +827,10 @@ smart_frag_failure: mhip->ip_hl = mhlen >> 2; } m->m_len = mhlen; - /* XXX do we need to add ip->ip_off below ? */ - mhip->ip_off = ((off - hlen) >> 3) + ip->ip_off; - if (off + len >= ip->ip_len) { /* last fragment */ - len = ip->ip_len - off; + /* XXX do we need to add ip_off below ? */ + mhip->ip_off = ((off - hlen) >> 3) + ip_off; + if (off + len >= ip_len) { /* last fragment */ + len = ip_len - off; m->m_flags |= M_LASTFRAG; } else mhip->ip_off |= IP_MF; @@ -849,11 +865,10 @@ smart_frag_failure: * Update first fragment by trimming what's been copied out * and updating header. */ - m_adj(m0, hlen + firstlen - ip->ip_len); + m_adj(m0, hlen + firstlen - ip_len); m0->m_pkthdr.len = hlen + firstlen; ip->ip_len = htons((u_short)m0->m_pkthdr.len); - ip->ip_off |= IP_MF; - ip->ip_off = htons(ip->ip_off); + ip->ip_off = htons(ip_off | IP_MF); ip->ip_sum = 0; if (sw_csum & CSUM_DELAY_IP) ip->ip_sum = in_cksum(m0, hlen); @@ -1279,6 +1294,8 @@ ip_ctloutput(struct socket *so, struct s * calls the output routine of the loopback "driver", but with an interface * pointer that might NOT be a loopback interface -- evil, but easier than * replicating that code here. + * + * IP header in host byte order. */ static void ip_mloopback(struct ifnet *ifp, struct mbuf *m, struct sockaddr_in *dst, Modified: head/sys/netpfil/ipfw/ip_fw_pfil.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_pfil.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netpfil/ipfw/ip_fw_pfil.c Sat Oct 6 10:02:11 2012 (r241245) @@ -125,10 +125,6 @@ ipfw_check_packet(void *arg, struct mbuf int ipfw; int ret; - /* all the processing now uses ip_len in net format */ - if (mtod(*m0, struct ip *)->ip_v == 4) - SET_NET_IPLEN(mtod(*m0, struct ip *)); - /* convert dir to IPFW values */ dir = (dir == PFIL_IN) ? DIR_IN : DIR_OUT; bzero(&args, sizeof(args)); @@ -288,8 +284,7 @@ again: FREE_PKT(*m0); *m0 = NULL; } - if (*m0 && mtod(*m0, struct ip *)->ip_v == 4) - SET_HOST_IPLEN(mtod(*m0, struct ip *)); + return ret; } Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/netpfil/pf/pf_ioctl.c Sat Oct 6 10:02:11 2012 (r241245) @@ -3473,23 +3473,8 @@ static int pf_check_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - /* - * XXX Wed Jul 9 22:03:16 2003 UTC - * OpenBSD has changed its byte ordering convention on ip_len/ip_off - * in network stack. OpenBSD's network stack have converted - * ip_len/ip_off to host byte order frist as FreeBSD. - * Now this is not true anymore , so we should convert back to network - * byte order. - */ - struct ip *h = NULL; int chk; - if ((*m)->m_pkthdr.len >= (int)sizeof(struct ip)) { - /* if m_pkthdr.len is less than ip header, pf will handle. */ - h = mtod(*m, struct ip *); - HTONS(h->ip_len); - HTONS(h->ip_off); - } CURVNET_SET(ifp->if_vnet); chk = pf_test(PF_IN, ifp, m, inp); CURVNET_RESTORE(); @@ -3497,28 +3482,14 @@ pf_check_in(void *arg, struct mbuf **m, m_freem(*m); *m = NULL; } - if (*m != NULL) { - /* pf_test can change ip header location */ - h = mtod(*m, struct ip *); - NTOHS(h->ip_len); - NTOHS(h->ip_off); - } - return chk; + + return (chk); } static int pf_check_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - /* - * XXX Wed Jul 9 22:03:16 2003 UTC - * OpenBSD has changed its byte ordering convention on ip_len/ip_off - * in network stack. OpenBSD's network stack have converted - * ip_len/ip_off to host byte order frist as FreeBSD. - * Now this is not true anymore , so we should convert back to network - * byte order. - */ - struct ip *h = NULL; int chk; /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ @@ -3526,12 +3497,7 @@ pf_check_out(void *arg, struct mbuf **m, in_delayed_cksum(*m); (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } - if ((*m)->m_pkthdr.len >= (int)sizeof(*h)) { - /* if m_pkthdr.len is less than ip header, pf will handle. */ - h = mtod(*m, struct ip *); - HTONS(h->ip_len); - HTONS(h->ip_off); - } + CURVNET_SET(ifp->if_vnet); chk = pf_test(PF_OUT, ifp, m, inp); CURVNET_RESTORE(); @@ -3539,13 +3505,8 @@ pf_check_out(void *arg, struct mbuf **m, m_freem(*m); *m = NULL; } - if (*m != NULL) { - /* pf_test can change ip header location */ - h = mtod(*m, struct ip *); - NTOHS(h->ip_len); - NTOHS(h->ip_off); - } - return chk; + + return (chk); } #endif @@ -3554,10 +3515,6 @@ static int pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - - /* - * IPv6 is not affected by ip_len/ip_off byte order changes. - */ int chk; /* @@ -3579,9 +3536,6 @@ static int pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - /* - * IPv6 does not affected ip_len/ip_off byte order changes. - */ int chk; /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sat Oct 6 07:06:57 2012 (r241244) +++ head/sys/sys/param.h Sat Oct 6 10:02:11 2012 (r241245) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1000018 /* Master, propagated to newvers */ +#define __FreeBSD_version 1000019 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 17:54:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E5308106564A; Sat, 6 Oct 2012 17:54:42 +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 D0C008FC16; Sat, 6 Oct 2012 17:54:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96HsgXi009273; Sat, 6 Oct 2012 17:54:42 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Hsg4n009271; Sat, 6 Oct 2012 17:54:42 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <201210061754.q96Hsg4n009271@svn.freebsd.org> From: Tim Kientzle Date: Sat, 6 Oct 2012 17:54: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: r241255 - head/lib/libpmc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 17:54:43 -0000 Author: kientzle Date: Sat Oct 6 17:54:42 2012 New Revision: 241255 URL: http://svn.freebsd.org/changeset/base/241255 Log: Fix "make install" Also make arm the same as other platforms: Install man pages for all CPUs in the family. Modified: head/lib/libpmc/Makefile Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Sat Oct 6 14:04:36 2012 (r241254) +++ head/lib/libpmc/Makefile Sat Oct 6 17:54:42 2012 (r241255) @@ -42,7 +42,7 @@ MAN+= pmc.sandybridgeuc.3 MAN+= pmc.westmere.3 MAN+= pmc.westmereuc.3 MAN+= pmc.tsc.3 -.elif ${MACHINE_CPUARCH} == "arm" && ${CPUTYPE} == "xscale" +.elif ${MACHINE_CPUARCH} == "arm" MAN+= pmc.xscale.3 .elif ${MACHINE_CPUARCH} == "mips" MAN+= pmc.mips24k.3 From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:05:50 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE383106564A; Sat, 6 Oct 2012 19:05:50 +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 C9DAE8FC12; Sat, 6 Oct 2012 19:05:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96J5oiH021827; Sat, 6 Oct 2012 19:05:50 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96J5of9021825; Sat, 6 Oct 2012 19:05:50 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210061905.q96J5of9021825@svn.freebsd.org> From: Alan Cox Date: Sat, 6 Oct 2012 19:05:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241276 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 19:05:51 -0000 Author: alc Date: Sat Oct 6 19:05:50 2012 New Revision: 241276 URL: http://svn.freebsd.org/changeset/base/241276 Log: Correct two pessimizations in pmap_extract_and_hold(). Test the PTE for having PTE_RO set instead of PTE_D. This avoids some unnecessary failures by pmap_extract_and_hold() that will have to be handled by a call to vm_fault_hold(). Testing the PTE for both being non-zero and having PTE_V set is redundant. The latter suffices. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Oct 6 19:01:31 2012 (r241275) +++ head/sys/mips/mips/pmap.c Sat Oct 6 19:05:50 2012 (r241276) @@ -791,24 +791,25 @@ pmap_extract(pmap_t pmap, vm_offset_t va vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { - pt_entry_t *ptep; - pt_entry_t pte; + pt_entry_t pte, *ptep; + vm_paddr_t pa, pte_pa; vm_page_t m; - vm_paddr_t pa; m = NULL; pa = 0; PMAP_LOCK(pmap); retry: ptep = pmap_pte(pmap, va); - if ((ptep != NULL) && ((pte = *ptep) != 0) && - pte_test(&pte, PTE_V) && - (pte_test(&pte, PTE_D) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, TLBLO_PTE_TO_PA(pte), &pa)) - goto retry; - - m = PHYS_TO_VM_PAGE(TLBLO_PTE_TO_PA(pte)); - vm_page_hold(m); + if (ptep != NULL) { + pte = *ptep; + if (pte_test(&pte, PTE_V) && (!pte_test(&pte, PTE_RO) || + (prot & VM_PROT_WRITE) == 0)) { + pte_pa = TLBLO_PTE_TO_PA(pte); + if (vm_page_pa_tryrelock(pmap, pte_pa, &pa)) + goto retry; + m = PHYS_TO_VM_PAGE(pte_pa); + vm_page_hold(m); + } } PA_UNLOCK_COND(pa); PMAP_UNLOCK(pmap); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:19:22 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 06763106566C; Sat, 6 Oct 2012 19:19:22 +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 E2BDD8FC0C; Sat, 6 Oct 2012 19:19:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JJLEk023888; Sat, 6 Oct 2012 19:19:21 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JJLW0023879; Sat, 6 Oct 2012 19:19:21 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210061919.q96JJLW0023879@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Oct 2012 19:19: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: r241279 - in head: share/mk tools/build/options usr.bin usr.bin/bmake usr.bin/bmake/unit-tests X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 19:19:22 -0000 Author: marcel Date: Sat Oct 6 19:19:21 2012 New Revision: 241279 URL: http://svn.freebsd.org/changeset/base/241279 Log: Add bmake to the build and allow it to be installed as make(1) instead of FreeBSD's make by setting WITH_BMAKE. The WITH_BMAKE build makes it easy for people to switch while working out the kinks -- think ports tree here. The option will be removed in due time. Submitted by: Simon Gerraty (sjg@juniper.net) Added: head/tools/build/options/WITH_BMAKE (contents, props changed) head/usr.bin/bmake/ head/usr.bin/bmake/Makefile (contents, props changed) head/usr.bin/bmake/Makefile.inc (contents, props changed) head/usr.bin/bmake/config.h (contents, props changed) head/usr.bin/bmake/unit-tests/ head/usr.bin/bmake/unit-tests/Makefile (contents, props changed) Modified: head/share/mk/bsd.own.mk head/usr.bin/Makefile Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Sat Oct 6 19:06:23 2012 (r241278) +++ head/share/mk/bsd.own.mk Sat Oct 6 19:19:21 2012 (r241279) @@ -417,6 +417,7 @@ __DEFAULT_YES_OPTIONS = \ ZONEINFO __DEFAULT_NO_OPTIONS = \ + BMAKE \ BSD_GREP \ BIND_IDN \ BIND_LARGE_FILE \ Added: head/tools/build/options/WITH_BMAKE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_BMAKE Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,8 @@ +.\" $FreeBSD$ +Build and install the portable BSD make (bmake) as +.Xr make 1 +instead of the traditional FreeBSD make. +This build option is temporary. +It allows developers to switch to bmake in order to work out any remaining +kinks or issues. +This option will be removed in due time. Modified: head/usr.bin/Makefile ============================================================================== --- head/usr.bin/Makefile Sat Oct 6 19:06:23 2012 (r241278) +++ head/usr.bin/Makefile Sat Oct 6 19:19:21 2012 (r241279) @@ -271,8 +271,12 @@ SUBDIR+= msgs .endif .if ${MK_MAKE} != "no" +.if ${MK_BMAKE} != "no" +SUBDIR+= bmake +.else SUBDIR+= make .endif +.endif .if ${MK_MAN_UTILS} != "no" SUBDIR+= catman Added: head/usr.bin/bmake/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/Makefile Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,209 @@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +.sinclude "Makefile.inc" + +SRCTOP?= ${.CURDIR:H:H} + +# look here first for config.h +CFLAGS+= -I${.CURDIR} + +# $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $ +# @(#)Makefile 5.2 (Berkeley) 12/28/90 + +# $Id: Makefile.in,v 1.170 2012/08/31 06:46:22 sjg Exp $ + +PROG?= ${.CURDIR:T} +SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \ + make.c parse.c str.c suff.c targ.c trace.c var.c util.c +SRCS+= strlist.c +SRCS+= make_malloc.c +SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \ + lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \ + lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \ + lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \ + lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c +SRCS += lstPrev.c + +# you can use this Makefile if you have an earlier version of bmake. +prefix= /usr +srcdir= ${SRCTOP}/contrib/bmake +CC?= gcc + +# Base version on src date +MAKE_VERSION= 20120831 +DEFAULT_SYS_PATH = .../share/mk:/usr/share/mk + +CPPFLAGS+= +CFLAGS+= ${CPPFLAGS} +CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" +CFLAGS+= -I. -I${srcdir} -DHAVE_CONFIG_H ${XDEFS} -DMAKE_NATIVE +CFLAGS+= ${CFLAGS_${.TARGET:T}} +CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} +COPTS.main.c+= "-DMAKE_VERSION=\"${MAKE_VERSION}\"" +LDFLAGS= +LIBOBJS= ${LIBOBJDIR}stresep$U.o +LDADD= + +.if !empty(LIBOBJS) +SRCS+= ${LIBOBJS:T:.o=.c} +.endif + +USE_META = yes +.if ${USE_META} != "no" +SRCS+= meta.c +CPPFLAGS+= -DUSE_META +FILEMON_H ?= /usr/include/dev/filemon/filemon.h +.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" +COPTS.meta.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} +.endif +.endif + +.PATH: ${srcdir} +.PATH: ${srcdir}/lst.lib + +OS!= uname -s +ARCH!= uname -p 2>/dev/null || uname -m + +# list of OS's which are derrived from BSD4.4 +isBSD44= NetBSD FreeBSD OpenBSD DragonFly + +.if ${OS} == "NetBSD" +# Don't set these for anyone else since we don't know what the effect may be. +# On FreeBSD WARNS=2 sets a bunch of -W flags that make does not handle. +WFORMAT= 1 +WARNS=4 +.NOPATH: bmake.cat1 +.if make(install) && exists(${DESTDIR}/usr/share/doc) +SUBDIR= PSD.doc +.endif +.endif + +.if empty(isBSD44:M${OS}) +# XXX not sure if we still want this given that configure +# lets us force or not the definition of MACHINE. +CFLAGS_main.o+= "-DFORCE_MACHINE=\"${MACHINE}\"" +MANTARGET=cat +INSTALL?=${srcdir}/install-sh +.if (${MACHINE} == "sun386") +# even I don't have one of these anymore :-) +CFLAGS+= -DPORTAR +.elif (${MACHINE} != "sunos") +SRCS+= sigcompat.c +CFLAGS+= -DSIGNAL_FLAGS=SA_RESTART +.endif +.endif +.if defined(.PARSEDIR) +.if make(obj) || make(clean) +SUBDIR+= unit-tests +.endif +.endif + +# many systems use gcc these days +CC_IS_GCC=yes +.if ${CC_IS_GCC} == "yes" +# problem with gcc3 +CFLAGS_var.o+= -Wno-cast-qual +.endif + +CFLAGS_main.o+= "-DMACHINE=\"${MACHINE}\"" "-DMACHINE_ARCH=\"${MACHINE_ARCH}\"" + +EXTRACT_MAN=no + +MAN=${PROG}.1 +.if (${PROG} != "make") +${MAN}: make.1 + @echo making ${PROG}.1 + @sed -e 's/^.Nx/NetBSD/' -e '/^.Nm/s/make/${PROG}/' -e '/^.Sh HISTORY/,$$d' ${srcdir}/make.1 > $@ + @(echo ".Sh HISTORY"; \ + echo ".Nm"; \ + echo "is derived from NetBSD"; \ + echo ".Xr make 1 ."; \ + echo It uses autoconf to facilitate portability to other platforms.) >> $@ + +.endif + +.if !empty(isBSD44:M${OS}) +.if "${OS}" != "NetBSD" +MAN1=${MAN} +.endif +MANTARGET?=man +.endif + +MANTARGET?= cat +MANDEST?= ${MANDIR}/${MANTARGET}1 + +.if ${MANTARGET} == "cat" +_mfromdir=${srcdir} +.endif + +.if exists(${srcdir}/../Makefile.inc) +.include "${srcdir}/../Makefile.inc" +.endif +.sinclude +# sigh, FreeBSD at least includes bsd.subdir.mk via bsd.obj.mk +# so the inclusion below, results in complaints about re-defined +# targets. For NetBSD though we need to explicitly include it. +.if defined(.PARSEDIR) +.if defined(SUBDIR) && !target(${SUBDIR:[1]}) +.sinclude +.endif +.endif + +CPPFLAGS+= -DMAKE_NATIVE +COPTS.var.c += -Wno-cast-qual +COPTS.job.c += -Wno-format-nonliteral +COPTS.parse.c += -Wno-format-nonliteral +COPTS.var.c += -Wno-format-nonliteral + +# Force these +BINDIR= ${prefix}/bin +MANDIR= ${prefix}/man + +arch.o: config.h +# make sure that MAKE_VERSION gets updated. +main.o: ${SRCS} ${MAKEFILE} + +MK?=${prefix}/share/mk +MKSRC?=mk +INSTALL?=${srcdir}/install-sh + +beforeinstall: + test -d ${DESTDIR}${BINDIR} || ${INSTALL} -m 775 -d ${DESTDIR}${BINDIR} + test -d ${DESTDIR}${MANDEST} || ${INSTALL} -m 775 -d ${DESTDIR}${MANDEST} + +# latest version of *.mk includes an installer. +# you should not need to set USE_OS +install-mk: +.if exists(${MKSRC}/install-mk) + test -d ${DESTDIR}${MK} || ${INSTALL} -m 775 -d ${DESTDIR}${MK} + ${MKSRC}/install-mk -v -m 644 ${DESTDIR}${MK} ${USE_OS} +.else + @echo need to unpack mk.tar.gz under ${srcdir} or set MKSRC; false +.endif + +.ifdef TOOLDIR +# this is a native netbsd build, +# use libutil rather than the local emalloc etc. +CPPFLAGS+= -DUSE_EMALLOC +LDADD+=-lutil +DPADD+=${LIBUTIL} +.endif + +# A simple unit-test driver to help catch regressions +accept test: + cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} + +# override some simple things +BINDIR= /usr/bin +MANDIR= /usr/share/man/man + +# make sure we get this +CFLAGS+= ${COPTS.${.IMPSRC:T}} +CLEANFILES+= bootstrap + +after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk + cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk + Added: head/usr.bin/bmake/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/Makefile.inc Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +.include "bsd.own.mk" + +.if defined(.PARSEDIR) +# make sure this is available to unit-tests/Makefile +.export SRCTOP +.endif + +.if defined(MK_BMAKE) +PROG= make +.endif + +WARNS=3 Added: head/usr.bin/bmake/config.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/config.h Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,316 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.in by autoheader. */ +/* $FreeBSD$ */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Path of default shell */ +/* #undef DEFSHELL_CUSTOM */ + +/* Shell spec to use by default */ +/* #undef DEFSHELL_INDEX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_AR_H 1 + +/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_SIGLIST 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +#define HAVE_DIRENT_H 1 + +/* Define to 1 if you have the `dirname' function. */ +#define HAVE_DIRNAME 1 + +/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ +/* #undef HAVE_DOPRNT */ + +/* Define to 1 if you have the `err' function. */ +#define HAVE_ERR 1 + +/* Define to 1 if you have the `errx' function. */ +#define HAVE_ERRX 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_ERR_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to 1 if you have the `fork' function. */ +#define HAVE_FORK 1 + +/* Define to 1 if you have the `getcwd' function. */ +#define HAVE_GETCWD 1 + +/* Define to 1 if you have the `getenv' function. */ +#define HAVE_GETENV 1 + +/* Define to 1 if you have the `getopt' function. */ +#define HAVE_GETOPT 1 + +/* Define to 1 if you have the `getwd' function. */ +#define HAVE_GETWD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `killpg' function. */ +#define HAVE_KILLPG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `mmap' function. */ +#define HAVE_MMAP 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* #undef HAVE_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PATHS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_POLL_H 1 + +/* Define to 1 if you have the `putenv' function. */ +#define HAVE_PUTENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_RANLIB_H 1 + +/* Define to 1 if you have the `realpath' function. */ +#define HAVE_REALPATH 1 + +/* Define to 1 if you have the `select' function. */ +#define HAVE_SELECT 1 + +/* Define to 1 if you have the `setenv' function. */ +#define HAVE_SETENV 1 + +/* Define to 1 if you have the `setpgid' function. */ +#define HAVE_SETPGID 1 + +/* Define to 1 if you have the `setsid' function. */ +#define HAVE_SETSID 1 + +/* Define to 1 if you have the `sigaction' function. */ +#define HAVE_SIGACTION 1 + +/* Define to 1 if you have the `sigvec' function. */ +#define HAVE_SIGVEC 1 + +/* Define to 1 if you have the `snprintf' function. */ +#define HAVE_SNPRINTF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the `strerror' function. */ +#define HAVE_STRERROR 1 + +/* Define to 1 if you have the `stresep' function. */ +/* #undef HAVE_STRESEP */ + +/* Define to 1 if you have the `strftime' function. */ +#define HAVE_STRFTIME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strlcpy' function. */ +#define HAVE_STRLCPY 1 + +/* Define to 1 if you have the `strsep' function. */ +#define HAVE_STRSEP 1 + +/* Define to 1 if you have the `strtod' function. */ +#define HAVE_STRTOD 1 + +/* Define to 1 if you have the `strtol' function. */ +#define HAVE_STRTOL 1 + +/* Define to 1 if `struct stat' is a member of `st_rdev'. */ +#define HAVE_STRUCT_STAT_ST_RDEV 1 + +/* Define to 1 if your `struct stat' has `st_rdev'. Deprecated, use + `HAVE_STRUCT_STAT_ST_RDEV' instead. */ +#define HAVE_ST_RDEV 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_MMAN_H 1 + +/* Define to 1 if you have the header file, and it defines `DIR'. + */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have that is POSIX.1 compatible. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `unsetenv' function. */ +#define HAVE_UNSETENV 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UTIME_H 1 + +/* Define to 1 if you have the `vfork' function. */ +#define HAVE_VFORK 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_VFORK_H */ + +/* Define to 1 if you have the `vprintf' function. */ +#define HAVE_VPRINTF 1 + +/* Define to 1 if you have the `vsnprintf' function. */ +#define HAVE_VSNPRINTF 1 + +/* Define to 1 if you have the `wait3' function. */ +#define HAVE_WAIT3 1 + +/* Define to 1 if you have the `wait4' function. */ +#define HAVE_WAIT4 1 + +/* Define to 1 if you have the `waitpid' function. */ +#define HAVE_WAITPID 1 + +/* Define to 1 if you have the `warn' function. */ +#define HAVE_WARN 1 + +/* Define to 1 if you have the `warnx' function. */ +#define HAVE_WARNX 1 + +/* Define to 1 if `fork' works. */ +#define HAVE_WORKING_FORK 1 + +/* Define to 1 if `vfork' works. */ +#define HAVE_WORKING_VFORK 1 + +/* define if your compiler has __attribute__ */ +/* #undef HAVE___ATTRIBUTE__ */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "sjg@NetBSD.org" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "bmake" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "bmake 20120620" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "bmake" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "20120620" + +/* Define as the return type of signal handlers (`int' or `void'). */ +#define RETSIGTYPE void + +/* Define to 1 if the `S_IS*' macros in do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you can safely include both and . */ +#define TIME_WITH_SYS_TIME 1 + +/* Define to 1 if your declares `struct tm'. */ +/* #undef TM_IN_SYS_TIME */ + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif + +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `long int' if does not define. */ +/* #undef off_t */ + +/* Define to `int' if does not define. */ +/* #undef pid_t */ + +/* Define to `unsigned int' if does not define. */ +/* #undef size_t */ + +/* Define as `fork' if `vfork' does not work. */ +/* #undef vfork */ Added: head/usr.bin/bmake/unit-tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.bin/bmake/unit-tests/Makefile Sat Oct 6 19:19:21 2012 (r241279) @@ -0,0 +1,103 @@ +# This is a generated file, do NOT edit! +# See contrib/bmake/bsd.after-import.mk +# +# $FreeBSD$ + +SRCTOP?= ${.CURDIR:H:H:H} + +# $Id: Makefile.in,v 1.38 2012/06/19 23:38:48 sjg Exp $ +# +# $NetBSD: Makefile,v 1.34 2012/06/19 23:25:53 sjg Exp $ +# +# Unit tests for make(1) +# The main targets are: +# +# all: run all the tests +# test: run 'all', capture output and compare to expected results +# accept: move generated output to expected results +# +# Adding a test case. +# Each feature should get its own set of tests in its own suitably +# named makefile which should be added to SUBFILES to hook it in. +# + +srcdir= ${SRCTOP}/contrib/bmake/unit-tests + +.MAIN: all + +UNIT_TESTS:= ${srcdir} + +# Simple sub-makefiles - we run them as a black box +# keep the list sorted. +SUBFILES= \ + comment \ + cond1 \ + error \ + export \ + export-all \ + doterror \ + dotwait \ + forloop \ + forsubst \ + hash \ + misc \ + moderrs \ + modmatch \ + modmisc \ + modorder \ + modts \ + modword \ + phony-end \ + posix \ + qequals \ + sysv \ + ternary \ + unexport \ + unexport-env \ + varcmd + +all: ${SUBFILES} + +flags.doterror= + +# the tests are actually done with sub-makes. +.PHONY: ${SUBFILES} +.PRECIOUS: ${SUBFILES} +${SUBFILES}: + -@${.MAKE} ${flags.$@:U-k} -f ${UNIT_TESTS}/$@ + +clean: + rm -f *.out *.fail *.core + +.sinclude + +TEST_MAKE?= ${.MAKE} +TOOL_SED?= sed +TOOL_TR?= tr +TOOL_DIFF?= diff +DIFF_FLAGS?= -u + +# ensure consistent results from sort(1) +LC_ALL= C +LANG= C +.export LANG LC_ALL + +# The driver. +# We always pretend .MAKE was called 'make' +# and strip ${.CURDIR}/ from the output +# and replace anything after 'stopped in' with unit-tests +# so the results can be compared. +test: + @echo "${TEST_MAKE} -f ${MAKEFILE} > ${.TARGET}.out 2>&1" + @cd ${.OBJDIR} && ${TEST_MAKE} -f ${MAKEFILE} 2>&1 | \ + ${TOOL_TR} -d '\015' | \ + ${TOOL_SED} -e 's,^${TEST_MAKE:T:C/\./\\\./g}:,make:,' \ + -e '/stopped/s, /.*, unit-tests,' \ + -e 's,${.CURDIR:C/\./\\\./g}/,,g' \ + -e 's,${UNIT_TESTS:C/\./\\\./g}/,,g' > ${.TARGET}.out || { \ + tail ${.TARGET}.out; mv ${.TARGET}.out ${.TARGET}.fail; exit 1; } + ${TOOL_DIFF} ${DIFF_FLAGS} ${UNIT_TESTS}/${.TARGET}.exp ${.TARGET}.out + +accept: + mv test.out ${srcdir}/test.exp + From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:19:32 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CDCB11065752; Sat, 6 Oct 2012 19:19:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4988FC0C; Sat, 6 Oct 2012 19:19:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JJW2Z023947; Sat, 6 Oct 2012 19:19:32 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JJWvd023945; Sat, 6 Oct 2012 19:19:32 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061919.q96JJWvd023945@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:19: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: r241280 - 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, 06 Oct 2012 19:19:33 -0000 Author: avg Date: Sat Oct 6 19:19:32 2012 New Revision: 241280 URL: http://svn.freebsd.org/changeset/base/241280 Log: make: report :M or :N pattern in debug mode MFC after: 12 days Modified: head/usr.bin/make/var.c Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Sat Oct 6 19:19:21 2012 (r241279) +++ head/usr.bin/make/var.c Sat Oct 6 19:19:32 2012 (r241280) @@ -1421,6 +1421,7 @@ modifier_M(VarParser *vp, const char val vp->ptr++; } *ptr = '\0'; + DEBUGF(VAR, ("Pattern :%s\n", patt)); if (modifier == 'M') { newValue = VarModify(value, VarMatch, patt); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:23:45 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FE94106566C; Sat, 6 Oct 2012 19:23:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A94B8FC08; Sat, 6 Oct 2012 19:23:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JNjDE024625; Sat, 6 Oct 2012 19:23:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JNjgQ024623; Sat, 6 Oct 2012 19:23:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061923.q96JNjgQ024623@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:23: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: r241281 - 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, 06 Oct 2012 19:23:45 -0000 Author: avg Date: Sat Oct 6 19:23:44 2012 New Revision: 241281 URL: http://svn.freebsd.org/changeset/base/241281 Log: ktrace/kern_exec: check p_tracecred instead of p_cred .. when deciding whether to continue tracing across suid/sgid exec. Otherwise if root ktrace-d an unprivileged process and the processed exec-ed a suid program, then tracing didn't continue across exec. Reviewed by: bde, kib MFC after: 22 days Modified: head/sys/kern/kern_exec.c Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sat Oct 6 19:19:32 2012 (r241280) +++ head/sys/kern/kern_exec.c Sat Oct 6 19:23:44 2012 (r241281) @@ -691,7 +691,8 @@ interpret: setsugid(p); #ifdef KTRACE - if (priv_check_cred(oldcred, PRIV_DEBUG_DIFFCRED, 0)) + if (p->p_tracecred != NULL && + priv_check_cred(p->p_tracecred, PRIV_DEBUG_DIFFCRED, 0)) ktrprocexec(p, &tracecred, &tracevp); #endif /* From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:25:41 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 66B781065673; Sat, 6 Oct 2012 19:25:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51CB68FC08; Sat, 6 Oct 2012 19:25:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JPfwT024922; Sat, 6 Oct 2012 19:25:41 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JPfEI024920; Sat, 6 Oct 2012 19:25:41 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061925.q96JPfEI024920@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:25: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: r241282 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:25:41 -0000 Author: avg Date: Sat Oct 6 19:25:40 2012 New Revision: 241282 URL: http://svn.freebsd.org/changeset/base/241282 Log: zfs boot: chose a "first" pool if none is explicitly requested MFC after: 8 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:23:44 2012 (r241281) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:25:40 2012 (r241282) @@ -513,7 +513,10 @@ zfs_dev_open(struct open_file *f, ...) dev = va_arg(args, struct zfs_devdesc *); va_end(args); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); rv = zfs_spa_init(spa); @@ -627,7 +630,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - spa = spa_find_by_guid(dev->pool_guid); + if (dev->pool_guid == 0) + spa = STAILQ_FIRST(&zfs_pools); + else + spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); return (buf); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:27:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAEEA1065670; Sat, 6 Oct 2012 19:27:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4CB68FC19; Sat, 6 Oct 2012 19:27:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JR48m025164; Sat, 6 Oct 2012 19:27:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JR4qn025160; Sat, 6 Oct 2012 19:27:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061927.q96JR4qn025160@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:27: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: r241283 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:27:04 -0000 Author: avg Date: Sat Oct 6 19:27:04 2012 New Revision: 241283 URL: http://svn.freebsd.org/changeset/base/241283 Log: zfs boot: add code for listing child datasets of a given dataset - only filesystem datasets are supported - children names are printed to stdout To do: allow to iterate over the list and fetch names programatically MFC after: 17 days Modified: head/sys/boot/zfs/libzfs.h head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/libzfs.h ============================================================================== --- head/sys/boot/zfs/libzfs.h Sat Oct 6 19:25:40 2012 (r241282) +++ head/sys/boot/zfs/libzfs.h Sat Oct 6 19:27:04 2012 (r241283) @@ -59,6 +59,7 @@ int zfs_parsedev(struct zfs_devdesc *dev const char **path); char *zfs_fmtdev(void *vdev); int zfs_probe_dev(const char *devname, uint64_t *pool_guid); +int zfs_list(const char *name); extern struct devsw zfs_dev; extern struct fs_ops zfs_fsops; Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:25:40 2012 (r241282) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:27:04 2012 (r241283) @@ -658,3 +658,38 @@ zfs_fmtdev(void *vdev) rootname); return (buf); } + +int +zfs_list(const char *name) +{ + static char poolname[ZFS_MAXNAMELEN]; + uint64_t objid; + spa_t *spa; + const char *dsname; + int len; + int rv; + + len = strlen(name); + dsname = strchr(name, '/'); + if (dsname != NULL) { + len = dsname - name; + dsname++; + } + memcpy(poolname, name, len); + poolname[len] = '\0'; + + spa = spa_find_by_name(poolname); + if (!spa) + return (ENXIO); + rv = zfs_spa_init(spa); + if (rv != 0) + return (rv); + if (dsname != NULL) + rv = zfs_lookup_dataset(spa, dsname, &objid); + else + rv = zfs_get_root(spa, &objid); + if (rv != 0) + return (rv); + rv = zfs_list_dataset(spa, objid); + return (0); +} Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:25:40 2012 (r241282) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:27:04 2012 (r241283) @@ -1387,8 +1387,6 @@ zap_lookup(const spa_t *spa, const dnode return (EIO); } -#ifdef BOOT2 - /* * List a microzap directory. Assumes that the zap scratch buffer contains * the directory contents. @@ -1513,8 +1511,6 @@ zap_list(const spa_t *spa, const dnode_p return fzap_list(spa, dnode); } -#endif - static int objset_get_dnode(const spa_t *spa, const objset_phys_t *os, uint64_t objnum, dnode_phys_t *dnode) { @@ -1751,6 +1747,38 @@ zfs_lookup_dataset(const spa_t *spa, con return (0); } +#ifndef BOOT2 +static int +zfs_list_dataset(const spa_t *spa, uint64_t objnum/*, int pos, char *entry*/) +{ + uint64_t dir_obj, child_dir_zapobj; + dnode_phys_t child_dir_zap, dir, dataset; + dsl_dataset_phys_t *ds; + dsl_dir_phys_t *dd; + + if (objset_get_dnode(spa, &spa->spa_mos, objnum, &dataset)) { + printf("ZFS: can't find dataset %ju\n", (uintmax_t)objnum); + return (EIO); + } + ds = (dsl_dataset_phys_t *) &dataset.dn_bonus; + dir_obj = ds->ds_dir_obj; + + if (objset_get_dnode(spa, &spa->spa_mos, dir_obj, &dir)) { + printf("ZFS: can't find dirobj %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + dd = (dsl_dir_phys_t *)&dir.dn_bonus; + + child_dir_zapobj = dd->dd_child_dir_zapobj; + if (objset_get_dnode(spa, &spa->spa_mos, child_dir_zapobj, &child_dir_zap) != 0) { + printf("ZFS: can't find child zap %ju\n", (uintmax_t)dir_obj); + return (EIO); + } + + return (zap_list(spa, &child_dir_zap) != 0); +} +#endif + /* * Find the object set given the object number of its dataset object * and return its details in *objset From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:27:55 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 614A11065670; Sat, 6 Oct 2012 19:27:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BA2B8FC1A; Sat, 6 Oct 2012 19:27:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JRtlo025315; Sat, 6 Oct 2012 19:27:55 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JRt0w025313; Sat, 6 Oct 2012 19:27:55 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061927.q96JRt0w025313@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:27: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: r241284 - head/sys/boot/i386/loader X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 19:27:55 -0000 Author: avg Date: Sat Oct 6 19:27:54 2012 New Revision: 241284 URL: http://svn.freebsd.org/changeset/base/241284 Log: zfs boot: add lszfs command to i386 loader ... to list child datasets of a specified dataset. Dataset name should be provided in poolname/dsname format. MFC after: 17 days Modified: head/sys/boot/i386/loader/main.c Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Sat Oct 6 19:27:04 2012 (r241283) +++ head/sys/boot/i386/loader/main.c Sat Oct 6 19:27:54 2012 (r241284) @@ -322,6 +322,29 @@ command_heap(int argc, char *argv[]) return(CMD_OK); } +#ifdef LOADER_ZFS_SUPPORT +COMMAND_SET(lszfs, "lszfs", "list child datasets of a zfs dataset", + command_lszfs); + +static int +command_lszfs(int argc, char *argv[]) +{ + int err; + + if (argc != 2) { + command_errmsg = "wrong number of arguments"; + return (CMD_ERROR); + } + + err = zfs_list(argv[1]); + if (err != 0) { + command_errmsg = strerror(err); + return (CMD_ERROR); + } + return (CMD_OK); +} +#endif + /* ISA bus access functions for PnP. */ static int isa_inb(int port) From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:28:19 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9FB051065679; Sat, 6 Oct 2012 19:28:19 +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 89DD18FC08; Sat, 6 Oct 2012 19:28:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JSJd3025410; Sat, 6 Oct 2012 19:28:19 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JSJIj025408; Sat, 6 Oct 2012 19:28:19 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210061928.q96JSJIj025408@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Oct 2012 19:28: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: r241285 - 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: Sat, 06 Oct 2012 19:28:19 -0000 Author: marcel Date: Sat Oct 6 19:28:19 2012 New Revision: 241285 URL: http://svn.freebsd.org/changeset/base/241285 Log: Update to include WITH_BMAKE. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 ============================================================================== --- head/share/man/man5/src.conf.5 Sat Oct 6 19:27:54 2012 (r241284) +++ head/share/man/man5/src.conf.5 Sat Oct 6 19:28:19 2012 (r241285) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: head/tools/build/options/makeman 236279 2012-05-30 02:37:20Z gjb .\" $FreeBSD$ -.Dd September 19, 2012 +.Dd October 6, 2012 .Dt SRC.CONF 5 .Os .Sh NAME @@ -217,6 +217,15 @@ toolchain is enabled. .It Va WITHOUT_BLUETOOTH .\" from FreeBSD: head/tools/build/options/WITHOUT_BLUETOOTH 156932 2006-03-21 07:50:50Z ru Set to not build Bluetooth related kernel modules, programs and libraries. +.It Va WITH_BMAKE +.\" from FreeBSD: head/tools/build/options/WITH_BMAKE 241279 2012-10-06 19:19:21Z marcel +Build and install the portable BSD make (bmake) as +.Xr make 1 +instead of the traditional FreeBSD make. +This build option is temporary. +It allows developers to switch to bmake in order to work out any remaining +kinks or issues. +This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: head/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. @@ -552,7 +561,7 @@ Set to build some programs without IPX s Set to not build tools for the support of jails; e.g. .Xr jail 8 . .It Va WITHOUT_KDUMP -.\" $FreeBSD$ +.\" from FreeBSD: head/tools/build/options/WITHOUT_KDUMP 240690 2012-09-19 11:38:37Z zeising Set to not build .Xr kdump 1 and From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:33:48 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 118CE106566C; Sat, 6 Oct 2012 19:33:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6E1D8FC12; Sat, 6 Oct 2012 19:33:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JXli4026194; Sat, 6 Oct 2012 19:33:47 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JXlur026189; Sat, 6 Oct 2012 19:33:47 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061933.q96JXlur026189@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:33: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: r241286 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . 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: Sat, 06 Oct 2012 19:33:48 -0000 Author: avg Date: Sat Oct 6 19:33:47 2012 New Revision: 241286 URL: http://svn.freebsd.org/changeset/base/241286 Log: zfs_mount: taste geom providers for root pool config This should allow to mount a dataset as a root filesystem even if it belongs to a pool that is not described in zpool.cache. This adds some overhead to the boot process though. If the root filesystem's pool is found in zpool.cache, the by default its cached configuration will be used for import. vfs.zfs.rootpool.prefer_cached_config could be set to zero to force the config to be retasted. Discussed with: gibbs, pjd, des MFC after: 25 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Oct 6 19:33:47 2012 (r241286) @@ -3550,8 +3550,8 @@ spa_create(const char *pool, nvlist_t *n return (0); } -#if defined(sun) #ifdef _KERNEL +#if defined(sun) /* * Get the root pool information from the root disk, then import the root pool * during the system boot up time. @@ -3753,8 +3753,115 @@ out: return (error); } -#endif +#else + +extern int +vdev_geom_read_pool_label(const char *name, nvlist_t **config); + +static nvlist_t * +spa_generate_rootconf(const char *name) +{ + nvlist_t *config; + nvlist_t *nvtop, *nvroot; + uint64_t pgid; + + if (vdev_geom_read_pool_label(name, &config) != 0) + return (NULL); + + /* + * Add this top-level vdev to the child array. + */ + VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, + &nvtop) == 0); + VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID, + &pgid) == 0); + + /* + * Put this pool's top-level vdevs into a root vdev. + */ + VERIFY(nvlist_alloc(&nvroot, NV_UNIQUE_NAME, KM_SLEEP) == 0); + VERIFY(nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, + VDEV_TYPE_ROOT) == 0); + VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) == 0); + VERIFY(nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid) == 0); + VERIFY(nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, + &nvtop, 1) == 0); + + /* + * Replace the existing vdev_tree with the new root vdev in + * this pool's configuration (remove the old, add the new). + */ + VERIFY(nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot) == 0); + nvlist_free(nvroot); + return (config); +} + +int +spa_import_rootpool(const char *name) +{ + spa_t *spa; + vdev_t *rvd, *bvd, *avd = NULL; + nvlist_t *config, *nvtop; + uint64_t txg; + char *pname; + int error; + + /* + * Read the label from the boot device and generate a configuration. + */ + config = spa_generate_rootconf(name); + if (config == NULL) { + cmn_err(CE_NOTE, "Cannot find the pool label for '%s'", + name); + return (EIO); + } + + VERIFY(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, + &pname) == 0 && strcmp(name, pname) == 0); + VERIFY(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg) == 0); + + mutex_enter(&spa_namespace_lock); + if ((spa = spa_lookup(pname)) != NULL) { + /* + * Remove the existing root pool from the namespace so that we + * can replace it with the correct config we just read in. + */ + spa_remove(spa); + } + spa = spa_add(pname, config, NULL); + spa->spa_is_root = B_TRUE; + spa->spa_import_flags = ZFS_IMPORT_VERBATIM; + + /* + * Build up a vdev tree based on the boot device's label config. + */ + VERIFY(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, + &nvtop) == 0); + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + error = spa_config_parse(spa, &rvd, nvtop, NULL, 0, + VDEV_ALLOC_ROOTPOOL); + spa_config_exit(spa, SCL_ALL, FTAG); + if (error) { + mutex_exit(&spa_namespace_lock); + nvlist_free(config); + cmn_err(CE_NOTE, "Can not parse the config for pool '%s'", + pname); + return (error); + } + + error = 0; + spa_history_log_version(spa, LOG_POOL_IMPORT); +out: + spa_config_enter(spa, SCL_ALL, FTAG, RW_WRITER); + vdev_free(rvd); + spa_config_exit(spa, SCL_ALL, FTAG); + mutex_exit(&spa_namespace_lock); + + return (error); +} + #endif /* sun */ +#endif /* * Import a non-root pool into the system. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Sat Oct 6 19:33:47 2012 (r241286) @@ -419,7 +419,11 @@ extern int spa_get_stats(const char *poo size_t buflen); extern int spa_create(const char *pool, nvlist_t *config, nvlist_t *props, const char *history_str, nvlist_t *zplprops); +#if defined(sun) extern int spa_import_rootpool(char *devpath, char *devid); +#else +extern int spa_import_rootpool(const char *name); +#endif extern int spa_import(const char *pool, nvlist_t *config, nvlist_t *props, uint64_t flags); extern nvlist_t *spa_tryimport(nvlist_t *tryconfig); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sat Oct 6 19:33:47 2012 (r241286) @@ -178,17 +178,11 @@ vdev_geom_detach(void *arg, int flag __u static uint64_t nvlist_get_guid(nvlist_t *list) { - nvpair_t *elem = NULL; uint64_t value; - while ((elem = nvlist_next_nvpair(list, elem)) != NULL) { - if (nvpair_type(elem) == DATA_TYPE_UINT64 && - strcmp(nvpair_name(elem), "guid") == 0) { - VERIFY(nvpair_value_uint64(elem, &value) == 0); - return (value); - } - } - return (0); + value = 0; + nvlist_lookup_uint64(list, ZPOOL_CONFIG_GUID, &value); + return (value); } static int @@ -226,8 +220,16 @@ vdev_geom_io(struct g_consumer *cp, int return (error); } -static uint64_t -vdev_geom_read_guid(struct g_consumer *cp) +static void +vdev_geom_taste_orphan(struct g_consumer *cp) +{ + + KASSERT(1 == 0, ("%s called while tasting %s.", __func__, + cp->provider->name)); +} + +static int +vdev_geom_read_config(struct g_consumer *cp, nvlist_t **config) { struct g_provider *pp; vdev_label_t *label; @@ -235,13 +237,13 @@ vdev_geom_read_guid(struct g_consumer *c size_t buflen; uint64_t psize; off_t offset, size; - uint64_t guid; + uint64_t guid, state, txg; int error, l, len; g_topology_assert_not(); pp = cp->provider; - ZFS_LOG(1, "Reading guid from %s...", pp->name); + ZFS_LOG(1, "Reading config from %s...", pp->name); psize = pp->mediasize; psize = P2ALIGN(psize, (uint64_t)sizeof(vdev_label_t)); @@ -253,8 +255,8 @@ vdev_geom_read_guid(struct g_consumer *c label = kmem_alloc(size, KM_SLEEP); buflen = sizeof(label->vl_vdev_phys.vp_nvlist); + *config = NULL; for (l = 0; l < VDEV_LABELS; l++) { - nvlist_t *config = NULL; offset = vdev_label_offset(psize, l, 0); if ((offset % pp->sectorsize) != 0) @@ -264,27 +266,149 @@ vdev_geom_read_guid(struct g_consumer *c continue; buf = label->vl_vdev_phys.vp_nvlist; - if (nvlist_unpack(buf, buflen, &config, 0) != 0) + if (nvlist_unpack(buf, buflen, config, 0) != 0) continue; - guid = nvlist_get_guid(config); - nvlist_free(config); - if (guid != 0) - break; + if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE, + &state) != 0 || state >= POOL_STATE_DESTROYED) { + nvlist_free(*config); + *config = NULL; + continue; + } + + if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG, + &txg) != 0 || txg == 0) { + nvlist_free(*config); + *config = NULL; + continue; + } + + break; } kmem_free(label, size); - if (guid != 0) - ZFS_LOG(1, "guid for %s is %ju", pp->name, (uintmax_t)guid); - return (guid); + return (*config == NULL ? ENOENT : 0); +} + +static int +vdev_geom_check_config(nvlist_t *config, const char *name, uint64_t *best_txg) +{ + uint64_t vdev_guid; + uint64_t txg; + char *pname; + + if (nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME, &pname) != 0 || + strcmp(pname, name) != 0) + return (ENOENT); + + ZFS_LOG(1, "found pool: %s", pname); + + txg = 0; + nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG, &txg); + if (txg <= *best_txg) + return (ENOENT); + *best_txg = txg; + ZFS_LOG(1, "txg: %ju", (uintmax_t)*best_txg); + + return (0); +} + +static int +vdev_geom_attach_taster(struct g_consumer *cp, struct g_provider *pp) +{ + int error; + + if (pp->flags & G_PF_WITHER) + return (EINVAL); + if (pp->sectorsize > VDEV_PAD_SIZE || !ISP2(pp->sectorsize)) + return (EINVAL); + g_attach(cp, pp); + error = g_access(cp, 1, 0, 0); + if (error != 0) + g_detach(cp); + return (error); } static void -vdev_geom_taste_orphan(struct g_consumer *cp) +vdev_geom_dettach_taster(struct g_consumer *cp) { + g_access(cp, -1, 0, 0); + g_detach(cp); +} - KASSERT(1 == 0, ("%s called while tasting %s.", __func__, - cp->provider->name)); +int +vdev_geom_read_pool_label(const char *name, nvlist_t **config) +{ + struct g_class *mp; + struct g_geom *gp, *zgp; + struct g_provider *pp; + struct g_consumer *zcp; + nvlist_t *vdev_cfg; + uint64_t best_txg; + int error; + + DROP_GIANT(); + g_topology_lock(); + + zgp = g_new_geomf(&zfs_vdev_class, "zfs::vdev::taste"); + /* This orphan function should be never called. */ + zgp->orphan = vdev_geom_taste_orphan; + zcp = g_new_consumer(zgp); + + best_txg = 0; + *config = NULL; + LIST_FOREACH(mp, &g_classes, class) { + if (mp == &zfs_vdev_class) + continue; + LIST_FOREACH(gp, &mp->geom, geom) { + if (gp->flags & G_GEOM_WITHER) + continue; + LIST_FOREACH(pp, &gp->provider, provider) { + if (pp->flags & G_PF_WITHER) + continue; + if (vdev_geom_attach_taster(zcp, pp) != 0) + continue; + g_topology_unlock(); + error = vdev_geom_read_config(zcp, &vdev_cfg); + g_topology_lock(); + vdev_geom_dettach_taster(zcp); + if (error) + continue; + ZFS_LOG(1, "successfully read vdev config"); + + error = vdev_geom_check_config(vdev_cfg, name, + &best_txg); + if (error != 0) { + nvlist_free(vdev_cfg); + continue; + } + nvlist_free(*config); + *config = vdev_cfg; + } + } + } + + g_destroy_consumer(zcp); + g_destroy_geom(zgp); + g_topology_unlock(); + PICKUP_GIANT(); + return (*config == NULL ? ENOENT : 0); +} + +static uint64_t +vdev_geom_read_guid(struct g_consumer *cp) +{ + nvlist_t *config; + uint64_t guid; + + g_topology_assert_not(); + + guid = 0; + if (vdev_geom_read_config(cp, &config) == 0) { + guid = nvlist_get_guid(config); + nvlist_free(config); + } + return (guid); } static struct g_consumer * @@ -311,18 +435,12 @@ vdev_geom_attach_by_guid(uint64_t guid) if (gp->flags & G_GEOM_WITHER) continue; LIST_FOREACH(pp, &gp->provider, provider) { - if (pp->flags & G_PF_WITHER) - continue; - g_attach(zcp, pp); - if (g_access(zcp, 1, 0, 0) != 0) { - g_detach(zcp); + if (vdev_geom_attach_taster(zcp, pp) != 0) continue; - } g_topology_unlock(); pguid = vdev_geom_read_guid(zcp); g_topology_lock(); - g_access(zcp, -1, 0, 0); - g_detach(zcp); + vdev_geom_dettach_taster(zcp); if (pguid != guid) continue; cp = vdev_geom_attach(pp); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Oct 6 19:28:19 2012 (r241285) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Sat Oct 6 19:33:47 2012 (r241286) @@ -1539,6 +1539,25 @@ out: } #endif /* OPENSOLARIS_MOUNTROOT */ +static int +getpoolname(const char *osname, char *poolname) +{ + char *p; + + p = strchr(osname, '/'); + if (p == NULL) { + if (strlen(osname) >= MAXNAMELEN) + return (ENAMETOOLONG); + (void) strcpy(poolname, osname); + } else { + if (p - osname >= MAXNAMELEN) + return (ENAMETOOLONG); + (void) strncpy(poolname, osname, p - osname); + poolname[p - osname] = '\0'; + } + return (0); +} + /*ARGSUSED*/ static int zfs_mount(vfs_t *vfsp) @@ -1632,6 +1651,29 @@ zfs_mount(vfs_t *vfsp) goto out; } + /* Initial root mount: try hard to import the requested root pool. */ + if ((vfsp->vfs_flag & MNT_ROOTFS) != 0 && + (vfsp->vfs_flag & MNT_UPDATE) == 0) { + char pname[MAXNAMELEN]; + spa_t *spa; + int prefer_cache; + + error = getpoolname(osname, pname); + if (error) + goto out; + + prefer_cache = 1; + TUNABLE_INT_FETCH("vfs.zfs.rootpool.prefer_cached_config", + &prefer_cache); + mutex_enter(&spa_namespace_lock); + spa = spa_lookup(pname); + mutex_exit(&spa_namespace_lock); + if (!prefer_cache || spa == NULL) { + error = spa_import_rootpool(pname); + if (error) + goto out; + } + } DROP_GIANT(); error = zfs_domount(vfsp, osname); PICKUP_GIANT(); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:33:53 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 65D7D106566B; Sat, 6 Oct 2012 19:33: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 5128A8FC16; Sat, 6 Oct 2012 19:33:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JXr7F026238; Sat, 6 Oct 2012 19:33:53 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JXrwn026236; Sat, 6 Oct 2012 19:33:53 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201210061933.q96JXrwn026236@svn.freebsd.org> From: Alan Cox Date: Sat, 6 Oct 2012 19:33: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: r241287 - head/sys/mips/mips X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 19:33:53 -0000 Author: alc Date: Sat Oct 6 19:33:52 2012 New Revision: 241287 URL: http://svn.freebsd.org/changeset/base/241287 Log: In general pmap implementations do not set the wired attribute on the temporary mappings that are used to implement operations like pmap_zero_page(). There is no reason for the MIPS pmap to deviate from that practice. Modified: head/sys/mips/mips/pmap.c Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Sat Oct 6 19:33:47 2012 (r241286) +++ head/sys/mips/mips/pmap.c Sat Oct 6 19:33:52 2012 (r241287) @@ -239,8 +239,7 @@ pmap_lmem_map1(vm_paddr_t phys) sysm = &sysmap_lmem[cpu]; sysm->saved_intr = intr; va = sysm->base; - npte = TLBLO_PA_TO_PFN(phys) | - PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(phys) | PTE_C_CACHE | PTE_D | PTE_V | PTE_G; pte = pmap_pte(kernel_pmap, va); *pte = npte; sysm->valid1 = 1; @@ -262,12 +261,10 @@ pmap_lmem_map2(vm_paddr_t phys1, vm_padd sysm->saved_intr = intr; va1 = sysm->base; va2 = sysm->base + PAGE_SIZE; - npte = TLBLO_PA_TO_PFN(phys1) | - PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(phys1) | PTE_C_CACHE | PTE_D | PTE_V | PTE_G; pte = pmap_pte(kernel_pmap, va1); *pte = npte; - npte = TLBLO_PA_TO_PFN(phys2) | - PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(phys2) | PTE_C_CACHE | PTE_D | PTE_V | PTE_G; pte = pmap_pte(kernel_pmap, va2); *pte = npte; sysm->valid1 = 1; @@ -2329,7 +2326,8 @@ pmap_kenter_temporary(vm_paddr_t pa, int cpu = PCPU_GET(cpuid); sysm = &sysmap_lmem[cpu]; /* Since this is for the debugger, no locks or any other fun */ - npte = TLBLO_PA_TO_PFN(pa) | PTE_D | PTE_V | PTE_G | PTE_W | PTE_C_CACHE; + npte = TLBLO_PA_TO_PFN(pa) | PTE_C_CACHE | PTE_D | PTE_V | + PTE_G; pte = pmap_pte(kernel_pmap, sysm->base); *pte = npte; sysm->valid1 = 1; From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:38:34 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 92B70106566B; Sat, 6 Oct 2012 19:38:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D1298FC12; Sat, 6 Oct 2012 19:38:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JcY3c026917; Sat, 6 Oct 2012 19:38:34 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JcYlf026915; Sat, 6 Oct 2012 19:38:34 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061938.q96JcYlf026915@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:38: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: r241288 - head/sys/boot/i386/zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 19:38:34 -0000 Author: avg Date: Sat Oct 6 19:38:33 2012 New Revision: 241288 URL: http://svn.freebsd.org/changeset/base/241288 Log: zfsboot: use the same zfs dataset naming format as loader Also, pool name alone now names a root dataset of the pool regardless of bootfs property value. MFC after: 15 days Modified: head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:33:52 2012 (r241287) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:38:33 2012 (r241288) @@ -553,7 +553,7 @@ main(void) if (parse()) autoboot = 0; if (!OPT_CHECK(RBX_QUIET)) - printf("%s: %s", PATH_CONFIG, cmddup); + printf("%s: %s\n", PATH_CONFIG, cmddup); /* Do not process this command twice */ *cmd = 0; } @@ -577,13 +577,17 @@ main(void) if (!autoboot || !OPT_CHECK(RBX_QUIET)) { printf("\nFreeBSD/x86 boot\n"); if (zfs_rlookup(spa, zfsmount.rootobj, rootname) != 0) - printf("Default: %s:<0x%llx>:%s\n" + printf("Default: %s/<0x%llx>:%s\n" "boot: ", spa->spa_name, zfsmount.rootobj, kname); - else - printf("Default: %s:%s:%s\n" + else if (rootname[0] != '\0') + printf("Default: %s/%s:%s\n" "boot: ", spa->spa_name, rootname, kname); + else + printf("Default: %s:%s\n" + "boot: ", + spa->spa_name, kname); } if (ioctrl & IO_SERIAL) sio_flush(); @@ -708,12 +712,46 @@ load(void) } static int +zfs_mount_ds(char *dsname) +{ + uint64_t newroot; + spa_t *newspa; + char *q; + + q = strchr(dsname, '/'); + if (q) + *q++ = '\0'; + newspa = spa_find_by_name(dsname); + if (newspa == NULL) { + printf("\nCan't find ZFS pool %s\n", dsname); + return -1; + } + + if (zfs_spa_init(newspa)) + return -1; + + newroot = 0; + if (q) { + if (zfs_lookup_dataset(newspa, q, &newroot)) { + printf("\nCan't find dataset %s in ZFS pool %s\n", + q, newspa->spa_name); + return -1; + } + } + if (zfs_mount(newspa, newroot, &zfsmount)) { + printf("\nCan't mount ZFS dataset\n"); + return -1; + } + spa = newspa; + return (0); +} + +static int parse(void) { char *arg = cmd; char *ep, *p, *q; const char *cp; - //unsigned int drv; int c, i, j; while ((c = *arg++)) { @@ -773,37 +811,20 @@ parse(void) } /* + * If there is "zfs:" prefix simply ignore it. + */ + if (strncmp(arg, "zfs:", 4) == 0) + arg += 4; + + /* * If there is a colon, switch pools. */ - q = (char *) strchr(arg, ':'); + q = strchr(arg, ':'); if (q) { - spa_t *newspa; - uint64_t newroot; - - *q++ = 0; - newspa = spa_find_by_name(arg); - if (newspa) { - arg = q; - spa = newspa; - newroot = 0; - q = (char *) strchr(arg, ':'); - if (q) { - *q++ = 0; - if (zfs_lookup_dataset(spa, arg, &newroot)) { - printf("\nCan't find dataset %s in ZFS pool %s\n", - arg, spa->spa_name); - return -1; - } - arg = q; - } - if (zfs_mount(spa, newroot, &zfsmount)) { - printf("\nCan't mount ZFS dataset\n"); - return -1; - } - } else { - printf("\nCan't find ZFS pool %s\n", arg); + *q++ = '\0'; + if (zfs_mount_ds(arg) != 0) return -1; - } + arg = q; } if ((i = ep - arg)) { if ((size_t)i >= sizeof(kname)) From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:40:13 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6DE331065742; Sat, 6 Oct 2012 19:40:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3ECEB8FC1B; Sat, 6 Oct 2012 19:40:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JeDof027178; Sat, 6 Oct 2012 19:40:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JeDAj027175; Sat, 6 Oct 2012 19:40:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061940.q96JeDAj027175@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19: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: r241289 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:40:13 -0000 Author: avg Date: Sat Oct 6 19:40:12 2012 New Revision: 241289 URL: http://svn.freebsd.org/changeset/base/241289 Log: boot/zfs: call zfs_spa_init for all found pools ... and drop those for which it fails. Also, add more sanity checking to the function. MFC after: 16 days Modified: head/sys/boot/zfs/zfs.c head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:38:33 2012 (r241288) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:40:12 2012 (r241289) @@ -370,10 +370,28 @@ vdev_read(vdev_t *vdev, void *priv, off_ static int zfs_dev_init(void) { + spa_t *spa; + spa_t *next; + spa_t *prev; + zfs_init(); if (archsw.arch_zfs_probe == NULL) return (ENXIO); archsw.arch_zfs_probe(); + + prev = NULL; + spa = STAILQ_FIRST(&zfs_pools); + while (spa != NULL) { + next = STAILQ_NEXT(spa, spa_link); + if (zfs_spa_init(spa)) { + if (prev == NULL) + STAILQ_REMOVE_HEAD(&zfs_pools, spa_link); + else + STAILQ_REMOVE_AFTER(&zfs_pools, prev, spa_link); + } else + prev = spa; + spa = next; + } return (0); } @@ -519,9 +537,6 @@ zfs_dev_open(struct open_file *f, ...) spa = spa_find_by_guid(dev->pool_guid); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); mount = malloc(sizeof(*mount)); rv = zfs_mount(spa, dev->root_guid, mount); if (rv != 0) { @@ -601,9 +616,6 @@ zfs_parsedev(struct zfs_devdesc *dev, co spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); dev->pool_guid = spa->spa_guid; if (rootname[0] != '\0') { rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); @@ -638,10 +650,6 @@ zfs_fmtdev(void *vdev) printf("ZFS: can't find pool by guid\n"); return (buf); } - if (zfs_spa_init(spa) != 0) { - printf("ZFS: can't init pool\n"); - return (buf); - } if (dev->root_guid == 0 && zfs_get_root(spa, &dev->root_guid)) { printf("ZFS: can't find root filesystem\n"); return (buf); @@ -681,9 +689,6 @@ zfs_list(const char *name) spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - rv = zfs_spa_init(spa); - if (rv != 0) - return (rv); if (dsname != NULL) rv = zfs_lookup_dataset(spa, dsname, &objid); else Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:38:33 2012 (r241288) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:40:12 2012 (r241289) @@ -1881,13 +1881,14 @@ static int zfs_spa_init(spa_t *spa) { - if (spa->spa_inited) - return (0); if (zio_read(spa, &spa->spa_uberblock.ub_rootbp, &spa->spa_mos)) { printf("ZFS: can't read MOS of pool %s\n", spa->spa_name); return (EIO); } - spa->spa_inited = 1; + if (spa->spa_mos.os_type != DMU_OST_META) { + printf("ZFS: corrupted MOS of pool %s\n", spa->spa_name); + return (EIO); + } return (0); } From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:41:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68CC21065670; Sat, 6 Oct 2012 19:41:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 537008FC1D; Sat, 6 Oct 2012 19:41:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JfCwF027355; Sat, 6 Oct 2012 19:41:12 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JfCLh027353; Sat, 6 Oct 2012 19:41:12 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061941.q96JfCLh027353@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:41: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: r241290 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:41:12 -0000 Author: avg Date: Sat Oct 6 19:41:11 2012 New Revision: 241290 URL: http://svn.freebsd.org/changeset/base/241290 Log: boot/zfs: a small whitespace cleanup MFC after: 5 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:40:12 2012 (r241289) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:41:11 2012 (r241290) @@ -554,7 +554,7 @@ zfs_dev_open(struct open_file *f, ...) return (0); } -static int +static int zfs_dev_close(struct open_file *f) { @@ -563,7 +563,7 @@ zfs_dev_close(struct open_file *f) return (0); } -static int +static int zfs_dev_strategy(void *devdata, int rw, daddr_t dblk, size_t size, char *buf, size_t *rsize) { From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:42:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7242A1065688; Sat, 6 Oct 2012 19:42:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D1288FC0C; Sat, 6 Oct 2012 19:42:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Jg62r027566; Sat, 6 Oct 2012 19:42:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Jg63w027564; Sat, 6 Oct 2012 19:42:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061942.q96Jg63w027564@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:42: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: r241291 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:42:06 -0000 Author: avg Date: Sat Oct 6 19:42:05 2012 New Revision: 241291 URL: http://svn.freebsd.org/changeset/base/241291 Log: zfs boot spa_status: print bootfs for each reported pool MFC after: 9 days Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:41:11 2012 (r241290) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:42:05 2012 (r241291) @@ -71,6 +71,8 @@ static char *zfs_temp_buf, *zfs_temp_end #define TEMP_SIZE (1024 * 1024) static int zio_read(const spa_t *spa, const blkptr_t *bp, void *buf); +static int zfs_get_root(const spa_t *spa, uint64_t *objid); +static int zfs_rlookup(const spa_t *spa, uint64_t objnum, char *result); static void zfs_init(void) @@ -784,11 +786,20 @@ vdev_status(vdev_t *vdev, int indent) static void spa_status(spa_t *spa) { + static char bootfs[ZFS_MAXNAMELEN]; + uint64_t rootid; vdev_t *vdev; int good_kids, bad_kids, degraded_kids; vdev_state_t state; pager_printf(" pool: %s\n", spa->spa_name); + if (zfs_get_root(spa, &rootid) == 0 && + zfs_rlookup(spa, rootid, bootfs) == 0) { + if (bootfs[0] == '\0') + pager_printf("bootfs: %s\n", spa->spa_name); + else + pager_printf("bootfs: %s/%s\n", spa->spa_name, bootfs); + } pager_printf("config:\n\n"); pager_printf(STATUS_FORMAT, "NAME", "STATE"); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:42:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 220E8106564A; Sat, 6 Oct 2012 19:42:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E6438FC17; Sat, 6 Oct 2012 19:42:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Jgo8n027705; Sat, 6 Oct 2012 19:42:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Jgoo6027703; Sat, 6 Oct 2012 19:42:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061942.q96Jgoo6027703@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241292 - head/sys/boot/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:42:51 -0000 Author: avg Date: Sat Oct 6 19:42:50 2012 New Revision: 241292 URL: http://svn.freebsd.org/changeset/base/241292 Log: zfs loader: treat plain pool name as a name of its root dataset ... as opposed to the previous behavior of treating it as boot dataset (specified by bootfs or default) MFC after: 19 days Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Sat Oct 6 19:42:05 2012 (r241291) +++ head/sys/boot/zfs/zfs.c Sat Oct 6 19:42:50 2012 (r241292) @@ -617,12 +617,9 @@ zfs_parsedev(struct zfs_devdesc *dev, co if (!spa) return (ENXIO); dev->pool_guid = spa->spa_guid; - if (rootname[0] != '\0') { - rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); - if (rv != 0) - return (rv); - } else - dev->root_guid = 0; + rv = zfs_lookup_dataset(spa, rootname, &dev->root_guid); + if (rv != 0) + return (rv); if (path != NULL) *path = (*end == '\0') ? end : end + 1; dev->d_dev = &zfs_dev; @@ -642,9 +639,10 @@ zfs_fmtdev(void *vdev) if (dev->d_type != DEVT_ZFS) return (buf); - if (dev->pool_guid == 0) + if (dev->pool_guid == 0) { spa = STAILQ_FIRST(&zfs_pools); - else + dev->pool_guid = spa->spa_guid; + } else spa = spa_find_by_guid(dev->pool_guid); if (spa == NULL) { printf("ZFS: can't find pool by guid\n"); @@ -682,19 +680,17 @@ zfs_list(const char *name) if (dsname != NULL) { len = dsname - name; dsname++; - } + } else + dsname = ""; memcpy(poolname, name, len); poolname[len] = '\0'; spa = spa_find_by_name(poolname); if (!spa) return (ENXIO); - if (dsname != NULL) - rv = zfs_lookup_dataset(spa, dsname, &objid); - else - rv = zfs_get_root(spa, &objid); + rv = zfs_lookup_dataset(spa, dsname, &objid); if (rv != 0) return (rv); rv = zfs_list_dataset(spa, objid); - return (0); + return (rv); } From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:47:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00230106566B; Sat, 6 Oct 2012 19:47:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE6228FC0A; Sat, 6 Oct 2012 19:47:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JlOZO028392; Sat, 6 Oct 2012 19:47:24 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JlOpN028387; Sat, 6 Oct 2012 19:47:24 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061947.q96JlOpN028387@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:47: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: r241293 - in head/sys/boot: i386/loader i386/zfsboot zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:47:25 -0000 Author: avg Date: Sat Oct 6 19:47:24 2012 New Revision: 241293 URL: http://svn.freebsd.org/changeset/base/241293 Log: zfs boot: export boot/primary pool and vdev guid all the way to kenv This is work in progress to for znextboot and it also provides some convenient infrastructure. MFC after: 20 days Modified: head/sys/boot/i386/loader/main.c head/sys/boot/i386/zfsboot/zfsboot.c head/sys/boot/zfs/libzfs.h head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/i386/loader/main.c ============================================================================== --- head/sys/boot/i386/loader/main.c Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/i386/loader/main.c Sat Oct 6 19:47:24 2012 (r241293) @@ -209,6 +209,7 @@ extract_currdev(void) { struct i386_devdesc new_currdev; #ifdef LOADER_ZFS_SUPPORT + char buf[20]; struct zfs_boot_args *zargs; #endif int biosdev = -1; @@ -239,10 +240,17 @@ extract_currdev(void) if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) zargs = (struct zfs_boot_args *)(kargs + 1); - if (zargs != NULL && zargs->size >= sizeof(*zargs)) { + if (zargs != NULL && + zargs->size >= offsetof(struct zfs_boot_args, primary_pool)) { /* sufficient data is provided */ new_currdev.d_kind.zfs.pool_guid = zargs->pool; new_currdev.d_kind.zfs.root_guid = zargs->root; + if (zargs->size >= sizeof(*zargs) && zargs->primary_vdev != 0) { + sprintf(buf, "%llu", zargs->primary_pool); + setenv("vfs.zfs.boot.primary_pool", buf, 1); + sprintf(buf, "%llu", zargs->primary_vdev); + setenv("vfs.zfs.boot.primary_vdev", buf, 1); + } } else { /* old style zfsboot block */ new_currdev.d_kind.zfs.pool_guid = kargs->zfspool; Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:47:24 2012 (r241293) @@ -176,6 +176,8 @@ zfs_read(spa_t *spa, const dnode_phys_t * Current ZFS pool */ static spa_t *spa; +static spa_t *primary_spa; +static vdev_t *primary_vdev; /* * A wrapper for dskread that doesn't have to worry about whether the @@ -526,7 +528,7 @@ main(void) * first pool we found, if any. */ if (!spa) { - spa = STAILQ_FIRST(&zfs_pools); + spa = spa_get_primary(); if (!spa) { printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); for (;;) @@ -534,6 +536,9 @@ main(void) } } + primary_spa = spa; + primary_vdev = spa_get_primary_vdev(spa); + if (zfs_spa_init(spa) != 0 || zfs_mount(spa, 0, &zfsmount) != 0) { printf("%s: failed to mount default pool %s\n", BOOTPROG, spa->spa_name); @@ -702,6 +707,11 @@ load(void) zfsargs.size = sizeof(zfsargs); zfsargs.pool = zfsmount.spa->spa_guid; zfsargs.root = zfsmount.rootobj; + zfsargs.primary_pool = primary_spa->spa_guid; + if (primary_vdev != NULL) + zfsargs.primary_vdev = primary_vdev->v_guid; + else + printf("failed to detect primary vdev\n"); __exec((caddr_t)addr, RB_BOOTINFO | (opts & RBX_MASK), bootdev, KARGS_FLAGS_ZFS | KARGS_FLAGS_EXTARG, Modified: head/sys/boot/zfs/libzfs.h ============================================================================== --- head/sys/boot/zfs/libzfs.h Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/zfs/libzfs.h Sat Oct 6 19:47:24 2012 (r241293) @@ -53,6 +53,8 @@ struct zfs_boot_args uint32_t reserved; uint64_t pool; uint64_t root; + uint64_t primary_pool; + uint64_t primary_vdev; }; int zfs_parsedev(struct zfs_devdesc *dev, const char *devspec, Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:42:50 2012 (r241292) +++ head/sys/boot/zfs/zfsimpl.c Sat Oct 6 19:47:24 2012 (r241293) @@ -706,6 +706,34 @@ spa_find_by_name(const char *name) return (0); } +#ifdef BOOT2 +static spa_t * +spa_get_primary(void) +{ + + return (STAILQ_FIRST(&zfs_pools)); +} + +static vdev_t * +spa_get_primary_vdev(const spa_t *spa) +{ + vdev_t *vdev; + vdev_t *kid; + + if (spa == NULL) + spa = spa_get_primary(); + if (spa == NULL) + return (NULL); + vdev = STAILQ_FIRST(&spa->spa_vdevs); + if (vdev == NULL) + return (NULL); + for (kid = STAILQ_FIRST(&vdev->v_children); kid != NULL; + kid = STAILQ_FIRST(&vdev->v_children)) + vdev = kid; + return (vdev); +} +#endif + static spa_t * spa_create(uint64_t guid) { From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:48:16 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E89A1065676; Sat, 6 Oct 2012 19:48:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D0228FC20; Sat, 6 Oct 2012 19:48:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JmFBw028551; Sat, 6 Oct 2012 19:48:15 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JmFPU028549; Sat, 6 Oct 2012 19:48:15 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061948.q96JmFPU028549@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:48: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: r241294 - head/sys/boot/i386/zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 19:48:16 -0000 Author: avg Date: Sat Oct 6 19:48:15 2012 New Revision: 241294 URL: http://svn.freebsd.org/changeset/base/241294 Log: zfsboot: simplify probe_drive() a little bit The first discovered pool, whether it covers the whole boot disk or not, is going to be first in zfs_pools list. So there is no need at all for spapp parameter. This commit also fixes a bug where NULL would be assigned to NULL pointer when probe_drive was called with the spapp parameter of NULL. MFC after: 21 days Modified: head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:47:24 2012 (r241293) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 19:48:15 2012 (r241294) @@ -345,7 +345,7 @@ copy_dsk(struct dsk *dsk) } static void -probe_drive(struct dsk *dsk, spa_t **spap) +probe_drive(struct dsk *dsk) { #ifdef GPT struct gpt_hdr hdr; @@ -359,9 +359,10 @@ probe_drive(struct dsk *dsk, spa_t **spa /* * If we find a vdev on the whole disk, stop here. Otherwise dig - * out the MBR and probe each slice in turn for a vdev. + * out the partition table and probe each slice/partition + * in turn for a vdev. */ - if (vdev_probe(vdev_read, dsk, spap) == 0) + if (vdev_probe(vdev_read, dsk, NULL) == 0) return; sec = dmadat->secbuf; @@ -399,13 +400,7 @@ probe_drive(struct dsk *dsk, spa_t **spa if (memcmp(&ent->ent_type, &freebsd_zfs_uuid, sizeof(uuid_t)) == 0) { dsk->start = ent->ent_lba_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try - * to boot from that one). - */ - spap = NULL; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk * structure now since the vdev now owns this one. @@ -428,13 +423,7 @@ trymbr: if (!dp[i].dp_typ) continue; dsk->start = dp[i].dp_start; - if (vdev_probe(vdev_read, dsk, spap) == 0) { - /* - * We record the first pool we find (we will try to boot - * from that one. - */ - spap = 0; - + if (vdev_probe(vdev_read, dsk, NULL) == 0) { /* * This slice had a vdev. We need a new dsk structure now * since the vdev now owns this one. @@ -493,7 +482,7 @@ main(void) * Probe the boot drive first - we will try to boot from whatever * pool we find on that drive. */ - probe_drive(dsk, &spa); + probe_drive(dsk); /* * Probe the rest of the drives that the bios knows about. This @@ -520,20 +509,17 @@ main(void) dsk->part = 0; dsk->start = 0; dsk->init = 0; - probe_drive(dsk, NULL); + probe_drive(dsk); } /* - * If we didn't find a pool on the boot drive, default to the - * first pool we found, if any. + * The first discovered pool, if any, is the pool. */ + spa = spa_get_primary(); if (!spa) { - spa = spa_get_primary(); - if (!spa) { - printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); - for (;;) - ; - } + printf("%s: No ZFS pools located, can't boot\n", BOOTPROG); + for (;;) + ; } primary_spa = spa; From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:50:23 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A57DE1065672; Sat, 6 Oct 2012 19:50:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 908FD8FC14; Sat, 6 Oct 2012 19:50:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JoNVA028913; Sat, 6 Oct 2012 19:50:23 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JoNIk028911; Sat, 6 Oct 2012 19:50:23 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061950.q96JoNIk028911@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:50: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: r241295 - 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, 06 Oct 2012 19:50:23 -0000 Author: avg Date: Sat Oct 6 19:50:23 2012 New Revision: 241295 URL: http://svn.freebsd.org/changeset/base/241295 Log: cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit Reviewed by: julian MFC after: 10 days Modified: head/sys/kern/kern_cons.c Modified: head/sys/kern/kern_cons.c ============================================================================== --- head/sys/kern/kern_cons.c Sat Oct 6 19:48:15 2012 (r241294) +++ head/sys/kern/kern_cons.c Sat Oct 6 19:50:23 2012 (r241295) @@ -384,7 +384,7 @@ cngetc(void) if (cn_mute) return (-1); while ((c = cncheckc()) == -1) - ; + cpu_spinwait(); if (c == '\r') c = '\n'; /* console input is always ICRNL */ return (c); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:52:51 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 020EF106566B; Sat, 6 Oct 2012 19:52:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFDF78FC08; Sat, 6 Oct 2012 19:52:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JqoG4029410; Sat, 6 Oct 2012 19:52:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Jqo3D029407; Sat, 6 Oct 2012 19:52:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061952.q96Jqo3D029407@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:52:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r241296 - 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: Sat, 06 Oct 2012 19:52:51 -0000 Author: avg Date: Sat Oct 6 19:52:50 2012 New Revision: 241296 URL: http://svn.freebsd.org/changeset/base/241296 Log: g_part_taste: directly destroy consumer and geom here, no need for withering Besides withered but still alive consumers may interfere with re-tatsing. MFC after: 16 days Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Sat Oct 6 19:50:23 2012 (r241295) +++ head/sys/geom/part/g_part.c Sat Oct 6 19:52:50 2012 (r241296) @@ -1880,7 +1880,10 @@ g_part_taste(struct g_class *mp, struct if (error == 0) error = g_access(cp, 1, 0, 0); if (error != 0) { - g_part_wither(gp, error); + if (cp->provider) + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } @@ -1940,7 +1943,9 @@ g_part_taste(struct g_class *mp, struct g_topology_lock(); root_mount_rel(rht); g_access(cp, -1, 0, 0); - g_part_wither(gp, error); + g_detach(cp); + g_destroy_consumer(cp); + g_destroy_geom(gp); return (NULL); } From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 19:57:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F04231065670; Sat, 6 Oct 2012 19:57:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA3798FC08; Sat, 6 Oct 2012 19:57:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96JvRot030146; Sat, 6 Oct 2012 19:57:27 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96JvRA5030144; Sat, 6 Oct 2012 19:57:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210061957.q96JvRA5030144@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 19:57: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: r241297 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2012 19:57:28 -0000 Author: avg Date: Sat Oct 6 19:57:27 2012 New Revision: 241297 URL: http://svn.freebsd.org/changeset/base/241297 Log: zvol: set mediasize in geom provider right upon its creation ... instead of deferring the action until first open. Unlike upstream this has no benefit on FreeBSD. We know that as soon as the provider is created it is going to be tasted and thus opened. Initial mediasize of zero causes tasting failure and subsequent retasting because of the size change. MFC after: 14 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 6 19:52:50 2012 (r241296) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Sat Oct 6 19:57:27 2012 (r241297) @@ -475,6 +475,7 @@ zvol_create_minor(const char *name) zvol_state_t *zv; objset_t *os; dmu_object_info_t doi; + uint64_t volsize; int error; ZFS_LOG(1, "Creating ZVOL %s...", name); @@ -535,9 +536,20 @@ zvol_create_minor(const char *name) zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); #else /* !sun */ + error = zap_lookup(os, ZVOL_ZAP_OBJ, "size", 8, 1, &volsize); + if (error) { + ASSERT(error == 0); + dmu_objset_disown(os, zvol_tag); + mutex_exit(&spa_namespace_lock); + return (error); + } + DROP_GIANT(); g_topology_lock(); zv = zvol_geom_create(name); + zv->zv_volsize = volsize; + zv->zv_provider->mediasize = zv->zv_volsize; + #endif /* !sun */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:01:06 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B7D7610656C4; Sat, 6 Oct 2012 20:01:06 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 985A88FC14; Sat, 6 Oct 2012 20:01:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K16r0030772; Sat, 6 Oct 2012 20:01:06 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K16Or030755; Sat, 6 Oct 2012 20:01:06 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201210062001.q96K16Or030755@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 6 Oct 2012 20:01: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: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 20:01:07 -0000 Author: marcel Date: Sat Oct 6 20:01:05 2012 New Revision: 241298 URL: http://svn.freebsd.org/changeset/base/241298 Log: Add support for bmake. This includes: 1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE, there's a bootstrap complication in ths respect. Avoid it. Make the necessary changes to have upgrade_checks work wth bmake anyway. 2. Remove the use of -E. It's not needed in our build because we use ?= for the respective variables, which means that we'll take the environment value (if any) anyway. 3. Properly declare phony targets as phony as bmake is a lot smarter (and thus agressive) about build avoidance. 4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot smarter about build avoidance and should not find files we generate in the source tree. We should not have files in the repository we want to generate, but this is an easier way to cross this hurdle. 5. Have behavior under bmake the same as it is under make with respect to halting when sub-commands fail. Add "set -e" to compound commands so that bmake is informed when sub-commands fail. 6. Make sure crunchgen uses the same make as the rest of the build. This is important when the make utility isn't called make (but bmake for example). 7. While here, add support for using MAKEOBJDIR to set the object tree location. It's the second alternative bmake looks for when determining the actual object directory (= .OBJDIR). Submitted by: Simon Gerraty Submitted by: John Van Horne Modified: head/Makefile head/Makefile.inc1 head/gnu/usr.bin/cc/cc_int/Makefile head/gnu/usr.bin/cc/include/Makefile head/kerberos5/Makefile head/kerberos5/tools/asn1_compile/Makefile head/kerberos5/tools/slc/Makefile head/lib/clang/include/Makefile head/share/mk/bsd.crunchgen.mk head/share/mk/bsd.dep.mk head/share/mk/bsd.obj.mk head/share/mk/bsd.subdir.mk head/share/mk/bsd.sys.mk head/share/mk/sys.mk head/tools/build/make_check/Makefile head/usr.sbin/crunch/examples/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -280,12 +280,14 @@ kernel: buildkernel installkernel # for building the world. # upgrade_checks: +.if !defined(.PARSEDIR) @if ! (cd ${.CURDIR}/tools/build/make_check && \ PATH=${PATH} ${BINMAKE} obj >/dev/null 2>&1 && \ PATH=${PATH} ${BINMAKE} >/dev/null 2>&1); \ then \ (cd ${.CURDIR} && ${MAKE} make); \ fi +.endif # # Upgrade make(1) to the current version using the installed Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sat Oct 6 19:57:27 2012 (r241297) +++ head/Makefile.inc1 Sat Oct 6 20:01:05 2012 (r241298) @@ -330,7 +330,7 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ + -DWITHOUT_HTML -DNO_CTF -DNO_LINT \ DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*:N_LDSCRIPTROOT=*} -DNO_INCS .endif Modified: head/gnu/usr.bin/cc/cc_int/Makefile ============================================================================== --- head/gnu/usr.bin/cc/cc_int/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/gnu/usr.bin/cc/cc_int/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -98,4 +98,7 @@ SRCS+= ${OBJS-all:R:S/$/.c/g} toplev.o: toplev.c ${CC} ${CFLAGS} -DTARGET_NAME=\"${GCC_TARGET}\" -c ${.IMPSRC} +# make sure we don't find .o's in ../cc_tools/ +CLEANFILES+= ${OBJS-all} + .include Modified: head/gnu/usr.bin/cc/include/Makefile ============================================================================== --- head/gnu/usr.bin/cc/include/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/gnu/usr.bin/cc/include/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -21,6 +21,4 @@ mm_malloc.h: pmm_malloc.h @cp ${.ALLSRC} ${.TARGET} CLEANFILES+= mm_malloc.h -.include -.include -.include +.include Modified: head/kerberos5/Makefile ============================================================================== --- head/kerberos5/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/kerberos5/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -1,6 +1,6 @@ # $FreeBSD$ -SUBDIR= doc lib libexec usr.bin usr.sbin +SUBDIR= doc lib libexec tools usr.bin usr.sbin # These are the programs which depend on Kerberos. KPROGS= lib/libpam \ Modified: head/kerberos5/tools/asn1_compile/Makefile ============================================================================== --- head/kerberos5/tools/asn1_compile/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/kerberos5/tools/asn1_compile/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -25,7 +25,7 @@ SRCS= \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/asn1 -I. -CLEANFILES= roken.h +CLEANFILES= roken.h lex.c parse.c roken.h: make-roken > ${.TARGET} Modified: head/kerberos5/tools/slc/Makefile ============================================================================== --- head/kerberos5/tools/slc/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/kerberos5/tools/slc/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -12,7 +12,7 @@ SRCS= roken.h \ CFLAGS+=-I${KRB5DIR}/lib/roken -I${KRB5DIR}/lib/sl -I${KRB5DIR}/lib/vers -I. -CLEANFILES= roken.h +CLEANFILES= roken.h slc-gram.c slc-lex.c roken.h: ${MAKE_ROKEN} > ${.TARGET} Modified: head/lib/clang/include/Makefile ============================================================================== --- head/lib/clang/include/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/lib/clang/include/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -30,6 +30,4 @@ INCS= altivec.h \ xmmintrin.h \ xopintrin.h -.include -.include -.include +.include Modified: head/share/mk/bsd.crunchgen.mk ============================================================================== --- head/share/mk/bsd.crunchgen.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.crunchgen.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -38,6 +38,8 @@ OUTPUTS=$(OUTMK) $(OUTC) $(PROG).cache CRUNCHOBJS= ${.OBJDIR} .if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:= ${MAKEOBJDIRPREFIX}${.CURDIR} +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:=${MAKEOBJDIR} .else CANONICALOBJDIR:= /usr/obj${.CURDIR} .endif Modified: head/share/mk/bsd.dep.mk ============================================================================== --- head/share/mk/bsd.dep.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.dep.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC} CLEANFILES+= y.tab.c y.tab.h .elif !empty(YFLAGS:M-d) .for _YH in ${_YC:R}.h -.ORDER: ${_YC} ${_YH} -${_YC} ${_YH}: ${_YSRC} +${_YH}: ${_YC} +${_YC}: ${_YSRC} ${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC} SRCS+= ${_YH} CLEANFILES+= ${_YH} @@ -123,6 +123,9 @@ ${_YC:R}.o: ${_YC} .if defined(SRCS) depend: beforedepend ${DEPENDFILE} afterdepend +# Tell bmake not to look for generated files via .PATH +.NOPATH: ${DEPENDFILE} + # Different types of sources are compiled with slightly different flags. # Split up the sources, and filter out headers and non-applicable flags. MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \ Modified: head/share/mk/bsd.obj.mk ============================================================================== --- head/share/mk/bsd.obj.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.obj.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -44,6 +44,8 @@ ____: .if defined(MAKEOBJDIRPREFIX) CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} +.elif defined(MAKEOBJDIR) && ${MAKEOBJDIR:M/*} != "" +CANONICALOBJDIR:=${MAKEOBJDIR} .else CANONICALOBJDIR:=/usr/obj${.CURDIR} .endif @@ -116,6 +118,11 @@ cleanobj: clean cleandepend .endif @if [ -L ${.CURDIR}/obj ]; then rm -f ${.CURDIR}/obj; fi +# Tell bmake not to look for generated files via .PATH +.if !empty(CLEANFILES) +.NOPATH: ${CLEANFILES} +.endif + .if !target(clean) clean: .if defined(CLEANFILES) && !empty(CLEANFILES) Modified: head/share/mk/bsd.subdir.mk ============================================================================== --- head/share/mk/bsd.subdir.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.subdir.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -42,7 +42,7 @@ distribute: _SUBDIR: .USE .if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR) - @${_+_}for entry in ${SUBDIR}; do \ + @${_+_}set -e; for entry in ${SUBDIR}; do \ if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH} (${.TARGET:realinstall=install})"; \ edir=$${entry}.${MACHINE_ARCH}; \ @@ -79,7 +79,7 @@ ${__stage}${__target}: _SUBDIR .endif .endfor ${__target}: - ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} + ${_+_}set -e; cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} .endfor .if !target(install) Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/bsd.sys.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -126,3 +126,18 @@ CFLAGS+= ${SSP_CFLAGS} # Allow user-specified additional warning flags CFLAGS+= ${CWARNFLAGS} + + +# Tell bmake not to mistake standard targets for things to be searched for +# or expect to ever be up-to-date. +PHONY_NOTMAIN = afterdepend afterinstall all beforedepend beforeinstall \ + beforelinking build build-tools buildfiles buildincludes \ + checkdpadd clean cleandepend cleandir cleanobj configure \ + depend dependall distclean distribute exe extract fetch \ + html includes install installfiles installincludes lint \ + obj objlink objs objwarn patch realall realdepend \ + realinstall regress subdir-all subdir-depend subdir-install \ + tags whereobj + +.PHONY: ${PHONY_NOTMAIN} +.NOTMAIN: ${PHONY_NOTMAIN} Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Sat Oct 6 19:57:27 2012 (r241297) +++ head/share/mk/sys.mk Sat Oct 6 20:01:05 2012 (r241298) @@ -16,6 +16,10 @@ unix ?= We run FreeBSD, not UNIX. MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb)?/arm/:C/powerpc64/powerpc/} .endif +# Set any local definitions first. Place this early, but it needs +# MACHINE_CPUARCH to be defined. +.sinclude + # If the special target .POSIX appears (without prerequisites or # commands) before the first noncomment line in the makefile, make shall # process the makefile as specified by the Posix 1003.2 specification. @@ -324,8 +328,19 @@ SHELL= ${__MAKE_SHELL} # XXX hint for bsd.port.mk OBJFORMAT?= elf +# Tell bmake to expand -V VAR by default +.MAKE.EXPAND_VARIABLES= yes + +.if !defined(.PARSEDIR) +# We are not bmake, which is more aggressive about searching .PATH +# It is sometime necessary to curb its enthusiasm with .NOPATH +# The following allows us to quietly ignore .NOPATH when not using bmake. +.NOTMAIN: .NOPATH +.NOPATH: + # Toggle on warnings .WARN: dirsyntax +.endif .endif Modified: head/tools/build/make_check/Makefile ============================================================================== --- head/tools/build/make_check/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/tools/build/make_check/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -56,8 +56,10 @@ all: @echo "ok 14 shell # Test shell detected no regression." @${SMAKE} shell_1 || ${SMAKE} failure @echo "ok 15 shell_1 # Test shell_1 detected no regression." +.if !defined(.PARSEDIR) @${SMAKE} shell_2 || ${SMAKE} failure @echo "ok 16 shell_2 # Test shell_2 detected no regression." +.endif .if make(C_check) C_check: @@ -92,17 +94,34 @@ lhs_expn: # to determine its value; that was not always the case. .undef notdef notdef: -.if defined(notdef) && ${notdef:U} +.if defined(notdef) && ${notdef:M/} .endif .endif .if make(modifiers) -# See if make(1) supports the C modifier. +.if defined(.PARSEDIR) +# check if bmake can expand plain variables +.MAKE.EXPAND_VARIABLES= yes +x!= ${SMAKE} -V .CURDIR:H modifiers: +.if ${.CURDIR:H} != "$x" + @false +.endif +.else +# See if make(1) supports the C modifier. +modifiers: dollarV @if ${SMAKE} -V .CURDIR:C/.// 2>&1 >/dev/null | \ grep -q "Unknown modifier 'C'"; then \ false; \ fi + +# check that make -V '${VAR}' works +V_expn != V_OK=ok ${SMAKE} -r -f /dev/null -V '$${V_OK}' +dollarV: +.if ${V_expn} == "" + @false +.endif +.endif .endif .if make(arith_expr) Modified: head/usr.sbin/crunch/examples/Makefile ============================================================================== --- head/usr.sbin/crunch/examples/Makefile Sat Oct 6 19:57:27 2012 (r241297) +++ head/usr.sbin/crunch/examples/Makefile Sat Oct 6 20:01:05 2012 (r241298) @@ -19,14 +19,14 @@ all: $(CRUNCHED) exe: $(CRUNCHED) $(OUTPUTS): $(CONF) - crunchgen ${.CURDIR}/$(CONF) + MAKE=${MAKE} crunchgen ${.CURDIR}/$(CONF) $(CRUNCHED): $(OUTPUTS) submake submake: - make -f $(OUTMK) + ${MAKE} -f $(OUTMK) objs: - make -f $(OUTMK) objs + ${MAKE} -f $(OUTMK) objs cleandir: rm -f $(CLEANDIRFILES) From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:01:18 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 41A1910657DC; Sat, 6 Oct 2012 20:01:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 226938FC14; Sat, 6 Oct 2012 20:01:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K1H1Q030838; Sat, 6 Oct 2012 20:01:17 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K1Hpc030835; Sat, 6 Oct 2012 20:01:17 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062001.q96K1Hpc030835@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:01: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: r241299 - head/sys/boot/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, 06 Oct 2012 20:01:18 -0000 Author: avg Date: Sat Oct 6 20:01:17 2012 New Revision: 241299 URL: http://svn.freebsd.org/changeset/base/241299 Log: boot/console: handle consoles that fail to probe - clarify meaning of console flags - perform i/o via a console only if both of the following conditions are met: o console is active (selected by user or config) o console flags that it can perform the operation - warn if a chosen console can not work (the warning may go nowhere without working and active console, though) Reviewed by: jhb Tested by: Uffe Jakobsen , Olivier Cochard-Labbe' MFC after: 26 days Modified: head/sys/boot/common/bootstrap.h head/sys/boot/common/console.c Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Sat Oct 6 20:01:05 2012 (r241298) +++ head/sys/boot/common/bootstrap.h Sat Oct 6 20:01:17 2012 (r241299) @@ -109,10 +109,10 @@ struct console const char *c_name; const char *c_desc; int c_flags; -#define C_PRESENTIN (1<<0) -#define C_PRESENTOUT (1<<1) -#define C_ACTIVEIN (1<<2) -#define C_ACTIVEOUT (1<<3) +#define C_PRESENTIN (1<<0) /* console can provide input */ +#define C_PRESENTOUT (1<<1) /* console can provide output */ +#define C_ACTIVEIN (1<<2) /* user wants input from console */ +#define C_ACTIVEOUT (1<<3) /* user wants output to console */ void (* c_probe)(struct console *cp); /* set c_flags to match hardware */ int (* c_init)(int arg); /* reinit XXX may need more args */ void (* c_out)(int c); /* emit c */ Modified: head/sys/boot/common/console.c ============================================================================== --- head/sys/boot/common/console.c Sat Oct 6 20:01:05 2012 (r241298) +++ head/sys/boot/common/console.c Sat Oct 6 20:01:17 2012 (r241299) @@ -100,11 +100,12 @@ getchar(void) { int cons; int rv; - + /* Loop forever polling all active consoles */ for(;;) for (cons = 0; consoles[cons] != NULL; cons++) - if ((consoles[cons]->c_flags & C_ACTIVEIN) && + if ((consoles[cons]->c_flags & (C_PRESENTIN | C_ACTIVEIN)) == + (C_PRESENTIN | C_ACTIVEIN) && ((rv = consoles[cons]->c_in()) != -1)) return(rv); } @@ -115,7 +116,8 @@ ischar(void) int cons; for (cons = 0; consoles[cons] != NULL; cons++) - if ((consoles[cons]->c_flags & C_ACTIVEIN) && + if ((consoles[cons]->c_flags & (C_PRESENTIN | C_ACTIVEIN)) == + (C_PRESENTIN | C_ACTIVEIN) && (consoles[cons]->c_ready() != 0)) return(1); return(0); @@ -125,13 +127,14 @@ void putchar(int c) { int cons; - + /* Expand newlines */ if (c == '\n') putchar('\r'); - + for (cons = 0; consoles[cons] != NULL; cons++) - if (consoles[cons]->c_flags & C_ACTIVEOUT) + if ((consoles[cons]->c_flags & (C_PRESENTOUT | C_ACTIVEOUT)) == + (C_PRESENTOUT | C_ACTIVEOUT)) consoles[cons]->c_out(c); } @@ -220,6 +223,10 @@ cons_change(const char *string) if (cons >= 0) { consoles[cons]->c_flags |= C_ACTIVEIN | C_ACTIVEOUT; consoles[cons]->c_init(0); + if ((consoles[cons]->c_flags & (C_PRESENTIN | C_PRESENTOUT)) != + (C_PRESENTIN | C_PRESENTOUT)) + printf("console %s failed to initialize\n", + consoles[cons]->c_name); } } From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:04:52 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71A6E1065674; Sat, 6 Oct 2012 20:04:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BF9D8FC08; Sat, 6 Oct 2012 20:04:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K4qJS031384; Sat, 6 Oct 2012 20:04:52 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K4qQT031382; Sat, 6 Oct 2012 20:04:52 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062004.q96K4qQT031382@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:04: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: r241300 - head/sys/boot/i386/libi386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 20:04:52 -0000 Author: avg Date: Sat Oct 6 20:04:51 2012 New Revision: 241300 URL: http://svn.freebsd.org/changeset/base/241300 Log: i386 comconsole: don't loop forever if hardware doesn't respond - clear capability flags when hw timeouts - retire comc_started status variable and directly use c_flags to see if comconsole is selected for use Reviewed by: jhb Tested by: Uffe Jakobsen , Olivier Cochard-Labbe MFC after: 26 days Modified: head/sys/boot/i386/libi386/comconsole.c Modified: head/sys/boot/i386/libi386/comconsole.c ============================================================================== --- head/sys/boot/i386/libi386/comconsole.c Sat Oct 6 20:01:17 2012 (r241299) +++ head/sys/boot/i386/libi386/comconsole.c Sat Oct 6 20:04:51 2012 (r241300) @@ -63,7 +63,6 @@ static void comc_setup(int speed, int po static int comc_speed_set(struct env_var *ev, int flags, const void *value); -static int comc_started; static int comc_curspeed; static int comc_port = COMPORT; static uint32_t comc_locator; @@ -87,9 +86,6 @@ comc_probe(struct console *cp) int speed, port; uint32_t locator; - /* XXX check the BIOS equipment list? */ - cp->c_flags |= (C_PRESENTIN | C_PRESENTOUT); - if (comc_curspeed == 0) { comc_curspeed = COMSPEED; /* @@ -137,18 +133,19 @@ comc_probe(struct console *cp) env_setenv("comconsole_pcidev", EV_VOLATILE, env, comc_pcidev_set, env_nounset); } + comc_setup(comc_curspeed, comc_port); } static int comc_init(int arg) { - if (comc_started && arg == 0) - return 0; - comc_started = 1; comc_setup(comc_curspeed, comc_port); - return(0); + if ((comconsole.c_flags & (C_PRESENTIN | C_PRESENTOUT)) == + (C_PRESENTIN | C_PRESENTOUT)) + return (CMD_OK); + return (CMD_ERROR); } static void @@ -166,13 +163,13 @@ comc_putchar(int c) static int comc_getchar(void) { - return(comc_ischar() ? inb(comc_port + com_data) : -1); + return (comc_ischar() ? inb(comc_port + com_data) : -1); } static int comc_ischar(void) { - return(inb(comc_port + com_lsr) & LSR_RXRDY); + return (inb(comc_port + com_lsr) & LSR_RXRDY); } static int @@ -185,7 +182,8 @@ comc_speed_set(struct env_var *ev, int f return (CMD_ERROR); } - if (comc_started && comc_curspeed != speed) + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_curspeed != speed) comc_setup(speed, comc_port); env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); @@ -203,7 +201,8 @@ comc_port_set(struct env_var *ev, int fl return (CMD_ERROR); } - if (comc_started && comc_port != port) { + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_port != port) { comc_setup(comc_curspeed, port); set_hw_console_hint(); } @@ -305,7 +304,8 @@ comc_pcidev_set(struct env_var *ev, int printf("Invalid pcidev\n"); return (CMD_ERROR); } - if (comc_started && comc_locator != locator) { + if ((comconsole.c_flags & (C_ACTIVEIN | C_ACTIVEOUT)) != 0 && + comc_locator != locator) { error = comc_pcidev_handle(locator); if (error != CMD_OK) return (error); @@ -317,6 +317,8 @@ comc_pcidev_set(struct env_var *ev, int static void comc_setup(int speed, int port) { + static int TRY_COUNT = 1000000; + int tries; comc_curspeed = speed; comc_port = port; @@ -327,9 +329,15 @@ comc_setup(int speed, int port) outb(comc_port + com_cfcr, COMC_FMT); outb(comc_port + com_mcr, MCR_RTS | MCR_DTR); + tries = 0; do inb(comc_port + com_data); - while (inb(comc_port + com_lsr) & LSR_RXRDY); + while (inb(comc_port + com_lsr) & LSR_RXRDY && ++tries < TRY_COUNT); + + if (tries < TRY_COUNT) + comconsole.c_flags |= (C_PRESENTIN | C_PRESENTOUT); + else + comconsole.c_flags &= ~(C_PRESENTIN | C_PRESENTOUT); } static int From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:08:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F6BB106564A; Sat, 6 Oct 2012 20:08:30 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E32788FC16; Sat, 6 Oct 2012 20:08:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96K8TAP032060; Sat, 6 Oct 2012 20:08:29 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96K8TiX032052; Sat, 6 Oct 2012 20:08:29 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062008.q96K8TiX032052@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:08: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: r241301 - in head/sys/boot/i386: boot2 btx/btx gptboot zfsboot X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 20:08:30 -0000 Author: avg Date: Sat Oct 6 20:08:29 2012 New Revision: 241301 URL: http://svn.freebsd.org/changeset/base/241301 Log: add detection of serial console presence to btx and boot2-like blocks Note that this commit slightly increases size of boot blocks. Reviewed by: jhb Tested by: Olivier Cochard-Labbe MFC after: 26 days Modified: head/sys/boot/i386/boot2/boot2.c head/sys/boot/i386/boot2/lib.h head/sys/boot/i386/boot2/sio.S head/sys/boot/i386/btx/btx/btx.S head/sys/boot/i386/gptboot/gptboot.c head/sys/boot/i386/zfsboot/zfsboot.c Modified: head/sys/boot/i386/boot2/boot2.c ============================================================================== --- head/sys/boot/i386/boot2/boot2.c Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/boot2/boot2.c Sat Oct 6 20:08:29 2012 (r241301) @@ -415,8 +415,10 @@ parse() } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } else { for (q = arg--; *q && *q != '('; q++); if (*q) { Modified: head/sys/boot/i386/boot2/lib.h ============================================================================== --- head/sys/boot/i386/boot2/lib.h Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/boot2/lib.h Sat Oct 6 20:08:29 2012 (r241301) @@ -17,8 +17,8 @@ * $FreeBSD$ */ -void sio_init(int) __attribute__((regparm (3))); -void sio_flush(void); +int sio_init(int) __attribute__((regparm (3))); +int sio_flush(void); void sio_putc(int) __attribute__((regparm (3))); int sio_getc(void); int sio_ischar(void); Modified: head/sys/boot/i386/boot2/sio.S ============================================================================== --- head/sys/boot/i386/boot2/sio.S Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/boot2/sio.S Sat Oct 6 20:08:29 2012 (r241301) @@ -24,7 +24,7 @@ .globl sio_getc .globl sio_ischar -/* void sio_init(int div) */ +/* int sio_init(int div) */ sio_init: pushl %eax movw $SIO_PRT+0x3,%dx # Data format reg @@ -43,12 +43,16 @@ sio_init: pushl %eax call sio_flush ret -/* void sio_flush(void) */ +/* int sio_flush(void) */ -sio_flush.0: call sio_getc.1 # Get character -sio_flush: call sio_ischar # Check for character - jnz sio_flush.0 # Till none - ret # To caller +sio_flush: xorl %eax,%eax # Return value + xorl %ecx,%ecx # Timeout + movb $0x80,%ch # counter +sio_flush.1: call sio_ischar # Check for character + jz sio_flush.2 # Till none + loop sio_flush.1 # or counter is zero + movb $1, %al # Exhausted all tries +sio_flush.2: ret # To caller /* void sio_putc(int c) */ Modified: head/sys/boot/i386/btx/btx/btx.S ============================================================================== --- head/sys/boot/i386/btx/btx/btx.S Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/btx/btx/btx.S Sat Oct 6 20:08:29 2012 (r241301) @@ -812,7 +812,7 @@ putstr: lodsb # Load char .set SIO_DIV,(115200/SIOSPD) # 115200 / SPD /* - * void sio_init(void) + * int sio_init(void) */ sio_init: movw $SIO_PRT+0x3,%dx # Data format reg movb $SIO_FMT|0x80,%al # Set format @@ -828,14 +828,19 @@ sio_init: movw $SIO_PRT+0x3,%dx # Data movb $0x3,%al # Set RTS, outb %al,(%dx) # DTR incl %edx # Line status reg + call sio_getc.1 # Get character /* - * void sio_flush(void) + * int sio_flush(void) */ -sio_flush.0: call sio_getc.1 # Get character -sio_flush: call sio_ischar # Check for character - jnz sio_flush.0 # Till none - ret # To caller +sio_flush: xorl %eax,%eax # Return value + xorl %ecx,%ecx # Timeout + movb $0x80,%ch # counter +sio_flush.1: call sio_ischar # Check for character + jz sio_flush.2 # Till none + loop sio_flush.1 # or counter is zero + movb $1, %al # Exhausted all tries +sio_flush.2: ret # To caller /* * void sio_putc(int c) Modified: head/sys/boot/i386/gptboot/gptboot.c ============================================================================== --- head/sys/boot/i386/gptboot/gptboot.c Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/gptboot/gptboot.c Sat Oct 6 20:08:29 2012 (r241301) @@ -379,8 +379,10 @@ parse(char *cmdstr, int *dskupdated) } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } else { for (q = arg--; *q && *q != '('; q++); if (*q) { Modified: head/sys/boot/i386/zfsboot/zfsboot.c ============================================================================== --- head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 20:04:51 2012 (r241300) +++ head/sys/boot/i386/zfsboot/zfsboot.c Sat Oct 6 20:08:29 2012 (r241301) @@ -785,8 +785,10 @@ parse(void) } ioctrl = OPT_CHECK(RBX_DUAL) ? (IO_SERIAL|IO_KEYBOARD) : OPT_CHECK(RBX_SERIAL) ? IO_SERIAL : IO_KEYBOARD; - if (ioctrl & IO_SERIAL) - sio_init(115200 / comspeed); + if (ioctrl & IO_SERIAL) { + if (sio_init(115200 / comspeed) != 0) + ioctrl &= ~IO_SERIAL; + } } if (c == '?') { dnode_phys_t dn; From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:12:25 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A9331065672; Sat, 6 Oct 2012 20:12:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4519E8FC08; Sat, 6 Oct 2012 20:12:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96KCPjU032659; Sat, 6 Oct 2012 20:12:25 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96KCPJK032657; Sat, 6 Oct 2012 20:12:25 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062012.q96KCPJK032657@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:12: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: r241302 - head/lib/libkvm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 20:12:25 -0000 Author: avg Date: Sat Oct 6 20:12:24 2012 New Revision: 241302 URL: http://svn.freebsd.org/changeset/base/241302 Log: kvm_proclist: ignore processes in larvae state Reviewed by: jhb MFC after: 8 days Modified: head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Sat Oct 6 20:08:29 2012 (r241301) +++ head/lib/libkvm/kvm_proc.c Sat Oct 6 20:12:24 2012 (r241302) @@ -144,6 +144,8 @@ kvm_proclist(kvm_t *kd, int what, int ar _kvm_err(kd, kd->program, "can't read proc at %p", p); return (-1); } + if (proc.p_state == PRS_NEW) + continue; if (proc.p_state != PRS_ZOMBIE) { if (KREAD(kd, (u_long)TAILQ_FIRST(&proc.p_threads), &mtd)) { From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:16:04 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A29A71065670; Sat, 6 Oct 2012 20:16:04 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC638FC17; Sat, 6 Oct 2012 20:16:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96KG4a1033182; Sat, 6 Oct 2012 20:16:04 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96KG41g033180; Sat, 6 Oct 2012 20:16:04 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062016.q96KG41g033180@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:16: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: r241303 - head/lib/libkvm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 20:16:04 -0000 Author: avg Date: Sat Oct 6 20:16:04 2012 New Revision: 241303 URL: http://svn.freebsd.org/changeset/base/241303 Log: kvm_getprocs: gracefully handle errors from kvm_deadprocs and don't confuse callers with incorrect return value MFC after: 9 days Modified: head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm_proc.c ============================================================================== --- head/lib/libkvm/kvm_proc.c Sat Oct 6 20:12:24 2012 (r241302) +++ head/lib/libkvm/kvm_proc.c Sat Oct 6 20:16:04 2012 (r241303) @@ -593,9 +593,15 @@ liveout: nprocs = kvm_deadprocs(kd, op, arg, nl[1].n_value, nl[2].n_value, nprocs); + if (nprocs <= 0) { + _kvm_freeprocs(kd); + nprocs = 0; + } #ifdef notdef - size = nprocs * sizeof(struct kinfo_proc); - (void)realloc(kd->procbase, size); + else { + size = nprocs * sizeof(struct kinfo_proc); + kd->procbase = realloc(kd->procbase, size); + } #endif } *cnt = nprocs; From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 20:17:28 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E55D0106566C; Sat, 6 Oct 2012 20:17:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0EDB8FC12; Sat, 6 Oct 2012 20:17:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96KHSsh033425; Sat, 6 Oct 2012 20:17:28 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96KHSgf033423; Sat, 6 Oct 2012 20:17:28 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062017.q96KHSgf033423@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 20:17: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: r241304 - head/lib/libprocstat X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 20:17:29 -0000 Author: avg Date: Sat Oct 6 20:17:28 2012 New Revision: 241304 URL: http://svn.freebsd.org/changeset/base/241304 Log: procstat_getprocs: honor kvm_getprocs interface - cnt is signed MFC after: 10 days Modified: head/lib/libprocstat/libprocstat.c Modified: head/lib/libprocstat/libprocstat.c ============================================================================== --- head/lib/libprocstat/libprocstat.c Sat Oct 6 20:16:04 2012 (r241303) +++ head/lib/libprocstat/libprocstat.c Sat Oct 6 20:17:28 2012 (r241304) @@ -184,15 +184,18 @@ procstat_getprocs(struct procstat *procs struct kinfo_proc *p0, *p; size_t len; int name[4]; + int cnt; int error; assert(procstat); assert(count); p = NULL; if (procstat->type == PROCSTAT_KVM) { - p0 = kvm_getprocs(procstat->kd, what, arg, count); - if (p0 == NULL || count == 0) + *count = 0; + p0 = kvm_getprocs(procstat->kd, what, arg, &cnt); + if (p0 == NULL || cnt <= 0) return (NULL); + *count = cnt; len = *count * sizeof(*p); p = malloc(len); if (p == NULL) { From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 21:39:12 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 51F9C1065672; Sat, 6 Oct 2012 21:39:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) by mx1.freebsd.org (Postfix) with ESMTP id 073188FC17; Sat, 6 Oct 2012 21:39:11 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:d16d:2274:8c10:a1ca] (unknown [IPv6:2001:7b8:3a7:0:d16d:2274:8c10:a1ca]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id D15F15C59; Sat, 6 Oct 2012 23:39:04 +0200 (CEST) Message-ID: <5070A4FC.4080802@FreeBSD.org> Date: Sat, 06 Oct 2012 23:39:08 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121002 Thunderbird/16.0 MIME-Version: 1.0 To: Marcel Moolenaar References: <201210062001.q96K16Or030755@svn.freebsd.org> In-Reply-To: <201210062001.q96K16Or030755@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: r241298 - in head: . gnu/usr.bin/cc/cc_int gnu/usr.bin/cc/include kerberos5 kerberos5/tools/asn1_compile kerberos5/tools/slc lib/clang/include share/mk tools/build/make_check usr.sbin/c... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: 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, 06 Oct 2012 21:39:12 -0000 On 2012-10-06 22:01, Marcel Moolenaar wrote: > 2. Remove the use of -E. It's not needed in our build because we use ?= for > the respective variables, which means that we'll take the environment > value (if any) anyway. No, this will break builds of 32-bit libraries on amd64, at least when CC/CXX etc are set in make.conf. I put this in specifically in r227120. Please revert this particular change, unless you have tested that it works correctly, with e.g. CC=clang in make.conf. From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 21:42:08 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0F4FF1065672; Sat, 6 Oct 2012 21:42:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE2F58FC0A; Sat, 6 Oct 2012 21:42:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q96Lg7dq046469; Sat, 6 Oct 2012 21:42:07 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q96Lg7S3046467; Sat, 6 Oct 2012 21:42:07 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201210062142.q96Lg7S3046467@svn.freebsd.org> From: Andriy Gapon Date: Sat, 6 Oct 2012 21:42: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: r241305 - head/sys/cam/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, 06 Oct 2012 21:42:08 -0000 Author: avg Date: Sat Oct 6 21:42:07 2012 New Revision: 241305 URL: http://svn.freebsd.org/changeset/base/241305 Log: ata_da: set disk::d_ident from serial number MFC after: 10 days Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sat Oct 6 20:17:28 2012 (r241304) +++ head/sys/cam/ata/ata_da.c Sat Oct 6 21:42:07 2012 (r241305) @@ -1064,6 +1064,8 @@ adaregister(struct cam_periph *periph, v softc->disk->d_flags |= DISKFLAG_CANDELETE; strlcpy(softc->disk->d_descr, cgd->ident_data.model, MIN(sizeof(softc->disk->d_descr), sizeof(cgd->ident_data.model))); + strlcpy(softc->disk->d_ident, cgd->ident_data.serial, + MIN(sizeof(softc->disk->d_ident), sizeof(cgd->ident_data.serial))); softc->disk->d_hba_vendor = cpi.hba_vendor; softc->disk->d_hba_device = cpi.hba_device; softc->disk->d_hba_subvendor = cpi.hba_subvendor; From owner-svn-src-head@FreeBSD.ORG Sat Oct 6 22:46:40 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E1154106566C; Sat, 6 Oct 2012 22:46:40 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id A2F148FC08; Sat, 6 Oct 2012 22:46:39 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id CB96384F; Sun, 7 Oct 2012 00:45:24 +0200 (CEST) Date: Sun, 7 Oct 2012 00:47:03 +0200 From: Pawel Jakub Dawidek To: Andriy Gapon Message-ID: <20121006224702.GA28611@garage.freebsd.pl> References: <201210061950.q96JoNIk028911@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: <201210061950.q96JoNIk028911@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r241295 - 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, 06 Oct 2012 22:46:41 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 06, 2012 at 07:50:23PM +0000, Andriy Gapon wrote: > Author: avg > Date: Sat Oct 6 19:50:23 2012 > New Revision: 241295 > URL: http://svn.freebsd.org/changeset/base/241295 >=20 > Log: > cngetc: use cpu_spinwait to ease the cncheckc loop a tiny bit This doesn't really help me. On machine that I tried something similar, with this patch CPU fan still goes crazy when I enter DDB. What did work for me was to reduce CPU speed to supported minimum. Entering DDB then did not result in CPU fan speed up. If something like this could be done automatically, that would be great. > Reviewed by: julian > MFC after: 10 days >=20 > Modified: > head/sys/kern/kern_cons.c >=20 > Modified: head/sys/kern/kern_cons.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/kern_cons.c Sat Oct 6 19:48:15 2012 (r241294) > +++ head/sys/kern/kern_cons.c Sat Oct 6 19:50:23 2012 (r241295) > @@ -384,7 +384,7 @@ cngetc(void) > if (cn_mute) > return (-1); > while ((c =3D cncheckc()) =3D=3D -1) > - ; > + cpu_spinwait(); > if (c =3D=3D '\r') > c =3D '\n'; /* console input is always ICRNL */ > return (c); --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBwtOYACgkQForvXbEpPzTygwCfR4XBG3gcSXbnkazBg7zrj4Fh VRcAoMx2pScfI1tko3lRadY+DeD3jtSc =diBM -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--