From owner-svn-src-stable@FreeBSD.ORG Mon Sep 28 11:31:22 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75DC7106566C; Mon, 28 Sep 2009 11:31:22 +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 47F7B8FC12; Mon, 28 Sep 2009 11:31:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SBVMIb053068; Mon, 28 Sep 2009 11:31:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SBVMv9053065; Mon, 28 Sep 2009 11:31:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200909281131.n8SBVMv9053065@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 28 Sep 2009 11:31:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197576 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 11:31:22 -0000 Author: kib Date: Mon Sep 28 11:31:21 2009 New Revision: 197576 URL: http://svn.freebsd.org/changeset/base/197576 Log: MFC r197390: Remove forward_roundrobin(). Approved by: re (kensmith) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/subr_smp.c stable/8/sys/sys/smp.h Modified: stable/8/sys/kern/subr_smp.c ============================================================================== --- stable/8/sys/kern/subr_smp.c Mon Sep 28 10:22:46 2009 (r197575) +++ stable/8/sys/kern/subr_smp.c Mon Sep 28 11:31:21 2009 (r197576) @@ -104,12 +104,6 @@ SYSCTL_INT(_kern_smp, OID_AUTO, forward_ &forward_signal_enabled, 0, "Forwarding of a signal to a process on a different CPU"); -/* Enable forwarding of roundrobin to all other cpus */ -static int forward_roundrobin_enabled = 1; -SYSCTL_INT(_kern_smp, OID_AUTO, forward_roundrobin_enabled, CTLFLAG_RW, - &forward_roundrobin_enabled, 0, - "Forwarding of roundrobin to all other CPUs"); - /* Variables needed for SMP rendezvous. */ static volatile int smp_rv_ncpus; static void (*volatile smp_rv_setup_func)(void *arg); @@ -189,33 +183,6 @@ forward_signal(struct thread *td) ipi_selected(1 << id, IPI_AST); } -void -forward_roundrobin(void) -{ - struct pcpu *pc; - struct thread *td; - cpumask_t id, map, me; - - CTR0(KTR_SMP, "forward_roundrobin()"); - - if (!smp_started || cold || panicstr) - return; - if (!forward_roundrobin_enabled) - return; - map = 0; - me = PCPU_GET(cpumask); - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { - td = pc->pc_curthread; - id = pc->pc_cpumask; - if (id != me && (id & stopped_cpus) == 0 && - !TD_IS_IDLETHREAD(td)) { - td->td_flags |= TDF_NEEDRESCHED; - map |= id; - } - } - ipi_selected(map, IPI_AST); -} - /* * When called the executing CPU will send an IPI to all other CPUs * requesting that they halt execution. Modified: stable/8/sys/sys/smp.h ============================================================================== --- stable/8/sys/sys/smp.h Mon Sep 28 10:22:46 2009 (r197575) +++ stable/8/sys/sys/smp.h Mon Sep 28 11:31:21 2009 (r197576) @@ -120,7 +120,6 @@ void cpu_mp_setmaxid(void); void cpu_mp_start(void); void forward_signal(struct thread *); -void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); int stop_cpus_hard(cpumask_t); From owner-svn-src-stable@FreeBSD.ORG Mon Sep 28 15:10:09 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 770F4106566B; Mon, 28 Sep 2009 15:10:09 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64EA68FC17; Mon, 28 Sep 2009 15:10:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SFA9F7058134; Mon, 28 Sep 2009 15:10:09 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SFA9sx058132; Mon, 28 Sep 2009 15:10:09 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200909281510.n8SFA9sx058132@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 28 Sep 2009 15:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197577 - in stable/7/sys: . contrib/pf dev/mxge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 15:10:09 -0000 Author: gallatin Date: Mon Sep 28 15:10:08 2009 New Revision: 197577 URL: http://svn.freebsd.org/changeset/base/197577 Log: MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/mxge/if_mxge.c Modified: stable/7/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/7/sys/dev/mxge/if_mxge.c Mon Sep 28 11:31:21 2009 (r197576) +++ stable/7/sys/dev/mxge/if_mxge.c Mon Sep 28 15:10:08 2009 (r197577) @@ -135,7 +135,7 @@ MODULE_DEPEND(mxge, zlib, 1, 1, 1); static int mxge_load_firmware(mxge_softc_t *sc, int adopt); static int mxge_send_cmd(mxge_softc_t *sc, uint32_t cmd, mxge_cmd_t *data); -static int mxge_close(mxge_softc_t *sc); +static int mxge_close(mxge_softc_t *sc, int down); static int mxge_open(mxge_softc_t *sc); static void mxge_tick(void *arg); @@ -1291,8 +1291,7 @@ mxge_reset(mxge_softc_t *sc, int interru ss->lro_queued = 0; ss->lro_flushed = 0; if (ss->fw_stats != NULL) { - ss->fw_stats->valid = 0; - ss->fw_stats->send_done_count = 0; + bzero(ss->fw_stats, sizeof *ss->fw_stats); } } sc->rdma_tags_available = 15; @@ -1365,7 +1364,7 @@ mxge_change_lro_locked(mxge_softc_t *sc, ifp->if_capenable |= IFCAP_LRO; sc->lro_cnt = lro_cnt; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); err = mxge_open(sc); } return err; @@ -1481,6 +1480,10 @@ mxge_add_sysctls(mxge_softc_t *sc) "read_write_dma_MBs", CTLFLAG_RD, &sc->read_write_dma, 0, "DMA concurrent Read/Write speed in MB/s"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "watchdog_resets", + CTLFLAG_RD, &sc->watchdog_resets, + 0, "Number of times NIC was reset"); /* performance related tunables */ @@ -3377,28 +3380,29 @@ abort: } static int -mxge_close(mxge_softc_t *sc) +mxge_close(mxge_softc_t *sc, int down) { mxge_cmd_t cmd; int err, old_down_cnt; callout_stop(&sc->co_hdl); sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - old_down_cnt = sc->down_cnt; - mb(); - err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); - if (err) { - device_printf(sc->dev, "Couldn't bring down link\n"); - } - if (old_down_cnt == sc->down_cnt) { - /* wait for down irq */ - DELAY(10 * sc->intr_coal_delay); - } - mb(); - if (old_down_cnt == sc->down_cnt) { - device_printf(sc->dev, "never got down irq\n"); + if (!down) { + old_down_cnt = sc->down_cnt; + mb(); + err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); + if (err) { + device_printf(sc->dev, "Couldn't bring down link\n"); + } + if (old_down_cnt == sc->down_cnt) { + /* wait for down irq */ + DELAY(10 * sc->intr_coal_delay); + } + mb(); + if (old_down_cnt == sc->down_cnt) { + device_printf(sc->dev, "never got down irq\n"); + } } - mxge_free_mbufs(sc); return 0; @@ -3451,7 +3455,8 @@ static int mxge_watchdog_reset(mxge_softc_t *sc) { struct pci_devinfo *dinfo; - int err; + struct mxge_slice_state *ss; + int err, running, s, num_tx_slices = 1; uint32_t reboot; uint16_t cmd; @@ -3485,6 +3490,30 @@ mxge_watchdog_reset(mxge_softc_t *sc) reboot = mxge_read_reboot(sc); device_printf(sc->dev, "NIC rebooted, status = 0x%x\n", reboot); + running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING; + if (running) { + + /* + * quiesce NIC so that TX routines will not try to + * xmit after restoration of BAR + */ + + /* Mark the link as down */ + if (sc->link_state) { + sc->link_state = 0; + if_link_state_change(sc->ifp, + LINK_STATE_DOWN); + } +#ifdef IFNET_BUF_RING + num_tx_slices = sc->num_slices; +#endif + /* grab all TX locks to ensure no tx */ + for (s = 0; s < num_tx_slices; s++) { + ss = &sc->ss[s]; + mtx_lock(&ss->tx.mtx); + } + mxge_close(sc, 1); + } /* restore PCI configuration space */ dinfo = device_get_ivars(sc->dev); pci_cfg_restore(sc->dev, dinfo); @@ -3492,10 +3521,22 @@ mxge_watchdog_reset(mxge_softc_t *sc) /* and redo any changes we made to our config space */ mxge_setup_cfg_space(sc); - if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); - err = mxge_open(sc); + /* reload f/w */ + err = mxge_load_firmware(sc, 0); + if (err) { + device_printf(sc->dev, + "Unable to re-load f/w\n"); } + if (running) { + if (!err) + err = mxge_open(sc); + /* release all TX locks */ + for (s = 0; s < num_tx_slices; s++) { + ss = &sc->ss[s]; + mtx_unlock(&ss->tx.mtx); + } + } + sc->watchdog_resets++; } else { device_printf(sc->dev, "NIC did not reboot, ring state:\n"); device_printf(sc->dev, "tx.req=%d tx.done=%d\n", @@ -3505,6 +3546,9 @@ mxge_watchdog_reset(mxge_softc_t *sc) be32toh(sc->ss->fw_stats->send_done_count)); device_printf(sc->dev, "not resetting\n"); } + if (err) + device_printf(sc->dev, "watchdog reset failed\n"); + return (err); } @@ -3590,11 +3634,11 @@ mxge_change_mtu(mxge_softc_t *sc, int mt old_mtu = ifp->if_mtu; ifp->if_mtu = mtu; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); err = mxge_open(sc); if (err != 0) { ifp->if_mtu = old_mtu; - mxge_close(sc); + mxge_close(sc, 0); (void) mxge_open(sc); } } @@ -3648,7 +3692,7 @@ mxge_ioctl(struct ifnet *ifp, u_long com } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); } } mtx_unlock(&sc->driver_mtx); @@ -4345,7 +4389,7 @@ mxge_detach(device_t dev) } mtx_lock(&sc->driver_mtx); if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) - mxge_close(sc); + mxge_close(sc, 0); mtx_unlock(&sc->driver_mtx); ether_ifdetach(sc->ifp); callout_drain(&sc->co_hdl); From owner-svn-src-stable@FreeBSD.ORG Mon Sep 28 15:11:49 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAD4C106566C; Mon, 28 Sep 2009 15:11:49 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 982EE8FC13; Mon, 28 Sep 2009 15:11:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SFBn0i058215; Mon, 28 Sep 2009 15:11:49 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SFBn7B058213; Mon, 28 Sep 2009 15:11:49 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200909281511.n8SFBn7B058213@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 28 Sep 2009 15:11:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197578 - in stable/6/sys: . conf contrib/pf dev/cxgb dev/mxge X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 15:11:49 -0000 Author: gallatin Date: Mon Sep 28 15:11:49 2009 New Revision: 197578 URL: http://svn.freebsd.org/changeset/base/197578 Log: MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC Modified: stable/6/sys/ (props changed) stable/6/sys/conf/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) stable/6/sys/dev/mxge/if_mxge.c Modified: stable/6/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/6/sys/dev/mxge/if_mxge.c Mon Sep 28 15:10:08 2009 (r197577) +++ stable/6/sys/dev/mxge/if_mxge.c Mon Sep 28 15:11:49 2009 (r197578) @@ -135,7 +135,7 @@ MODULE_DEPEND(mxge, zlib, 1, 1, 1); static int mxge_load_firmware(mxge_softc_t *sc, int adopt); static int mxge_send_cmd(mxge_softc_t *sc, uint32_t cmd, mxge_cmd_t *data); -static int mxge_close(mxge_softc_t *sc); +static int mxge_close(mxge_softc_t *sc, int down); static int mxge_open(mxge_softc_t *sc); static void mxge_tick(void *arg); @@ -1291,8 +1291,7 @@ mxge_reset(mxge_softc_t *sc, int interru ss->lro_queued = 0; ss->lro_flushed = 0; if (ss->fw_stats != NULL) { - ss->fw_stats->valid = 0; - ss->fw_stats->send_done_count = 0; + bzero(ss->fw_stats, sizeof *ss->fw_stats); } } sc->rdma_tags_available = 15; @@ -1365,7 +1364,7 @@ mxge_change_lro_locked(mxge_softc_t *sc, ifp->if_capenable |= IFCAP_LRO; sc->lro_cnt = lro_cnt; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); err = mxge_open(sc); } return err; @@ -1481,6 +1480,10 @@ mxge_add_sysctls(mxge_softc_t *sc) "read_write_dma_MBs", CTLFLAG_RD, &sc->read_write_dma, 0, "DMA concurrent Read/Write speed in MB/s"); + SYSCTL_ADD_INT(ctx, children, OID_AUTO, + "watchdog_resets", + CTLFLAG_RD, &sc->watchdog_resets, + 0, "Number of times NIC was reset"); /* performance related tunables */ @@ -3377,28 +3380,30 @@ abort: } static int -mxge_close(mxge_softc_t *sc) +mxge_close(mxge_softc_t *sc, int down) { mxge_cmd_t cmd; int err, old_down_cnt; callout_stop(&sc->co_hdl); sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - old_down_cnt = sc->down_cnt; - mb(); - err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); - if (err) { - device_printf(sc->dev, "Couldn't bring down link\n"); - } - if (old_down_cnt == sc->down_cnt) { - /* wait for down irq */ - DELAY(10 * sc->intr_coal_delay); - } - mb(); - if (old_down_cnt == sc->down_cnt) { - device_printf(sc->dev, "never got down irq\n"); + if (!down) { + old_down_cnt = sc->down_cnt; + mb(); + err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd); + if (err) { + device_printf(sc->dev, + "Couldn't bring down link\n"); + } + if (old_down_cnt == sc->down_cnt) { + /* wait for down irq */ + DELAY(10 * sc->intr_coal_delay); + } + mb(); + if (old_down_cnt == sc->down_cnt) { + device_printf(sc->dev, "never got down irq\n"); + } } - mxge_free_mbufs(sc); return 0; @@ -3451,7 +3456,8 @@ static int mxge_watchdog_reset(mxge_softc_t *sc) { struct pci_devinfo *dinfo; - int err; + struct mxge_slice_state *ss; + int err, running, s, num_tx_slices = 1; uint32_t reboot; uint16_t cmd; @@ -3485,6 +3491,30 @@ mxge_watchdog_reset(mxge_softc_t *sc) reboot = mxge_read_reboot(sc); device_printf(sc->dev, "NIC rebooted, status = 0x%x\n", reboot); + running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING; + if (running) { + + /* + * quiesce NIC so that TX routines will not try to + * xmit after restoration of BAR + */ + + /* Mark the link as down */ + if (sc->link_state) { + sc->link_state = 0; + if_link_state_change(sc->ifp, + LINK_STATE_DOWN); + } +#ifdef IFNET_BUF_RING + num_tx_slices = sc->num_slices; +#endif + /* grab all TX locks to ensure no tx */ + for (s = 0; s < num_tx_slices; s++) { + ss = &sc->ss[s]; + mtx_lock(&ss->tx.mtx); + } + mxge_close(sc, 1); + } /* restore PCI configuration space */ dinfo = device_get_ivars(sc->dev); pci_cfg_restore(sc->dev, dinfo); @@ -3492,10 +3522,22 @@ mxge_watchdog_reset(mxge_softc_t *sc) /* and redo any changes we made to our config space */ mxge_setup_cfg_space(sc); - if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); - err = mxge_open(sc); + /* reload f/w */ + err = mxge_load_firmware(sc, 0); + if (err) { + device_printf(sc->dev, + "Unable to re-load f/w\n"); } + if (running) { + if (!err) + err = mxge_open(sc); + /* release all TX locks */ + for (s = 0; s < num_tx_slices; s++) { + ss = &sc->ss[s]; + mtx_unlock(&ss->tx.mtx); + } + } + sc->watchdog_resets++; } else { device_printf(sc->dev, "NIC did not reboot, ring state:\n"); device_printf(sc->dev, "tx.req=%d tx.done=%d\n", @@ -3505,6 +3547,9 @@ mxge_watchdog_reset(mxge_softc_t *sc) be32toh(sc->ss->fw_stats->send_done_count)); device_printf(sc->dev, "not resetting\n"); } + if (err) + device_printf(sc->dev, "watchdog reset failed\n"); + return (err); } @@ -3590,11 +3635,11 @@ mxge_change_mtu(mxge_softc_t *sc, int mt old_mtu = ifp->if_mtu; ifp->if_mtu = mtu; if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); err = mxge_open(sc); if (err != 0) { ifp->if_mtu = old_mtu; - mxge_close(sc); + mxge_close(sc, 0); (void) mxge_open(sc); } } @@ -3648,7 +3693,7 @@ mxge_ioctl(struct ifnet *ifp, u_long com } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - mxge_close(sc); + mxge_close(sc, 0); } } mtx_unlock(&sc->driver_mtx); @@ -4345,7 +4390,7 @@ mxge_detach(device_t dev) } mtx_lock(&sc->driver_mtx); if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) - mxge_close(sc); + mxge_close(sc, 0); mtx_unlock(&sc->driver_mtx); ether_ifdetach(sc->ifp); callout_drain(&sc->co_hdl); From owner-svn-src-stable@FreeBSD.ORG Mon Sep 28 18:32:28 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2D06106566C; Mon, 28 Sep 2009 18:32:28 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B679B8FC22; Mon, 28 Sep 2009 18:32:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SIWSwi062382; Mon, 28 Sep 2009 18:32:28 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SIWSSP062380; Mon, 28 Sep 2009 18:32:28 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200909281832.n8SIWSSP062380@svn.freebsd.org> From: Michael Tuexen Date: Mon, 28 Sep 2009 18:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197582 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/xen/xenpci netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 18:32:29 -0000 Author: tuexen Date: Mon Sep 28 18:32:28 2009 New Revision: 197582 URL: http://svn.freebsd.org/changeset/base/197582 Log: MFC r197341. Fix errnos. Approved by: re (bz), rrs (mentor) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/netinet/sctp_output.c Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Mon Sep 28 18:07:16 2009 (r197581) +++ stable/8/sys/netinet/sctp_output.c Mon Sep 28 18:32:28 2009 (r197582) @@ -12384,8 +12384,8 @@ sctp_lower_sosend(struct socket *so, t_inp = inp = (struct sctp_inpcb *)so->so_pcb; if (inp == NULL) { - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); - error = EFAULT; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; if (i_pak) { SCTP_RELEASE_PKT(i_pak); } @@ -12432,8 +12432,8 @@ sctp_lower_sosend(struct socket *so, if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (inp->sctp_socket->so_qlimit)) { /* The listener can NOT send */ - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); - error = EFAULT; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, ENOTCONN); + error = ENOTCONN; goto out_unlocked; } if ((use_rcvinfo) && srcv) { @@ -12566,8 +12566,8 @@ sctp_lower_sosend(struct socket *so, if ((inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) || (inp->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE)) { /* Should I really unlock ? */ - SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EFAULT); - error = EFAULT; + SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_OUTPUT, EINVAL); + error = EINVAL; goto out_unlocked; } @@ -12596,6 +12596,12 @@ sctp_lower_sosend(struct socket *so, } } if (stcb == NULL) { + if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || + (inp->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { + SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOTCONN); + error = ENOTCONN; + goto out_unlocked; + } if (addr == NULL) { SCTP_LTRACE_ERR_RET(inp, stcb, net, SCTP_FROM_SCTP_OUTPUT, ENOENT); error = ENOENT; From owner-svn-src-stable@FreeBSD.ORG Mon Sep 28 22:03:02 2009 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2427D1065695; Mon, 28 Sep 2009 22:03:02 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C55FB8FC19; Mon, 28 Sep 2009 22:03:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SM31LF067432; Mon, 28 Sep 2009 22:03:01 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SM318J067429; Mon, 28 Sep 2009 22:03:01 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200909282203.n8SM318J067429@svn.freebsd.org> From: Edwin Groothuis Date: Mon, 28 Sep 2009 22:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197598 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Sep 2009 22:03:02 -0000 Author: edwin Date: Mon Sep 28 22:03:01 2009 New Revision: 197598 URL: http://svn.freebsd.org/changeset/base/197598 Log: MFC of r197597 Update to tzdata2009n: Pakistan will go back from DST at 1 October. Headsup for changes in Argentina. Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/southamerica Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Mon Sep 28 21:53:28 2009 (r197597) +++ stable/7/share/zoneinfo/asia Mon Sep 28 22:03:01 2009 (r197598) @@ -1,5 +1,5 @@ #
-# @(#)asia	8.40
+# @(#)asia	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1674,8 +1674,15 @@ Zone	Asia/Muscat	3:54:20 -	LMT	1920
 # advance clocks in the country by one hour from April 15 to
 # conserve energy"
 
-# From Arthur David Olson (2009-04-10):
-# Assume for now that Pakistan will end DST in 2009 as it did in 2008.
+# From Steffen Thorsen (2009-09-17):
+# "The News International," Pakistan reports that: "The Federal
+# Government has decided to restore the previous time by moving the
+# clocks backward by one hour from October 1. A formal announcement to
+# this effect will be made after the Prime Minister grants approval in
+# this regard." 
+# 
+# http://www.thenews.com.pk/updates.asp?id=87168
+# 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Pakistan	2002	only	-	Apr	Sun>=2	0:01	1:00	S
@@ -1683,7 +1690,7 @@ Rule Pakistan	2002	only	-	Oct	Sun>=2	0:0
 Rule Pakistan	2008	only	-	Jun	1	0:00	1:00	S
 Rule Pakistan	2008	only	-	Nov	1	0:00	0	-
 Rule Pakistan	2009	only	-	Apr	15	0:00	1:00	S
-Rule Pakistan	2009	only	-	Nov	1	0:00	0	-
+Rule Pakistan	2009	only	-	Oct	1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Karachi	4:28:12 -	LMT	1907
 			5:30	-	IST	1942 Sep

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Mon Sep 28 21:53:28 2009	(r197597)
+++ stable/7/share/zoneinfo/southamerica	Mon Sep 28 22:03:01 2009	(r197598)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.36
+# @(#)southamerica	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -397,7 +397,37 @@ Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:0
 # is that "The province will most likely follow the next daylight saving schedule,
 # which is planned for the second Sunday in October."
 
-#
+# From Alexander Krivenyshev (2009-09-19):
+# Some  Argentinian Provinces (Buenos Aires, Entre Ríos) are opposing to the
+# Daylight Saving Time for the 2009-2010 season.
+#
+# (Spanish)
+# "El cambio de huso horario en Entre Ríos deberá ser aprobado por la
+# Legislatura":
+# 
+# http://www.analisisdigital.com.ar/noticias.php?ed=1&di=0&no=110168
+# 
+# English translation - "The time zone change in Entre Rios must be approved by
+# the Legislature."
+#
+# (Spanish)
+# "Mar del Plata no quiere cambiar la hora."
+# 
+# http://www.mensajeroweb.com.ar/index.php?x=nota/33861/1/mar-del-plata-no-quiere-cambiar-la-hora
+# 
+# English translation - "Mar del Plata is not to change the time"
+#
+# or
+# (some English translation)
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_argentina07.html
+# 
+
+# From Arthur David Olson (2009-09-22):
+# "Mar del Plata no quiere cambiar la hora" translates to
+# "Mar del Plata doesn't want to change the time"
+# (less definitive than "is not to").
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
 # Buenos Aires (BA), Capital Federal (CF),

From owner-svn-src-stable@FreeBSD.ORG  Mon Sep 28 22:03:44 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 926291065672;
	Mon, 28 Sep 2009 22:03:44 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 802D08FC19;
	Mon, 28 Sep 2009 22:03:44 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SM3iws067497;
	Mon, 28 Sep 2009 22:03:44 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SM3i4p067494;
	Mon, 28 Sep 2009 22:03:44 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200909282203.n8SM3i4p067494@svn.freebsd.org>
From: Edwin Groothuis 
Date: Mon, 28 Sep 2009 22:03:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197599 - stable/6/share/zoneinfo
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 28 Sep 2009 22:03:44 -0000

Author: edwin
Date: Mon Sep 28 22:03:44 2009
New Revision: 197599
URL: http://svn.freebsd.org/changeset/base/197599

Log:
  MFC of r197594
  
  Update to tzdata2009n
  
  Pakistan will go back from DST at 1 October 2009.
  Headsup for changes in Argentina.

Modified:
  stable/6/share/zoneinfo/   (props changed)
  stable/6/share/zoneinfo/asia
  stable/6/share/zoneinfo/southamerica

Modified: stable/6/share/zoneinfo/asia
==============================================================================
--- stable/6/share/zoneinfo/asia	Mon Sep 28 22:03:01 2009	(r197598)
+++ stable/6/share/zoneinfo/asia	Mon Sep 28 22:03:44 2009	(r197599)
@@ -1,5 +1,5 @@
 # 
-# @(#)asia	8.40
+# @(#)asia	8.41
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -1674,8 +1674,15 @@ Zone	Asia/Muscat	3:54:20 -	LMT	1920
 # advance clocks in the country by one hour from April 15 to
 # conserve energy"
 
-# From Arthur David Olson (2009-04-10):
-# Assume for now that Pakistan will end DST in 2009 as it did in 2008.
+# From Steffen Thorsen (2009-09-17):
+# "The News International," Pakistan reports that: "The Federal
+# Government has decided to restore the previous time by moving the
+# clocks backward by one hour from October 1. A formal announcement to
+# this effect will be made after the Prime Minister grants approval in
+# this regard." 
+# 
+# http://www.thenews.com.pk/updates.asp?id=87168
+# 
 
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Pakistan	2002	only	-	Apr	Sun>=2	0:01	1:00	S
@@ -1683,7 +1690,7 @@ Rule Pakistan	2002	only	-	Oct	Sun>=2	0:0
 Rule Pakistan	2008	only	-	Jun	1	0:00	1:00	S
 Rule Pakistan	2008	only	-	Nov	1	0:00	0	-
 Rule Pakistan	2009	only	-	Apr	15	0:00	1:00	S
-Rule Pakistan	2009	only	-	Nov	1	0:00	0	-
+Rule Pakistan	2009	only	-	Oct	1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Karachi	4:28:12 -	LMT	1907
 			5:30	-	IST	1942 Sep

Modified: stable/6/share/zoneinfo/southamerica
==============================================================================
--- stable/6/share/zoneinfo/southamerica	Mon Sep 28 22:03:01 2009	(r197598)
+++ stable/6/share/zoneinfo/southamerica	Mon Sep 28 22:03:44 2009	(r197599)
@@ -1,5 +1,5 @@
 # 
-# @(#)southamerica	8.36
+# @(#)southamerica	8.37
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -397,7 +397,37 @@ Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:0
 # is that "The province will most likely follow the next daylight saving schedule,
 # which is planned for the second Sunday in October."
 
-#
+# From Alexander Krivenyshev (2009-09-19):
+# Some  Argentinian Provinces (Buenos Aires, Entre Ríos) are opposing to the
+# Daylight Saving Time for the 2009-2010 season.
+#
+# (Spanish)
+# "El cambio de huso horario en Entre Ríos deberá ser aprobado por la
+# Legislatura":
+# 
+# http://www.analisisdigital.com.ar/noticias.php?ed=1&di=0&no=110168
+# 
+# English translation - "The time zone change in Entre Rios must be approved by
+# the Legislature."
+#
+# (Spanish)
+# "Mar del Plata no quiere cambiar la hora."
+# 
+# http://www.mensajeroweb.com.ar/index.php?x=nota/33861/1/mar-del-plata-no-quiere-cambiar-la-hora
+# 
+# English translation - "Mar del Plata is not to change the time"
+#
+# or
+# (some English translation)
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_argentina07.html
+# 
+
+# From Arthur David Olson (2009-09-22):
+# "Mar del Plata no quiere cambiar la hora" translates to
+# "Mar del Plata doesn't want to change the time"
+# (less definitive than "is not to").
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
 # Buenos Aires (BA), Capital Federal (CF),

From owner-svn-src-stable@FreeBSD.ORG  Mon Sep 28 22:29:29 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3C9C7106568F;
	Mon, 28 Sep 2009 22:29: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 2AAE48FC18;
	Mon, 28 Sep 2009 22:29:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SMTTiQ068089;
	Mon, 28 Sep 2009 22:29:29 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SMTTGM068086;
	Mon, 28 Sep 2009 22:29:29 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200909282229.n8SMTTGM068086@svn.freebsd.org>
From: Xin LI 
Date: Mon, 28 Sep 2009 22:29:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197601 - in stable/7/lib/libc: . net resolv
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 28 Sep 2009 22:29:29 -0000

Author: delphij
Date: Mon Sep 28 22:29:28 2009
New Revision: 197601
URL: http://svn.freebsd.org/changeset/base/197601

Log:
  MFC 193023+193024:
  
  Add an option to enforce strict RFC 1034 compliance.
  Document how to enable strict RFC 1034 enforcements.
  
  PR:		kern/129477

Modified:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/net/resolver.3
  stable/7/lib/libc/resolv/res_comp.c

Modified: stable/7/lib/libc/net/resolver.3
==============================================================================
--- stable/7/lib/libc/net/resolver.3	Mon Sep 28 22:18:38 2009	(r197600)
+++ stable/7/lib/libc/net/resolver.3	Mon Sep 28 22:29:28 2009	(r197601)
@@ -28,7 +28,7 @@
 .\"     @(#)resolver.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd November 4, 2006
+.Dd May 29, 2009
 .Dt RESOLVER 3
 .Os
 .Sh NAME
@@ -401,6 +401,19 @@ function properly if the programmer atte
 .Va _res
 structure in an attempt to replace the per-thread version referred to
 by that macro.
+.Pp
+The following compile-time option can be specified to change the default
+behavior of resolver routines when necessary.
+.Bl -tag -width RES_ENFORCE_RFC1034
+.It Dv RES_ENFORCE_RFC1034
+If this symbol is defined during compile-time,
+.Fn res_search
+will enforce RFC 1034 check, namely, disallow using of underscore character
+within host names.
+This is used by the standard host lookup routines like
+.Xr gethostbyname 3 .
+For compatibility reasons this option is not enabled by default.
+.El
 .Sh RETURN VALUES
 The
 .Fn res_init

Modified: stable/7/lib/libc/resolv/res_comp.c
==============================================================================
--- stable/7/lib/libc/resolv/res_comp.c	Mon Sep 28 22:18:38 2009	(r197600)
+++ stable/7/lib/libc/resolv/res_comp.c	Mon Sep 28 22:29:28 2009	(r197601)
@@ -148,7 +148,11 @@ dn_skipname(const u_char *ptr, const u_c
 #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
 
 #define borderchar(c) (alphachar(c) || digitchar(c))
+#ifdef	RES_ENFORCE_RFC1034
+#define middlechar(c) (borderchar(c) || hyphenchar(c))
+#else
 #define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
+#endif
 #define	domainchar(c) ((c) > 0x20 && (c) < 0x7f)
 
 int

From owner-svn-src-stable@FreeBSD.ORG  Mon Sep 28 22:31:30 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4BC0F106566B;
	Mon, 28 Sep 2009 22:31:30 +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 209718FC17;
	Mon, 28 Sep 2009 22:31:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SMVUih068200;
	Mon, 28 Sep 2009 22:31:30 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SMVU1b068197;
	Mon, 28 Sep 2009 22:31:30 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200909282231.n8SMVU1b068197@svn.freebsd.org>
From: Xin LI 
Date: Mon, 28 Sep 2009 22:31:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197602 - in stable/6/lib/libc: . net resolv
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 28 Sep 2009 22:31:30 -0000

Author: delphij
Date: Mon Sep 28 22:31:29 2009
New Revision: 197602
URL: http://svn.freebsd.org/changeset/base/197602

Log:
  MFC 193023+193024:
  
  Add an option to enforce strict RFC 1034 compliance.
  Document how to enable strict RFC 1034 enforcements.
  
  PR:		kern/129477

Modified:
  stable/6/lib/libc/   (props changed)
  stable/6/lib/libc/net/resolver.3
  stable/6/lib/libc/resolv/res_comp.c

Modified: stable/6/lib/libc/net/resolver.3
==============================================================================
--- stable/6/lib/libc/net/resolver.3	Mon Sep 28 22:29:28 2009	(r197601)
+++ stable/6/lib/libc/net/resolver.3	Mon Sep 28 22:31:29 2009	(r197602)
@@ -32,7 +32,7 @@
 .\"     @(#)resolver.3	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd November 4, 2006
+.Dd May 29, 2009
 .Dt RESOLVER 3
 .Os
 .Sh NAME
@@ -405,6 +405,19 @@ function properly if the programmer atte
 .Va _res
 structure in an attempt to replace the per-thread version referred to
 by that macro.
+.Pp
+The following compile-time option can be specified to change the default
+behavior of resolver routines when necessary.
+.Bl -tag -width RES_ENFORCE_RFC1034
+.It Dv RES_ENFORCE_RFC1034
+If this symbol is defined during compile-time,
+.Fn res_search
+will enforce RFC 1034 check, namely, disallow using of underscore character
+within host names.
+This is used by the standard host lookup routines like
+.Xr gethostbyname 3 .
+For compatibility reasons this option is not enabled by default.
+.El
 .Sh RETURN VALUES
 The
 .Fn res_init

Modified: stable/6/lib/libc/resolv/res_comp.c
==============================================================================
--- stable/6/lib/libc/resolv/res_comp.c	Mon Sep 28 22:29:28 2009	(r197601)
+++ stable/6/lib/libc/resolv/res_comp.c	Mon Sep 28 22:31:29 2009	(r197602)
@@ -152,7 +152,11 @@ dn_skipname(const u_char *ptr, const u_c
 #define digitchar(c) ((c) >= 0x30 && (c) <= 0x39)
 
 #define borderchar(c) (alphachar(c) || digitchar(c))
+#ifdef	RES_ENFORCE_RFC1034
+#define middlechar(c) (borderchar(c) || hyphenchar(c))
+#else
 #define middlechar(c) (borderchar(c) || hyphenchar(c) || underscorechar(c))
+#endif
 #define	domainchar(c) ((c) > 0x20 && (c) < 0x7f)
 
 int

From owner-svn-src-stable@FreeBSD.ORG  Mon Sep 28 23:48:16 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AF9D4106566C;
	Mon, 28 Sep 2009 23:48:16 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9C6018FC1E;
	Mon, 28 Sep 2009 23:48:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8SNmGD8069860;
	Mon, 28 Sep 2009 23:48:16 GMT
	(envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8SNmGd7069858;
	Mon, 28 Sep 2009 23:48:16 GMT
	(envelope-from gallatin@svn.freebsd.org)
Message-Id: <200909282348.n8SNmGd7069858@svn.freebsd.org>
From: Andrew Gallatin 
Date: Mon, 28 Sep 2009 23:48:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197607 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/mxge dev/xen/xenpci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Mon, 28 Sep 2009 23:48:16 -0000

Author: gallatin
Date: Mon Sep 28 23:48:16 2009
New Revision: 197607
URL: http://svn.freebsd.org/changeset/base/197607

Log:
  MFC 197395: Improve mxge watchdog routine's ability to reliably reset a failed NIC
  
  Approved by: re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/mxge/if_mxge.c
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/mxge/if_mxge.c
==============================================================================
--- stable/8/sys/dev/mxge/if_mxge.c	Mon Sep 28 22:41:28 2009	(r197606)
+++ stable/8/sys/dev/mxge/if_mxge.c	Mon Sep 28 23:48:16 2009	(r197607)
@@ -143,7 +143,7 @@ MODULE_DEPEND(mxge, zlib, 1, 1, 1);
 
 static int mxge_load_firmware(mxge_softc_t *sc, int adopt);
 static int mxge_send_cmd(mxge_softc_t *sc, uint32_t cmd, mxge_cmd_t *data);
-static int mxge_close(mxge_softc_t *sc);
+static int mxge_close(mxge_softc_t *sc, int down);
 static int mxge_open(mxge_softc_t *sc);
 static void mxge_tick(void *arg);
 
@@ -1305,8 +1305,7 @@ mxge_reset(mxge_softc_t *sc, int interru
 		ss->lro_queued = 0;
 		ss->lro_flushed = 0;
 		if (ss->fw_stats != NULL) {
-			ss->fw_stats->valid = 0;
-			ss->fw_stats->send_done_count = 0;
+			bzero(ss->fw_stats, sizeof *ss->fw_stats);
 		}
 	}
 	sc->rdma_tags_available = 15;
@@ -1379,7 +1378,7 @@ mxge_change_lro_locked(mxge_softc_t *sc,
 		ifp->if_capenable |= IFCAP_LRO;
 	sc->lro_cnt = lro_cnt;
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-		mxge_close(sc);
+		mxge_close(sc, 0);
 		err = mxge_open(sc);
 	}
 	return err;
@@ -1495,6 +1494,10 @@ mxge_add_sysctls(mxge_softc_t *sc)
 		       "read_write_dma_MBs",
 		       CTLFLAG_RD, &sc->read_write_dma,
 		       0, "DMA concurrent Read/Write speed in MB/s");
+	SYSCTL_ADD_INT(ctx, children, OID_AUTO, 
+		       "watchdog_resets",
+		       CTLFLAG_RD, &sc->watchdog_resets,
+		       0, "Number of times NIC was reset");
 
 
 	/* performance related tunables */
@@ -3600,7 +3603,7 @@ abort:
 }
 
 static int
-mxge_close(mxge_softc_t *sc)
+mxge_close(mxge_softc_t *sc, int down)
 {
 	mxge_cmd_t cmd;
 	int err, old_down_cnt;
@@ -3617,21 +3620,23 @@ mxge_close(mxge_softc_t *sc)
 	}
 #endif
 	sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
-	old_down_cnt = sc->down_cnt;
-	wmb();
-	err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd);
-	if (err) {
-		device_printf(sc->dev, "Couldn't bring down link\n");
-	}
-	if (old_down_cnt == sc->down_cnt) {
-		/* wait for down irq */
-		DELAY(10 * sc->intr_coal_delay);
-	}
-	wmb();
-	if (old_down_cnt == sc->down_cnt) {
-		device_printf(sc->dev, "never got down irq\n");
+	if (!down) {
+		old_down_cnt = sc->down_cnt;
+		wmb();
+		err = mxge_send_cmd(sc, MXGEFW_CMD_ETHERNET_DOWN, &cmd);
+		if (err) {
+			device_printf(sc->dev,
+				      "Couldn't bring down link\n");
+		}
+		if (old_down_cnt == sc->down_cnt) {
+			/* wait for down irq */
+			DELAY(10 * sc->intr_coal_delay);
+		}
+		wmb();
+		if (old_down_cnt == sc->down_cnt) {
+			device_printf(sc->dev, "never got down irq\n");
+		}
 	}
-
 	mxge_free_mbufs(sc);
 
 	return 0;
@@ -3684,8 +3689,9 @@ static int
 mxge_watchdog_reset(mxge_softc_t *sc, int slice)
 {
 	struct pci_devinfo *dinfo;
+	struct mxge_slice_state *ss;
 	mxge_tx_ring_t *tx;
-	int err;
+	int err, running, s, num_tx_slices = 1;
 	uint32_t reboot;
 	uint16_t cmd;
 
@@ -3719,6 +3725,30 @@ mxge_watchdog_reset(mxge_softc_t *sc, in
 		reboot = mxge_read_reboot(sc);
 		device_printf(sc->dev, "NIC rebooted, status = 0x%x\n",
 			      reboot);
+		running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING;
+		if (running) {
+
+			/* 
+			 * quiesce NIC so that TX routines will not try to
+			 * xmit after restoration of BAR
+			 */
+
+			/* Mark the link as down */
+			if (sc->link_state) {
+				sc->link_state = 0;
+				if_link_state_change(sc->ifp,
+						     LINK_STATE_DOWN);
+			}
+#ifdef IFNET_BUF_RING
+			num_tx_slices = sc->num_slices;
+#endif
+			/* grab all TX locks to ensure no tx  */
+			for (s = 0; s < num_tx_slices; s++) {
+				ss = &sc->ss[s];
+				mtx_lock(&ss->tx.mtx);
+			}
+			mxge_close(sc, 1);
+		}
 		/* restore PCI configuration space */
 		dinfo = device_get_ivars(sc->dev);
 		pci_cfg_restore(sc->dev, dinfo);
@@ -3726,10 +3756,22 @@ mxge_watchdog_reset(mxge_softc_t *sc, in
 		/* and redo any changes we made to our config space */
 		mxge_setup_cfg_space(sc);
 
-		if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING) {
-			mxge_close(sc);
-			err = mxge_open(sc);
+		/* reload f/w */
+		err = mxge_load_firmware(sc, 0);
+		if (err) {
+			device_printf(sc->dev,
+				      "Unable to re-load f/w\n");
 		}
+		if (running) {
+			if (!err)
+				err = mxge_open(sc);
+			/* release all TX locks */
+			for (s = 0; s < num_tx_slices; s++) {
+				ss = &sc->ss[s];
+				mtx_unlock(&ss->tx.mtx);
+			}
+		}
+		sc->watchdog_resets++;
 	} else {
 		tx = &sc->ss[slice].tx;
 		device_printf(sc->dev,
@@ -3745,6 +3787,9 @@ mxge_watchdog_reset(mxge_softc_t *sc, in
 			      be32toh(sc->ss->fw_stats->send_done_count));
 		device_printf(sc->dev, "not resetting\n");
 	}
+	if (err)
+		device_printf(sc->dev, "watchdog reset failed\n");
+
 	return (err);
 }
 
@@ -3860,11 +3905,11 @@ mxge_change_mtu(mxge_softc_t *sc, int mt
 	old_mtu = ifp->if_mtu;
 	ifp->if_mtu = mtu;
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-		mxge_close(sc);
+		mxge_close(sc, 0);
 		err = mxge_open(sc);
 		if (err != 0) {
 			ifp->if_mtu = old_mtu;
-			mxge_close(sc);
+			mxge_close(sc, 0);
 			(void) mxge_open(sc);
 		}
 	}
@@ -3922,7 +3967,7 @@ mxge_ioctl(struct ifnet *ifp, u_long com
 			}
 		} else {
 			if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-				mxge_close(sc);
+				mxge_close(sc, 0);
 			}
 		}
 		mtx_unlock(&sc->driver_mtx);
@@ -4645,7 +4690,7 @@ mxge_detach(device_t dev)
 	mtx_lock(&sc->driver_mtx);
 	sc->dying = 1;
 	if (sc->ifp->if_drv_flags & IFF_DRV_RUNNING)
-		mxge_close(sc);
+		mxge_close(sc, 0);
 	mtx_unlock(&sc->driver_mtx);
 	ether_ifdetach(sc->ifp);
 	callout_drain(&sc->co_hdl);

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 10:53:06 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A9628106566B;
	Tue, 29 Sep 2009 10:53:06 +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 94D2F8FC17;
	Tue, 29 Sep 2009 10:53:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TAr6X8083218;
	Tue, 29 Sep 2009 10:53:06 GMT (envelope-from pjd@svn.freebsd.org)
Received: (from pjd@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TAr6A5083207;
	Tue, 29 Sep 2009 10:53:06 GMT (envelope-from pjd@svn.freebsd.org)
Message-Id: <200909291053.n8TAr6A5083207@svn.freebsd.org>
From: Pawel Jakub Dawidek 
Date: Tue, 29 Sep 2009 10:53:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197613 - in stable/8: cddl/contrib/opensolaris
	cddl/contrib/opensolaris/cmd/zfs sys sys/amd64/include/xen
	sys/cddl/contrib/opensolaris
	sys/cddl/contrib/opensolaris/uts/common/fs sys/cd...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 10:53:06 -0000

Author: pjd
Date: Tue Sep 29 10:53:06 2009
New Revision: 197613
URL: http://svn.freebsd.org/changeset/base/197613

Log:
  MFC r197287, r197289, r197351, r197426, r197458, r197459, r197497, r197498,
  r197512, r197513, r197514, r197515, r197525:
  
  r197287:
  
  Purge namecache for the file system being rolled back, so it doesn't point at
  invalid vnodes after the rollback resulting in EIO errors when trying to access
  files which are in the namecache.
  
  Reported by:	des
  
  r197289:
  
  Purge file system namecache when receiving incremental stream and rolling back
  to it.
  
  r197351:
  
  Purge namecache in the same place OpenSolaris does.
  
  r197426:
  
  Restore BSD behaviour - when creating new directory entry use parent directory
  gid to set group ownership and not process gid.
  
  This was overlooked during v6 -> v13 switch.
  
  PR:	kern/139076
  Reported by:	Sean Winn 
  
  r197458:
  
  Close race in zfs_zget(). We have to increase usecount first and then
  check for VI_DOOMED flag. Before this change vnode could be reclaimed
  between checking for the flag and increasing usecount.
  
  r197459:
  
  Before calling vflush(FORCECLOSE) mark file system as unmounted so the
  following vnops will fail. This is very important, because without this change
  vnode could be reclaimed at any point, even if we increased usecount. The only
  way to ensure that vnode won't be reclaimed was to lock it, which would be very
  hard to do in ZFS without changing a lot of code. With this change simply
  increasing usecount is enough to be sure vnode won't be reclaimed from under
  us. To be precise it can still be reclaimed but we won't be able to see it,
  because every try to enter ZFS through VFS will result in EIO.
  
  The only function that cannot return EIO, because it is needed for vflush() is
  zfs_root(). Introduce ZFS_ENTER_NOERROR() macro that only locks
  z_teardown_lock and never returns EIO.
  
  r197497:
  
  Switch to fletcher4 as the default checksum algorithm. Fletcher2 was proven to
  be a bit weak and OpenSolaris also switched to fletcher4.
  
  r197498:	head/cddl/contrib/opensolaris
  
  Fletcher4 is not the default checksum algorithm.
  
  r197512:
  
  - Don't depend on value returned by gfs_*_inactive(), it doesn't work
    well with forced unmounts when GFS vnodes are referenced.
  - Make other preparations to GFS for forced unmounts.
  
  PR:	kern/139062
  Reported by:	trasz
  
  r197513:
  
  Use traverse() function to find and return mount point's vnode instead of
  covered vnode when snapshot is already mounted.
  
  r197514:
  
  On lookup error VFS expects *vpp to be set to NULL, be sure to do that.
  
  r197515:
  
  Handle cases where virtual (GFS) vnodes are referenced when doing forced
  unmount. In that case we cannot depend on the proper order of invalidating
  vnodes, so we have to free resources when we have a chance.
  
  PR:	kern/139062
  Reported by:	trasz
  
  r197525:
  
  Ensure that tv_sec is between INT32_MIN and INT32_MAX, so ZFS won't object.
  This completes the fix from r185586.
  
  PR:	kern/139059
  Reported by:	Daniel Braniss 
  Submitted by:	Jaakko Heinonen 
  Tested by:	Daniel Braniss 
  
  Approved by:	re (kib)

Modified:
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/nfsserver/nfs_serv.c

Modified: stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8
==============================================================================
--- stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Tue Sep 29 10:53:06 2009	(r197613)
@@ -535,7 +535,7 @@ This property is not inherited.
 .ad
 .sp .6
 .RS 4n
-Controls the checksum used to verify data integrity. The default value is "on", which automatically selects an appropriate algorithm (currently, \fIfletcher2\fR, but this may change in future releases). The value "off" disables integrity
+Controls the checksum used to verify data integrity. The default value is "on", which automatically selects an appropriate algorithm (currently, \fIfletcher4\fR, but this may change in future releases). The value "off" disables integrity
 checking on user data. Disabling checksums is NOT a recommended practice.
 .RE
 

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -595,7 +595,6 @@ found:
 	if (vp->v_flag & V_XATTRDIR)
 		VI_LOCK(fp->gfs_parent);
 	VI_LOCK(vp);
-	ASSERT(vp->v_count < 2);
 	/*
 	 * Really remove this vnode
 	 */
@@ -607,12 +606,7 @@ found:
 		 */
 		ge->gfse_vnode = NULL;
 	}
-	if (vp->v_count == 1) {
-		vp->v_usecount--;
-		vdropl(vp);
-	} else {
-		VI_UNLOCK(vp);
-	}
+	VI_UNLOCK(vp);
 
 	/*
 	 * Free vnode and release parent
@@ -1084,18 +1078,16 @@ gfs_vop_inactive(ap)
 {
 	vnode_t *vp = ap->a_vp;
 	gfs_file_t *fp = vp->v_data;
-	void *data;
 
 	if (fp->gfs_type == GFS_DIR)
-		data = gfs_dir_inactive(vp);
+		gfs_dir_inactive(vp);
 	else
-		data = gfs_file_inactive(vp);
-
-	if (data != NULL)
-		kmem_free(data, fp->gfs_size);
+		gfs_file_inactive(vp);
 
 	VI_LOCK(vp);
 	vp->v_data = NULL;
 	VI_UNLOCK(vp);
+	kmem_free(fp, fp->gfs_size);
+
 	return (0);
 }

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -19,11 +19,111 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Fletcher Checksums
+ * ------------------
+ *
+ * ZFS's 2nd and 4th order Fletcher checksums are defined by the following
+ * recurrence relations:
+ *
+ *	a  = a    + f
+ *	 i    i-1    i-1
+ *
+ *	b  = b    + a
+ *	 i    i-1    i
+ *
+ *	c  = c    + b		(fletcher-4 only)
+ *	 i    i-1    i
+ *
+ *	d  = d    + c		(fletcher-4 only)
+ *	 i    i-1    i
+ *
+ * Where
+ *	a_0 = b_0 = c_0 = d_0 = 0
+ * and
+ *	f_0 .. f_(n-1) are the input data.
+ *
+ * Using standard techniques, these translate into the following series:
+ *
+ *	     __n_			     __n_
+ *	     \   |			     \   |
+ *	a  =  >     f			b  =  >     i * f
+ *	 n   /___|   n - i		 n   /___|	 n - i
+ *	     i = 1			     i = 1
+ *
+ *
+ *	     __n_			     __n_
+ *	     \   |  i*(i+1)		     \   |  i*(i+1)*(i+2)
+ *	c  =  >     ------- f		d  =  >     ------------- f
+ *	 n   /___|     2     n - i	 n   /___|	  6	   n - i
+ *	     i = 1			     i = 1
+ *
+ * For fletcher-2, the f_is are 64-bit, and [ab]_i are 64-bit accumulators.
+ * Since the additions are done mod (2^64), errors in the high bits may not
+ * be noticed.  For this reason, fletcher-2 is deprecated.
+ *
+ * For fletcher-4, the f_is are 32-bit, and [abcd]_i are 64-bit accumulators.
+ * A conservative estimate of how big the buffer can get before we overflow
+ * can be estimated using f_i = 0xffffffff for all i:
+ *
+ * % bc
+ *  f=2^32-1;d=0; for (i = 1; d<2^64; i++) { d += f*i*(i+1)*(i+2)/6 }; (i-1)*4
+ * 2264
+ *  quit
+ * %
+ *
+ * So blocks of up to 2k will not overflow.  Our largest block size is
+ * 128k, which has 32k 4-byte words, so we can compute the largest possible
+ * accumulators, then divide by 2^64 to figure the max amount of overflow:
+ *
+ * % bc
+ *  a=b=c=d=0; f=2^32-1; for (i=1; i<=32*1024; i++) { a+=f; b+=a; c+=b; d+=c }
+ *  a/2^64;b/2^64;c/2^64;d/2^64
+ * 0
+ * 0
+ * 1365
+ * 11186858
+ *  quit
+ * %
+ *
+ * So a and b cannot overflow.  To make sure each bit of input has some
+ * effect on the contents of c and d, we can look at what the factors of
+ * the coefficients in the equations for c_n and d_n are.  The number of 2s
+ * in the factors determines the lowest set bit in the multiplier.  Running
+ * through the cases for n*(n+1)/2 reveals that the highest power of 2 is
+ * 2^14, and for n*(n+1)*(n+2)/6 it is 2^15.  So while some data may overflow
+ * the 64-bit accumulators, every bit of every f_i effects every accumulator,
+ * even for 128k blocks.
+ *
+ * If we wanted to make a stronger version of fletcher4 (fletcher4c?),
+ * we could do our calculations mod (2^32 - 1) by adding in the carries
+ * periodically, and store the number of carries in the top 32-bits.
+ *
+ * --------------------
+ * Checksum Performance
+ * --------------------
+ *
+ * There are two interesting components to checksum performance: cached and
+ * uncached performance.  With cached data, fletcher-2 is about four times
+ * faster than fletcher-4.  With uncached data, the performance difference is
+ * negligible, since the cost of a cache fill dominates the processing time.
+ * Even though fletcher-4 is slower than fletcher-2, it is still a pretty
+ * efficient pass over the data.
+ *
+ * In normal operation, the data which is being checksummed is in a buffer
+ * which has been filled either by:
+ *
+ *	1. a compression step, which will be mostly cached, or
+ *	2. a bcopy() or copyin(), which will be uncached (because the
+ *	   copy is cache-bypassing).
+ *
+ * For both cached and uncached data, both fletcher checksums are much faster
+ * than sha-256, and slower than 'off', which doesn't touch the data at all.
+ */
 
 #include 
 #include 

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h	Tue Sep 29 10:53:06 2009	(r197613)
@@ -255,6 +255,7 @@ VTOZ(vnode_t *vp)
 
 /*
  * ZFS_ENTER() is called on entry to each ZFS vnode and vfs operation.
+ * ZFS_ENTER_NOERROR() is called when we can't return EIO.
  * ZFS_EXIT() must be called before exitting the vop.
  * ZFS_VERIFY_ZP() verifies the znode is valid.
  */
@@ -267,6 +268,9 @@ VTOZ(vnode_t *vp)
 		} \
 	}
 
+#define	ZFS_ENTER_NOERROR(zfsvfs) \
+	rrw_enter(&(zfsvfs)->z_teardown_lock, RW_READER, FTAG)
+
 #define	ZFS_EXIT(zfsvfs) rrw_exit(&(zfsvfs)->z_teardown_lock, FTAG)
 
 #define	ZFS_VERIFY_ZP(zp) \

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h	Tue Sep 29 10:53:06 2009	(r197613)
@@ -76,7 +76,7 @@ enum zio_checksum {
 	ZIO_CHECKSUM_FUNCTIONS
 };
 
-#define	ZIO_CHECKSUM_ON_VALUE	ZIO_CHECKSUM_FLETCHER_2
+#define	ZIO_CHECKSUM_ON_VALUE	ZIO_CHECKSUM_FLETCHER_4
 #define	ZIO_CHECKSUM_DEFAULT	ZIO_CHECKSUM_ON
 
 enum zio_compress {

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -1841,7 +1841,7 @@ zfs_perm_init(znode_t *zp, znode_t *pare
 				fgid = zfs_fuid_create_cred(zfsvfs,
 				    ZFS_GROUP, tx, cr, fuidp);
 #ifdef __FreeBSD__
-				gid = parent->z_phys->zp_gid;
+				gid = fgid = parent->z_phys->zp_gid;
 #else
 				gid = crgetgid(cr);
 #endif

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -818,7 +818,11 @@ zfsctl_snapdir_lookup(ap)
 	if ((sep = avl_find(&sdp->sd_snaps, &search, &where)) != NULL) {
 		*vpp = sep->se_root;
 		VN_HOLD(*vpp);
-		if ((*vpp)->v_mountedhere == NULL) {
+		err = traverse(vpp, LK_EXCLUSIVE | LK_RETRY);
+		if (err) {
+			VN_RELE(*vpp);
+			*vpp = NULL;
+		} else if (*vpp == sep->se_root) {
 			/*
 			 * The snapshot was unmounted behind our backs,
 			 * try to remount it.
@@ -832,10 +836,9 @@ zfsctl_snapdir_lookup(ap)
 			 */
 			(*vpp)->v_flag &= ~VROOT;
 		}
-		vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
 		mutex_exit(&sdp->sd_lock);
 		ZFS_EXIT(zfsvfs);
-		return (0);
+		return (err);
 	}
 
 	/*
@@ -895,6 +898,8 @@ domount:
 	}
 	mutex_exit(&sdp->sd_lock);
 	ZFS_EXIT(zfsvfs);
+	if (err != 0)
+		*vpp = NULL;
 	return (err);
 }
 
@@ -1002,15 +1007,24 @@ zfsctl_snapdir_inactive(ap)
 {
 	vnode_t *vp = ap->a_vp;
 	zfsctl_snapdir_t *sdp = vp->v_data;
-	void *private;
+	zfs_snapentry_t *sep;
 
-	private = gfs_dir_inactive(vp);
-	if (private != NULL) {
-		ASSERT(avl_numnodes(&sdp->sd_snaps) == 0);
-		mutex_destroy(&sdp->sd_lock);
-		avl_destroy(&sdp->sd_snaps);
-		kmem_free(private, sizeof (zfsctl_snapdir_t));
+	/*
+	 * On forced unmount we have to free snapshots from here.
+	 */
+	mutex_enter(&sdp->sd_lock);
+	while ((sep = avl_first(&sdp->sd_snaps)) != NULL) {
+		avl_remove(&sdp->sd_snaps, sep);
+		kmem_free(sep->se_name, strlen(sep->se_name) + 1);
+		kmem_free(sep, sizeof (zfs_snapentry_t));
 	}
+	mutex_exit(&sdp->sd_lock);
+	gfs_dir_inactive(vp);
+	ASSERT(avl_numnodes(&sdp->sd_snaps) == 0);
+	mutex_destroy(&sdp->sd_lock);
+	avl_destroy(&sdp->sd_snaps);
+	kmem_free(sdp, sizeof (zfsctl_snapdir_t));
+
 	return (0);
 }
 
@@ -1068,6 +1082,9 @@ zfsctl_snapshot_inactive(ap)
 	int locked;
 	vnode_t *dvp;
 
+	if (vp->v_count > 0)
+		goto end;
+
 	VERIFY(gfs_dir_lookup(vp, "..", &dvp, cr, 0, NULL, NULL) == 0);
 	sdp = dvp->v_data;
 	VOP_UNLOCK(dvp, 0);
@@ -1075,11 +1092,6 @@ zfsctl_snapshot_inactive(ap)
 	if (!(locked = MUTEX_HELD(&sdp->sd_lock)))
 		mutex_enter(&sdp->sd_lock);
 
-	if (vp->v_count > 1) {
-		if (!locked)
-			mutex_exit(&sdp->sd_lock);
-		return (0);
-	}
 	ASSERT(!vn_ismntpt(vp));
 
 	sep = avl_first(&sdp->sd_snaps);
@@ -1099,6 +1111,7 @@ zfsctl_snapshot_inactive(ap)
 	if (!locked)
 		mutex_exit(&sdp->sd_lock);
 	VN_RELE(dvp);
+end:
 	VFS_RELE(vp->v_vfsp);
 
 	/*

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -864,7 +864,7 @@ zfs_root(vfs_t *vfsp, int flags, vnode_t
 	znode_t *rootzp;
 	int error;
 
-	ZFS_ENTER(zfsvfs);
+	ZFS_ENTER_NOERROR(zfsvfs);
 
 	error = zfs_zget(zfsvfs, zfsvfs->z_root, &rootzp);
 	if (error == 0) {
@@ -898,6 +898,9 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolea
 		 * 'z_parent' is self referential for non-snapshots.
 		 */
 		(void) dnlc_purge_vfsp(zfsvfs->z_parent->z_vfs, 0);
+#ifdef FREEBSD_NAMECACHE
+		cache_purgevfs(zfsvfs->z_parent->z_vfs);
+#endif
 	}
 
 	/*
@@ -1027,6 +1030,17 @@ zfs_umount(vfs_t *vfsp, int fflag)
 		ASSERT(zfsvfs->z_ctldir == NULL);
 	}
 
+	if (fflag & MS_FORCE) {
+		/*
+		 * Mark file system as unmounted before calling
+		 * vflush(FORCECLOSE). This way we ensure no future vnops
+		 * will be called and risk operating on DOOMED vnodes.
+		 */
+		rrw_enter(&zfsvfs->z_teardown_lock, RW_WRITER, FTAG);
+		zfsvfs->z_unmounted = B_TRUE;
+		rrw_exit(&zfsvfs->z_teardown_lock, FTAG);
+	}
+
 	/*
 	 * Flush all the files.
 	 */
@@ -1093,8 +1107,7 @@ zfs_umount(vfs_t *vfsp, int fflag)
 	if (zfsvfs->z_issnap) {
 		vnode_t *svp = vfsp->mnt_vnodecovered;
 
-		ASSERT(svp->v_count == 2 || svp->v_count == 1);
-		if (svp->v_count == 2)
+		if (svp->v_count >= 2)
 			VN_RELE(svp);
 	}
 	zfs_freevfs(vfsp);

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -890,17 +890,25 @@ again:
 		if (zp->z_unlinked) {
 			err = ENOENT;
 		} else {
-			if ((vp = ZTOV(zp)) != NULL) {
-				VI_LOCK(vp);
+			int dying = 0;
+
+			vp = ZTOV(zp);
+			if (vp == NULL)
+				dying = 1;
+			else {
+				VN_HOLD(vp);
 				if ((vp->v_iflag & VI_DOOMED) != 0) {
-					VI_UNLOCK(vp);
-					vp = NULL;
-				} else
-					VI_UNLOCK(vp);
+					dying = 1;
+					/*
+					 * Don't VN_RELE() vnode here, because
+					 * it can call vn_lock() which creates
+					 * LOR between vnode lock and znode
+					 * lock. We will VN_RELE() the vnode
+					 * after droping znode lock.
+					 */
+				}
 			}
-			if (vp != NULL)
-				VN_HOLD(vp);
-			else {
+			if (dying) {
 				if (first) {
 					ZFS_LOG(1, "dying znode detected (zp=%p)", zp);
 					first = 0;
@@ -912,6 +920,8 @@ again:
 				dmu_buf_rele(db, NULL);
 				mutex_exit(&zp->z_lock);
 				ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
+				if (vp != NULL)
+					VN_RELE(vp);
 				tsleep(zp, 0, "zcollide", 1);
 				goto again;
 			}

Modified: stable/8/sys/nfsserver/nfs_serv.c
==============================================================================
--- stable/8/sys/nfsserver/nfs_serv.c	Tue Sep 29 10:50:02 2009	(r197612)
+++ stable/8/sys/nfsserver/nfs_serv.c	Tue Sep 29 10:53:06 2009	(r197613)
@@ -1332,7 +1332,7 @@ nfsrv_create(struct nfsrv_descript *nfsd
 			tl = nfsm_dissect_nonblock(u_int32_t *,
 			    NFSX_V3CREATEVERF);
 			/* Unique bytes, endianness is not important. */
-			cverf.tv_sec  = tl[0];
+			cverf.tv_sec  = (int32_t)tl[0];
 			cverf.tv_nsec = tl[1];
 			exclusive_flag = 1;
 			break;

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 12:18:24 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 53C101065670;
	Tue, 29 Sep 2009 12:18:24 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 40EC88FC08;
	Tue, 29 Sep 2009 12:18:24 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TCIN0u085043;
	Tue, 29 Sep 2009 12:18:23 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TCINmv085038;
	Tue, 29 Sep 2009 12:18:23 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <200909291218.n8TCINmv085038@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 29 Sep 2009 12:18:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197614 - stable/8/sys/net80211
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 12:18:24 -0000

Author: rpaulo
Date: Tue Sep 29 12:18:23 2009
New Revision: 197614
URL: http://svn.freebsd.org/changeset/base/197614

Log:
  Update 802.11s mesh support to draft 3.03. This includes a revised  frame
  format for peering and changes to the PERR frames.
  Note that this is incompatible with the previous code.
  
  Reviewed by:	sam
  Approved by:	re (kib)

Modified:
  stable/8/sys/net80211/ieee80211.h
  stable/8/sys/net80211/ieee80211_hwmp.c
  stable/8/sys/net80211/ieee80211_mesh.c
  stable/8/sys/net80211/ieee80211_mesh.h

Modified: stable/8/sys/net80211/ieee80211.h
==============================================================================
--- stable/8/sys/net80211/ieee80211.h	Tue Sep 29 10:53:06 2009	(r197613)
+++ stable/8/sys/net80211/ieee80211.h	Tue Sep 29 12:18:23 2009	(r197614)
@@ -708,7 +708,7 @@ enum {
 	IEEE80211_ELEMID_VENDOR		= 221,	/* vendor private */
 
 	/*
-	 * 802.11s IEs based on D3.0 spec and were not assigned by
+	 * 802.11s IEs based on D3.03 spec and were not assigned by
 	 * ANA. Beware changing them because some of them are being
 	 * kept compatible with Linux.
 	 */
@@ -726,10 +726,9 @@ enum {
 	IEEE80211_ELEMID_MESHPREQ	= 68,
 	IEEE80211_ELEMID_MESHPREP	= 69,
 	IEEE80211_ELEMID_MESHPERR	= 70,
-	IEEE80211_ELEMID_MESHPU		= 53,
-	IEEE80211_ELEMID_MESHPUC	= 54,
+	IEEE80211_ELEMID_MESHPXU	= 53,
+	IEEE80211_ELEMID_MESHPXUC	= 54,
 	IEEE80211_ELEMID_MESHAH		= 60, /* Abbreviated Handshake */
-	IEEE80211_ELEMID_MESHPEERVER	= 80, /* Peering Protocol Version */
 };
 
 struct ieee80211_tim_ie {
@@ -925,6 +924,9 @@ enum {
 	IEEE80211_REASON_MESH_INVALID_GTK	= 8,	/* 11s */
 	IEEE80211_REASON_MESH_INCONS_PARAMS	= 9,	/* 11s */
 	IEEE80211_REASON_MESH_INVALID_SECURITY	= 10,	/* 11s */
+	IEEE80211_REASON_MESH_PERR_UNSPEC	= 11,	/* 11s */
+	IEEE80211_REASON_MESH_PERR_NO_FI	= 12,	/* 11s */
+	IEEE80211_REASON_MESH_PERR_DEST_UNREACH	= 13,	/* 11s */
 
 	IEEE80211_STATUS_SUCCESS		= 0,
 	IEEE80211_STATUS_UNSPECIFIED		= 1,

Modified: stable/8/sys/net80211/ieee80211_hwmp.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_hwmp.c	Tue Sep 29 10:53:06 2009	(r197613)
+++ stable/8/sys/net80211/ieee80211_hwmp.c	Tue Sep 29 12:18:23 2009	(r197614)
@@ -188,10 +188,7 @@ SYSCTL_PROC(_net_wlan_hwmp, OID_AUTO, ra
 
 #define	IEEE80211_HWMP_DEFAULT_MAXHOPS	31
 
-static	ieee80211_recv_action_func hwmp_recv_action_meshpath_preq;
-static	ieee80211_recv_action_func hwmp_recv_action_meshpath_prep;
-static	ieee80211_recv_action_func hwmp_recv_action_meshpath_perr;
-static	ieee80211_recv_action_func hwmp_recv_action_meshpath_rann;
+static	ieee80211_recv_action_func hwmp_recv_action_meshpath;
 
 static struct ieee80211_mesh_proto_path mesh_proto_hwmp = {
 	.mpp_descr	= "HWMP",
@@ -217,16 +214,10 @@ ieee80211_hwmp_init(void)
 	ieee80211_hwmp_rannint = msecs_to_ticks(1*1000);
 
 	/*
-	 * Register action frame handlers.
+	 * Register action frame handler.
 	 */
 	ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH,
-	    IEEE80211_ACTION_MESHPATH_REQ, hwmp_recv_action_meshpath_preq);
-	ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH,
-	    IEEE80211_ACTION_MESHPATH_REP, hwmp_recv_action_meshpath_prep);
-	ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH,
-	    IEEE80211_ACTION_MESHPATH_ERR, hwmp_recv_action_meshpath_perr);
-	ieee80211_recv_action_register(IEEE80211_ACTION_CAT_MESHPATH,
-	    IEEE80211_ACTION_MESHPATH_RANN, hwmp_recv_action_meshpath_rann);
+	    IEEE80211_ACTION_MESHPATH_SEL, hwmp_recv_action_meshpath);
 
 	/* NB: default is 5 secs per spec */
 	mesh_proto_hwmp.mpp_inact = msecs_to_ticks(5*1000);
@@ -285,17 +276,23 @@ hwmp_newstate(struct ieee80211vap *vap, 
 }
 
 static int
-hwmp_recv_action_meshpath_preq(struct ieee80211_node *ni,
+hwmp_recv_action_meshpath(struct ieee80211_node *ni,
 	const struct ieee80211_frame *wh,
 	const uint8_t *frm, const uint8_t *efrm)
 {
 	struct ieee80211vap *vap = ni->ni_vap;
 	struct ieee80211_meshpreq_ie preq;
+	struct ieee80211_meshprep_ie prep;
+	struct ieee80211_meshperr_ie perr;
+	struct ieee80211_meshrann_ie rann;
 	const uint8_t *iefrm = frm + 2; /* action + code */
+	int found = 0;
 
 	while (efrm - iefrm > 1) {
 		IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0);
-		if (*iefrm == IEEE80211_ELEMID_MESHPREQ) {
+		switch (*iefrm) {
+		case IEEE80211_ELEMID_MESHPREQ:
+		{
 			const struct ieee80211_meshpreq_ie *mpreq =
 			    (const struct ieee80211_meshpreq_ie *) iefrm;
 			/* XXX > 1 target */
@@ -305,7 +302,7 @@ hwmp_recv_action_meshpath_preq(struct ie
 				    IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
 				    wh, NULL, "%s", "PREQ with wrong len");
 				vap->iv_stats.is_rx_mgtdiscard++;
-				return 1;
+				break;
 			}
 			memcpy(&preq, mpreq, sizeof(preq));
 			preq.preq_id = LE_READ_4(&mpreq->preq_id);
@@ -315,28 +312,11 @@ hwmp_recv_action_meshpath_preq(struct ie
 			preq.preq_targets[0].target_seq =
 			    LE_READ_4(&mpreq->preq_targets[0].target_seq);
 			hwmp_recv_preq(vap, ni, wh, &preq);
-			return 0;
+			found++;
+			break;	
 		}
-		iefrm += iefrm[1] + 2;
-	}
-	IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
-	    wh, NULL, "%s", "PREQ without IE");
-	vap->iv_stats.is_rx_mgtdiscard++;
-	return 0;
-}
-
-static int
-hwmp_recv_action_meshpath_prep(struct ieee80211_node *ni,
-	const struct ieee80211_frame *wh,
-	const uint8_t *frm, const uint8_t *efrm)
-{
-	struct ieee80211vap *vap = ni->ni_vap;
-	struct ieee80211_meshprep_ie prep;
-	const uint8_t *iefrm = frm + 2; /* action + code */
-
-	while (efrm - iefrm > 1) {
-		IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0);
-		if (*iefrm == IEEE80211_ELEMID_MESHPREP) {
+		case IEEE80211_ELEMID_MESHPREP:
+		{
 			const struct ieee80211_meshprep_ie *mprep =
 			    (const struct ieee80211_meshprep_ie *) iefrm;
 			if (mprep->prep_len !=
@@ -345,7 +325,7 @@ hwmp_recv_action_meshpath_prep(struct ie
 				    IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
 				    wh, NULL, "%s", "PREP with wrong len");
 				vap->iv_stats.is_rx_mgtdiscard++;
-				return 1;
+				break;
 			}
 			memcpy(&prep, mprep, sizeof(prep));
 			prep.prep_targetseq = LE_READ_4(&mprep->prep_targetseq);
@@ -353,28 +333,11 @@ hwmp_recv_action_meshpath_prep(struct ie
 			prep.prep_metric = LE_READ_4(&mprep->prep_metric);
 			prep.prep_origseq = LE_READ_4(&mprep->prep_origseq);
 			hwmp_recv_prep(vap, ni, wh, &prep);
-			return 0;
+			found++;
+			break;
 		}
-		iefrm += iefrm[1] + 2;
-	}
-	IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
-	    wh, NULL, "%s", "PREP without IE");
-	vap->iv_stats.is_rx_mgtdiscard++;
-	return 0;
-}
-
-static int
-hwmp_recv_action_meshpath_perr(struct ieee80211_node *ni,
-	const struct ieee80211_frame *wh,
-	const uint8_t *frm, const uint8_t *efrm)
-{
-	struct ieee80211_meshperr_ie perr;
-	struct ieee80211vap *vap = ni->ni_vap;
-	const uint8_t *iefrm = frm + 2; /* action + code */
-
-	while (efrm - iefrm > 1) {
-		IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0);
-		if (*iefrm == IEEE80211_ELEMID_MESHPERR) {
+		case IEEE80211_ELEMID_MESHPERR:
+		{
 			const struct ieee80211_meshperr_ie *mperr =
 			    (const struct ieee80211_meshperr_ie *) iefrm;
 			/* XXX > 1 target */
@@ -384,34 +347,17 @@ hwmp_recv_action_meshpath_perr(struct ie
 				    IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
 				    wh, NULL, "%s", "PERR with wrong len");
 				vap->iv_stats.is_rx_mgtdiscard++;
-				return 1;
+				break;
 			}
 			memcpy(&perr, mperr, sizeof(perr));
 			perr.perr_dests[0].dest_seq =
 			    LE_READ_4(&mperr->perr_dests[0].dest_seq);
 			hwmp_recv_perr(vap, ni, wh, &perr);
-			return 0;
+			found++;
+			break;
 		}
-		iefrm += iefrm[1] + 2;
-	}
-	IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
-	    wh, NULL, "%s", "PERR without IE");
-	vap->iv_stats.is_rx_mgtdiscard++;
-	return 0;
-}
-
-static int
-hwmp_recv_action_meshpath_rann(struct ieee80211_node *ni,
-	const struct ieee80211_frame *wh,
-	const uint8_t *frm, const uint8_t *efrm)
-{
-	struct ieee80211vap *vap = ni->ni_vap;
-	struct ieee80211_meshrann_ie rann;
-	const uint8_t *iefrm = frm + 2; /* action + code */
-
-	while (efrm - iefrm > 1) {
-		IEEE80211_VERIFY_LENGTH(efrm - iefrm, iefrm[1] + 2, return 0);
-		if (*iefrm == IEEE80211_ELEMID_MESHRANN) {
+		case IEEE80211_ELEMID_MESHRANN:
+		{
 			const struct ieee80211_meshrann_ie *mrann =
 			    (const struct ieee80211_meshrann_ie *) iefrm;
 			if (mrann->rann_len !=
@@ -426,13 +372,18 @@ hwmp_recv_action_meshpath_rann(struct ie
 			rann.rann_seq = LE_READ_4(&mrann->rann_seq);
 			rann.rann_metric = LE_READ_4(&mrann->rann_metric);
 			hwmp_recv_rann(vap, ni, wh, &rann);
-			return 0;
+			found++;
+			break;
+		}
 		}
 		iefrm += iefrm[1] + 2;
 	}
-	IEEE80211_DISCARD(vap, IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
-	    wh, NULL, "%s", "RANN without IE");
-	vap->iv_stats.is_rx_mgtdiscard++;
+	if (!found) {
+		IEEE80211_DISCARD(vap,
+		    IEEE80211_MSG_ACTION | IEEE80211_MSG_HWMP,
+		    wh, NULL, "%s", "PATH SEL action without IE");
+		vap->iv_stats.is_rx_mgtdiscard++;
+	}
 	return 0;
 }
 
@@ -480,24 +431,21 @@ hwmp_send_action(struct ieee80211_node *
 		return ENOMEM;
 	}
 	*frm++ = IEEE80211_ACTION_CAT_MESHPATH;
+	*frm++ = IEEE80211_ACTION_MESHPATH_SEL;
 	switch (*ie) {
 	case IEEE80211_ELEMID_MESHPREQ:
-		*frm++ = IEEE80211_ACTION_MESHPATH_REQ;
 		frm = hwmp_add_meshpreq(frm,
 		    (struct ieee80211_meshpreq_ie *)ie);
 		break;
 	case IEEE80211_ELEMID_MESHPREP:
-		*frm++ = IEEE80211_ACTION_MESHPATH_REP;
 		frm = hwmp_add_meshprep(frm,
 		    (struct ieee80211_meshprep_ie *)ie);
 		break;
 	case IEEE80211_ELEMID_MESHPERR:
-		*frm++ = IEEE80211_ACTION_MESHPATH_ERR;
 		frm = hwmp_add_meshperr(frm,
 		    (struct ieee80211_meshperr_ie *)ie);
 		break;
 	case IEEE80211_ELEMID_MESHRANN:
-		*frm++ = IEEE80211_ACTION_MESHPATH_RANN;
 		frm = hwmp_add_meshrann(frm,
 		    (struct ieee80211_meshrann_ie *)ie);
 		break;
@@ -528,6 +476,11 @@ hwmp_send_action(struct ieee80211_node *
 	return ic->ic_raw_xmit(ni, m, ¶ms);
 }
 
+#define ADDSHORT(frm, v) do {		\
+	frm[0] = (v) & 0xff;		\
+	frm[1] = (v) >> 8;		\
+	frm += 2;			\
+} while (0)
 #define ADDWORD(frm, v) do {		\
 	LE_WRITE_4(frm, v);		\
 	frm += 4;			\
@@ -592,12 +545,14 @@ hwmp_add_meshperr(uint8_t *frm, const st
 	*frm++ = IEEE80211_ELEMID_MESHPERR;
 	*frm++ = sizeof(struct ieee80211_meshperr_ie) - 2 +
 	    (perr->perr_ndests - 1) * sizeof(*perr->perr_dests);
-	*frm++ = perr->perr_mode;
+	*frm++ = perr->perr_ttl;
 	*frm++ = perr->perr_ndests;
 	for (i = 0; i < perr->perr_ndests; i++) {
+		*frm += perr->perr_dests[i].dest_flags;
 		IEEE80211_ADDR_COPY(frm, perr->perr_dests[i].dest_addr);
 		frm += 6;
 		ADDWORD(frm, perr->perr_dests[i].dest_seq);
+		ADDSHORT(frm, perr->perr_dests[i].dest_rcode);
 	}
 	return frm;
 }
@@ -1138,12 +1093,15 @@ hwmp_send_prep(struct ieee80211_node *ni
 	    sizeof(struct ieee80211_meshprep_ie));
 }
 
+#define	PERR_DFLAGS(n)	perr.perr_dests[n].dest_flags
 #define	PERR_DADDR(n)	perr.perr_dests[n].dest_addr
 #define	PERR_DSEQ(n)	perr.perr_dests[n].dest_seq
+#define	PERR_DRCODE(n)	perr.perr_dests[n].dest_rcode
 static void
 hwmp_peerdown(struct ieee80211_node *ni)
 {
 	struct ieee80211vap *vap = ni->ni_vap;
+	struct ieee80211_mesh_state *ms = vap->iv_mesh;
 	struct ieee80211_meshperr_ie perr;
 	struct ieee80211_mesh_route *rt;
 	struct ieee80211_hwmp_route *hr;
@@ -1154,19 +1112,27 @@ hwmp_peerdown(struct ieee80211_node *ni)
 	hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
 	IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
 	    "%s", "delete route entry");
-	perr.perr_mode = 0;
+	perr.perr_ttl = ms->ms_ttl;
 	perr.perr_ndests = 1;
+	if (hr->hr_seq == 0)
+		PERR_DFLAGS(0) |= IEEE80211_MESHPERR_DFLAGS_USN;
+	PERR_DFLAGS(0) |= IEEE80211_MESHPERR_DFLAGS_RC;
 	IEEE80211_ADDR_COPY(PERR_DADDR(0), rt->rt_dest);
 	PERR_DSEQ(0) = hr->hr_seq;
+	PERR_DRCODE(0) = IEEE80211_REASON_MESH_PERR_DEST_UNREACH;
 	/* NB: flush everything passing through peer */
 	ieee80211_mesh_rt_flush_peer(vap, ni->ni_macaddr);
 	hwmp_send_perr(vap->iv_bss, vap->iv_myaddr, broadcastaddr, &perr);
 }
+#undef	PERR_DFLAGS
 #undef	PERR_DADDR
 #undef	PERR_DSEQ
+#undef	PERR_DRCODE
 
+#define	PERR_DFLAGS(n)	perr->perr_dests[n].dest_flags
 #define	PERR_DADDR(n)	perr->perr_dests[n].dest_addr
 #define	PERR_DSEQ(n)	perr->perr_dests[n].dest_seq
+#define	PERR_DRCODE(n)	perr->perr_dests[n].dest_rcode
 static void
 hwmp_recv_perr(struct ieee80211vap *vap, struct ieee80211_node *ni,
     const struct ieee80211_frame *wh, const struct ieee80211_meshperr_ie *perr)
@@ -1192,9 +1158,9 @@ hwmp_recv_perr(struct ieee80211vap *vap,
 		rt = ieee80211_mesh_rt_find(vap, PERR_DADDR(i));
 		if (rt == NULL)
 			continue;
-		hr = IEEE80211_MESH_ROUTE_PRIV(rt,
-		    struct ieee80211_hwmp_route);
-		if (HWMP_SEQ_GEQ(PERR_DSEQ(i), hr->hr_seq)) {
+		hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
+		if (!(PERR_DFLAGS(0) & IEEE80211_MESHPERR_DFLAGS_USN) && 
+		    HWMP_SEQ_GEQ(PERR_DSEQ(i), hr->hr_seq)) {
 			ieee80211_mesh_rt_del(vap, rt->rt_dest);
 			ieee80211_mesh_rt_flush_peer(vap, rt->rt_dest);
 			rt = NULL;
@@ -1205,10 +1171,11 @@ hwmp_recv_perr(struct ieee80211vap *vap,
 	 * Propagate the PERR if we previously found it on our routing table.
 	 * XXX handle ndest > 1
 	 */
-	if (forward) {
+	if (forward && perr->perr_ttl > 1) {
 		IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
 		    "propagate PERR from %s", ether_sprintf(wh->i_addr2));
 		memcpy(&pperr, perr, sizeof(*perr));
+		pperr.perr_ttl--;
 		hwmp_send_perr(vap->iv_bss, vap->iv_myaddr, broadcastaddr,
 		    &pperr);
 	}

Modified: stable/8/sys/net80211/ieee80211_mesh.c
==============================================================================
--- stable/8/sys/net80211/ieee80211_mesh.c	Tue Sep 29 10:53:06 2009	(r197613)
+++ stable/8/sys/net80211/ieee80211_mesh.c	Tue Sep 29 12:18:23 2009	(r197614)
@@ -87,10 +87,10 @@ static void	mesh_peer_timeout_backoff(st
 static void	mesh_peer_timeout_cb(void *);
 static __inline void
 		mesh_peer_timeout_stop(struct ieee80211_node *);
-static int	mesh_verify_meshpeerver(struct ieee80211vap *, const uint8_t *);
 static int	mesh_verify_meshid(struct ieee80211vap *, const uint8_t *);
 static int	mesh_verify_meshconf(struct ieee80211vap *, const uint8_t *);
-static int	mesh_verify_meshpeer(struct ieee80211vap *, const uint8_t *);
+static int	mesh_verify_meshpeer(struct ieee80211vap *, uint8_t,
+    		    const uint8_t *);
 uint32_t	mesh_airtime_calc(struct ieee80211_node *);
 
 /*
@@ -1544,19 +1544,16 @@ static const struct ieee80211_meshpeer_i
 mesh_parse_meshpeering_action(struct ieee80211_node *ni,
 	const struct ieee80211_frame *wh,	/* XXX for VERIFY_LENGTH */
 	const uint8_t *frm, const uint8_t *efrm,
-	struct ieee80211_meshpeer_ie *mp)
+	struct ieee80211_meshpeer_ie *mp, uint8_t subtype)
 {
 	struct ieee80211vap *vap = ni->ni_vap;
 	const struct ieee80211_meshpeer_ie *mpie;
-	const uint8_t *meshid, *meshconf, *meshpeerver, *meshpeer;
+	const uint8_t *meshid, *meshconf, *meshpeer;
 
-	meshid = meshconf = meshpeerver = meshpeer = NULL;
+	meshid = meshconf = meshpeer = NULL;
 	while (efrm - frm > 1) {
 		IEEE80211_VERIFY_LENGTH(efrm - frm, frm[1] + 2, return NULL);
 		switch (*frm) {
-		case IEEE80211_ELEMID_MESHPEERVER:
-			meshpeerver = frm;
-			break;
 		case IEEE80211_ELEMID_MESHID:
 			meshid = frm;
 			break;
@@ -1567,12 +1564,10 @@ mesh_parse_meshpeering_action(struct iee
 			meshpeer = frm;
 			mpie = (const struct ieee80211_meshpeer_ie *) frm;
 			memset(mp, 0, sizeof(*mp));
-			mp->peer_subtype = mpie->peer_subtype;
 			mp->peer_llinkid = LE_READ_2(&mpie->peer_llinkid);
 			/* NB: peer link ID is optional on these frames */
-			if (mpie->peer_subtype ==
-			    IEEE80211_MESH_PEER_LINK_CLOSE &&
-			    mpie->peer_len == 5) {
+			if (subtype == IEEE80211_MESH_PEER_LINK_CLOSE &&
+			    mpie->peer_len == 8) {
 				mp->peer_linkid = 0;
 				mp->peer_rcode = LE_READ_2(&mpie->peer_linkid);
 			} else {
@@ -1589,12 +1584,12 @@ mesh_parse_meshpeering_action(struct iee
 	 * close subtype don't have a Mesh Configuration IE.
 	 * If if fails validation, close the peer link.
 	 */
-	KASSERT(meshpeer != NULL && mp->peer_subtype !=
-	    IEEE80211_ACTION_MESHPEERING_CLOSE, ("parsing close action"));
+	KASSERT(meshpeer != NULL &&
+	    subtype != IEEE80211_ACTION_MESHPEERING_CLOSE,
+	    ("parsing close action"));
 
-	if (mesh_verify_meshpeerver(vap, meshpeerver) ||
-	    mesh_verify_meshid(vap, meshid) ||
-	    mesh_verify_meshpeer(vap, meshpeer) ||
+	if (mesh_verify_meshid(vap, meshid) ||
+	    mesh_verify_meshpeer(vap, subtype, meshpeer) ||
 	    mesh_verify_meshconf(vap, meshconf)) {
 		uint16_t args[3];
 
@@ -1638,7 +1633,8 @@ mesh_recv_action_meshpeering_open(struct
 	uint16_t args[3];
 
 	/* +2+2 for action + code + capabilites */
-	meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2, efrm, &ie);
+	meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2, efrm, &ie,
+	    IEEE80211_ACTION_MESHPEERING_OPEN);
 	if (meshpeer == NULL) {
 		return 0;
 	}
@@ -1770,7 +1766,8 @@ mesh_recv_action_meshpeering_confirm(str
 	uint16_t args[3];
 
 	/* +2+2+2+2 for action + code + capabilites + status code + AID */
-	meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2+2+2, efrm, &ie);
+	meshpeer = mesh_parse_meshpeering_action(ni, wh, frm+2+2+2+2, efrm, &ie,
+	    IEEE80211_ACTION_MESHPEERING_CONFIRM);
 	if (meshpeer == NULL) {
 		return 0;
 	}
@@ -1933,7 +1930,6 @@ mesh_send_action_meshpeering_open(struct
 	    ic->ic_headroom + sizeof(struct ieee80211_frame),
 	    sizeof(uint16_t)	/* action+category */
 	    + sizeof(uint16_t)	/* capabilites */
-	    + sizeof(struct ieee80211_meshpeerver_ie)	 
 	    + 2 + IEEE80211_RATE_SIZE	 
 	    + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)	 
 	    + 2 + IEEE80211_MESHID_LEN
@@ -1946,7 +1942,6 @@ mesh_send_action_meshpeering_open(struct
 		 *   [1] category
 		 *   [1] action
 		 *   [2] capabilities
-		 *   [tlv] mesh peer protocol version
 		 *   [tlv] rates
 		 *   [tlv] xrates
 		 *   [tlv] mesh id
@@ -1956,7 +1951,6 @@ mesh_send_action_meshpeering_open(struct
 		*frm++ = category;
 		*frm++ = action;
 		ADDSHORT(frm, ieee80211_getcapinfo(vap, ni->ni_chan));
-		frm = ieee80211_add_meshpeerver(frm, vap);
 		rs = ieee80211_get_suprates(ic, ic->ic_curchan);
 		frm = ieee80211_add_rates(frm, rs);
 		frm = ieee80211_add_xrates(frm, rs);
@@ -1999,7 +1993,6 @@ mesh_send_action_meshpeering_confirm(str
 	    + sizeof(uint16_t)	/* capabilites */
 	    + sizeof(uint16_t)	/* status code */
 	    + sizeof(uint16_t)	/* AID */
-	    + sizeof(struct ieee80211_meshpeerver_ie)	 
 	    + 2 + IEEE80211_RATE_SIZE	 
 	    + 2 + (IEEE80211_RATE_MAXSIZE - IEEE80211_RATE_SIZE)	 
 	    + 2 + IEEE80211_MESHID_LEN
@@ -2014,7 +2007,6 @@ mesh_send_action_meshpeering_confirm(str
 		 *   [2] capabilities
 		 *   [2] status code
 		 *   [2] association id (peer ID)
-		 *   [tlv] mesh peer protocol version
 		 *   [tlv] rates
 		 *   [tlv] xrates
 		 *   [tlv] mesh id
@@ -2026,7 +2018,6 @@ mesh_send_action_meshpeering_confirm(str
 		ADDSHORT(frm, ieee80211_getcapinfo(vap, ni->ni_chan));
 		ADDSHORT(frm, 0);		/* status code */
 		ADDSHORT(frm, args[1]);		/* AID */
-		frm = ieee80211_add_meshpeerver(frm, vap);
 		rs = ieee80211_get_suprates(ic, ic->ic_curchan);
 		frm = ieee80211_add_rates(frm, rs);
 		frm = ieee80211_add_xrates(frm, rs);
@@ -2067,7 +2058,6 @@ mesh_send_action_meshpeering_close(struc
 	    ic->ic_headroom + sizeof(struct ieee80211_frame),
 	    sizeof(uint16_t)	/* action+category */
 	    + sizeof(uint16_t)	/* reason code */
-	    + sizeof(struct ieee80211_meshpeerver_ie)
 	    + 2 + IEEE80211_MESHID_LEN
 	    + sizeof(struct ieee80211_meshpeer_ie) 
 	);
@@ -2077,14 +2067,12 @@ mesh_send_action_meshpeering_close(struc
 		 *   [1] category
 		 *   [1] action
 		 *   [2] reason code
-		 *   [tlv] mesh peer protocol version
 		 *   [tlv] mesh id
 		 *   [tlv] mesh peer link mgmt
 		 */
 		*frm++ = category;
 		*frm++ = action;
 		ADDSHORT(frm, args[2]);		/* reason code */
-		frm = ieee80211_add_meshpeerver(frm, vap);
 		frm = ieee80211_add_meshid(frm, vap);
 		frm = ieee80211_add_meshpeer(frm,
 		    IEEE80211_MESH_PEER_LINK_CLOSE,
@@ -2279,19 +2267,6 @@ mesh_peer_timeout_cb(void *arg)
 }
 
 static int
-mesh_verify_meshpeerver(struct ieee80211vap *vap, const uint8_t *ie)
-{
-	static const uint8_t peer[4] = IEEE80211_MESHPEERVER_PEER;
-	const struct ieee80211_meshpeerver_ie *meshpeerver =
-	    (const struct ieee80211_meshpeerver_ie *) ie;
-
-	if (meshpeerver->peerver_len !=
-	    sizeof(struct ieee80211_meshpeerver_ie) - 2)
-		return 1;
-	return memcmp(meshpeerver->peerver_proto, peer, 4);
-}
-
-static int
 mesh_verify_meshid(struct ieee80211vap *vap, const uint8_t *ie)
 {
 	struct ieee80211_mesh_state *ms = vap->iv_mesh;
@@ -2364,26 +2339,28 @@ mesh_verify_meshconf(struct ieee80211vap
 }
 
 static int
-mesh_verify_meshpeer(struct ieee80211vap *vap, const uint8_t *ie)
+mesh_verify_meshpeer(struct ieee80211vap *vap, uint8_t subtype,
+    const uint8_t *ie)
 {
 	const struct ieee80211_meshpeer_ie *meshpeer =
 	    (const struct ieee80211_meshpeer_ie *) ie;
 
-	if (meshpeer == NULL)
+	if (meshpeer == NULL || meshpeer->peer_len < 6 ||
+	    meshpeer->peer_len > 10)
 		return 1;
-	switch (meshpeer->peer_subtype) {
+	switch (subtype) {
 	case IEEE80211_MESH_PEER_LINK_OPEN:
-		if (meshpeer->peer_len != 3)
+		if (meshpeer->peer_len != 6)
 			return 1;
 		break;
 	case IEEE80211_MESH_PEER_LINK_CONFIRM:
-		if (meshpeer->peer_len != 5)
+		if (meshpeer->peer_len != 8)
 			return 1;
 		break;
 	case IEEE80211_MESH_PEER_LINK_CLOSE:
-		if (meshpeer->peer_len < 5)
+		if (meshpeer->peer_len < 8)
 			return 1;
-		if (meshpeer->peer_len == 5 && meshpeer->peer_linkid != 0)
+		if (meshpeer->peer_len == 8 && meshpeer->peer_linkid != 0)
 			return 1;
 		if (meshpeer->peer_rcode == 0)
 			return 1;
@@ -2449,53 +2426,40 @@ ieee80211_add_meshconf(uint8_t *frm, str
 }
 
 /*
- * Add a Mesh Peer Protocol IE to a frame.
- * XXX: needs to grow support for Abbreviated Handshake
- */
-uint8_t *
-ieee80211_add_meshpeerver(uint8_t *frm, struct ieee80211vap *vap)
-{
-	static struct ieee80211_meshpeerver_ie ie = {
-		.peerver_ie 	= IEEE80211_ELEMID_MESHPEERVER,
-		.peerver_len 	= 4,
-		.peerver_proto	= IEEE80211_MESHPEERVER_PEER,
-	};
-
-	KASSERT(vap->iv_opmode == IEEE80211_M_MBSS, ("not a MBSS vap"));
-
-	memcpy(frm, &ie, sizeof(ie));
-	return frm + sizeof(ie);
-}
-
-/*
  * Add a Mesh Peer Management IE to a frame.
  */
 uint8_t *
 ieee80211_add_meshpeer(uint8_t *frm, uint8_t subtype, uint16_t localid,
     uint16_t peerid, uint16_t reason)
 {
+	/* XXX change for AH */
+	static const uint8_t meshpeerproto[4] = IEEE80211_MESH_PEER_PROTO;
+
 	KASSERT(localid != 0, ("localid == 0"));
 
 	*frm++ = IEEE80211_ELEMID_MESHPEER;
 	switch (subtype) {
 	case IEEE80211_MESH_PEER_LINK_OPEN:
-		*frm++ = 3;		/* length */
-		*frm++ = subtype;
+		*frm++ = 6;		/* length */
+		memcpy(frm, meshpeerproto, 4);
+		frm += 4;
 		ADDSHORT(frm, localid);	/* local ID */
 		break;
 	case IEEE80211_MESH_PEER_LINK_CONFIRM:
 		KASSERT(peerid != 0, ("sending peer confirm without peer id"));
-		*frm++ = 5;		/* length */
-		*frm++ = subtype;
+		*frm++ = 8;		/* length */
+		memcpy(frm, meshpeerproto, 4);
+		frm += 4;
 		ADDSHORT(frm, localid);	/* local ID */
 		ADDSHORT(frm, peerid);	/* peer ID */
 		break;
 	case IEEE80211_MESH_PEER_LINK_CLOSE:
 		if (peerid)
-			*frm++ = 7;	/* length */
+			*frm++ = 10;	/* length */
 		else
-			*frm++ = 5;	/* length */
-		*frm++ = subtype;
+			*frm++ = 8;	/* length */
+		memcpy(frm, meshpeerproto, 4);
+		frm += 4;
 		ADDSHORT(frm, localid);	/* local ID */
 		if (peerid)
 			ADDSHORT(frm, peerid);	/* peer ID */

Modified: stable/8/sys/net80211/ieee80211_mesh.h
==============================================================================
--- stable/8/sys/net80211/ieee80211_mesh.h	Tue Sep 29 10:53:06 2009	(r197613)
+++ stable/8/sys/net80211/ieee80211_mesh.h	Tue Sep 29 12:18:23 2009	(r197614)
@@ -34,7 +34,7 @@
 #define	IEEE80211_MESH_DEFAULT_TTL	31
 
 /*
- * NB: all structures are__packed  so sizeof works on arm, et. al.
+ * NB: all structures are __packed  so sizeof works on arm, et. al.
  */
 /*
  * 802.11s Information Elements.
@@ -116,28 +116,11 @@ struct ieee80211_meshcngst_ie {
 					   AC_BE, AC_VI, AC_VO */
 } __packed;
 
-/* Peer Version */
-struct ieee80211_meshpeerver_ie {
-	uint8_t		peerver_ie;	/* IEEE80211_ELEMID_MESHPEERVER */
-	uint8_t		peerver_len;
-	uint8_t		peerver_proto[4];
-} __packed;
-/* Mesh Peering Management Protocol */
-#define	IEEE80211_MESHPEERVER_PEER_OUI		0x00, 0x0f, 0xac
-#define	IEEE80211_MESHPEERVER_PEER_VALUE	0x2a
-#define	IEEE80211_MESHPEERVER_PEER	{ IEEE80211_MESHPEERVER_PEER_OUI, \
-					  IEEE80211_MESHPEERVER_PEER_VALUE }
-/* Abbreviated Handshake Protocol */
-#define	IEEE80211_MESHPEERVER_AH_OUI		0x00, 0x0f, 0xac
-#define	IEEE80211_MESHPEERVER_AH_VALUE		0x2b
-#define	IEEE80211_MESHPEERVER_AH	{ IEEE80211_MESHPEERVER_AH_OUI, \
-					  IEEE80211_MESHPEERVER_AH_VALUE }
-
 /* Peer Link Management */
 struct ieee80211_meshpeer_ie {
 	uint8_t		peer_ie;	/* IEEE80211_ELEMID_MESHPEER */
 	uint8_t		peer_len;
-	uint8_t		peer_subtype;
+	uint8_t		peer_proto[4];	/* Peer Management Protocol */
 	uint16_t	peer_llinkid;	/* Local Link ID */
 	uint16_t	peer_linkid;	/* Peer Link ID */
 	uint16_t	peer_rcode;
@@ -150,6 +133,16 @@ enum {
 	/* values 3-255 are reserved */
 };
 
+/* Mesh Peering Management Protocol */
+#define	IEEE80211_MESH_PEER_PROTO_OUI		0x00, 0x0f, 0xac
+#define	IEEE80211_MESH_PEER_PROTO_VALUE		0x2a
+#define	IEEE80211_MESH_PEER_PROTO	{ IEEE80211_MESH_PEER_PROTO_OUI, \
+					  IEEE80211_MESH_PEER_PROTO_VALUE }
+/* Abbreviated Handshake Protocol */
+#define	IEEE80211_MESH_PEER_PROTO_AH_OUI	0x00, 0x0f, 0xac
+#define	IEEE80211_MESH_PEER_PROTO_AH_VALUE	0x2b
+#define	IEEE80211_MESH_PEER_PROTO_AH	{ IEEE80211_MESH_PEER_PROTO_AH_OUI, \
+					  IEEE80211_MESH_PEER_PROTO_AH_VALUE }
 #ifdef notyet
 /* Mesh Channel Switch Annoucement */
 struct ieee80211_meshcsa_ie {
@@ -256,11 +249,15 @@ struct ieee80211_meshprep_ie {
 struct ieee80211_meshperr_ie {
 	uint8_t		perr_ie;	/* IEEE80211_ELEMID_MESHPERR */
 	uint8_t		perr_len;
-	uint8_t		perr_mode;	/* NB: reserved */
+	uint8_t		perr_ttl;
 	uint8_t		perr_ndests;	/* Number of Destinations */
 	struct {
+		uint8_t		dest_flags;
+#define	IEEE80211_MESHPERR_DFLAGS_USN	0x01
+#define	IEEE80211_MESHPERR_DFLAGS_RC	0x02
 		uint8_t		dest_addr[IEEE80211_ADDR_LEN];
 		uint32_t	dest_seq;	/* HWMP Sequence Number */
+		uint16_t	dest_rcode;
 	} __packed perr_dests[1];		/* NB: variable size */
 } __packed;
 
@@ -310,14 +307,11 @@ enum {
 };
 
 /*
- * Mesh Path Selection Action codes.
+ * Mesh Path Selection Action code.
  */
 enum {
-	IEEE80211_ACTION_MESHPATH_REQ	= 0,
-	IEEE80211_ACTION_MESHPATH_REP	= 1,
-	IEEE80211_ACTION_MESHPATH_ERR	= 2,
-	IEEE80211_ACTION_MESHPATH_RANN	= 3,
-	/* 4-255 reserved */
+	IEEE80211_ACTION_MESHPATH_SEL	= 0,
+	/* 1-255 reserved */
 };
 
 /*
@@ -479,7 +473,6 @@ int		ieee80211_mesh_register_proto_path(
 int		ieee80211_mesh_register_proto_metric(const
 		    struct ieee80211_mesh_proto_metric *);
 
-uint8_t *	ieee80211_add_meshpeerver(uint8_t *, struct ieee80211vap *);
 uint8_t *	ieee80211_add_meshid(uint8_t *, struct ieee80211vap *);
 uint8_t *	ieee80211_add_meshconf(uint8_t *, struct ieee80211vap *);
 uint8_t *	ieee80211_add_meshpeer(uint8_t *, uint8_t, uint16_t, uint16_t,

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 12:20:11 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 19371106566C;
	Tue, 29 Sep 2009 12:20:11 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0823F8FC12;
	Tue, 29 Sep 2009 12:20:11 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TCKA2A085185;
	Tue, 29 Sep 2009 12:20:10 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TCKA7C085183;
	Tue, 29 Sep 2009 12:20:10 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <200909291220.n8TCKA7C085183@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 29 Sep 2009 12:20:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197615 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 12:20:11 -0000

Author: rpaulo
Date: Tue Sep 29 12:20:10 2009
New Revision: 197615
URL: http://svn.freebsd.org/changeset/base/197615

Log:
  Mention 802.11s D3.03 support.
  
  Approved by:	re (implicit)

Modified:
  stable/8/UPDATING

Modified: stable/8/UPDATING
==============================================================================
--- stable/8/UPDATING	Tue Sep 29 12:18:23 2009	(r197614)
+++ stable/8/UPDATING	Tue Sep 29 12:20:10 2009	(r197615)
@@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20090929:
+	802.11s D3.03 support was committed. This is incompatible with
+	the previous code, which was based on D3.0.
+
 20090915:
 	ZFS snapshots are now mounted with MNT_IGNORE flag. Use -v option for
 	mount(8) and -a option for df(1) to see them.

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 12:46:37 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85B4E106566B;
	Tue, 29 Sep 2009 12:46:37 +0000 (UTC)
	(envelope-from rpaulo@gmail.com)
Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com
	[209.85.219.209])
	by mx1.freebsd.org (Postfix) with ESMTP id DB69F8FC0A;
	Tue, 29 Sep 2009 12:46:36 +0000 (UTC)
Received: by ewy5 with SMTP id 5so3985832ewy.36
	for ; Tue, 29 Sep 2009 05:46:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:references:in-reply-to
	:mime-version:content-type:message-id:content-transfer-encoding:from
	:subject:date:to:x-mailer;
	bh=umsVUkBqc9wZQqpeIceDTFaO1ipCJ1cXa8JPctf4nck=;
	b=KVavDy2dn01WVQ4RVXun6vwjcHXVh3gCMz7cyxBkcQW81JIHWMcxB2mPap667CNrAp
	pjeoVAm4T3QWggha2JwUHtsqhWXdHwK/e1H4/w3TlqwcGu6d525v+zY8502NZlGUMeJI
	XTHBvH5c5NLsTkV7JZu462aq8kCadhA+l8Blg=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:references:in-reply-to:mime-version:content-type:message-id
	:content-transfer-encoding:from:subject:date:to:x-mailer;
	b=oSYGSZ2Pvthr21Hh3JRzLuaVeli49TUQuqjtRp0Uxeqw+cY+N3oxG4GnT7q3JuvEv7
	OtXDcb7AHVsT2QNEzZlb9maMVoFcpek7uxRj5NkmjJCeEu7fPyhOTeMnXG27asNDfWcy
	96WfH6OBpj2UFSXMTBoY5ppmNn+gwl4nuj03I=
Received: by 10.216.53.205 with SMTP id g55mr1054404wec.160.1254226912397;
	Tue, 29 Sep 2009 05:21:52 -0700 (PDT)
Received: from rui-macbook.lan (bl11-195-254.dsl.telepac.pt [85.244.195.254])
	by mx.google.com with ESMTPS id 10sm551126eyd.4.2009.09.29.05.21.51
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 29 Sep 2009 05:21:51 -0700 (PDT)
Sender: Rui Paulo 
References: <200909291218.n8TCINmv085038@svn.freebsd.org>
In-Reply-To: <200909291218.n8TCINmv085038@svn.freebsd.org>
Mime-Version: 1.0 (Apple Message framework v1076)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
Message-Id: 
Content-Transfer-Encoding: 7bit
From: Rui Paulo 
Date: Tue, 29 Sep 2009 13:21:49 +0100
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-Mailer: Apple Mail (2.1076)
Cc: 
Subject: Re: svn commit: r197614 - stable/8/sys/net80211
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 12:46:37 -0000

On 29 Sep 2009, at 13:18, Rui Paulo wrote:

> Author: rpaulo
> Date: Tue Sep 29 12:18:23 2009
> New Revision: 197614
> URL: http://svn.freebsd.org/changeset/base/197614
>
> Log:
>  Update 802.11s mesh support to draft 3.03. This includes a revised   
> frame
>  format for peering and changes to the PERR frames.
>  Note that this is incompatible with the previous code.

Argh, MFC revision number is missing. This is an MFC for 197413.

Sorry,
--
Rui Paulo


From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 12:56:14 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 35ED2106568F;
	Tue, 29 Sep 2009 12:56:14 +0000 (UTC)
	(envelope-from ivoras@gmail.com)
Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com
	[209.85.219.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 4699D8FC23;
	Tue, 29 Sep 2009 12:56:12 +0000 (UTC)
Received: by ewy5 with SMTP id 5so3994928ewy.36
	for ; Tue, 29 Sep 2009 05:56:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:sender:received:in-reply-to
	:references:from:date:x-google-sender-auth:message-id:subject:to:cc
	:content-type:content-transfer-encoding;
	bh=Vj17cIEkkjAEvyNnYcfxXoSjt16GbPIkGBwYNwniZDY=;
	b=wFBE7UiIGndA1ZfR1TbMsQxoXtLEB1exuRzyzhpQnd5E7Xr8zuPMiRJG9InQ83Xngm
	KKSlJwRBg89VszQOp0a3uzQh9xbJ99Xef2bB9J6Ns6oaGkgH9UtBAWhkXyEv1L1eVfUa
	X/+xWmNzRfuMf4W8yWeufyf+AgtaySNNuSfnY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:from:date
	:x-google-sender-auth:message-id:subject:to:cc:content-type
	:content-transfer-encoding;
	b=MhhsJu6o0EL5ZiubMcylt7gXhlLHvEjJ7tvBSQZdrFcsgR2ael4VyaBSBdWOBqMHU2
	kau3dyIe0N0wt+uwkhn/utvMo58y7M/U/lNiNAqCSCzP5sekeZRvz/Y0tQTAGwNzzL7E
	gJX8bNFXPCK0kQSQTQoR0eBrPAKSSoTMBXFWI=
MIME-Version: 1.0
Sender: ivoras@gmail.com
Received: by 10.216.86.206 with SMTP id w56mr246416wee.1.1254228972144; Tue, 
	29 Sep 2009 05:56:12 -0700 (PDT)
In-Reply-To: <200909291220.n8TCKA7C085183@svn.freebsd.org>
References: <200909291220.n8TCKA7C085183@svn.freebsd.org>
From: Ivan Voras 
Date: Tue, 29 Sep 2009 14:55:52 +0200
X-Google-Sender-Auth: 8850a75d1aa5d4fe
Message-ID: <9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com>
To: src-committers@freebsd.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r197615 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 12:56:14 -0000

2009/9/29 Rui Paulo :

> --- stable/8/UPDATING =C2=A0 Tue Sep 29 12:18:23 2009 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0(r197614)
> +++ stable/8/UPDATING =C2=A0 Tue Sep 29 12:20:10 2009 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0(r197615)
> @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
> =C2=A0 =C2=A0 =C2=A0 =C2=A0to maximize performance. =C2=A0(To disable mal=
loc debugging, run
> =C2=A0 =C2=A0 =C2=A0 =C2=A0ln -s aj /etc/malloc.conf.)

So the "NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW" message is
still here?

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 13:03:10 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AD5581065672;
	Tue, 29 Sep 2009 13:03:10 +0000 (UTC)
	(envelope-from rpaulo@gmail.com)
Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com
	[209.85.219.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 929708FC19;
	Tue, 29 Sep 2009 13:03:09 +0000 (UTC)
Received: by ewy5 with SMTP id 5so4001919ewy.36
	for ; Tue, 29 Sep 2009 06:03:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:subject:mime-version
	:content-type:from:in-reply-to:date:cc:content-transfer-encoding
	:message-id:references:to:x-mailer;
	bh=FJQB9pQI7BhL0WUw6/Esnk3tXVqQojdg7j7Nav+wOnU=;
	b=fRTy71XuzZi7/fEjLVyaJOXZWa0xGBKEgzWT9WPZ81W2Ie7qZ/3d7QXrZn44Fwwx5A
	5ioGqUojEccX3iNMi40Tk/w8AbNTuGaxB5eQ+dZk4r49b5w7dETZCobJgi8B0t30Q82z
	1BAwUFXLHUw/qn1WVJXdKWw3EEUyW+HSN/mh0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	b=dZ+LYLh3wVFYhYcDyeAM6jQit/AHrT3Xc6gwqwb+PsL0j2/lAsrXR4I2xEnQc61vPl
	5uilFB8QdbIQGoXKvQ26PKlktT0lppqsjdxR46Z9BRBZBgNSZnb7oP0r0XOhfU5xLm/K
	c986O7j5fmDWzYPIB3yK7WOyMTUW41MIaxbjE=
Received: by 10.210.3.18 with SMTP id 18mr4359312ebc.80.1254229388660;
	Tue, 29 Sep 2009 06:03:08 -0700 (PDT)
Received: from mac-mini.lan (bl11-195-254.dsl.telepac.pt [85.244.195.254])
	by mx.google.com with ESMTPS id 7sm1116867eyg.41.2009.09.29.06.03.07
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 29 Sep 2009 06:03:07 -0700 (PDT)
Mime-Version: 1.0 (Apple Message framework v1076)
Content-Type: text/plain; charset=us-ascii; format=flowed
From: Rui Paulo 
In-Reply-To: <9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com>
Date: Tue, 29 Sep 2009 14:03:05 +0100
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <200909291220.n8TCKA7C085183@svn.freebsd.org>
	<9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com>
To: Ivan Voras 
X-Mailer: Apple Mail (2.1076)
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r197615 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 13:03:10 -0000

On 29 Sep 2009, at 13:55, Ivan Voras wrote:

> 2009/9/29 Rui Paulo :
>
>> --- stable/8/UPDATING   Tue Sep 29 12:18:23 2009        (r197614)
>> +++ stable/8/UPDATING   Tue Sep 29 12:20:10 2009        (r197615)
>> @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
>>        to maximize performance.  (To disable malloc debugging, run
>>        ln -s aj /etc/malloc.conf.)
>
> So the "NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW" message is
> still here?

Send a patch to re@ asking for removal :-)

--
Rui Paulo




From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 13:26:10 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 471CD106566B;
	Tue, 29 Sep 2009 13:26:10 +0000 (UTC)
	(envelope-from serenity@exscape.org)
Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net
	[80.76.149.212])
	by mx1.freebsd.org (Postfix) with ESMTP id EFDFD8FC15;
	Tue, 29 Sep 2009 13:26:09 +0000 (UTC)
Received: from c83-253-248-99.bredband.comhem.se ([83.253.248.99]:60893
	helo=mx.exscape.org)
	by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68)
	(envelope-from )
	id 1MscS0-0001ob-4Y; Tue, 29 Sep 2009 15:09:06 +0200
Received: from [192.168.1.5] (macbookpro [192.168.1.5])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by mx.exscape.org (Postfix) with ESMTPSA id 0D09C1CF593;
	Tue, 29 Sep 2009 15:08:58 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1076)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
From: Thomas Backman 
In-Reply-To: 
Date: Tue, 29 Sep 2009 15:08:55 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <1BB83399-AEAC-430C-973A-F850ED90E69E@exscape.org>
References: <200909291220.n8TCKA7C085183@svn.freebsd.org>
	<9bbcef730909290555i6ba85783x36d4a9708323f436@mail.gmail.com>
	
To: Rui Paulo 
X-Mailer: Apple Mail (2.1076)
X-Originating-IP: 83.253.248.99
X-Scan-Result: No virus found in message 1MscS0-0001ob-4Y.
X-Scan-Signature: ch-smtp01.sth.basefarm.net 1MscS0-0001ob-4Y
	63becf37275f51a4c86d6bf0ea9d0154
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org,
	Ivan Voras 
Subject: Re: svn commit: r197615 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 13:26:10 -0000

On Sep 29, 2009, at 3:03 PM, Rui Paulo wrote:

> On 29 Sep 2009, at 13:55, Ivan Voras wrote:
>
>> 2009/9/29 Rui Paulo :
>>
>>> --- stable/8/UPDATING   Tue Sep 29 12:18:23 2009        (r197614)
>>> +++ stable/8/UPDATING   Tue Sep 29 12:20:10 2009        (r197615)
>>> @@ -22,6 +22,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
>>>       to maximize performance.  (To disable malloc debugging, run
>>>       ln -s aj /etc/malloc.conf.)
>>
>> So the "NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW" message is
>> still here?
>
> Send a patch to re@ asking for removal :-)
It should probably be noted that INVARIANTS* are left on ia64 and (as  
far as I understand) everything is left on sun4v.

Regards,
Thomas

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 16:19:49 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 27EBA106566C;
	Tue, 29 Sep 2009 16:19:49 +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 15D058FC15;
	Tue, 29 Sep 2009 16:19:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TGJmOq089761;
	Tue, 29 Sep 2009 16:19:48 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TGJmRg089759;
	Tue, 29 Sep 2009 16:19:48 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200909291619.n8TGJmRg089759@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 29 Sep 2009 16:19:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197617 - stable/7/sys/dev/ata
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 16:19:49 -0000

Author: mav
Date: Tue Sep 29 16:19:48 2009
New Revision: 197617
URL: http://svn.freebsd.org/changeset/base/197617

Log:
  Partial MFC rev. 191568:
  Do not hide second channel of ATI IXP700 ATA controller.
  While this chip indeed has only one PATA channel, second channel of the
  controller is used by two SATA channels working in legacy emulation mode.

Modified:
  stable/7/sys/dev/ata/ata-chipset.c

Modified: stable/7/sys/dev/ata/ata-chipset.c
==============================================================================
--- stable/7/sys/dev/ata/ata-chipset.c	Tue Sep 29 12:59:31 2009	(r197616)
+++ stable/7/sys/dev/ata/ata-chipset.c	Tue Sep 29 16:19:48 2009	(r197617)
@@ -1406,9 +1406,8 @@ ata_ati_chipinit(device_t dev)
     if (ata_setup_interrupt(dev))
 	return ENXIO;
 
-    /* IXP600 & IXP700 only have 1 PATA channel */
-    if ((ctlr->chip->chipid == ATA_ATI_IXP600) ||
-	(ctlr->chip->chipid == ATA_ATI_IXP700))
+    /* IXP600 only have 1 PATA channel */
+    if (ctlr->chip->chipid == ATA_ATI_IXP600)
 	ctlr->channels = 1;
 
     ctlr->setmode = ata_ati_setmode;

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 18:44:35 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 339C5106568B;
	Tue, 29 Sep 2009 18:44:35 +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 08A2F8FC20;
	Tue, 29 Sep 2009 18:44:35 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TIiYuk092938;
	Tue, 29 Sep 2009 18:44:34 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TIiYDJ092934;
	Tue, 29 Sep 2009 18:44:34 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200909291844.n8TIiYDJ092934@svn.freebsd.org>
From: Doug Barton 
Date: Tue, 29 Sep 2009 18:44:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197620 - in stable/8: etc etc/defaults share/man/man5
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 18:44:35 -0000

Author: dougb
Date: Tue Sep 29 18:44:34 2009
New Revision: 197620
URL: http://svn.freebsd.org/changeset/base/197620

Log:
  MFC r197297
  
  Add a knob to show 'Starting foo:' messages when faststart is used,
  such as at boot time.
  
  MFC 197619
  
  By popular acclaim, enable "Starting foo:" messages by default
  
  Approved by:	re (bz)

Modified:
  stable/8/etc/   (props changed)
  stable/8/etc/defaults/rc.conf
  stable/8/etc/rc.subr
  stable/8/share/man/man5/   (props changed)
  stable/8/share/man/man5/rc.conf.5

Modified: stable/8/etc/defaults/rc.conf
==============================================================================
--- stable/8/etc/defaults/rc.conf	Tue Sep 29 16:49:10 2009	(r197619)
+++ stable/8/etc/defaults/rc.conf	Tue Sep 29 18:44:34 2009	(r197620)
@@ -23,6 +23,7 @@
 
 rc_debug="NO"		# Set to YES to enable debugging output from rc.d
 rc_info="NO"		# Enables display of informational messages at boot.
+rc_startmsgs="YES" 	# Show "Starting foo:" messages at boot
 rcshutdown_timeout="30" # Seconds to wait before terminating rc.shutdown
 early_late_divider="FILESYSTEMS"	# Script that separates early/late
 			# stages of the boot process.  Make sure you know

Modified: stable/8/etc/rc.subr
==============================================================================
--- stable/8/etc/rc.subr	Tue Sep 29 16:49:10 2009	(r197619)
+++ stable/8/etc/rc.subr	Tue Sep 29 18:44:34 2009	(r197620)
@@ -680,7 +680,13 @@ run_rc_command()
 
 					# setup the full command to run
 					#
-			[ -z "${rc_quiet}" ] && echo "Starting ${name}."
+			_show_startmsgs=1
+			if [ -n "${rc_quiet}" ]; then
+				if ! checkyesno rc_startmsgs; then
+					unset _show_startmsgs
+				fi
+			fi
+			[ -n "$_show_startmsgs" ] && echo "Starting ${name}."
 			if [ -n "$_chroot" ]; then
 				_doit="\
 ${_nice:+nice -n $_nice }\

Modified: stable/8/share/man/man5/rc.conf.5
==============================================================================
--- stable/8/share/man/man5/rc.conf.5	Tue Sep 29 16:49:10 2009	(r197619)
+++ stable/8/share/man/man5/rc.conf.5	Tue Sep 29 18:44:34 2009	(r197620)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 10, 2009
+.Dd September 17, 2009
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -95,6 +95,13 @@ disable informational messages from the 
 Informational messages are displayed when
 a condition that is not serious enough to warrant a warning or
 an error occurs.
+.It Va rc_startmsgs
+.Pq Vt bool
+If set to
+.Dq Li YES ,
+show
+.Dq Starting foo:
+when faststart is used (e.g., at boot time).
 .It Va early_late_divider
 .Pq Vt str
 The name of the script that should be used as the

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 19:57:08 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 20AEC106566C;
	Tue, 29 Sep 2009 19:57:08 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FC508FC1A;
	Tue, 29 Sep 2009 19:57:08 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8TJv7jP094475;
	Tue, 29 Sep 2009 19:57:07 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8TJv7bS094474;
	Tue, 29 Sep 2009 19:57:07 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200909291957.n8TJv7bS094474@svn.freebsd.org>
From: Ken Smith 
Date: Tue, 29 Sep 2009 19:57:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197623 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 19:57:08 -0000

Author: kensmith
Date: Tue Sep 29 19:57:06 2009
New Revision: 197623
URL: http://svn.freebsd.org/changeset/base/197623

Log:
  Update description of debugging support.
  
  Submitted by:	ivoras (but heavily modified)
  Pointy hat:	me
  Approved by:	re (implicit)

Modified:
  stable/8/UPDATING

Modified: stable/8/UPDATING
==============================================================================
--- stable/8/UPDATING	Tue Sep 29 19:50:50 2009	(r197622)
+++ stable/8/UPDATING	Tue Sep 29 19:57:06 2009	(r197623)
@@ -8,19 +8,12 @@ Items affecting the ports and packages s
 /usr/ports/UPDATING.  Please read that file before running
 portupgrade.
 
-NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW:
-	FreeBSD 8.x has many debugging features turned on, in
-	both the kernel and userland.  These features attempt to detect
-	incorrect use of system primitives, and encourage loud failure
-	through extra sanity checking and fail stop semantics.  They
-	also substantially impact system performance.  If you want to
-	do performance measurement, benchmarking, and optimization,
-	you'll want to turn them off.  This includes various WITNESS-
-	related kernel options, INVARIANTS, malloc debugging flags
-	in userland, and various verbose features in the kernel.  Many
-	developers choose to disable these features on build machines
-	to maximize performance.  (To disable malloc debugging, run
-	ln -s aj /etc/malloc.conf.)
+NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
+	For ia64 the INVARIANTS and INVARIANTS_SUPPORT kernel options
+	were left in the GENERIC kernel because the kernel does not
+	work properly without them.  For sun4v all of the normal kernel
+	debugging tools present in HEAD were left in place because
+	sun4v support still needs work to become production ready.
 
 20090929:
 	802.11s D3.03 support was committed. This is incompatible with

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 20:13:59 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
	id 1EACB10656BA; Tue, 29 Sep 2009 20:13:59 +0000 (UTC)
Date: Tue, 29 Sep 2009 20:13:59 +0000
From: Alexey Dokuchaev 
To: Ken Smith 
Message-ID: <20090929201358.GA9988@FreeBSD.org>
References: <200909291957.n8TJv7bS094474@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=koi8-r
Content-Disposition: inline
In-Reply-To: <200909291957.n8TJv7bS094474@svn.freebsd.org>
User-Agent: Mutt/1.4.2.1i
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r197623 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 20:13:59 -0000

On Tue, Sep 29, 2009 at 07:57:06PM +0000, Ken Smith wrote:
> +NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
> +	For ia64 the INVARIANTS and INVARIANTS_SUPPORT kernel options
					     ^
Shouldn't it be INVARIANT_SUPPORT instead (note the superfluous `S')?

./danfe

From owner-svn-src-stable@FreeBSD.ORG  Tue Sep 29 23:00:44 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 06658106568B;
	Tue, 29 Sep 2009 23:00:44 +0000 (UTC)
	(envelope-from rpaulo@gmail.com)
Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com
	[209.85.219.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 0C4478FC14;
	Tue, 29 Sep 2009 23:00:42 +0000 (UTC)
Received: by ewy5 with SMTP id 5so4646898ewy.36
	for ; Tue, 29 Sep 2009 16:00:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:content-type
	:mime-version:subject:from:in-reply-to:date
	:content-transfer-encoding:message-id:references:to:x-mailer;
	bh=N5y6FMje4A1+aRCiUCNzF5cGMYWpOPMsOIxHLcxxolU=;
	b=PD+onHMTQfvxXI39nX03f3ueKtGunONUMaLnokYtJhh8jBfAa5Jszg/zI0Jksw6iqm
	HEmZNCG26LbWDoa66qgn1vIdQ6hYdefQ0MNsICHrF38aGlqnbBamm1wb/lfjrzZwFEB5
	INfkopMLAybhmMa2W90tdvJG2ytZDeM5Fs3Sc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:content-type:mime-version:subject:from:in-reply-to:date
	:content-transfer-encoding:message-id:references:to:x-mailer;
	b=KV9li50QxUfx2XOJAqLzGAyB7bQcmL4cuvf/pTDeMot8Y9wy2oNIqglFVGTYedD9At
	qtdLJmSjZ78Lzneysmn3d28g49QwYM7PwLApUozlGtZMpBc1q351qsKa5blCSZKi1C6u
	E1Bo7frOVFhzn4C0d5ou/JTWzlXT9D1i6T0bg=
Received: by 10.211.131.40 with SMTP id i40mr1920900ebn.99.1254265241979;
	Tue, 29 Sep 2009 16:00:41 -0700 (PDT)
Received: from mac-mini.lan (bl11-195-254.dsl.telepac.pt [85.244.195.254])
	by mx.google.com with ESMTPS id 7sm416198eyb.20.2009.09.29.16.00.40
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Tue, 29 Sep 2009 16:00:41 -0700 (PDT)
Sender: Rui Paulo 
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
Mime-Version: 1.0 (Apple Message framework v1076)
From: Rui Paulo 
In-Reply-To: <200909291218.n8TCINmv085038@svn.freebsd.org>
Date: Wed, 30 Sep 2009 00:00:39 +0100
Content-Transfer-Encoding: 7bit
Message-Id: <558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org>
References: <200909291218.n8TCINmv085038@svn.freebsd.org>
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-Mailer: Apple Mail (2.1076)
Cc: 
Subject: Re: svn commit: r197614 - stable/8/sys/net80211
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 29 Sep 2009 23:00:44 -0000

On 29 Sep 2009, at 13:18, Rui Paulo wrote:

> Author: rpaulo
> Date: Tue Sep 29 12:18:23 2009
> New Revision: 197614
> URL: http://svn.freebsd.org/changeset/base/197614
>
> Log:
>  Update 802.11s mesh support to draft 3.03. This includes a revised   
> frame
>  format for peering and changes to the PERR frames.
>  Note that this is incompatible with the previous code.
>
>  Reviewed by:	sam
>  Approved by:	re (kib)


Please note that, while these changes are being made very late in the  
release process, they are necessary to keep in sync with the new  
draft.  There should be no impact on ports, mesh support is brand new  
to 8.0.

--
Rui Paulo




From owner-svn-src-stable@FreeBSD.ORG  Wed Sep 30 12:53:22 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 167DA1065670;
	Wed, 30 Sep 2009 12:53:22 +0000 (UTC)
	(envelope-from kensmith@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 043708FC17;
	Wed, 30 Sep 2009 12:53:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8UCrL5M015730;
	Wed, 30 Sep 2009 12:53:21 GMT
	(envelope-from kensmith@svn.freebsd.org)
Received: (from kensmith@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8UCrLwZ015728;
	Wed, 30 Sep 2009 12:53:21 GMT
	(envelope-from kensmith@svn.freebsd.org)
Message-Id: <200909301253.n8UCrLwZ015728@svn.freebsd.org>
From: Ken Smith 
Date: Wed, 30 Sep 2009 12:53:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197642 - stable/8
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 30 Sep 2009 12:53:22 -0000

Author: kensmith
Date: Wed Sep 30 12:53:21 2009
New Revision: 197642
URL: http://svn.freebsd.org/changeset/base/197642

Log:
  Remove an extra 'S' that snuck in.
  
  Submitted by:	danfe
  Approved by:	re (implicit)

Modified:
  stable/8/UPDATING

Modified: stable/8/UPDATING
==============================================================================
--- stable/8/UPDATING	Wed Sep 30 11:14:13 2009	(r197641)
+++ stable/8/UPDATING	Wed Sep 30 12:53:21 2009	(r197642)
@@ -9,7 +9,7 @@ Items affecting the ports and packages s
 portupgrade.
 
 NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
-	For ia64 the INVARIANTS and INVARIANTS_SUPPORT kernel options
+	For ia64 the INVARIANTS and INVARIANT_SUPPORT kernel options
 	were left in the GENERIC kernel because the kernel does not
 	work properly without them.  For sun4v all of the normal kernel
 	debugging tools present in HEAD were left in place because

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep 30 19:23:27 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75E8A1065696
	for ; Wed, 30 Sep 2009 19:23:27 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4])
	by mx1.freebsd.org (Postfix) with ESMTP id C1F558FC1B
	for ; Wed, 30 Sep 2009 19:23:26 +0000 (UTC)
Received: (qmail 4323 invoked by uid 399); 30 Sep 2009 19:23:24 -0000
Received: from localhost (HELO foreign.dougb.net)
	(dougb@dougbarton.us@127.0.0.1)
	by localhost with ESMTPAM; 30 Sep 2009 19:23:24 -0000
X-Originating-IP: 127.0.0.1
X-Sender: dougb@dougbarton.us
Message-ID: <4AC3B02B.90703@FreeBSD.org>
Date: Wed, 30 Sep 2009 12:23:23 -0700
From: Doug Barton 
Organization: http://www.FreeBSD.org/
User-Agent: Thunderbird 2.0.0.23 (X11/20090822)
MIME-Version: 1.0
To: Rui Paulo 
References: <200909291218.n8TCINmv085038@svn.freebsd.org>
	<558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org>
In-Reply-To: <558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org>
X-Enigmail-Version: 0.96.0
OpenPGP: id=D5B2F0FB
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r197614 - stable/8/sys/net80211
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 30 Sep 2009 19:23:27 -0000

Rui Paulo wrote:
> On 29 Sep 2009, at 13:18, Rui Paulo wrote:
> 
>> Author: rpaulo
>> Date: Tue Sep 29 12:18:23 2009
>> New Revision: 197614
>> URL: http://svn.freebsd.org/changeset/base/197614
>>
>> Log:
>>  Update 802.11s mesh support to draft 3.03. This includes a revised 
>> frame
>>  format for peering and changes to the PERR frames.
>>  Note that this is incompatible with the previous code.
>>
>>  Reviewed by:    sam
>>  Approved by:    re (kib)
> 
> 
> Please note that, while these changes are being made very late in the
> release process, they are necessary to keep in sync with the new draft. 
> There should be no impact on ports, mesh support is brand new to 8.0.

Is it my imagination, or does GENERIC still refer to D3.0? Perhaps
other places as well?

Doug

-- 

    This .signature sanitized for your protection


From owner-svn-src-stable@FreeBSD.ORG  Wed Sep 30 19:40:51 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 806001065692;
	Wed, 30 Sep 2009 19:40:51 +0000 (UTC) (envelope-from zml@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 65FCF8FC22;
	Wed, 30 Sep 2009 19:40:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8UJep8j024251;
	Wed, 30 Sep 2009 19:40:51 GMT (envelope-from zml@svn.freebsd.org)
Received: (from zml@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8UJep9X024249;
	Wed, 30 Sep 2009 19:40:51 GMT (envelope-from zml@svn.freebsd.org)
Message-Id: <200909301940.n8UJep9X024249@svn.freebsd.org>
From: Zachary Loafman 
Date: Wed, 30 Sep 2009 19:40:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197652 - stable/7/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 30 Sep 2009 19:40:51 -0000

Author: zml
Date: Wed Sep 30 19:40:51 2009
New Revision: 197652
URL: http://svn.freebsd.org/changeset/base/197652

Log:
  sched_ule in stable/7 has a bug (introduced in r180607) where a thread
  that is running often will appear to not be running much at all.
  
  sched_ule has a much less accurate mechanism for determining how much
  various threads are running.  Every tick, hardclock_cpu() calls
  sched_tick(), and the currently running thread gets it's ts_ticks
  incremented.  Whenever an event of interest happens to a thread, the
  ts_ticks value may be decayed; it's supposed to be a rough running
  average of the last 10 seconds.  So there's a ts_ltick which is the last
  tick we looked at decaying ts_ticks.
  
  The increment in sched_tick() was slightly buggy on SMP, because a
  thread could get incremented on two different CPUs in the rare case
  where it was swapped from one which had run sched_tick() this tick to
  one which hadn't.  The fix that was used relied on ts_ltick and only
  incremented ts_ticks if ts_ltick was not from the current tick.
  This is buggy, because any time the thread began running on a CPU in the
  current tick, we would have set ts_ltick to ticks, so if it was still
  running at sched_tick() we wouldn't increment.
  
  A system with a single process that hogs the CPU and is otherwise idle,
  therefore, would look like all threads were at 0%. The threads not
  running are really at 0%, and the hog is not getting its ts_ticks
  incremented since it went through some other runq stats that set
  ts_ltick.  On a 2-way SMP the thread used to get shuffled regularly
  between CPUs (I think fallout from this bug), so it would appear a
  little over 50% busy.
  
  The fix is to use a separate variable to record when the last
  sched_tick() increment happened.
  
  Submitted by:       Matthew Fleming (matthew.fleming at isilon.com)
  Reviewed by:        zml, dfr
  Approved by:        dfr (mentor)

Modified:
  stable/7/sys/kern/sched_ule.c

Modified: stable/7/sys/kern/sched_ule.c
==============================================================================
--- stable/7/sys/kern/sched_ule.c	Wed Sep 30 19:19:53 2009	(r197651)
+++ stable/7/sys/kern/sched_ule.c	Wed Sep 30 19:40:51 2009	(r197652)
@@ -101,6 +101,7 @@ struct td_sched {	
 	u_int		ts_runtime;	/* Number of ticks we were running */
 	/* The following variables are only used for pctcpu calculation */
 	int		ts_ltick;	/* Last tick that we were running on */
+	int		ts_incrtick;	/* Last tick that we incremented on */
 	int		ts_ftick;	/* First tick that we were running on */
 	int		ts_ticks;	/* Tick count */
 #ifdef SMP
@@ -2075,6 +2076,7 @@ sched_fork_thread(struct thread *td, str
 	 */
 	ts2->ts_ticks = ts->ts_ticks;
 	ts2->ts_ltick = ts->ts_ltick;
+	ts2->ts_incrtick = ts->ts_incrtick;
 	ts2->ts_ftick = ts->ts_ftick;
 	child->td_user_pri = td->td_user_pri;
 	child->td_base_user_pri = td->td_base_user_pri;
@@ -2266,10 +2268,11 @@ sched_tick(void)
 	 * Ticks is updated asynchronously on a single cpu.  Check here to
 	 * avoid incrementing ts_ticks multiple times in a single tick.
 	 */
-	if (ts->ts_ltick == ticks)
+	if (ts->ts_incrtick == ticks)
 		return;
 	/* Adjust ticks for pctcpu */
 	ts->ts_ticks += 1 << SCHED_TICK_SHIFT;
+	ts->ts_incrtick = ticks;
 	ts->ts_ltick = ticks;
 	/*
 	 * Update if we've exceeded our desired tick threshhold by over one

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep 30 19:53:02 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 576AE1065693;
	Wed, 30 Sep 2009 19:53:02 +0000 (UTC)
	(envelope-from kostikbel@gmail.com)
Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194])
	by mx1.freebsd.org (Postfix) with ESMTP id DF88A8FC13;
	Wed, 30 Sep 2009 19:53:01 +0000 (UTC)
Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua
	[10.1.1.148])
	by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n8UJqsv9038009
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 30 Sep 2009 22:52:54 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1])
	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id
	n8UJqsGQ039860; Wed, 30 Sep 2009 22:52:54 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
Received: (from kostik@localhost)
	by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n8UJqsU9039859; 
	Wed, 30 Sep 2009 22:52:54 +0300 (EEST)
	(envelope-from kostikbel@gmail.com)
X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to
	kostikbel@gmail.com using -f
Date: Wed, 30 Sep 2009 22:52:54 +0300
From: Kostik Belousov 
To: Zachary Loafman 
Message-ID: <20090930195254.GK3130@deviant.kiev.zoral.com.ua>
References: <200909301940.n8UJep9X024249@svn.freebsd.org>
Mime-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;
	protocol="application/pgp-signature"; boundary="fLj60tP2PZ34xyqD"
Content-Disposition: inline
In-Reply-To: <200909301940.n8UJep9X024249@svn.freebsd.org>
User-Agent: Mutt/1.4.2.3i
X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua
X-Virus-Status: Clean
X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00
	autolearn=ham version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
	skuns.kiev.zoral.com.ua
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r197652 - stable/7/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 30 Sep 2009 19:53:02 -0000


--fLj60tP2PZ34xyqD
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 30, 2009 at 07:40:51PM +0000, Zachary Loafman wrote:
> Author: zml
> Date: Wed Sep 30 19:40:51 2009
> New Revision: 197652
> URL: http://svn.freebsd.org/changeset/base/197652
>=20
> Log:
>   sched_ule in stable/7 has a bug (introduced in r180607) where a thread
>   that is running often will appear to not be running much at all.
Why is this not a problem on HEAD ?

>  =20
>   sched_ule has a much less accurate mechanism for determining how much
>   various threads are running.  Every tick, hardclock_cpu() calls
>   sched_tick(), and the currently running thread gets it's ts_ticks
>   incremented.  Whenever an event of interest happens to a thread, the
>   ts_ticks value may be decayed; it's supposed to be a rough running
>   average of the last 10 seconds.  So there's a ts_ltick which is the last
>   tick we looked at decaying ts_ticks.
>  =20
>   The increment in sched_tick() was slightly buggy on SMP, because a
>   thread could get incremented on two different CPUs in the rare case
>   where it was swapped from one which had run sched_tick() this tick to
>   one which hadn't.  The fix that was used relied on ts_ltick and only
>   incremented ts_ticks if ts_ltick was not from the current tick.
>   This is buggy, because any time the thread began running on a CPU in the
>   current tick, we would have set ts_ltick to ticks, so if it was still
>   running at sched_tick() we wouldn't increment.
>  =20
>   A system with a single process that hogs the CPU and is otherwise idle,
>   therefore, would look like all threads were at 0%. The threads not
>   running are really at 0%, and the hog is not getting its ts_ticks
>   incremented since it went through some other runq stats that set
>   ts_ltick.  On a 2-way SMP the thread used to get shuffled regularly
>   between CPUs (I think fallout from this bug), so it would appear a
>   little over 50% busy.
>  =20
>   The fix is to use a separate variable to record when the last
>   sched_tick() increment happened.
>  =20
>   Submitted by:       Matthew Fleming (matthew.fleming at isilon.com)
>   Reviewed by:        zml, dfr
>   Approved by:        dfr (mentor)

--fLj60tP2PZ34xyqD
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAkrDtxUACgkQC3+MBN1Mb4hxLwCgkNdUEoc7cNwLLUFe4zy68Qe4
zFEAoOXuU7ZABaWvR/2PbqDjxsy0lRfR
=MzlZ
-----END PGP SIGNATURE-----

--fLj60tP2PZ34xyqD--

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep 30 20:01:45 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 25B3C106566B;
	Wed, 30 Sep 2009 20:01:45 +0000 (UTC) (envelope-from bms@FreeBSD.org)
Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com
	[66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id D273A8FC1A;
	Wed, 30 Sep 2009 20:01:44 +0000 (UTC)
Received: from compute1.internal (compute1.internal [10.202.2.41])
	by gateway1.messagingengine.com (Postfix) with ESMTP id 0696B7F5B9;
	Wed, 30 Sep 2009 15:44:14 -0400 (EDT)
Received: from heartbeat2.messagingengine.com ([10.202.2.161])
	by compute1.internal (MEProxy); Wed, 30 Sep 2009 15:44:14 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com;
	h=message-id:date:from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding;
	s=smtpout; bh=WXZHGeOR+k6H+9KFe29DiepQGwE=;
	b=p9aub6QLZ6hQuD0hGAwFfgAVtwJSq05BpkKnS4j9xZ9D8kw1tFHWOJ2uvj5NiSand53qc20ZI6+xRAcxtZQVNwX6hd1hg6R8TJuypRMAEUfsBRwPBp+IClL+rJLAu6oE8r+ViPkhsXyHdaoH6PyLyAPkTN7aSAqYcWq8/UkjY88=
X-Sasl-enc: UIeMoVvKB+HUlXyc3JcbcrFqcwig5KdskpOTGG55QiF4 1254339853
Received: from empiric.lon.incunabulum.net
	(82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254])
	by mail.messagingengine.com (Postfix) with ESMTPSA id 3A3B419F3A;
	Wed, 30 Sep 2009 15:44:13 -0400 (EDT)
Message-ID: <4AC3B50B.60806@FreeBSD.org>
Date: Wed, 30 Sep 2009 20:44:11 +0100
From: Bruce Simpson 
User-Agent: Thunderbird 2.0.0.23 (X11/20090827)
MIME-Version: 1.0
To: Zachary Loafman 
References: <200909301940.n8UJep9X024249@svn.freebsd.org>
In-Reply-To: <200909301940.n8UJep9X024249@svn.freebsd.org>
X-Enigmail-Version: 0.95.6
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r197652 - stable/7/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 30 Sep 2009 20:01:45 -0000

Nice fix.

Timing problems are the subtlest.

From owner-svn-src-stable@FreeBSD.ORG  Wed Sep 30 20:21:41 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B947106568D;
	Wed, 30 Sep 2009 20:21:41 +0000 (UTC)
	(envelope-from matthew.fleming@isilon.com)
Received: from seaxch09.isilon.com (seaxch09.isilon.com [74.85.160.25])
	by mx1.freebsd.org (Postfix) with ESMTP id 3D91B8FC0C;
	Wed, 30 Sep 2009 20:21:41 +0000 (UTC)
x-mimeole: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable
Date: Wed, 30 Sep 2009 13:09:40 -0700
Message-ID: <06D5F9F6F655AD4C92E28B662F7F853E03171462@seaxch09.desktop.isilon.com>
In-Reply-To: <20090930195254.GK3130@deviant.kiev.zoral.com.ua>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: svn commit: r197652 - stable/7/sys/kern
Thread-Index: AcpCB/F4hoEOPZEATdG5OhhIomenHQAACIUA
References: <200909301940.n8UJep9X024249@svn.freebsd.org>
	<20090930195254.GK3130@deviant.kiev.zoral.com.ua>
From: "Matthew Fleming" 
To: "Kostik Belousov" ,
	"Zachary Loafman" 
Cc: svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject: RE: svn commit: r197652 - stable/7/sys/kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 30 Sep 2009 20:21:41 -0000

> >   sched_ule in stable/7 has a bug (introduced in r180607) where a
thread
> >   that is running often will appear to not be running much at all.
> Why is this not a problem on HEAD ?

I can't say definitively there's not a bug on HEAD of some kind, but
when I ran a CPU hog and looked at the output of top(1), on HEAD the hog
was listed as near 100%, and on stable/7 it was listed as 0% after a few
seconds for the system to settle.  Since the code looked at least
somewhat different and the bug did not reproduce on HEAD, I assumed it
was only a problem on stable/7.  I had to run HEAD code in a virtual
machine, perhaps this made a difference?

>From a code inspection standpoint, I don't see anything obvious.  On
stable/7, the set of ts_ltick in tdq_runq_rem() appears to be the reason
a cpu hog was not getting incremented by sched_tick().  On HEAD this set
is moved to sched_choose().

Thanks,
matthew

From owner-svn-src-stable@FreeBSD.ORG  Thu Oct  1 02:06:07 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7DD781065670;
	Thu,  1 Oct 2009 02:06:07 +0000 (UTC)
	(envelope-from rpaulo@gmail.com)
Received: from mail-ew0-f209.google.com (mail-ew0-f209.google.com
	[209.85.219.209])
	by mx1.freebsd.org (Postfix) with ESMTP id 650AB8FC08;
	Thu,  1 Oct 2009 02:06:06 +0000 (UTC)
Received: by ewy5 with SMTP id 5so1221623ewy.36
	for ; Wed, 30 Sep 2009 19:06:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:sender:subject:mime-version
	:content-type:from:in-reply-to:date:cc:content-transfer-encoding
	:message-id:references:to:x-mailer;
	bh=1AsJSJbd7un45z59OujtTRprc9bz1RsWCxu1gu14i1c=;
	b=vWkQM9PVdx0RqYdeOt9bJT4oxVJ9mv7NoB60GTOCbsojzNMi+C7zjgU0G89Uchqmb5
	hJLLEbH+bEeZPfGr2+35ifK0EbhJtgu1LusNTuCB/ROz6dvEAnyLyMGrUiuKAuw2So7i
	L+cKAG3YwLIPmxdct5vvk0MExfcXy8HQVheVM=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc
	:content-transfer-encoding:message-id:references:to:x-mailer;
	b=ITtFpCj7kZ/n/OKN6E+iYKedBc9nmNuufFKP8gtX0y04YIceTMxHMBrWozHIOVWcx0
	dbbk0cz0d+fudWW3R9Rj431gh1dUCesiib2TEcEKVj6GU669TML6pYhsoW8BVWkWeW83
	siXFcGgWyWyBKTuOqQov92AU9FoTTi9XTqKU0=
Received: by 10.211.138.11 with SMTP id q11mr695015ebn.1.1254362765483;
	Wed, 30 Sep 2009 19:06:05 -0700 (PDT)
Received: from mac-mini.lan (bl6-144-180.dsl.telepac.pt [82.155.144.180])
	by mx.google.com with ESMTPS id 28sm671056eyg.35.2009.09.30.19.06.03
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Wed, 30 Sep 2009 19:06:03 -0700 (PDT)
Sender: Rui Paulo 
Mime-Version: 1.0 (Apple Message framework v1076)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
From: Rui Paulo 
In-Reply-To: <4AC3B02B.90703@FreeBSD.org>
Date: Thu, 1 Oct 2009 03:06:01 +0100
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <200909291218.n8TCINmv085038@svn.freebsd.org>
	<558A76C2-0F8C-472F-A235-16BDAD15C634@freebsd.org>
	<4AC3B02B.90703@FreeBSD.org>
To: Doug Barton 
X-Mailer: Apple Mail (2.1076)
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-8@freebsd.org
Subject: Re: svn commit: r197614 - stable/8/sys/net80211
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 01 Oct 2009 02:06:07 -0000

On 30 Sep 2009, at 20:23, Doug Barton wrote:

> Rui Paulo wrote:
>> On 29 Sep 2009, at 13:18, Rui Paulo wrote:
>>
>>> Author: rpaulo
>>> Date: Tue Sep 29 12:18:23 2009
>>> New Revision: 197614
>>> URL: http://svn.freebsd.org/changeset/base/197614
>>>
>>> Log:
>>> Update 802.11s mesh support to draft 3.03. This includes a revised
>>> frame
>>> format for peering and changes to the PERR frames.
>>> Note that this is incompatible with the previous code.
>>>
>>> Reviewed by:    sam
>>> Approved by:    re (kib)
>>
>>
>> Please note that, while these changes are being made very late in the
>> release process, they are necessary to keep in sync with the new  
>> draft.
>> There should be no impact on ports, mesh support is brand new to 8.0.
>
> Is it my imagination, or does GENERIC still refer to D3.0? Perhaps
> other places as well?

I'll fix it. Thanks.

--
Rui Paulo




From owner-svn-src-stable@FreeBSD.ORG  Thu Oct  1 10:06:10 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A94D3106566B;
	Thu,  1 Oct 2009 10:06:10 +0000 (UTC)
	(envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7B9678FC08;
	Thu,  1 Oct 2009 10:06:10 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91A6AjC047452;
	Thu, 1 Oct 2009 10:06:10 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91A6AFT047448;
	Thu, 1 Oct 2009 10:06:10 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <200910011006.n91A6AFT047448@svn.freebsd.org>
From: Rui Paulo 
Date: Thu, 1 Oct 2009 10:06:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197656 - in stable/8/sys: . amd64/conf
	amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica
	contrib/pf dev/xen/xenpci i386/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 01 Oct 2009 10:06:10 -0000

Author: rpaulo
Date: Thu Oct  1 10:06:09 2009
New Revision: 197656
URL: http://svn.freebsd.org/changeset/base/197656

Log:
  MFC r197653:
    Improve 802.11s comment.
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/conf/GENERIC
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/i386/conf/GENERIC

Modified: stable/8/sys/amd64/conf/GENERIC
==============================================================================
--- stable/8/sys/amd64/conf/GENERIC	Thu Oct  1 08:16:46 2009	(r197655)
+++ stable/8/sys/amd64/conf/GENERIC	Thu Oct  1 10:06:09 2009	(r197656)
@@ -248,7 +248,7 @@ device		xe		# Xircom pccard Ethernet
 device		wlan		# 802.11 support
 options 	IEEE80211_DEBUG	# enable debug msgs
 options 	IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-options 	IEEE80211_SUPPORT_MESH	# enable 802.11s D3.0 support
+options 	IEEE80211_SUPPORT_MESH	# enable 802.11s draft support
 device		wlan_wep	# 802.11 WEP support
 device		wlan_ccmp	# 802.11 CCMP support
 device		wlan_tkip	# 802.11 TKIP support

Modified: stable/8/sys/i386/conf/GENERIC
==============================================================================
--- stable/8/sys/i386/conf/GENERIC	Thu Oct  1 08:16:46 2009	(r197655)
+++ stable/8/sys/i386/conf/GENERIC	Thu Oct  1 10:06:09 2009	(r197656)
@@ -260,7 +260,7 @@ device		xe		# Xircom pccard Ethernet
 device		wlan		# 802.11 support
 options 	IEEE80211_DEBUG	# enable debug msgs
 options 	IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
-options 	IEEE80211_SUPPORT_MESH	# enable 802.11s D3.0 support
+options 	IEEE80211_SUPPORT_MESH	# enable 802.11s draft support
 device		wlan_wep	# 802.11 WEP support
 device		wlan_ccmp	# 802.11 CCMP support
 device		wlan_tkip	# 802.11 TKIP support

From owner-svn-src-stable@FreeBSD.ORG  Thu Oct  1 13:11:46 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CCEE2106568B;
	Thu,  1 Oct 2009 13:11: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 A148A8FC17;
	Thu,  1 Oct 2009 13:11:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91DBkBd052253;
	Thu, 1 Oct 2009 13:11:46 GMT (envelope-from jamie@svn.freebsd.org)
Received: (from jamie@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91DBkOf052250;
	Thu, 1 Oct 2009 13:11:46 GMT (envelope-from jamie@svn.freebsd.org)
Message-Id: <200910011311.n91DBkOf052250@svn.freebsd.org>
From: Jamie Gritton 
Date: Thu, 1 Oct 2009 13:11:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197667 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci kern rpc/rpcsec_gss
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 01 Oct 2009 13:11:46 -0000

Author: jamie
Date: Thu Oct  1 13:11:45 2009
New Revision: 197667
URL: http://svn.freebsd.org/changeset/base/197667

Log:
  MFC r197581, r197583, r197584:
  
    Set the prison in NFS anon and GSS SVC creds.
  
  Reviewed by:	marcel
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/vfs_export.c
  stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c

Modified: stable/8/sys/kern/vfs_export.c
==============================================================================
--- stable/8/sys/kern/vfs_export.c	Thu Oct  1 13:03:17 2009	(r197666)
+++ stable/8/sys/kern/vfs_export.c	Thu Oct  1 13:11:45 2009	(r197667)
@@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -122,6 +123,8 @@ vfs_hang_addrlist(struct mount *mp, stru
 		np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
 		crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
 		    argp->ex_anon.cr_groups);
+		np->netc_anon->cr_prison = &prison0;
+		prison_hold(np->netc_anon->cr_prison);
 		np->netc_numsecflavors = argp->ex_numsecflavors;
 		bcopy(argp->ex_secflavors, np->netc_secflavors,
 		    sizeof(np->netc_secflavors));
@@ -206,6 +209,8 @@ vfs_hang_addrlist(struct mount *mp, stru
 	np->netc_anon->cr_uid = argp->ex_anon.cr_uid;
 	crsetgroups(np->netc_anon, argp->ex_anon.cr_ngroups,
 	    np->netc_anon->cr_groups);
+	np->netc_anon->cr_prison = &prison0;
+	prison_hold(np->netc_anon->cr_prison);
 	np->netc_numsecflavors = argp->ex_numsecflavors;
 	bcopy(argp->ex_secflavors, np->netc_secflavors,
 	    sizeof(np->netc_secflavors));

Modified: stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c
==============================================================================
--- stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Thu Oct  1 13:03:17 2009	(r197666)
+++ stable/8/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c	Thu Oct  1 13:11:45 2009	(r197667)
@@ -449,6 +449,8 @@ rpc_gss_svc_getcred(struct svc_req *req,
 	cr->cr_uid = cr->cr_ruid = cr->cr_svuid = uc->uid;
 	cr->cr_rgid = cr->cr_svgid = uc->gid;
 	crsetgroups(cr, uc->gidlen, uc->gidlist);
+	cr->cr_prison = &prison0;
+	prison_hold(cr->cr_prison);
 	*crp = crhold(cr);
 
 	return (TRUE);

From owner-svn-src-stable@FreeBSD.ORG  Thu Oct  1 14:42:55 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BC7BB1065694;
	Thu,  1 Oct 2009 14:42:55 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id AA6F88FC0A;
	Thu,  1 Oct 2009 14:42:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91Egtfv054379;
	Thu, 1 Oct 2009 14:42:55 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91Egt6A054377;
	Thu, 1 Oct 2009 14:42:55 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <200910011442.n91Egt6A054377@svn.freebsd.org>
From: Takahashi Yoshihiro 
Date: Thu, 1 Oct 2009 14:42:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197669 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci modules/nfslockd
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 01 Oct 2009 14:42:55 -0000

Author: nyan
Date: Thu Oct  1 14:42:55 2009
New Revision: 197669
URL: http://svn.freebsd.org/changeset/base/197669

Log:
  MFC: revision 197535
  
    Add '#define NFSCLIENT' into opt_nfs.h if the NFSCLIENT variable is 1
    (the default is 1).
  
    This makes the nfslockd module works for NFS client.
  
    Reviewed by:	dfr
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/modules/nfslockd/Makefile

Modified: stable/8/sys/modules/nfslockd/Makefile
==============================================================================
--- stable/8/sys/modules/nfslockd/Makefile	Thu Oct  1 13:16:24 2009	(r197668)
+++ stable/8/sys/modules/nfslockd/Makefile	Thu Oct  1 14:42:55 2009	(r197669)
@@ -14,11 +14,18 @@ SRCS+=	opt_inet6.h opt_nfs.h
 
 .if !defined(KERNBUILDDIR)
 NFS_INET6?=	1	# 0/1 - requires INET6 to be configured in kernel
+NFSCLIENT?=	1	# 0/1 - requires NFSCLIENT to be configured in kernel
 
 .if ${NFS_INET6} > 0
 opt_inet6.h:
 	echo "#define INET6 1" > ${.TARGET}
 .endif
+
+.if ${NFSCLIENT} > 0
+opt_nfs.h:
+	echo "#define NFSCLIENT 1" > ${.TARGET}
+.endif
+
 .endif
 
 .include 

From owner-svn-src-stable@FreeBSD.ORG  Thu Oct  1 15:40:09 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5E6D2106566B;
	Thu,  1 Oct 2009 15:40:09 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 32B928FC13;
	Thu,  1 Oct 2009 15:40:09 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91Fe9um056135;
	Thu, 1 Oct 2009 15:40:09 GMT (envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91Fe9gg056132;
	Thu, 1 Oct 2009 15:40:09 GMT (envelope-from gallatin@svn.freebsd.org)
Message-Id: <200910011540.n91Fe9gg056132@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 1 Oct 2009 15:40:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197675 - in stable/7/sys: . contrib/pf dev/mxge
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 01 Oct 2009 15:40:09 -0000

Author: gallatin
Date: Thu Oct  1 15:40:08 2009
New Revision: 197675
URL: http://svn.freebsd.org/changeset/base/197675

Log:
  MFC: more fixes for mxge watchdog reset handling (194761 197645)
  
  194761: Fix bug where device would loose promisc setting when reset.
  197645: Restore the PCI Express control register after reset

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/mxge/if_mxge.c
  stable/7/sys/dev/mxge/if_mxge_var.h

Modified: stable/7/sys/dev/mxge/if_mxge.c
==============================================================================
--- stable/7/sys/dev/mxge/if_mxge.c	Thu Oct  1 15:33:53 2009	(r197674)
+++ stable/7/sys/dev/mxge/if_mxge.c	Thu Oct  1 15:40:08 2009	(r197675)
@@ -1296,7 +1296,7 @@ mxge_reset(mxge_softc_t *sc, int interru
 	}
 	sc->rdma_tags_available = 15;
 	status = mxge_update_mac_address(sc);
-	mxge_change_promisc(sc, 0);
+	mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC);
 	mxge_change_pause(sc, sc->pause);
 	mxge_set_multicast_list(sc);
 	return status;
@@ -3419,10 +3419,16 @@ mxge_setup_cfg_space(mxge_softc_t *sc)
 	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
 		lnk = pci_read_config(dev, reg + 0x12, 2);
 		sc->link_width = (lnk >> 4) & 0x3f;
-		
-		pectl = pci_read_config(dev, reg + 0x8, 2);
-		pectl = (pectl & ~0x7000) | (5 << 12);
-		pci_write_config(dev, reg + 0x8, pectl, 2);
+
+		if (sc->pectl == 0) {
+			pectl = pci_read_config(dev, reg + 0x8, 2);
+			pectl = (pectl & ~0x7000) | (5 << 12);
+			pci_write_config(dev, reg + 0x8, pectl, 2);
+			sc->pectl = pectl;
+		} else {
+			/* restore saved pectl after watchdog reset */
+			pci_write_config(dev, reg + 0x8, sc->pectl, 2);
+		}
 	}
 
 	/* Enable DMA and Memory space access */
@@ -3533,6 +3539,9 @@ mxge_watchdog_reset(mxge_softc_t *sc)
 			/* release all TX locks */
 			for (s = 0; s < num_tx_slices; s++) {
 				ss = &sc->ss[s];
+#ifdef IFNET_BUF_RING
+				mxge_start_locked(ss);
+#endif
 				mtx_unlock(&ss->tx.mtx);
 			}
 		}
@@ -3795,7 +3804,7 @@ mxge_fetch_tunables(mxge_softc_t *sc)
 		mxge_ticks = hz / 2;
 	sc->pause = mxge_flow_control;
 	if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 
-	    || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_SRC_PORT) {
+	    || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) {
 		mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
 	}
 }

Modified: stable/7/sys/dev/mxge/if_mxge_var.h
==============================================================================
--- stable/7/sys/dev/mxge/if_mxge_var.h	Thu Oct  1 15:33:53 2009	(r197674)
+++ stable/7/sys/dev/mxge/if_mxge_var.h	Thu Oct  1 15:40:08 2009	(r197675)
@@ -254,6 +254,7 @@ struct mxge_softc {
 	struct sysctl_ctx_list slice_sysctl_ctx;
 	char *mac_addr_string;
 	uint8_t	mac_addr[6];		/* eeprom mac address */
+	uint16_t pectl;			/* save PCIe CTL state */
 	char product_code_string[64];
 	char serial_number_string[64];
 	char cmd_mtx_name[16];

From owner-svn-src-stable@FreeBSD.ORG  Thu Oct  1 15:51:29 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9660F106568B;
	Thu,  1 Oct 2009 15:51:29 +0000 (UTC)
	(envelope-from gallatin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 7AB198FC1F;
	Thu,  1 Oct 2009 15:51:29 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n91FpTvs056480;
	Thu, 1 Oct 2009 15:51:29 GMT (envelope-from gallatin@svn.freebsd.org)
Received: (from gallatin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n91FpTnj056477;
	Thu, 1 Oct 2009 15:51:29 GMT (envelope-from gallatin@svn.freebsd.org)
Message-Id: <200910011551.n91FpTnj056477@svn.freebsd.org>
From: Andrew Gallatin 
Date: Thu, 1 Oct 2009 15:51:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197676 - in stable/6/sys: . conf contrib/pf dev/cxgb
	dev/mxge
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Thu, 01 Oct 2009 15:51:29 -0000

Author: gallatin
Date: Thu Oct  1 15:51:29 2009
New Revision: 197676
URL: http://svn.freebsd.org/changeset/base/197676

Log:
  MFC: more fixes for mxge watchdog reset handling (194761 197645)
  
  194761: Fix bug where device would loose promisc setting when reset.
  197645: Restore the PCI Express control register after reset

Modified:
  stable/6/sys/   (props changed)
  stable/6/sys/conf/   (props changed)
  stable/6/sys/contrib/pf/   (props changed)
  stable/6/sys/dev/cxgb/   (props changed)
  stable/6/sys/dev/mxge/if_mxge.c
  stable/6/sys/dev/mxge/if_mxge_var.h

Modified: stable/6/sys/dev/mxge/if_mxge.c
==============================================================================
--- stable/6/sys/dev/mxge/if_mxge.c	Thu Oct  1 15:40:08 2009	(r197675)
+++ stable/6/sys/dev/mxge/if_mxge.c	Thu Oct  1 15:51:29 2009	(r197676)
@@ -1296,7 +1296,7 @@ mxge_reset(mxge_softc_t *sc, int interru
 	}
 	sc->rdma_tags_available = 15;
 	status = mxge_update_mac_address(sc);
-	mxge_change_promisc(sc, 0);
+	mxge_change_promisc(sc, sc->ifp->if_flags & IFF_PROMISC);
 	mxge_change_pause(sc, sc->pause);
 	mxge_set_multicast_list(sc);
 	return status;
@@ -3420,10 +3420,16 @@ mxge_setup_cfg_space(mxge_softc_t *sc)
 	if (pci_find_extcap(dev, PCIY_EXPRESS, ®) == 0) {
 		lnk = pci_read_config(dev, reg + 0x12, 2);
 		sc->link_width = (lnk >> 4) & 0x3f;
-		
-		pectl = pci_read_config(dev, reg + 0x8, 2);
-		pectl = (pectl & ~0x7000) | (5 << 12);
-		pci_write_config(dev, reg + 0x8, pectl, 2);
+
+		if (sc->pectl == 0) {
+			pectl = pci_read_config(dev, reg + 0x8, 2);
+			pectl = (pectl & ~0x7000) | (5 << 12);
+			pci_write_config(dev, reg + 0x8, pectl, 2);
+			sc->pectl = pectl;
+		} else {
+			/* restore saved pectl after watchdog reset */
+			pci_write_config(dev, reg + 0x8, sc->pectl, 2);
+		}
 	}
 
 	/* Enable DMA and Memory space access */
@@ -3534,6 +3540,9 @@ mxge_watchdog_reset(mxge_softc_t *sc)
 			/* release all TX locks */
 			for (s = 0; s < num_tx_slices; s++) {
 				ss = &sc->ss[s];
+#ifdef IFNET_BUF_RING
+				mxge_start_locked(ss);
+#endif
 				mtx_unlock(&ss->tx.mtx);
 			}
 		}
@@ -3796,7 +3805,7 @@ mxge_fetch_tunables(mxge_softc_t *sc)
 		mxge_ticks = hz / 2;
 	sc->pause = mxge_flow_control;
 	if (mxge_rss_hash_type < MXGEFW_RSS_HASH_TYPE_IPV4 
-	    || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_SRC_PORT) {
+	    || mxge_rss_hash_type > MXGEFW_RSS_HASH_TYPE_MAX) {
 		mxge_rss_hash_type = MXGEFW_RSS_HASH_TYPE_SRC_PORT;
 	}
 }

Modified: stable/6/sys/dev/mxge/if_mxge_var.h
==============================================================================
--- stable/6/sys/dev/mxge/if_mxge_var.h	Thu Oct  1 15:40:08 2009	(r197675)
+++ stable/6/sys/dev/mxge/if_mxge_var.h	Thu Oct  1 15:51:29 2009	(r197676)
@@ -253,6 +253,7 @@ struct mxge_softc {
 	struct sysctl_ctx_list slice_sysctl_ctx;
 	char *mac_addr_string;
 	uint8_t	mac_addr[6];		/* eeprom mac address */
+	uint16_t pectl;			/* save PCIe CTL state */
 	char product_code_string[64];
 	char serial_number_string[64];
 	char cmd_mtx_name[16];

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 05:11:46 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id CA9111065676;
	Fri,  2 Oct 2009 05:11: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 B6DB28FC18;
	Fri,  2 Oct 2009 05:11:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n925Bkkn090099;
	Fri, 2 Oct 2009 05:11:46 GMT (envelope-from alc@svn.freebsd.org)
Received: (from alc@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n925BkKY090097;
	Fri, 2 Oct 2009 05:11:46 GMT (envelope-from alc@svn.freebsd.org)
Message-Id: <200910020511.n925BkKY090097@svn.freebsd.org>
From: Alan Cox 
Date: Fri, 2 Oct 2009 05:11:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197700 - in stable/8/sys: . amd64/amd64
	amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica
	contrib/pf dev/xen/xenpci
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 05:11:46 -0000

Author: alc
Date: Fri Oct  2 05:11:46 2009
New Revision: 197700
URL: http://svn.freebsd.org/changeset/base/197700

Log:
  MFC r197580
    Temporarily disable the use of 1GB page mappings by the direct map.
  
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/amd64/pmap.c
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/amd64/amd64/pmap.c
==============================================================================
--- stable/8/sys/amd64/amd64/pmap.c	Fri Oct  2 02:28:59 2009	(r197699)
+++ stable/8/sys/amd64/amd64/pmap.c	Fri Oct  2 05:11:46 2009	(r197700)
@@ -440,7 +440,7 @@ create_pagetables(vm_paddr_t *firstaddr)
 	if (ndmpdp < 4)		/* Minimum 4GB of dirmap */
 		ndmpdp = 4;
 	DMPDPphys = allocpages(firstaddr, NDMPML4E);
-	if ((amd_feature & AMDID_PAGE1GB) == 0)
+	if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0)
 		DMPDphys = allocpages(firstaddr, ndmpdp);
 	dmaplimit = (vm_paddr_t)ndmpdp << PDPSHIFT;
 
@@ -474,7 +474,7 @@ create_pagetables(vm_paddr_t *firstaddr)
 
 	/* Now set up the direct map space using either 2MB or 1GB pages */
 	/* Preset PG_M and PG_A because demotion expects it */
-	if ((amd_feature & AMDID_PAGE1GB) == 0) {
+	if (TRUE || (amd_feature & AMDID_PAGE1GB) == 0) {
 		for (i = 0; i < NPDEPG * ndmpdp; i++) {
 			((pd_entry_t *)DMPDphys)[i] = (vm_paddr_t)i << PDRSHIFT;
 			((pd_entry_t *)DMPDphys)[i] |= PG_RW | PG_V | PG_PS |

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 17:58:49 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1DFF31065672;
	Fri,  2 Oct 2009 17:58:49 +0000 (UTC)
	(envelope-from simon@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A7668FC14;
	Fri,  2 Oct 2009 17:58:49 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n92HwmHm008817;
	Fri, 2 Oct 2009 17:58:48 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n92HwmjA008816;
	Fri, 2 Oct 2009 17:58:48 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <200910021758.n92HwmjA008816@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Fri, 2 Oct 2009 17:58:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197714 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci kern
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 17:58:49 -0000

Author: simon
Date: Fri Oct  2 17:58:47 2009
New Revision: 197714
URL: http://svn.freebsd.org/changeset/base/197714

Log:
  MFC r197711:
  
  Add no zero mapping feature.
  
  NOTE: Unlike in the other branches where this change will be "merged"
  to, the 'no zero mapping' is enabled by default in stable/8.
  
  Errata:		FreeBSD-EN-09:05.null
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/kern/init_main.c
  stable/8/sys/kern/kern_exec.c

Modified: stable/8/sys/kern/init_main.c
==============================================================================
--- stable/8/sys/kern/init_main.c	Fri Oct  2 17:53:48 2009	(r197713)
+++ stable/8/sys/kern/init_main.c	Fri Oct  2 17:58:47 2009	(r197714)
@@ -492,6 +492,11 @@ proc0_init(void *dummy __unused)
 	pmap_pinit0(vmspace_pmap(&vmspace0));
 	p->p_vmspace = &vmspace0;
 	vmspace0.vm_refcnt = 1;
+
+	/*
+	 * proc0 is not expected to enter usermode, so there is no special
+	 * handling for sv_minuser here, like is done for exec_new_vmspace().
+	 */
 	vm_map_init(&vmspace0.vm_map, p->p_sysent->sv_minuser,
 	    p->p_sysent->sv_maxuser);
 	vmspace0.vm_map.pmap = vmspace_pmap(&vmspace0);

Modified: stable/8/sys/kern/kern_exec.c
==============================================================================
--- stable/8/sys/kern/kern_exec.c	Fri Oct  2 17:53:48 2009	(r197713)
+++ stable/8/sys/kern/kern_exec.c	Fri Oct  2 17:58:47 2009	(r197714)
@@ -122,6 +122,11 @@ u_long ps_arg_cache_limit = PAGE_SIZE / 
 SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, 
     &ps_arg_cache_limit, 0, "");
 
+static int map_at_zero = 0;
+TUNABLE_INT("security.bsd.map_at_zero", &map_at_zero);
+SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RW, &map_at_zero, 0,
+    "Permit processes to map an object at virtual address 0.");
+
 static int
 sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
 {
@@ -999,7 +1004,7 @@ exec_new_vmspace(imgp, sv)
 	int error;
 	struct proc *p = imgp->proc;
 	struct vmspace *vmspace = p->p_vmspace;
-	vm_offset_t stack_addr;
+	vm_offset_t sv_minuser, stack_addr;
 	vm_map_t map;
 	u_long ssiz;
 
@@ -1015,13 +1020,17 @@ exec_new_vmspace(imgp, sv)
 	 * not disrupted
 	 */
 	map = &vmspace->vm_map;
-	if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser &&
+	if (map_at_zero)
+		sv_minuser = sv->sv_minuser;
+	else
+		sv_minuser = MAX(sv->sv_minuser, PAGE_SIZE);
+	if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv_minuser &&
 	    vm_map_max(map) == sv->sv_maxuser) {
 		shmexit(vmspace);
 		pmap_remove_pages(vmspace_pmap(vmspace));
 		vm_map_remove(map, vm_map_min(map), vm_map_max(map));
 	} else {
-		error = vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser);
+		error = vmspace_exec(p, sv_minuser, sv->sv_maxuser);
 		if (error)
 			return (error);
 		vmspace = p->p_vmspace;

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 18:09:57 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 38F821065670;
	Fri,  2 Oct 2009 18:09:57 +0000 (UTC)
	(envelope-from simon@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 23F248FC12;
	Fri,  2 Oct 2009 18:09:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n92I9u83009086;
	Fri, 2 Oct 2009 18:09:56 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n92I9u1r009085;
	Fri, 2 Oct 2009 18:09:56 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <200910021809.n92I9u1r009085@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Fri, 2 Oct 2009 18:09:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf
	releng/6.3/sys/fs/devfs releng/6.3/sys/kern
	releng/6.3/sys/sys releng/6.4 releng/6.4/sys/conf
	releng/6.4/sys/fs/devfs releng/6.4/sys/kern releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 18:09:57 -0000

Author: simon
Date: Fri Oct  2 18:09:56 2009
New Revision: 197715
URL: http://svn.freebsd.org/changeset/base/197715

Log:
  MFC r197711 (partial) to 6.x and 7.x:
  
  - Add no zero mapping feature, disabled by default. [EN-09:05]
  
  MFC 178913,178914,179242,179243,180336,180340 to 6.x:
  
  - Fix kqueue pipe race conditions. [SA-09:13]
  
  MFC r192301 to 7.x; 6.x has slightly different fix:
  
  - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
  
  Security:	FreeBSD-SA-09:13.pipe
  Security:	FreeBSD-SA-09:14.devfs
  Errata:		FreeBSD-EN-09:05.null
  Submitted by:	kib [SA-09:13] [SA-09:14]
  Submitted by:	bz [EN-09:05]
  In collaboration with:	jhb, kib, alc [EN-09:05]
  Approved by:	so (simon)

Modified:
  stable/7/sys/kern/kern_exec.c

Changes in other areas also in this revision:
Modified:
  releng/6.3/UPDATING
  releng/6.3/sys/conf/newvers.sh
  releng/6.3/sys/fs/devfs/devfs_vnops.c
  releng/6.3/sys/kern/kern_event.c
  releng/6.3/sys/kern/kern_exec.c
  releng/6.3/sys/kern/kern_fork.c
  releng/6.3/sys/kern/sys_pipe.c
  releng/6.3/sys/sys/event.h
  releng/6.3/sys/sys/pipe.h
  releng/6.4/UPDATING
  releng/6.4/sys/conf/newvers.sh
  releng/6.4/sys/fs/devfs/devfs_vnops.c
  releng/6.4/sys/kern/kern_event.c
  releng/6.4/sys/kern/kern_exec.c
  releng/6.4/sys/kern/kern_fork.c
  releng/6.4/sys/kern/sys_pipe.c
  releng/6.4/sys/sys/event.h
  releng/6.4/sys/sys/pipe.h
  releng/7.1/UPDATING
  releng/7.1/sys/conf/newvers.sh
  releng/7.1/sys/fs/devfs/devfs_vnops.c
  releng/7.1/sys/kern/kern_exec.c
  releng/7.2/UPDATING
  releng/7.2/sys/conf/newvers.sh
  releng/7.2/sys/fs/devfs/devfs_vnops.c
  releng/7.2/sys/kern/kern_exec.c
  stable/6/sys/fs/devfs/devfs_vnops.c
  stable/6/sys/kern/kern_event.c
  stable/6/sys/kern/kern_exec.c
  stable/6/sys/kern/kern_fork.c
  stable/6/sys/kern/sys_pipe.c
  stable/6/sys/sys/event.h
  stable/6/sys/sys/pipe.h

Modified: stable/7/sys/kern/kern_exec.c
==============================================================================
--- stable/7/sys/kern/kern_exec.c	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/7/sys/kern/kern_exec.c	Fri Oct  2 18:09:56 2009	(r197715)
@@ -122,6 +122,11 @@ u_long ps_arg_cache_limit = PAGE_SIZE / 
 SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, 
     &ps_arg_cache_limit, 0, "");
 
+static int map_at_zero = 1;
+TUNABLE_INT("security.bsd.map_at_zero", &map_at_zero);
+SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RW, &map_at_zero, 0,
+    "Permit processes to map an object at virtual address 0.");
+
 static int
 sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
 {
@@ -939,7 +944,7 @@ exec_new_vmspace(imgp, sv)
 	int error;
 	struct proc *p = imgp->proc;
 	struct vmspace *vmspace = p->p_vmspace;
-	vm_offset_t stack_addr;
+	vm_offset_t sv_minuser, stack_addr;
 	vm_map_t map;
 	u_long ssiz;
 
@@ -955,13 +960,17 @@ exec_new_vmspace(imgp, sv)
 	 * not disrupted
 	 */
 	map = &vmspace->vm_map;
-	if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser &&
+	if (map_at_zero)
+		sv_minuser = sv->sv_minuser;
+	else
+		sv_minuser = MAX(sv->sv_minuser, PAGE_SIZE);
+	if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv_minuser &&
 	    vm_map_max(map) == sv->sv_maxuser) {
 		shmexit(vmspace);
 		pmap_remove_pages(vmspace_pmap(vmspace));
 		vm_map_remove(map, vm_map_min(map), vm_map_max(map));
 	} else {
-		error = vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser);
+		error = vmspace_exec(p, sv_minuser, sv->sv_maxuser);
 		if (error)
 			return (error);
 		vmspace = p->p_vmspace;

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 18:09:57 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8E9CF1065679;
	Fri,  2 Oct 2009 18:09:57 +0000 (UTC)
	(envelope-from simon@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 78D848FC16;
	Fri,  2 Oct 2009 18:09:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n92I9vmi009129;
	Fri, 2 Oct 2009 18:09:57 GMT (envelope-from simon@svn.freebsd.org)
Received: (from simon@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n92I9v0c009121;
	Fri, 2 Oct 2009 18:09:57 GMT (envelope-from simon@svn.freebsd.org)
Message-Id: <200910021809.n92I9v0c009121@svn.freebsd.org>
From: "Simon L. Nielsen" 
Date: Fri, 2 Oct 2009 18:09:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf
	releng/6.3/sys/fs/devfs releng/6.3/sys/kern
	releng/6.3/sys/sys releng/6.4 releng/6.4/sys/conf
	releng/6.4/sys/fs/devfs releng/6.4/sys/kern releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 18:09:57 -0000

Author: simon
Date: Fri Oct  2 18:09:56 2009
New Revision: 197715
URL: http://svn.freebsd.org/changeset/base/197715

Log:
  MFC r197711 (partial) to 6.x and 7.x:
  
  - Add no zero mapping feature, disabled by default. [EN-09:05]
  
  MFC 178913,178914,179242,179243,180336,180340 to 6.x:
  
  - Fix kqueue pipe race conditions. [SA-09:13]
  
  MFC r192301 to 7.x; 6.x has slightly different fix:
  
  - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
  
  Security:	FreeBSD-SA-09:13.pipe
  Security:	FreeBSD-SA-09:14.devfs
  Errata:		FreeBSD-EN-09:05.null
  Submitted by:	kib [SA-09:13] [SA-09:14]
  Submitted by:	bz [EN-09:05]
  In collaboration with:	jhb, kib, alc [EN-09:05]
  Approved by:	so (simon)

Modified:
  stable/6/sys/fs/devfs/devfs_vnops.c
  stable/6/sys/kern/kern_event.c
  stable/6/sys/kern/kern_exec.c
  stable/6/sys/kern/kern_fork.c
  stable/6/sys/kern/sys_pipe.c
  stable/6/sys/sys/event.h
  stable/6/sys/sys/pipe.h

Changes in other areas also in this revision:
Modified:
  releng/6.3/UPDATING
  releng/6.3/sys/conf/newvers.sh
  releng/6.3/sys/fs/devfs/devfs_vnops.c
  releng/6.3/sys/kern/kern_event.c
  releng/6.3/sys/kern/kern_exec.c
  releng/6.3/sys/kern/kern_fork.c
  releng/6.3/sys/kern/sys_pipe.c
  releng/6.3/sys/sys/event.h
  releng/6.3/sys/sys/pipe.h
  releng/6.4/UPDATING
  releng/6.4/sys/conf/newvers.sh
  releng/6.4/sys/fs/devfs/devfs_vnops.c
  releng/6.4/sys/kern/kern_event.c
  releng/6.4/sys/kern/kern_exec.c
  releng/6.4/sys/kern/kern_fork.c
  releng/6.4/sys/kern/sys_pipe.c
  releng/6.4/sys/sys/event.h
  releng/6.4/sys/sys/pipe.h
  releng/7.1/UPDATING
  releng/7.1/sys/conf/newvers.sh
  releng/7.1/sys/fs/devfs/devfs_vnops.c
  releng/7.1/sys/kern/kern_exec.c
  releng/7.2/UPDATING
  releng/7.2/sys/conf/newvers.sh
  releng/7.2/sys/fs/devfs/devfs_vnops.c
  releng/7.2/sys/kern/kern_exec.c
  stable/7/sys/kern/kern_exec.c

Modified: stable/6/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- stable/6/sys/fs/devfs/devfs_vnops.c	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/fs/devfs/devfs_vnops.c	Fri Oct  2 18:09:56 2009	(r197715)
@@ -759,6 +759,9 @@ devfs_open(struct vop_open_args *ap)
 
 	VOP_UNLOCK(vp, 0, td);
 
+	if (ap->a_fdidx >= 0)
+		ap->a_td->td_proc->p_fd->fd_ofiles[ap->a_fdidx]->f_vnode = vp;
+
 	if(!(dsw->d_flags & D_NEEDGIANT)) {
 		DROP_GIANT();
 		if (dsw->d_fdopen != NULL)

Modified: stable/6/sys/kern/kern_event.c
==============================================================================
--- stable/6/sys/kern/kern_event.c	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/kern/kern_event.c	Fri Oct  2 18:09:56 2009	(r197715)
@@ -392,30 +392,82 @@ filt_proc(struct knote *kn, long hint)
 		return (1);
 	}
 
-	/*
-	 * process forked, and user wants to track the new process,
-	 * so attach a new knote to it, and immediately report an
-	 * event with the parent's pid.
-	 */
-	if ((event == NOTE_FORK) && (kn->kn_sfflags & NOTE_TRACK)) {
-		struct kevent kev;
-		int error;
+	return (kn->kn_fflags != 0);
+}
+
+/*
+ * Called when the process forked. It mostly does the same as the
+ * knote(), activating all knotes registered to be activated when the
+ * process forked. Additionally, for each knote attached to the
+ * parent, check whether user wants to track the new process. If so
+ * attach a new knote to it, and immediately report an event with the
+ * child's pid.
+ */
+void
+knote_fork(struct knlist *list, int pid)
+{
+	struct kqueue *kq;
+	struct knote *kn;
+	struct kevent kev;
+	int error;
+
+	if (list == NULL)
+		return;
+	list->kl_lock(list->kl_lockarg);
+
+	SLIST_FOREACH(kn, &list->kl_list, kn_selnext) {
+		if ((kn->kn_status & KN_INFLUX) == KN_INFLUX)
+			continue;
+		kq = kn->kn_kq;
+		KQ_LOCK(kq);
+		if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) {
+			KQ_UNLOCK(kq);
+			continue;
+		}
 
 		/*
-		 * register knote with new process.
+		 * The same as knote(), activate the event.
 		 */
-		kev.ident = hint & NOTE_PDATAMASK;	/* pid */
+		if ((kn->kn_sfflags & NOTE_TRACK) == 0) {
+			kn->kn_status |= KN_HASKQLOCK;
+			if (kn->kn_fop->f_event(kn, NOTE_FORK | pid))
+				KNOTE_ACTIVATE(kn, 1);
+			kn->kn_status &= ~KN_HASKQLOCK;
+			KQ_UNLOCK(kq);
+			continue;
+		}
+
+		/*
+		 * The NOTE_TRACK case. In addition to the activation
+		 * of the event, we need to register new event to
+		 * track the child. Drop the locks in preparation for
+		 * the call to kqueue_register().
+		 */
+		kn->kn_status |= KN_INFLUX;
+		KQ_UNLOCK(kq);
+		list->kl_unlock(list->kl_lockarg);
+
+		/*
+		 * Activate existing knote and register a knote with
+		 * new process.
+		 */
+		kev.ident = pid;
 		kev.filter = kn->kn_filter;
 		kev.flags = kn->kn_flags | EV_ADD | EV_ENABLE | EV_FLAG1;
 		kev.fflags = kn->kn_sfflags;
-		kev.data = kn->kn_id;			/* parent */
-		kev.udata = kn->kn_kevent.udata;	/* preserve udata */
-		error = kqueue_register(kn->kn_kq, &kev, NULL, 0);
+		kev.data = kn->kn_id;		/* parent */
+		kev.udata = kn->kn_kevent.udata;/* preserve udata */
+		error = kqueue_register(kq, &kev, NULL, 0);
+		if (kn->kn_fop->f_event(kn, NOTE_FORK | pid))
+			KNOTE_ACTIVATE(kn, 0);
 		if (error)
 			kn->kn_fflags |= NOTE_TRACKERR;
+		KQ_LOCK(kq);
+		kn->kn_status &= ~KN_INFLUX;
+		KQ_UNLOCK_FLUX(kq);
+		list->kl_lock(list->kl_lockarg);
 	}
-
-	return (kn->kn_fflags != 0);
+	list->kl_unlock(list->kl_lockarg);
 }
 
 static int
@@ -1123,7 +1175,7 @@ kqueue_scan(struct kqueue *kq, int maxev
 	struct kevent *kevp;
 	struct timeval atv, rtv, ttv;
 	struct knote *kn, *marker;
-	int count, timeout, nkev, error;
+	int count, timeout, nkev, error, influx;
 	int haskqglobal;
 
 	count = maxevents;
@@ -1193,12 +1245,17 @@ start:
 	}
 
 	TAILQ_INSERT_TAIL(&kq->kq_head, marker, kn_tqe);
+	influx = 0;
 	while (count) {
 		KQ_OWNED(kq);
 		kn = TAILQ_FIRST(&kq->kq_head);
 
 		if ((kn->kn_status == KN_MARKER && kn != marker) ||
 		    (kn->kn_status & KN_INFLUX) == KN_INFLUX) {
+			if (influx) {
+				influx = 0;
+				KQ_FLUX_WAKEUP(kq);
+			}
 			kq->kq_state |= KQ_FLUXWAIT;
 			error = msleep(kq, &kq->kq_lock, PSOCK,
 			    "kqflxwt", 0);
@@ -1248,6 +1305,7 @@ start:
 				    ~(KN_QUEUED | KN_ACTIVE | KN_INFLUX);
 				kq->kq_count--;
 				KN_LIST_UNLOCK(kn);
+				influx = 1;
 				continue;
 			}
 			*kevp = kn->kn_kevent;
@@ -1263,6 +1321,7 @@ start:
 			
 			kn->kn_status &= ~(KN_INFLUX);
 			KN_LIST_UNLOCK(kn);
+			influx = 1;
 		}
 
 		/* we are returning a copy to the user */
@@ -1271,6 +1330,7 @@ start:
 		count--;
 
 		if (nkev == KQ_NEVENTS) {
+			influx = 0;
 			KQ_UNLOCK_FLUX(kq);
 			error = k_ops->k_copyout(k_ops->arg, keva, nkev);
 			nkev = 0;
@@ -1434,8 +1494,11 @@ kqueue_close(struct file *fp, struct thr
 
 	for (i = 0; i < kq->kq_knlistsize; i++) {
 		while ((kn = SLIST_FIRST(&kq->kq_knlist[i])) != NULL) {
-			KASSERT((kn->kn_status & KN_INFLUX) == 0,
-			    ("KN_INFLUX set when not suppose to be"));
+			if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) {
+				kq->kq_state |= KQ_FLUXWAIT;
+				msleep(kq, &kq->kq_lock, PSOCK, "kqclo1", 0);
+				continue;
+			}
 			kn->kn_status |= KN_INFLUX;
 			KQ_UNLOCK(kq);
 			if (!(kn->kn_status & KN_DETACHED))
@@ -1447,8 +1510,12 @@ kqueue_close(struct file *fp, struct thr
 	if (kq->kq_knhashmask != 0) {
 		for (i = 0; i <= kq->kq_knhashmask; i++) {
 			while ((kn = SLIST_FIRST(&kq->kq_knhash[i])) != NULL) {
-				KASSERT((kn->kn_status & KN_INFLUX) == 0,
-				    ("KN_INFLUX set when not suppose to be"));
+				if ((kn->kn_status & KN_INFLUX) == KN_INFLUX) {
+					kq->kq_state |= KQ_FLUXWAIT;
+					msleep(kq, &kq->kq_lock, PSOCK,
+					       "kqclo2", 0);
+					continue;
+				}
 				kn->kn_status |= KN_INFLUX;
 				KQ_UNLOCK(kq);
 				if (!(kn->kn_status & KN_DETACHED))

Modified: stable/6/sys/kern/kern_exec.c
==============================================================================
--- stable/6/sys/kern/kern_exec.c	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/kern/kern_exec.c	Fri Oct  2 18:09:56 2009	(r197715)
@@ -104,6 +104,13 @@ u_long ps_arg_cache_limit = PAGE_SIZE / 
 SYSCTL_ULONG(_kern, OID_AUTO, ps_arg_cache_limit, CTLFLAG_RW, 
     &ps_arg_cache_limit, 0, "");
 
+SYSCTL_DECL(_security_bsd);
+
+static int map_at_zero = 1;
+TUNABLE_INT("security.bsd.map_at_zero", &map_at_zero);
+SYSCTL_INT(_security_bsd, OID_AUTO, map_at_zero, CTLFLAG_RW, &map_at_zero, 0,
+    "Permit processes to map an object at virtual address 0.");
+
 static int
 sysctl_kern_ps_strings(SYSCTL_HANDLER_ARGS)
 {
@@ -914,7 +921,7 @@ exec_new_vmspace(imgp, sv)
 	int error;
 	struct proc *p = imgp->proc;
 	struct vmspace *vmspace = p->p_vmspace;
-	vm_offset_t stack_addr;
+	vm_offset_t sv_minuser, stack_addr;
 	vm_map_t map;
 
 	imgp->vmspace_destroyed = 1;
@@ -928,14 +935,18 @@ exec_new_vmspace(imgp, sv)
 	 * not disrupted
 	 */
 	map = &vmspace->vm_map;
-	if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv->sv_minuser &&
+	if (map_at_zero)
+		sv_minuser = sv->sv_minuser;
+	else
+		sv_minuser = MAX(sv->sv_minuser, PAGE_SIZE);
+	if (vmspace->vm_refcnt == 1 && vm_map_min(map) == sv_minuser &&
 	    vm_map_max(map) == sv->sv_maxuser) {
 		shmexit(vmspace);
 		pmap_remove_pages(vmspace_pmap(vmspace), vm_map_min(map),
 		    vm_map_max(map));
 		vm_map_remove(map, vm_map_min(map), vm_map_max(map));
 	} else {
-		vmspace_exec(p, sv->sv_minuser, sv->sv_maxuser);
+		vmspace_exec(p, sv_minuser, sv->sv_maxuser);
 		vmspace = p->p_vmspace;
 		map = &vmspace->vm_map;
 	}

Modified: stable/6/sys/kern/kern_fork.c
==============================================================================
--- stable/6/sys/kern/kern_fork.c	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/kern/kern_fork.c	Fri Oct  2 18:09:56 2009	(r197715)
@@ -699,14 +699,12 @@ again:
 	 */
 	PROC_LOCK(p1);
 	_PRELE(p1);
+	PROC_UNLOCK(p1);
 
 	/*
 	 * Tell any interested parties about the new process.
 	 */
-	KNOTE_LOCKED(&p1->p_klist, NOTE_FORK | p2->p_pid);
-
-	PROC_UNLOCK(p1);
-
+	knote_fork(&p1->p_klist, p2->p_pid);
 	/*
 	 * Preserve synchronization semantics of vfork.  If waiting for
 	 * child to exec or exit, set P_PPWAIT on child, and sleep on our

Modified: stable/6/sys/kern/sys_pipe.c
==============================================================================
--- stable/6/sys/kern/sys_pipe.c	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/kern/sys_pipe.c	Fri Oct  2 18:09:56 2009	(r197715)
@@ -268,8 +268,8 @@ pipe_zone_ctor(void *mem, int size, void
 	 * one at a time.  When both are free'd, then the whole pair
 	 * is released.
 	 */
-	rpipe->pipe_present = 1;
-	wpipe->pipe_present = 1;
+	rpipe->pipe_present = PIPE_ACTIVE;
+	wpipe->pipe_present = PIPE_ACTIVE;
 
 	/*
 	 * Eventually, the MAC Framework may initialize the label
@@ -1003,7 +1003,8 @@ pipe_write(fp, uio, active_cred, flags, 
 	/*
 	 * detect loss of pipe read side, issue SIGPIPE if lost.
 	 */
-	if ((!wpipe->pipe_present) || (wpipe->pipe_state & PIPE_EOF)) {
+	if (wpipe->pipe_present != PIPE_ACTIVE ||
+	    (wpipe->pipe_state & PIPE_EOF)) {
 		pipeunlock(wpipe);
 		PIPE_UNLOCK(rpipe);
 		return (EPIPE);
@@ -1361,13 +1362,14 @@ pipe_poll(fp, events, active_cred, td)
 			revents |= events & (POLLIN | POLLRDNORM);
 
 	if (events & (POLLOUT | POLLWRNORM))
-		if (!wpipe->pipe_present || (wpipe->pipe_state & PIPE_EOF) ||
+		if (wpipe->pipe_present != PIPE_ACTIVE ||
+		    (wpipe->pipe_state & PIPE_EOF) ||
 		    (((wpipe->pipe_state & PIPE_DIRECTW) == 0) &&
 		     (wpipe->pipe_buffer.size - wpipe->pipe_buffer.cnt) >= PIPE_BUF))
 			revents |= events & (POLLOUT | POLLWRNORM);
 
 	if ((rpipe->pipe_state & PIPE_EOF) ||
-	    (!wpipe->pipe_present) ||
+	    wpipe->pipe_present != PIPE_ACTIVE ||
 	    (wpipe->pipe_state & PIPE_EOF))
 		revents |= POLLHUP;
 
@@ -1506,7 +1508,7 @@ pipeclose(cpipe)
 	 * Disconnect from peer, if any.
 	 */
 	ppipe = cpipe->pipe_peer;
-	if (ppipe->pipe_present != 0) {
+	if (ppipe->pipe_present == PIPE_ACTIVE) {
 		pipeselwakeup(ppipe);
 
 		ppipe->pipe_state |= PIPE_EOF;
@@ -1523,16 +1525,23 @@ pipeclose(cpipe)
 	PIPE_UNLOCK(cpipe);
 	pipe_free_kmem(cpipe);
 	PIPE_LOCK(cpipe);
-	cpipe->pipe_present = 0;
+	cpipe->pipe_present = PIPE_CLOSING;
 	pipeunlock(cpipe);
+
+	/*
+	 * knlist_clear() may sleep dropping the PIPE_MTX. Set the
+	 * PIPE_FINALIZED, that allows other end to free the
+	 * pipe_pair, only after the knotes are completely dismantled.
+	 */
 	knlist_clear(&cpipe->pipe_sel.si_note, 1);
+	cpipe->pipe_present = PIPE_FINALIZED;
 	knlist_destroy(&cpipe->pipe_sel.si_note);
 
 	/*
 	 * If both endpoints are now closed, release the memory for the
 	 * pipe pair.  If not, unlock.
 	 */
-	if (ppipe->pipe_present == 0) {
+	if (ppipe->pipe_present == PIPE_FINALIZED) {
 		PIPE_UNLOCK(cpipe);
 #ifdef MAC
 		mac_destroy_pipe(pp);
@@ -1556,7 +1565,7 @@ pipe_kqfilter(struct file *fp, struct kn
 		break;
 	case EVFILT_WRITE:
 		kn->kn_fop = &pipe_wfiltops;
-		if (!cpipe->pipe_peer->pipe_present) {
+		if (cpipe->pipe_peer->pipe_present != PIPE_ACTIVE) {
 			/* other end of pipe has been closed */
 			PIPE_UNLOCK(cpipe);
 			return (EPIPE);
@@ -1579,13 +1588,8 @@ filt_pipedetach(struct knote *kn)
 	struct pipe *cpipe = (struct pipe *)kn->kn_fp->f_data;
 
 	PIPE_LOCK(cpipe);
-	if (kn->kn_filter == EVFILT_WRITE) {
-		if (!cpipe->pipe_peer->pipe_present) {
-			PIPE_UNLOCK(cpipe);
-			return;
-		}
+	if (kn->kn_filter == EVFILT_WRITE)
 		cpipe = cpipe->pipe_peer;
-	}
 	knlist_remove(&cpipe->pipe_sel.si_note, kn, 1);
 	PIPE_UNLOCK(cpipe);
 }
@@ -1604,7 +1608,8 @@ filt_piperead(struct knote *kn, long hin
 		kn->kn_data = rpipe->pipe_map.cnt;
 
 	if ((rpipe->pipe_state & PIPE_EOF) ||
-	    (!wpipe->pipe_present) || (wpipe->pipe_state & PIPE_EOF)) {
+	    wpipe->pipe_present != PIPE_ACTIVE ||
+	    (wpipe->pipe_state & PIPE_EOF)) {
 		kn->kn_flags |= EV_EOF;
 		PIPE_UNLOCK(rpipe);
 		return (1);
@@ -1622,7 +1627,8 @@ filt_pipewrite(struct knote *kn, long hi
 	struct pipe *wpipe = rpipe->pipe_peer;
 
 	PIPE_LOCK(rpipe);
-	if ((!wpipe->pipe_present) || (wpipe->pipe_state & PIPE_EOF)) {
+	if (wpipe->pipe_present != PIPE_ACTIVE ||
+	    (wpipe->pipe_state & PIPE_EOF)) {
 		kn->kn_data = 0;
 		kn->kn_flags |= EV_EOF;
 		PIPE_UNLOCK(rpipe);

Modified: stable/6/sys/sys/event.h
==============================================================================
--- stable/6/sys/sys/event.h	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/sys/event.h	Fri Oct  2 18:09:56 2009	(r197715)
@@ -208,6 +208,7 @@ struct proc;
 struct knlist;
 
 extern void	knote(struct knlist *list, long hint, int islocked);
+extern void	knote_fork(struct knlist *list, int pid);
 extern void	knlist_add(struct knlist *knl, struct knote *kn, int islocked);
 extern void	knlist_remove(struct knlist *knl, struct knote *kn, int islocked);
 extern void	knlist_remove_inevent(struct knlist *knl, struct knote *kn);

Modified: stable/6/sys/sys/pipe.h
==============================================================================
--- stable/6/sys/sys/pipe.h	Fri Oct  2 17:58:47 2009	(r197714)
+++ stable/6/sys/sys/pipe.h	Fri Oct  2 18:09:56 2009	(r197715)
@@ -115,6 +115,13 @@ struct pipe {
 };
 
 /*
+ * Values for the pipe_present.
+ */
+#define PIPE_ACTIVE		1
+#define	PIPE_CLOSING		2
+#define	PIPE_FINALIZED		3
+
+/*
  * Container structure to hold the two pipe endpoints, mutex, and label
  * pointer.
  */

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 18:13:19 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7D1B510656A3;
	Fri,  2 Oct 2009 18:13:19 +0000 (UTC) (envelope-from simon@nitro.dk)
Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38])
	by mx1.freebsd.org (Postfix) with ESMTP id 382478FC28;
	Fri,  2 Oct 2009 18:13:19 +0000 (UTC)
Received: from arthur.nitro.dk (arthur.bofh [192.168.2.3])
	by mx.nitro.dk (Postfix) with ESMTP id 3DBA92D4930;
	Fri,  2 Oct 2009 18:13:18 +0000 (UTC)
Received: by arthur.nitro.dk (Postfix, from userid 1000)
	id 25B9B5C0A; Fri,  2 Oct 2009 20:13:18 +0200 (CEST)
Date: Fri, 2 Oct 2009 20:13:18 +0200
From: "Simon L. Nielsen" 
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Message-ID: <20091002181317.GD1227@arthur.nitro.dk>
References: <200910021809.n92I9u1r009085@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200910021809.n92I9u1r009085@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: 
Subject: Re: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf
 releng/6.3/sys/fs/devfs releng/6.3/sys/kern releng/6.3/sys/sys releng/6.4
 releng/6.4/sys/conf releng/6.4/sys/fs/devfs releng/6.4/sys/kern releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 18:13:19 -0000

On 2009.10.02 18:09:56 +0000, Simon L. Nielsen wrote:
> Author: simon
> Date: Fri Oct  2 18:09:56 2009
> New Revision: 197715
> URL: http://svn.freebsd.org/changeset/base/197715
> 
> Log:
>   MFC r197711 (partial) to 6.x and 7.x:
>   
>   - Add no zero mapping feature, disabled by default. [EN-09:05]
>   
>   MFC 178913,178914,179242,179243,180336,180340 to 6.x:
>   
>   - Fix kqueue pipe race conditions. [SA-09:13]
>   
>   MFC r192301 to 7.x; 6.x has slightly different fix:
>   
>   - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
>   
>   Security:	FreeBSD-SA-09:13.pipe
>   Security:	FreeBSD-SA-09:14.devfs
>   Errata:		FreeBSD-EN-09:05.null
>   Submitted by:	kib [SA-09:13] [SA-09:14]
>   Submitted by:	bz [EN-09:05]
>   In collaboration with:	jhb, kib, alc [EN-09:05]
>   Approved by:	so (simon)

Just FYI, I plan to fix up the merge info for the stable/[67]
branches, but I probably won't get to it until Saturday or Sunday.

-- 
Simon L. Nielsen

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 18:33:41 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 55DEC106566B;
	Fri,  2 Oct 2009 18:33:41 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 42B1C8FC1E;
	Fri,  2 Oct 2009 18:33:41 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n92IXfC5009683;
	Fri, 2 Oct 2009 18:33:41 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n92IXfAb009681;
	Fri, 2 Oct 2009 18:33:41 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200910021833.n92IXfAb009681@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 2 Oct 2009 18:33:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197716 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci sparc64/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 18:33:41 -0000

Author: marius
Date: Fri Oct  2 18:33:40 2009
New Revision: 197716
URL: http://svn.freebsd.org/changeset/base/197716

Log:
  MFC: r197490
  
  Merge r194204 from amd64/i386:
  
  Enable PRINTF_BUFR_SIZE by default.
  
  PR:		139134
  Approved by:	re (kib)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/sparc64/conf/GENERIC

Modified: stable/8/sys/sparc64/conf/GENERIC
==============================================================================
--- stable/8/sys/sparc64/conf/GENERIC	Fri Oct  2 18:09:56 2009	(r197715)
+++ stable/8/sys/sparc64/conf/GENERIC	Fri Oct  2 18:33:40 2009	(r197716)
@@ -68,6 +68,7 @@ options 	SYSVMSG			# SYSV-style message 
 options 	SYSVSEM			# SYSV-style semaphores
 options 	P1003_1B_SEMAPHORES	# POSIX-style semaphores
 options 	_KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
+options 	PRINTF_BUFR_SIZE=128	# Prevent printf output being interspersed.
 options 	HWPMC_HOOKS		# Necessary kernel hooks for hwpmc(4)
 options 	AUDIT			# Security event auditing
 options 	MAC			# TrustedBSD MAC Framework

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 20:10:29 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3D3951065670;
	Fri,  2 Oct 2009 20:10:29 +0000 (UTC) (envelope-from simon@nitro.dk)
Received: from mx.nitro.dk (zarniwoop.nitro.dk [83.92.207.38])
	by mx1.freebsd.org (Postfix) with ESMTP id EC2978FC0C;
	Fri,  2 Oct 2009 20:10:28 +0000 (UTC)
Received: from arthur.nitro.dk (arthur.bofh [192.168.2.3])
	by mx.nitro.dk (Postfix) with ESMTP id F2D882D4906;
	Fri,  2 Oct 2009 20:10:27 +0000 (UTC)
Received: by arthur.nitro.dk (Postfix, from userid 1000)
	id D3BBC5C0A; Fri,  2 Oct 2009 22:10:27 +0200 (CEST)
Date: Fri, 2 Oct 2009 22:10:27 +0200
From: "Simon L. Nielsen" 
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Message-ID: <20091002201027.GE1227@arthur.nitro.dk>
References: <200910021809.n92I9u1r009085@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200910021809.n92I9u1r009085@svn.freebsd.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Cc: 
Subject: Re: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf
 releng/6.3/sys/fs/devfs releng/6.3/sys/kern releng/6.3/sys/sys releng/6.4
 releng/6.4/sys/conf releng/6.4/sys/fs/devfs releng/6.4/sys/kern releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 20:10:29 -0000

On 2009.10.02 18:09:56 +0000, Simon L. Nielsen wrote:
> Author: simon
> Date: Fri Oct  2 18:09:56 2009
> New Revision: 197715
> URL: http://svn.freebsd.org/changeset/base/197715
> 
> Log:
>   MFC r197711 (partial) to 6.x and 7.x:
>   
>   - Add no zero mapping feature, disabled by default. [EN-09:05]
>   
>   MFC 178913,178914,179242,179243,180336,180340 to 6.x:
>   
>   - Fix kqueue pipe race conditions. [SA-09:13]
>   
>   MFC r192301 to 7.x; 6.x has slightly different fix:
>   
>   - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
>   
>   Security:	FreeBSD-SA-09:13.pipe
>   Security:	FreeBSD-SA-09:14.devfs
>   Errata:		FreeBSD-EN-09:05.null
>   Submitted by:	kib [SA-09:13] [SA-09:14]
>   Submitted by:	bz [EN-09:05]
>   In collaboration with:	jhb, kib, alc [EN-09:05]
>   Approved by:	so (simon)

Oh, and I initially forgot:

Tested by:	pho

(and that was testing both reproducing the problems in the first place
and helping in testing that the patches actually closes the races
etc. - so thanks to pho as well as the other people mentioned above!
:-) )

-- 
Simon L. Nielsen

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 20:31:15 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1EA4B10656AD;
	Fri,  2 Oct 2009 20:31:15 +0000 (UTC)
	(envelope-from oliver.pntr@gmail.com)
Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com
	[209.85.211.197])
	by mx1.freebsd.org (Postfix) with ESMTP id 6C6FA8FC2F;
	Fri,  2 Oct 2009 20:31:13 +0000 (UTC)
Received: by ywh35 with SMTP id 35so3485920ywh.7
	for ; Fri, 02 Oct 2009 13:31:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type;
	bh=JoLWKP8yoSMMZqE3PMsuPzB0lJHFtkmzw/LdV3NZDYY=;
	b=nbkOBpi/8XB6W7ktJ74so43/3xImqQh2vKPvue4aftS0VXaOB/sGQtnoZYuezCkiSL
	R2RQ92Luc1phI81tVCuwUwTsptUJ+LOtDLQLnP+MWPM0AJfPuEGvZUP43vl53IubkuCC
	oC2cD3d6BxVsqN4Zh1RhGO9QVG6swHsXwg1Ws=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=R/Ow23yP3ZWnym+/otd/B5QIVxgMEp+OaQe9IQEKIXHcz+yIPJXB1OQJ2wNHKncpMU
	GHA/qDJX86k2BKcUZ1Ag0UgfZZ4NQpIi9bFBJiHBBNQlo1C26gexJyjBeX1bsjc42/6O
	4Fx72skUSYuOb+dZ8rQeFTtc9nDETUF03p5cg=
MIME-Version: 1.0
Received: by 10.91.19.4 with SMTP id w4mr1670374agi.0.1254515472238; Fri, 02 
	Oct 2009 13:31:12 -0700 (PDT)
In-Reply-To: <20091002201027.GE1227@arthur.nitro.dk>
References: <200910021809.n92I9u1r009085@svn.freebsd.org>
	<20091002201027.GE1227@arthur.nitro.dk>
Date: Fri, 2 Oct 2009 22:31:11 +0200
Message-ID: <6101e8c40910021331g3747f4e1g2b7c2dbfe504712@mail.gmail.com>
From: Oliver Pinter 
To: "Simon L. Nielsen" 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf 
	releng/6.3/sys/fs/devfs releng/6.3/sys/kern releng/6.3/sys/sys
	releng/6.4 
	releng/6.4/sys/conf releng/6.4/sys/fs/devfs releng/6.4/sys/kern
	releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 20:31:15 -0000

Hi!

And what's the status of these exploits fix:
http://hup.hu/cikkek/200909/freebsd_6.4_es_7.2_local_root_0day-ek

?

On 10/2/09, Simon L. Nielsen  wrote:
> On 2009.10.02 18:09:56 +0000, Simon L. Nielsen wrote:
>> Author: simon
>> Date: Fri Oct  2 18:09:56 2009
>> New Revision: 197715
>> URL: http://svn.freebsd.org/changeset/base/197715
>>
>> Log:
>>   MFC r197711 (partial) to 6.x and 7.x:
>>
>>   - Add no zero mapping feature, disabled by default. [EN-09:05]
>>
>>   MFC 178913,178914,179242,179243,180336,180340 to 6.x:
>>
>>   - Fix kqueue pipe race conditions. [SA-09:13]
>>
>>   MFC r192301 to 7.x; 6.x has slightly different fix:
>>
>>   - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
>>
>>   Security:	FreeBSD-SA-09:13.pipe
>>   Security:	FreeBSD-SA-09:14.devfs
>>   Errata:		FreeBSD-EN-09:05.null
>>   Submitted by:	kib [SA-09:13] [SA-09:14]
>>   Submitted by:	bz [EN-09:05]
>>   In collaboration with:	jhb, kib, alc [EN-09:05]
>>   Approved by:	so (simon)
>
> Oh, and I initially forgot:
>
> Tested by:	pho
>
> (and that was testing both reproducing the problems in the first place
> and helping in testing that the patches actually closes the races
> etc. - so thanks to pho as well as the other people mentioned above!
> :-) )
>
> --
> Simon L. Nielsen
> _______________________________________________
> svn-src-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable
> To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org"
>

From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 20:41:37 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E7F401065694;
	Fri,  2 Oct 2009 20:41:37 +0000 (UTC)
	(envelope-from remko@elvandar.org)
Received: from websrv01.jr-hosting.nl (websrv01.jr-hosting.nl [78.47.69.233])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F0F18FC2E;
	Fri,  2 Oct 2009 20:41:37 +0000 (UTC)
Received: from a83-163-38-147.adsl.xs4all.nl ([83.163.38.147]
	helo=axantucar.elvandar.int)
	by websrv01.jr-hosting.nl with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69 (FreeBSD)) (envelope-from )
	id 1Mtowa-0002uX-I9; Fri, 02 Oct 2009 22:41:36 +0200
Mime-Version: 1.0 (Apple Message framework v1076)
Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
From: Remko Lodder 
In-Reply-To: <6101e8c40910021331g3747f4e1g2b7c2dbfe504712@mail.gmail.com>
Date: Fri, 2 Oct 2009 22:41:35 +0200
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <200910021809.n92I9u1r009085@svn.freebsd.org>
	<20091002201027.GE1227@arthur.nitro.dk>
	<6101e8c40910021331g3747f4e1g2b7c2dbfe504712@mail.gmail.com>
To: Oliver Pinter 
X-Mailer: Apple Mail (2.1076)
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org,
	"Simon L. Nielsen" 
Subject: Re: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf
	releng/6.3/sys/fs/devfs releng/6.3/sys/kern
	releng/6.3/sys/sys releng/6.4 releng/6.4/sys/conf
	releng/6.4/sys/fs/devfs releng/6.4/sys/kern releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 20:41:38 -0000


Please wait for the advisories to popup and see whether these match  
the question you have.

Thanks,
Remko

On Oct 2, 2009, at 10:31 PM, Oliver Pinter wrote:

> Hi!
>
> And what's the status of these exploits fix:
> http://hup.hu/cikkek/200909/freebsd_6.4_es_7.2_local_root_0day-ek
>
> ?
>
> On 10/2/09, Simon L. Nielsen  wrote:
>> On 2009.10.02 18:09:56 +0000, Simon L. Nielsen wrote:
>>> Author: simon
>>> Date: Fri Oct  2 18:09:56 2009
>>> New Revision: 197715
>>> URL: http://svn.freebsd.org/changeset/base/197715
>>>
>>> Log:
>>>  MFC r197711 (partial) to 6.x and 7.x:
>>>
>>>  - Add no zero mapping feature, disabled by default. [EN-09:05]
>>>
>>>  MFC 178913,178914,179242,179243,180336,180340 to 6.x:
>>>
>>>  - Fix kqueue pipe race conditions. [SA-09:13]
>>>
>>>  MFC r192301 to 7.x; 6.x has slightly different fix:
>>>
>>>  - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
>>>
>>>  Security:	FreeBSD-SA-09:13.pipe
>>>  Security:	FreeBSD-SA-09:14.devfs
>>>  Errata:		FreeBSD-EN-09:05.null
>>>  Submitted by:	kib [SA-09:13] [SA-09:14]
>>>  Submitted by:	bz [EN-09:05]
>>>  In collaboration with:	jhb, kib, alc [EN-09:05]
>>>  Approved by:	so (simon)
>>
>> Oh, and I initially forgot:
>>
>> Tested by:	pho
>>
>> (and that was testing both reproducing the problems in the first  
>> place
>> and helping in testing that the patches actually closes the races
>> etc. - so thanks to pho as well as the other people mentioned above!
>> :-) )
>>
>> --
>> Simon L. Nielsen
>> _______________________________________________
>> svn-src-stable@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/svn-src-stable
>> To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org 
>> "
>>

-- 
/"\   Best regards,                        | remko@FreeBSD.org
\ /   Remko Lodder                      | remko@EFnet
X    http://www.evilcoder.org/    |
/ \   ASCII Ribbon Campaign    | Against HTML Mail and News


From owner-svn-src-stable@FreeBSD.ORG  Fri Oct  2 20:44:46 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 33B731065695;
	Fri,  2 Oct 2009 20:44:46 +0000 (UTC)
	(envelope-from oliver.pntr@gmail.com)
Received: from mail-yw0-f197.google.com (mail-yw0-f197.google.com
	[209.85.211.197])
	by mx1.freebsd.org (Postfix) with ESMTP id 86C578FC22;
	Fri,  2 Oct 2009 20:44:45 +0000 (UTC)
Received: by ywh35 with SMTP id 35so3532720ywh.7
	for ; Fri, 02 Oct 2009 13:44:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type;
	bh=YzuUyBoI5a0DJCuuEputs1OMjwMQBpmeuCXFiSDIedQ=;
	b=ctlH1JYfKeVlm5RAAJLq0RNl4HQ5gV58D+fbbyRwAWXe3bWFtgn0KiSAd8AkyaKOyP
	6XPozhP+CCLSWo17IIaaoGr7pKle4Y76QZTkoQYbdr1Zse76pxghB0NF0v2zZuEXKsRh
	fVHhoWJSEhlhdQnssoOqm7uUj53/UCpvCr+98=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=x3oR+R1JsY8/yw19IPM9X/pXiWtXZVljrW2XrccK9k0xEmEHfbFyDKfAM7W2Ri7N06
	cJ/gb4zUfyNmExuHhW51KX0SE05ntUB0AH3YujN/eujDNJr4Sbn4fZTqR8wmmadzbht9
	oM/+LaT2eacOXiQR/vmNqTt4/sASoE+/aOVQY=
MIME-Version: 1.0
Received: by 10.91.21.25 with SMTP id y25mr1695285agi.66.1254516283237; Fri, 
	02 Oct 2009 13:44:43 -0700 (PDT)
In-Reply-To: 
References: <200910021809.n92I9u1r009085@svn.freebsd.org>
	<20091002201027.GE1227@arthur.nitro.dk>
	<6101e8c40910021331g3747f4e1g2b7c2dbfe504712@mail.gmail.com>
	
Date: Fri, 2 Oct 2009 22:44:43 +0200
Message-ID: <6101e8c40910021344s514ea9fdg24e1e391efbbf956@mail.gmail.com>
From: Oliver Pinter 
To: Remko Lodder 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org,
	"Simon L. Nielsen" 
Subject: Re: svn commit: r197715 - releng/6.3 releng/6.3/sys/conf 
	releng/6.3/sys/fs/devfs releng/6.3/sys/kern releng/6.3/sys/sys
	releng/6.4 
	releng/6.4/sys/conf releng/6.4/sys/fs/devfs releng/6.4/sys/kern
	releng...
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Fri, 02 Oct 2009 20:44:46 -0000

After I send the previous mail, see the advisories.

On 10/2/09, Remko Lodder  wrote:
>
> Please wait for the advisories to popup and see whether these match
> the question you have.
>
> Thanks,
> Remko
>
> On Oct 2, 2009, at 10:31 PM, Oliver Pinter wrote:
>
>> Hi!
>>
>> And what's the status of these exploits fix:
>> http://hup.hu/cikkek/200909/freebsd_6.4_es_7.2_local_root_0day-ek
>>
>> ?
>>
>> On 10/2/09, Simon L. Nielsen  wrote:
>>> On 2009.10.02 18:09:56 +0000, Simon L. Nielsen wrote:
>>>> Author: simon
>>>> Date: Fri Oct  2 18:09:56 2009
>>>> New Revision: 197715
>>>> URL: http://svn.freebsd.org/changeset/base/197715
>>>>
>>>> Log:
>>>>  MFC r197711 (partial) to 6.x and 7.x:
>>>>
>>>>  - Add no zero mapping feature, disabled by default. [EN-09:05]
>>>>
>>>>  MFC 178913,178914,179242,179243,180336,180340 to 6.x:
>>>>
>>>>  - Fix kqueue pipe race conditions. [SA-09:13]
>>>>
>>>>  MFC r192301 to 7.x; 6.x has slightly different fix:
>>>>
>>>>  - Fix devfs / VFS NULL pointer race condition. [SA-09:14]
>>>>
>>>>  Security:	FreeBSD-SA-09:13.pipe
>>>>  Security:	FreeBSD-SA-09:14.devfs
>>>>  Errata:		FreeBSD-EN-09:05.null
>>>>  Submitted by:	kib [SA-09:13] [SA-09:14]
>>>>  Submitted by:	bz [EN-09:05]
>>>>  In collaboration with:	jhb, kib, alc [EN-09:05]
>>>>  Approved by:	so (simon)
>>>
>>> Oh, and I initially forgot:
>>>
>>> Tested by:	pho
>>>
>>> (and that was testing both reproducing the problems in the first
>>> place
>>> and helping in testing that the patches actually closes the races
>>> etc. - so thanks to pho as well as the other people mentioned above!
>>> :-) )
>>>
>>> --
>>> Simon L. Nielsen
>>> _______________________________________________
>>> svn-src-stable@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/svn-src-stable
>>> To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org
>>> "
>>>
>
> --
> /"\   Best regards,                        | remko@FreeBSD.org
> \ /   Remko Lodder                      | remko@EFnet
> X    http://www.evilcoder.org/    |
> / \   ASCII Ribbon Campaign    | Against HTML Mail and News
>
>

From owner-svn-src-stable@FreeBSD.ORG  Sat Oct  3 14:38:22 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A5C401065670;
	Sat,  3 Oct 2009 14:38:22 +0000 (UTC)
	(envelope-from nyan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 921218FC18;
	Sat,  3 Oct 2009 14:38:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n93EcMCu043462;
	Sat, 3 Oct 2009 14:38:22 GMT (envelope-from nyan@svn.freebsd.org)
Received: (from nyan@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n93EcMFE043460;
	Sat, 3 Oct 2009 14:38:22 GMT (envelope-from nyan@svn.freebsd.org)
Message-Id: <200910031438.n93EcMFE043460@svn.freebsd.org>
From: Takahashi Yoshihiro 
Date: Sat, 3 Oct 2009 14:38:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
X-SVN-Group: stable-8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197734 - in stable/8/sys: . amd64/include/xen
	cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
	dev/xen/xenpci pc98/conf
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 03 Oct 2009 14:38:22 -0000

Author: nyan
Date: Sat Oct  3 14:38:22 2009
New Revision: 197734
URL: http://svn.freebsd.org/changeset/base/197734

Log:
  MFC: revision 197657
  
    MFi386: revision 197653
  
      Improve 802.11s comment.
  
  Approved by:	re (bz)

Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/sys/pc98/conf/GENERIC

Modified: stable/8/sys/pc98/conf/GENERIC
==============================================================================
--- stable/8/sys/pc98/conf/GENERIC	Sat Oct  3 13:59:15 2009	(r197733)
+++ stable/8/sys/pc98/conf/GENERIC	Sat Oct  3 14:38:22 2009	(r197734)
@@ -214,7 +214,7 @@ device		xe		# Xircom pccard Ethernet
 #device		wlan		# 802.11 support
 #options 	IEEE80211_DEBUG	# enable debug msgs
 #options 	IEEE80211_AMPDU_AGE	# age frames in AMPDU reorder q's
-#options 	IEEE80211_SUPPORT_MESH	# enable 802.11s D3.0 support
+#options 	IEEE80211_SUPPORT_MESH	# enable 802.11s draft support
 #device		wlan_wep	# 802.11 WEP support
 #device		wlan_ccmp	# 802.11 CCMP support
 #device		wlan_tkip	# 802.11 TKIP support

From owner-svn-src-stable@FreeBSD.ORG  Sat Oct  3 16:13:57 2009
Return-Path: 
Delivered-To: svn-src-stable@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 21A4A106568B;
	Sat,  3 Oct 2009 16:13:57 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0F5058FC0C;
	Sat,  3 Oct 2009 16:13:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n93GDuc0045408;
	Sat, 3 Oct 2009 16:13:56 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id n93GDucb045406;
	Sat, 3 Oct 2009 16:13:56 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <200910031613.n93GDucb045406@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Sat, 3 Oct 2009 16:13:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r197736 - stable/6/lib/libthread_db/arch/alpha
X-BeenThere: svn-src-stable@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for all the -stable branches of the src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Sat, 03 Oct 2009 16:13:57 -0000

Author: nwhitehorn
Date: Sat Oct  3 16:13:56 2009
New Revision: 197736
URL: http://svn.freebsd.org/changeset/base/197736

Log:
  Fix world build on alpha, by adding an include now required but only added
  on other platforms.
  
  Note: this is not an MFC due to removal of alpha support in head.

Modified:
  stable/6/lib/libthread_db/arch/alpha/libpthread_md.c

Modified: stable/6/lib/libthread_db/arch/alpha/libpthread_md.c
==============================================================================
--- stable/6/lib/libthread_db/arch/alpha/libpthread_md.c	Sat Oct  3 15:02:55 2009	(r197735)
+++ stable/6/lib/libthread_db/arch/alpha/libpthread_md.c	Sat Oct  3 16:13:56 2009	(r197736)
@@ -28,6 +28,7 @@
 __FBSDID("$FreeBSD$");
 
 #include 
+#include 
 #include 
 
 #include "libpthread_db.h"