From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 00:12:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A93210656BD; Sun, 4 Jan 2009 00:12:02 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 850918FC16; Sun, 4 Jan 2009 00:12:02 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n040C2ii040930; Sun, 4 Jan 2009 00:12:02 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n040C2gH040928; Sun, 4 Jan 2009 00:12:02 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <200901040012.n040C2gH040928@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 4 Jan 2009 00:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 00:12:03 -0000 Author: alfred Date: Sun Jan 4 00:12:01 2009 New Revision: 186730 URL: http://svn.freebsd.org/changeset/base/186730 Log: Sync with usb4bsd: src/lib/libusb20/libusb20_desc.c Make "libusb20_desc_foreach()" more readable. src/sys/dev/usb2/controller/*.[ch] src/sys/dev/usb2/core/*.[ch] Implement support for USB power save for all HC's. Implement support for Big-endian EHCI. Move Huawei quirks back into "u3g" driver. Improve device enumeration. src/sys/dev/usb2/ethernet/*[ch] Patches for supporting new AXE Gigabit chipset. src/sys/dev/usb2/serial/*[ch] Fix IOCTL return code. src/sys/dev/usb2/wlan/*[ch] Sync with old USB stack. Submitted by: hps Added: head/sys/modules/usb2/serial_3g/ head/sys/modules/usb2/serial_3g/Makefile (contents, props changed) Modified: head/lib/libusb20/libusb20_desc.c head/sys/dev/usb2/controller/at91dci.c head/sys/dev/usb2/controller/ehci2.c head/sys/dev/usb2/controller/ehci2.h head/sys/dev/usb2/controller/musb2_otg.c head/sys/dev/usb2/controller/ohci2.c head/sys/dev/usb2/controller/uhci2.c head/sys/dev/usb2/controller/uhci2.h head/sys/dev/usb2/controller/usb2_bus.h head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/usb2_controller.h head/sys/dev/usb2/controller/uss820dci.c head/sys/dev/usb2/core/usb2_busdma.c head/sys/dev/usb2/core/usb2_core.h head/sys/dev/usb2/core/usb2_device.c head/sys/dev/usb2/core/usb2_device.h head/sys/dev/usb2/core/usb2_dynamic.c head/sys/dev/usb2/core/usb2_dynamic.h head/sys/dev/usb2/core/usb2_generic.c head/sys/dev/usb2/core/usb2_handle_request.c head/sys/dev/usb2/core/usb2_hub.c head/sys/dev/usb2/core/usb2_hub.h head/sys/dev/usb2/core/usb2_msctest.c head/sys/dev/usb2/core/usb2_msctest.h head/sys/dev/usb2/core/usb2_request.c head/sys/dev/usb2/core/usb2_request.h head/sys/dev/usb2/core/usb2_transfer.c head/sys/dev/usb2/core/usb2_transfer.h head/sys/dev/usb2/ethernet/if_axe2.c head/sys/dev/usb2/ethernet/if_axe2_reg.h head/sys/dev/usb2/image/uscanner2.c head/sys/dev/usb2/include/usb2_devid.h head/sys/dev/usb2/include/usb2_devtable.h head/sys/dev/usb2/include/usb2_ioctl.h head/sys/dev/usb2/include/usb2_standard.h head/sys/dev/usb2/serial/u3g2.c head/sys/dev/usb2/serial/uchcom2.c head/sys/dev/usb2/serial/uftdi2.c head/sys/dev/usb2/serial/uplcom2.c head/sys/dev/usb2/serial/uvscom2.c head/sys/dev/usb2/sound/uaudio2.c head/sys/dev/usb2/storage/umass2.c head/sys/dev/usb2/storage/ustorage2_fs.c head/sys/dev/usb2/wlan/if_ural2.c head/sys/dev/usb2/wlan/if_zyd2.c head/sys/dev/usb2/wlan/if_zyd2_reg.h head/sys/modules/usb2/Makefile Modified: head/lib/libusb20/libusb20_desc.c ============================================================================== --- head/lib/libusb20/libusb20_desc.c Sat Jan 3 22:51:54 2009 (r186729) +++ head/lib/libusb20/libusb20_desc.c Sun Jan 4 00:12:01 2009 (r186730) @@ -238,23 +238,37 @@ const uint8_t * libusb20_desc_foreach(const struct libusb20_me_struct *pdesc, const uint8_t *psubdesc) { - const void *end; + const uint8_t *start; + const uint8_t *end; + const uint8_t *desc_next; - if (pdesc == NULL) { + /* be NULL safe */ + if (pdesc == NULL) return (NULL); - } - end = LIBUSB20_ADD_BYTES(pdesc->ptr, pdesc->len); - if (psubdesc == NULL) { - psubdesc = LIBUSB20_ADD_BYTES(pdesc->ptr, 0); - } else { - psubdesc = LIBUSB20_ADD_BYTES(psubdesc, psubdesc[0]); - } - return (((((const void *)psubdesc) >= ((void *)(pdesc->ptr))) && - (((const void *)psubdesc) < end) && - (LIBUSB20_ADD_BYTES(psubdesc, psubdesc[0]) >= ((void *)(pdesc->ptr))) && - (LIBUSB20_ADD_BYTES(psubdesc, psubdesc[0]) <= end) && - (psubdesc[0] >= 3)) ? psubdesc : NULL); + start = (const uint8_t *)pdesc->ptr; + end = LIBUSB20_ADD_BYTES(start, pdesc->len); + + /* get start of next descriptor */ + if (psubdesc == NULL) + psubdesc = start; + else + psubdesc = psubdesc + psubdesc[0]; + + /* check that the next USB descriptor is within the range */ + if ((psubdesc < start) || (psubdesc >= end)) + return (NULL); /* out of range, or EOD */ + + /* check start of the second next USB descriptor, if any */ + desc_next = psubdesc + psubdesc[0]; + if ((desc_next < start) || (desc_next > end)) + return (NULL); /* out of range */ + + /* check minimum descriptor length */ + if (psubdesc[0] < 3) + return (NULL); /* too short descriptor */ + + return (psubdesc); /* return start of next descriptor */ } /*------------------------------------------------------------------------* Modified: head/sys/dev/usb2/controller/at91dci.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci.c Sat Jan 3 22:51:54 2009 (r186729) +++ head/sys/dev/usb2/controller/at91dci.c Sun Jan 4 00:12:01 2009 (r186730) @@ -261,42 +261,28 @@ at91dci_pull_down(struct at91dci_softc * } static void -at91dci_wakeup_peer(struct at91dci_softc *sc) +at91dci_wakeup_peer(struct usb2_xfer *xfer) { - uint32_t temp; + struct at91dci_softc *sc = xfer->usb2_sc; + uint8_t use_polling; if (!(sc->sc_flags.status_suspend)) { return; } - temp = AT91_UDP_READ_4(sc, AT91_UDP_GSTATE); - - if (!(temp & AT91_UDP_GSTATE_ESR)) { - return; - } - AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, temp); -} - -static void -at91dci_rem_wakeup_set(struct usb2_device *udev, uint8_t is_on) -{ - struct at91dci_softc *sc; - uint32_t temp; - - DPRINTFN(5, "is_on=%u\n", is_on); - - USB_BUS_LOCK_ASSERT(udev->bus, MA_OWNED); - - sc = AT9100_DCI_BUS2SC(udev->bus); + use_polling = mtx_owned(xfer->xfer_mtx) ? 1 : 0; - temp = AT91_UDP_READ_4(sc, AT91_UDP_GSTATE); + AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, AT91_UDP_GSTATE_ESR); - if (is_on) { - temp |= AT91_UDP_GSTATE_ESR; + /* wait 8 milliseconds */ + if (use_polling) { + /* polling */ + DELAY(8000); } else { - temp &= ~AT91_UDP_GSTATE_ESR; + /* Wait for reset to complete. */ + usb2_pause_mtx(&sc->sc_bus.bus_mtx, 8); } - AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, temp); + AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, 0); } static void @@ -2120,7 +2106,7 @@ tr_handle_clear_port_feature: switch (value) { case UHF_PORT_SUSPEND: - at91dci_wakeup_peer(sc); + at91dci_wakeup_peer(xfer); break; case UHF_PORT_ENABLE: @@ -2492,5 +2478,4 @@ struct usb2_bus_methods at91dci_bus_meth .set_stall = &at91dci_set_stall, .clear_stall = &at91dci_clear_stall, .vbus_interrupt = &at91dci_vbus_interrupt, - .rem_wakeup_set = &at91dci_rem_wakeup_set, }; Modified: head/sys/dev/usb2/controller/ehci2.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2.c Sat Jan 3 22:51:54 2009 (r186729) +++ head/sys/dev/usb2/controller/ehci2.c Sun Jan 4 00:12:01 2009 (r186730) @@ -84,7 +84,7 @@ SYSCTL_INT(_hw_usb2_ehci, OID_AUTO, no_h &ehcinohighspeed, 0, "Disable High Speed USB"); static void ehci_dump_regs(ehci_softc_t *sc); -static void ehci_dump_sqh(ehci_qh_t *sqh); +static void ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *sqh); #endif @@ -101,7 +101,7 @@ extern struct usb2_pipe_methods ehci_roo static usb2_config_td_command_t ehci_root_ctrl_task; static void ehci_do_poll(struct usb2_bus *bus); -static void ehci_root_ctrl_poll(struct ehci_softc *sc); +static void ehci_root_ctrl_poll(ehci_softc_t *sc); static void ehci_device_done(struct usb2_xfer *xfer, usb2_error_t error); static uint8_t ehci_check_transfer(struct usb2_xfer *xfer); static void ehci_timeout(void *arg); @@ -110,6 +110,7 @@ static usb2_sw_transfer_func_t ehci_root static usb2_sw_transfer_func_t ehci_root_ctrl_done; struct ehci_std_temp { + ehci_softc_t *sc; struct usb2_page_cache *pc; ehci_qtd_t *td; ehci_qtd_t *td_next; @@ -123,10 +124,27 @@ struct ehci_std_temp { uint8_t short_frames_ok; }; +/* + * Byte-order conversion functions. + */ +static uint32_t +htoehci32(ehci_softc_t *sc, const uint32_t v) +{ + return ((sc->sc_flags & EHCI_SCFLG_BIGEDESC) ? + htobe32(v) : htole32(v)); +} + +static uint32_t +ehci32toh(ehci_softc_t *sc, const uint32_t v) +{ + return ((sc->sc_flags & EHCI_SCFLG_BIGEDESC) ? + be32toh(v) : le32toh(v)); +} + void ehci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb) { - struct ehci_softc *sc = EHCI_BUS2SC(bus); + ehci_softc_t *sc = EHCI_BUS2SC(bus); uint32_t i; cb(bus, &sc->sc_hw.pframes_pc, &sc->sc_hw.pframes_pg, @@ -280,21 +298,21 @@ ehci_init(ehci_softc_t *sc) sc->sc_intr_p_last[i] = qh; qh->qh_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_QH); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_QH); qh->qh_endp = - htole32(EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH)); + htoehci32(sc, EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH)); qh->qh_endphub = - htole32(EHCI_QH_SET_MULT(1)); + htoehci32(sc, EHCI_QH_SET_MULT(1)); qh->qh_curqtd = 0; qh->qh_qtd.qtd_next = - htole32(EHCI_LINK_TERMINATE); + htoehci32(sc, EHCI_LINK_TERMINATE); qh->qh_qtd.qtd_altnext = - htole32(EHCI_LINK_TERMINATE); + htoehci32(sc, EHCI_LINK_TERMINATE); qh->qh_qtd.qtd_status = - htole32(EHCI_QTD_HALTED); + htoehci32(sc, EHCI_QTD_HALTED); } /* @@ -329,7 +347,7 @@ ehci_init(ehci_softc_t *sc) qh = sc->sc_intr_p_last[0]; /* the last (1ms) QH terminates */ - qh->qh_link = htole32(EHCI_LINK_TERMINATE); + qh->qh_link = htoehci32(sc, EHCI_LINK_TERMINATE); } for (i = 0; i < EHCI_VIRTUAL_FRAMELIST_COUNT; i++) { ehci_sitd_t *sitd; @@ -350,11 +368,11 @@ ehci_init(ehci_softc_t *sc) /* initialize full speed isochronous */ sitd->sitd_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_SITD); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_SITD); sitd->sitd_back = - htole32(EHCI_LINK_TERMINATE); + htoehci32(sc, EHCI_LINK_TERMINATE); sitd->sitd_next = sc->sc_intr_p_last[i | (EHCI_VIRTUAL_FRAMELIST_COUNT / 2)]->qh_self; @@ -375,8 +393,8 @@ ehci_init(ehci_softc_t *sc) /* initialize high speed isochronous */ itd->itd_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_ITD); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_ITD); itd->itd_next = sitd->sitd_self; @@ -421,20 +439,20 @@ ehci_init(ehci_softc_t *sc) /* init dummy QH that starts the async list */ qh->qh_self = - htole32(buf_res.physaddr) | - htole32(EHCI_LINK_QH); + htoehci32(sc, buf_res.physaddr) | + htoehci32(sc, EHCI_LINK_QH); /* fill the QH */ qh->qh_endp = - htole32(EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH) | EHCI_QH_HRECL); - qh->qh_endphub = htole32(EHCI_QH_SET_MULT(1)); + htoehci32(sc, EHCI_QH_SET_EPS(EHCI_QH_SPEED_HIGH) | EHCI_QH_HRECL); + qh->qh_endphub = htoehci32(sc, EHCI_QH_SET_MULT(1)); qh->qh_link = qh->qh_self; qh->qh_curqtd = 0; /* fill the overlay qTD */ - qh->qh_qtd.qtd_next = htole32(EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_altnext = htole32(EHCI_LINK_TERMINATE); - qh->qh_qtd.qtd_status = htole32(EHCI_QTD_HALTED); + qh->qh_qtd.qtd_next = htoehci32(sc, EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_altnext = htoehci32(sc, EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_status = htoehci32(sc, EHCI_QTD_HALTED); } /* flush all cache into memory */ @@ -442,7 +460,7 @@ ehci_init(ehci_softc_t *sc) #if USB_DEBUG if (ehcidebug) { - ehci_dump_sqh(sc->sc_async_p_last); + ehci_dump_sqh(sc, sc->sc_async_p_last); } #endif @@ -490,7 +508,7 @@ done: * shut down the controller when the system is going down */ void -ehci_detach(struct ehci_softc *sc) +ehci_detach(ehci_softc_t *sc) { USB_BUS_LOCK(&sc->sc_bus); @@ -510,7 +528,7 @@ ehci_detach(struct ehci_softc *sc) } void -ehci_suspend(struct ehci_softc *sc) +ehci_suspend(ehci_softc_t *sc) { uint32_t cmd; uint32_t hcr; @@ -564,7 +582,7 @@ ehci_suspend(struct ehci_softc *sc) } void -ehci_resume(struct ehci_softc *sc) +ehci_resume(ehci_softc_t *sc) { struct usb2_page_search buf_res; uint32_t cmd; @@ -723,9 +741,9 @@ ehci_dump_regs(ehci_softc_t *sc) } static void -ehci_dump_link(uint32_t link, int type) +ehci_dump_link(ehci_softc_t *sc, uint32_t link, int type) { - link = le32toh(link); + link = ehci32toh(sc, link); printf("0x%08x", link); if (link & EHCI_LINK_TERMINATE) printf(""); @@ -752,16 +770,16 @@ ehci_dump_link(uint32_t link, int type) } static void -ehci_dump_qtd(ehci_qtd_t *qtd) +ehci_dump_qtd(ehci_softc_t *sc, ehci_qtd_t *qtd) { uint32_t s; printf(" next="); - ehci_dump_link(qtd->qtd_next, 0); + ehci_dump_link(sc, qtd->qtd_next, 0); printf(" altnext="); - ehci_dump_link(qtd->qtd_altnext, 0); + ehci_dump_link(sc, qtd->qtd_altnext, 0); printf("\n"); - s = le32toh(qtd->qtd_status); + s = ehci32toh(sc, qtd->qtd_status); printf(" status=0x%08x: toggle=%d bytes=0x%x ioc=%d c_page=0x%x\n", s, EHCI_QTD_GET_TOGGLE(s), EHCI_QTD_GET_BYTES(s), EHCI_QTD_GET_IOC(s), EHCI_QTD_GET_C_PAGE(s)); @@ -778,35 +796,35 @@ ehci_dump_qtd(ehci_qtd_t *qtd) for (s = 0; s < 5; s++) { printf(" buffer[%d]=0x%08x\n", s, - le32toh(qtd->qtd_buffer[s])); + ehci32toh(sc, qtd->qtd_buffer[s])); } for (s = 0; s < 5; s++) { printf(" buffer_hi[%d]=0x%08x\n", s, - le32toh(qtd->qtd_buffer_hi[s])); + ehci32toh(sc, qtd->qtd_buffer_hi[s])); } } static uint8_t -ehci_dump_sqtd(ehci_qtd_t *sqtd) +ehci_dump_sqtd(ehci_softc_t *sc, ehci_qtd_t *sqtd) { uint8_t temp; usb2_pc_cpu_invalidate(sqtd->page_cache); - printf("QTD(%p) at 0x%08x:\n", sqtd, le32toh(sqtd->qtd_self)); - ehci_dump_qtd(sqtd); - temp = (sqtd->qtd_next & htole32(EHCI_LINK_TERMINATE)) ? 1 : 0; + printf("QTD(%p) at 0x%08x:\n", sqtd, ehci32toh(sc, sqtd->qtd_self)); + ehci_dump_qtd(sc, sqtd); + temp = (sqtd->qtd_next & htoehci32(sc, EHCI_LINK_TERMINATE)) ? 1 : 0; return (temp); } static void -ehci_dump_sqtds(ehci_qtd_t *sqtd) +ehci_dump_sqtds(ehci_softc_t *sc, ehci_qtd_t *sqtd) { uint16_t i; uint8_t stop; stop = 0; for (i = 0; sqtd && (i < 20) && !stop; sqtd = sqtd->obj_next, i++) { - stop = ehci_dump_sqtd(sqtd); + stop = ehci_dump_sqtd(sc, sqtd); } if (sqtd) { printf("dump aborted, too many TDs\n"); @@ -814,16 +832,17 @@ ehci_dump_sqtds(ehci_qtd_t *sqtd) } static void -ehci_dump_sqh(ehci_qh_t *qh) +ehci_dump_sqh(ehci_softc_t *sc, ehci_qh_t *qh) { - uint32_t endp, endphub; + uint32_t endp; + uint32_t endphub; usb2_pc_cpu_invalidate(qh->page_cache); - printf("QH(%p) at 0x%08x:\n", qh, le32toh(qh->qh_self) & ~0x1F); + printf("QH(%p) at 0x%08x:\n", qh, ehci32toh(sc, qh->qh_self) & ~0x1F); printf(" link="); - ehci_dump_link(qh->qh_link, 1); + ehci_dump_link(sc, qh->qh_link, 1); printf("\n"); - endp = le32toh(qh->qh_endp); + endp = ehci32toh(sc, qh->qh_endp); printf(" endp=0x%08x\n", endp); printf(" addr=0x%02x inact=%d endpt=%d eps=%d dtc=%d hrecl=%d\n", EHCI_QH_GET_ADDR(endp), EHCI_QH_GET_INACT(endp), @@ -832,90 +851,90 @@ ehci_dump_sqh(ehci_qh_t *qh) printf(" mpl=0x%x ctl=%d nrl=%d\n", EHCI_QH_GET_MPL(endp), EHCI_QH_GET_CTL(endp), EHCI_QH_GET_NRL(endp)); - endphub = le32toh(qh->qh_endphub); + endphub = ehci32toh(sc, qh->qh_endphub); printf(" endphub=0x%08x\n", endphub); printf(" smask=0x%02x cmask=0x%02x huba=0x%02x port=%d mult=%d\n", EHCI_QH_GET_SMASK(endphub), EHCI_QH_GET_CMASK(endphub), EHCI_QH_GET_HUBA(endphub), EHCI_QH_GET_PORT(endphub), EHCI_QH_GET_MULT(endphub)); printf(" curqtd="); - ehci_dump_link(qh->qh_curqtd, 0); + ehci_dump_link(sc, qh->qh_curqtd, 0); printf("\n"); printf("Overlay qTD:\n"); - ehci_dump_qtd((void *)&qh->qh_qtd); + ehci_dump_qtd(sc, (void *)&qh->qh_qtd); } static void -ehci_dump_sitd(ehci_sitd_t *sitd) +ehci_dump_sitd(ehci_softc_t *sc, ehci_sitd_t *sitd) { usb2_pc_cpu_invalidate(sitd->page_cache); - printf("SITD(%p) at 0x%08x\n", sitd, le32toh(sitd->sitd_self) & ~0x1F); - printf(" next=0x%08x\n", le32toh(sitd->sitd_next)); + printf("SITD(%p) at 0x%08x\n", sitd, ehci32toh(sc, sitd->sitd_self) & ~0x1F); + printf(" next=0x%08x\n", ehci32toh(sc, sitd->sitd_next)); printf(" portaddr=0x%08x dir=%s addr=%d endpt=0x%x port=0x%x huba=0x%x\n", - le32toh(sitd->sitd_portaddr), - (sitd->sitd_portaddr & htole32(EHCI_SITD_SET_DIR_IN)) + ehci32toh(sc, sitd->sitd_portaddr), + (sitd->sitd_portaddr & htoehci32(sc, EHCI_SITD_SET_DIR_IN)) ? "in" : "out", - EHCI_SITD_GET_ADDR(le32toh(sitd->sitd_portaddr)), - EHCI_SITD_GET_ENDPT(le32toh(sitd->sitd_portaddr)), - EHCI_SITD_GET_PORT(le32toh(sitd->sitd_portaddr)), - EHCI_SITD_GET_HUBA(le32toh(sitd->sitd_portaddr))); - printf(" mask=0x%08x\n", le32toh(sitd->sitd_mask)); - printf(" status=0x%08x <%s> len=0x%x\n", le32toh(sitd->sitd_status), - (sitd->sitd_status & htole32(EHCI_SITD_ACTIVE)) ? "ACTIVE" : "", - EHCI_SITD_GET_LEN(le32toh(sitd->sitd_status))); + EHCI_SITD_GET_ADDR(ehci32toh(sc, sitd->sitd_portaddr)), + EHCI_SITD_GET_ENDPT(ehci32toh(sc, sitd->sitd_portaddr)), + EHCI_SITD_GET_PORT(ehci32toh(sc, sitd->sitd_portaddr)), + EHCI_SITD_GET_HUBA(ehci32toh(sc, sitd->sitd_portaddr))); + printf(" mask=0x%08x\n", ehci32toh(sc, sitd->sitd_mask)); + printf(" status=0x%08x <%s> len=0x%x\n", ehci32toh(sc, sitd->sitd_status), + (sitd->sitd_status & htoehci32(sc, EHCI_SITD_ACTIVE)) ? "ACTIVE" : "", + EHCI_SITD_GET_LEN(ehci32toh(sc, sitd->sitd_status))); printf(" back=0x%08x, bp=0x%08x,0x%08x,0x%08x,0x%08x\n", - le32toh(sitd->sitd_back), - le32toh(sitd->sitd_bp[0]), - le32toh(sitd->sitd_bp[1]), - le32toh(sitd->sitd_bp_hi[0]), - le32toh(sitd->sitd_bp_hi[1])); + ehci32toh(sc, sitd->sitd_back), + ehci32toh(sc, sitd->sitd_bp[0]), + ehci32toh(sc, sitd->sitd_bp[1]), + ehci32toh(sc, sitd->sitd_bp_hi[0]), + ehci32toh(sc, sitd->sitd_bp_hi[1])); } static void -ehci_dump_itd(ehci_itd_t *itd) +ehci_dump_itd(ehci_softc_t *sc, ehci_itd_t *itd) { usb2_pc_cpu_invalidate(itd->page_cache); - printf("ITD(%p) at 0x%08x\n", itd, le32toh(itd->itd_self) & ~0x1F); - printf(" next=0x%08x\n", le32toh(itd->itd_next)); - printf(" status[0]=0x%08x; <%s>\n", le32toh(itd->itd_status[0]), - (itd->itd_status[0] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[1]=0x%08x; <%s>\n", le32toh(itd->itd_status[1]), - (itd->itd_status[1] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[2]=0x%08x; <%s>\n", le32toh(itd->itd_status[2]), - (itd->itd_status[2] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[3]=0x%08x; <%s>\n", le32toh(itd->itd_status[3]), - (itd->itd_status[3] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[4]=0x%08x; <%s>\n", le32toh(itd->itd_status[4]), - (itd->itd_status[4] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[5]=0x%08x; <%s>\n", le32toh(itd->itd_status[5]), - (itd->itd_status[5] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[6]=0x%08x; <%s>\n", le32toh(itd->itd_status[6]), - (itd->itd_status[6] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" status[7]=0x%08x; <%s>\n", le32toh(itd->itd_status[7]), - (itd->itd_status[7] & htole32(EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); - printf(" bp[0]=0x%08x\n", le32toh(itd->itd_bp[0])); + printf("ITD(%p) at 0x%08x\n", itd, ehci32toh(sc, itd->itd_self) & ~0x1F); + printf(" next=0x%08x\n", ehci32toh(sc, itd->itd_next)); + printf(" status[0]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[0]), + (itd->itd_status[0] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[1]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[1]), + (itd->itd_status[1] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[2]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[2]), + (itd->itd_status[2] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[3]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[3]), + (itd->itd_status[3] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[4]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[4]), + (itd->itd_status[4] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[5]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[5]), + (itd->itd_status[5] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[6]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[6]), + (itd->itd_status[6] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" status[7]=0x%08x; <%s>\n", ehci32toh(sc, itd->itd_status[7]), + (itd->itd_status[7] & htoehci32(sc, EHCI_ITD_ACTIVE)) ? "ACTIVE" : ""); + printf(" bp[0]=0x%08x\n", ehci32toh(sc, itd->itd_bp[0])); printf(" addr=0x%02x; endpt=0x%01x\n", - EHCI_ITD_GET_ADDR(le32toh(itd->itd_bp[0])), - EHCI_ITD_GET_ENDPT(le32toh(itd->itd_bp[0]))); - printf(" bp[1]=0x%08x\n", le32toh(itd->itd_bp[1])); + EHCI_ITD_GET_ADDR(ehci32toh(sc, itd->itd_bp[0])), + EHCI_ITD_GET_ENDPT(ehci32toh(sc, itd->itd_bp[0]))); + printf(" bp[1]=0x%08x\n", ehci32toh(sc, itd->itd_bp[1])); printf(" dir=%s; mpl=0x%02x\n", - (le32toh(itd->itd_bp[1]) & EHCI_ITD_SET_DIR_IN) ? "in" : "out", - EHCI_ITD_GET_MPL(le32toh(itd->itd_bp[1]))); + (ehci32toh(sc, itd->itd_bp[1]) & EHCI_ITD_SET_DIR_IN) ? "in" : "out", + EHCI_ITD_GET_MPL(ehci32toh(sc, itd->itd_bp[1]))); printf(" bp[2..6]=0x%08x,0x%08x,0x%08x,0x%08x,0x%08x\n", - le32toh(itd->itd_bp[2]), - le32toh(itd->itd_bp[3]), - le32toh(itd->itd_bp[4]), - le32toh(itd->itd_bp[5]), - le32toh(itd->itd_bp[6])); + ehci32toh(sc, itd->itd_bp[2]), + ehci32toh(sc, itd->itd_bp[3]), + ehci32toh(sc, itd->itd_bp[4]), + ehci32toh(sc, itd->itd_bp[5]), + ehci32toh(sc, itd->itd_bp[6])); printf(" bp_hi=0x%08x,0x%08x,0x%08x,0x%08x,\n" " 0x%08x,0x%08x,0x%08x\n", - le32toh(itd->itd_bp_hi[0]), - le32toh(itd->itd_bp_hi[1]), - le32toh(itd->itd_bp_hi[2]), - le32toh(itd->itd_bp_hi[3]), - le32toh(itd->itd_bp_hi[4]), - le32toh(itd->itd_bp_hi[5]), - le32toh(itd->itd_bp_hi[6])); + ehci32toh(sc, itd->itd_bp_hi[0]), + ehci32toh(sc, itd->itd_bp_hi[1]), + ehci32toh(sc, itd->itd_bp_hi[2]), + ehci32toh(sc, itd->itd_bp_hi[3]), + ehci32toh(sc, itd->itd_bp_hi[4]), + ehci32toh(sc, itd->itd_bp_hi[5]), + ehci32toh(sc, itd->itd_bp_hi[6])); } static void @@ -936,12 +955,12 @@ ehci_dump_isoc(ehci_softc_t *sc) sitd = sc->sc_isoc_fs_p_last[pos]; while (itd && max && max--) { - ehci_dump_itd(itd); + ehci_dump_itd(sc, itd); itd = itd->prev; } while (sitd && max && max--) { - ehci_dump_sitd(sitd); + ehci_dump_sitd(sc, sitd); sitd = sitd->prev; } } @@ -1022,6 +1041,11 @@ _ehci_append_qh(ehci_qh_t *sqh, ehci_qh_ { DPRINTFN(11, "%p to %p\n", sqh, last); + if (sqh->prev != NULL) { + /* should not happen */ + DPRINTFN(0, "QH already linked!\n"); + return (last); + } /* (sc->sc_bus.mtx) must be locked */ sqh->next = last->next; @@ -1040,12 +1064,6 @@ _ehci_append_qh(ehci_qh_t *sqh, ehci_qh_ usb2_pc_cpu_flush(last->page_cache); -#if USB_DEBUG - if (ehcidebug > 5) { - printf("%s:\n", __FUNCTION__); - ehci_dump_sqh(sqh); - } -#endif return (sqh); } @@ -1109,14 +1127,6 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ sqh->next->prev = sqh->prev; usb2_pc_cpu_flush(sqh->next->page_cache); } - /* - * set the Terminate-bit in the e_next of the QH, in case - * the transferred packet was short so that the QH still - * points at the last used TD - */ - - sqh->qh_qtd.qtd_next = htole32(EHCI_LINK_TERMINATE); - last = ((last == sqh) ? sqh->prev : last); sqh->prev = 0; @@ -1129,6 +1139,7 @@ _ehci_remove_qh(ehci_qh_t *sqh, ehci_qh_ static usb2_error_t ehci_non_isoc_done_sub(struct usb2_xfer *xfer) { + ehci_softc_t *sc = xfer->usb2_sc; ehci_qtd_t *td; ehci_qtd_t *td_alt_next; uint32_t status; @@ -1140,7 +1151,7 @@ ehci_non_isoc_done_sub(struct usb2_xfer while (1) { usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->qtd_status); + status = ehci32toh(sc, td->qtd_status); len = EHCI_QTD_GET_BYTES(status); @@ -1232,7 +1243,9 @@ ehci_non_isoc_done(struct usb2_xfer *xfe #if USB_DEBUG if (ehcidebug > 10) { - ehci_dump_sqtds(xfer->td_transfer_first); + ehci_softc_t *sc = xfer->usb2_sc; + + ehci_dump_sqtds(sc, xfer->td_transfer_first); } #endif @@ -1282,6 +1295,7 @@ static uint8_t ehci_check_transfer(struct usb2_xfer *xfer) { struct usb2_pipe_methods *methods = xfer->pipe->methods; + ehci_softc_t *sc = xfer->usb2_sc; uint32_t status; @@ -1294,13 +1308,13 @@ ehci_check_transfer(struct usb2_xfer *xf td = xfer->td_transfer_last; usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->sitd_status); + status = ehci32toh(sc, td->sitd_status); /* also check if first is complete */ td = xfer->td_transfer_first; usb2_pc_cpu_invalidate(td->page_cache); - status |= le32toh(td->sitd_status); + status |= ehci32toh(sc, td->sitd_status); if (!(status & EHCI_SITD_ACTIVE)) { ehci_device_done(xfer, USB_ERR_NORMAL_COMPLETION); @@ -1329,7 +1343,7 @@ ehci_check_transfer(struct usb2_xfer *xf td->itd_status[6] | td->itd_status[7]; /* if no transactions are active we continue */ - if (!(status & htole32(EHCI_ITD_ACTIVE))) { + if (!(status & htoehci32(sc, EHCI_ITD_ACTIVE))) { ehci_device_done(xfer, USB_ERR_NORMAL_COMPLETION); goto transferred; } @@ -1346,7 +1360,7 @@ ehci_check_transfer(struct usb2_xfer *xf while (1) { usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->qtd_status); + status = ehci32toh(sc, td->qtd_status); /* * if there is an active TD the transfer isn't done @@ -1520,7 +1534,7 @@ ehci_timeout(void *arg) static void ehci_do_poll(struct usb2_bus *bus) { - struct ehci_softc *sc = EHCI_BUS2SC(bus); + ehci_softc_t *sc = EHCI_BUS2SC(bus); USB_BUS_LOCK(&sc->sc_bus); ehci_interrupt_poll(sc); @@ -1542,7 +1556,7 @@ ehci_setup_standard_chain_sub(struct ehc uint8_t shortpkt_old; uint8_t precompute; - qtd_altnext = htole32(EHCI_LINK_TERMINATE); + qtd_altnext = htoehci32(temp->sc, EHCI_LINK_TERMINATE); td_alt_next = NULL; buf_offset = 0; shortpkt_old = temp->shortpkt; @@ -1599,7 +1613,8 @@ restart: /* fill out current TD */ td->qtd_status = - temp->qtd_status | htole32(EHCI_QTD_SET_BYTES(average)); + temp->qtd_status | + htoehci32(temp->sc, EHCI_QTD_SET_BYTES(average)); if (average == 0) { @@ -1607,7 +1622,8 @@ restart: /* update data toggle, ZLP case */ - temp->qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + temp->qtd_status ^= + htoehci32(temp->sc, EHCI_QTD_TOGGLE_MASK); } td->len = 0; @@ -1627,7 +1643,8 @@ restart: if (((average + temp->max_frame_size - 1) / temp->max_frame_size) & 1) { - temp->qtd_status ^= htole32(EHCI_QTD_TOGGLE_MASK); + temp->qtd_status ^= + htoehci32(temp->sc, EHCI_QTD_TOGGLE_MASK); } } td->len = average; @@ -1639,7 +1656,8 @@ restart: /* fill out buffer pointers */ usb2_get_page(temp->pc, buf_offset, &buf_res); - td->qtd_buffer[0] = htole32(buf_res.physaddr); + td->qtd_buffer[0] = + htoehci32(temp->sc, buf_res.physaddr); td->qtd_buffer_hi[0] = 0; x = 1; @@ -1648,7 +1666,9 @@ restart: average -= EHCI_PAGE_SIZE; buf_offset += EHCI_PAGE_SIZE; usb2_get_page(temp->pc, buf_offset, &buf_res); - td->qtd_buffer[x] = htole32(buf_res.physaddr & (~0xFFF)); + td->qtd_buffer[x] = + htoehci32(temp->sc, + buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; x++; } @@ -1663,7 +1683,9 @@ restart: */ buf_offset += average; usb2_get_page(temp->pc, buf_offset - 1, &buf_res); - td->qtd_buffer[x] = htole32(buf_res.physaddr & (~0xFFF)); + td->qtd_buffer[x] = + htoehci32(temp->sc, + buf_res.physaddr & (~0xFFF)); td->qtd_buffer_hi[x] = 0; } @@ -1717,6 +1739,7 @@ ehci_setup_standard_chain(struct usb2_xf temp.average = xfer->max_usb2_frame_size; temp.max_frame_size = xfer->max_frame_size; + temp.sc = xfer->usb2_sc; /* toggle the DMA set we are using */ xfer->flags_int.curr_dma_set ^= 1; @@ -1736,7 +1759,8 @@ ehci_setup_standard_chain(struct usb2_xf if (xfer->flags_int.control_xfr) { if (xfer->pipe->toggle_next) { /* DATA1 is next */ - temp.qtd_status |= htole32(EHCI_QTD_SET_TOGGLE(1)); + temp.qtd_status |= + htoehci32(temp.sc, EHCI_QTD_SET_TOGGLE(1)); } temp.auto_data_toggle = 0; } else { @@ -1745,14 +1769,16 @@ ehci_setup_standard_chain(struct usb2_xf if (usb2_get_speed(xfer->udev) != USB_SPEED_HIGH) { /* max 3 retries */ - temp.qtd_status |= htole32(EHCI_QTD_SET_CERR(3)); + temp.qtd_status |= + htoehci32(temp.sc, EHCI_QTD_SET_CERR(3)); } /* check if we should prepend a setup message */ if (xfer->flags_int.control_xfr) { if (xfer->flags_int.control_hdr) { - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3)); + temp.qtd_status &= + htoehci32(temp.sc, EHCI_QTD_SET_CERR(3)); temp.qtd_status |= htole32 (EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_SETUP) | @@ -1783,7 +1809,8 @@ ehci_setup_standard_chain(struct usb2_xf } /* keep previous data toggle and error count */ - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3) | + temp.qtd_status &= + htoehci32(temp.sc, EHCI_QTD_SET_CERR(3) | EHCI_QTD_SET_TOGGLE(1)); if (temp.len == 0) { @@ -1803,9 +1830,9 @@ ehci_setup_standard_chain(struct usb2_xf temp.qtd_status |= (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) ? - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_IN)) : - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT)); ehci_setup_standard_chain_sub(&temp); @@ -1821,14 +1848,14 @@ ehci_setup_standard_chain(struct usb2_xf * direction. */ - temp.qtd_status &= htole32(EHCI_QTD_SET_CERR(3) | + temp.qtd_status &= htoehci32(temp.sc, EHCI_QTD_SET_CERR(3) | EHCI_QTD_SET_TOGGLE(1)); temp.qtd_status |= (UE_GET_DIR(xfer->endpoint) == UE_DIR_OUT) ? - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_IN) | EHCI_QTD_SET_TOGGLE(1)) : - htole32(EHCI_QTD_ACTIVE | + htoehci32(temp.sc, EHCI_QTD_ACTIVE | EHCI_QTD_SET_PID(EHCI_QTD_PID_OUT) | EHCI_QTD_SET_TOGGLE(1)); @@ -1841,9 +1868,9 @@ ehci_setup_standard_chain(struct usb2_xf td = temp.td; /* the last TD terminates the transfer: */ - td->qtd_next = htole32(EHCI_LINK_TERMINATE); - td->qtd_altnext = htole32(EHCI_LINK_TERMINATE); - td->qtd_status |= htole32(EHCI_QTD_IOC); + td->qtd_next = htoehci32(temp.sc, EHCI_LINK_TERMINATE); + td->qtd_altnext = htoehci32(temp.sc, EHCI_LINK_TERMINATE); + td->qtd_status |= htoehci32(temp.sc, EHCI_QTD_IOC); usb2_pc_cpu_flush(td->page_cache); @@ -1855,7 +1882,8 @@ ehci_setup_standard_chain(struct usb2_xf if (ehcidebug > 8) { DPRINTF("nexttog=%d; data before transfer:\n", xfer->pipe->toggle_next); - ehci_dump_sqtds(xfer->td_transfer_first); + ehci_dump_sqtds(temp.sc, + xfer->td_transfer_first); } #endif @@ -1892,7 +1920,7 @@ ehci_setup_standard_chain(struct usb2_xf } } - qh->qh_endp = htole32(qh_endp); + qh->qh_endp = htoehci32(temp.sc, qh_endp); qh_endphub = (EHCI_QH_SET_MULT(xfer->max_packet_count & 3) | @@ -1901,38 +1929,42 @@ ehci_setup_standard_chain(struct usb2_xf EHCI_QH_SET_HUBA(xfer->udev->hs_hub_addr) | EHCI_QH_SET_PORT(xfer->udev->hs_port_no)); - qh->qh_endphub = htole32(qh_endphub); - qh->qh_curqtd = htole32(0); + qh->qh_endphub = htoehci32(temp.sc, qh_endphub); + qh->qh_curqtd = htoehci32(temp.sc, 0); /* fill the overlay qTD */ - qh->qh_qtd.qtd_status = htole32(0); + qh->qh_qtd.qtd_status = htoehci32(temp.sc, 0); if (temp.auto_data_toggle) { /* let the hardware compute the data toggle */ - qh->qh_endp &= ~htole32(EHCI_QH_DTC); + qh->qh_endp &= htoehci32(temp.sc, ~EHCI_QH_DTC); if (xfer->pipe->toggle_next) { /* DATA1 is next */ - qh->qh_qtd.qtd_status |= htole32(EHCI_QTD_SET_TOGGLE(1)); + qh->qh_qtd.qtd_status |= + htoehci32(temp.sc, EHCI_QTD_SET_TOGGLE(1)); } } td = xfer->td_transfer_first; qh->qh_qtd.qtd_next = td->qtd_self; - qh->qh_qtd.qtd_altnext = htole32(EHCI_LINK_TERMINATE); + qh->qh_qtd.qtd_altnext = + htoehci32(temp.sc, EHCI_LINK_TERMINATE); usb2_pc_cpu_flush(qh->page_cache); - EHCI_APPEND_QH(qh, *qh_last); + if (xfer->udev->pwr_save.suspended == 0) { + EHCI_APPEND_QH(qh, *qh_last); + } } static void ehci_root_intr_done(struct usb2_xfer *xfer, struct usb2_sw_transfer *std) { - struct ehci_softc *sc = xfer->usb2_sc; + ehci_softc_t *sc = xfer->usb2_sc; uint16_t i; uint16_t m; @@ -1992,11 +2024,11 @@ ehci_isoc_fs_done(ehci_softc_t *sc, stru #if USB_DEBUG if (ehcidebug > 15) { DPRINTF("isoc FS-TD\n"); - ehci_dump_sitd(td); + ehci_dump_sitd(sc, td); } #endif usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->sitd_status); + status = ehci32toh(sc, td->sitd_status); len = EHCI_SITD_GET_LEN(status); @@ -2044,12 +2076,12 @@ ehci_isoc_hs_done(ehci_softc_t *sc, stru #if USB_DEBUG if (ehcidebug > 15) { DPRINTF("isoc HS-TD\n"); - ehci_dump_itd(td); + ehci_dump_itd(sc, td); } #endif usb2_pc_cpu_invalidate(td->page_cache); - status = le32toh(td->itd_status[td_no]); + status = ehci32toh(sc, td->itd_status[td_no]); len = EHCI_ITD_GET_LEN(status); @@ -2102,7 +2134,8 @@ ehci_device_done(struct usb2_xfer *xfer, if (ehcidebug > 8) { DPRINTF("nexttog=%d; data after transfer:\n", xfer->pipe->toggle_next); - ehci_dump_sqtds(xfer->td_transfer_first); + ehci_dump_sqtds(xfer->usb2_sc, + xfer->td_transfer_first); } #endif @@ -2322,6 +2355,7 @@ struct usb2_pipe_methods ehci_device_int static void ehci_device_isoc_fs_open(struct usb2_xfer *xfer) { + ehci_softc_t *sc = xfer->usb2_sc; ehci_sitd_t *td; uint32_t sitd_portaddr; uint8_t ds; @@ -2335,7 +2369,7 @@ ehci_device_isoc_fs_open(struct usb2_xfe if (UE_GET_DIR(xfer->endpoint) == UE_DIR_IN) { sitd_portaddr |= EHCI_SITD_SET_DIR_IN; } - sitd_portaddr = htole32(sitd_portaddr); + sitd_portaddr = htoehci32(sc, sitd_portaddr); /* initialize all TD's */ @@ -2352,7 +2386,7 @@ ehci_device_isoc_fs_open(struct usb2_xfe * * micro-frame usage (8 microframes per 1ms) */ - td->sitd_back = htole32(EHCI_LINK_TERMINATE); + td->sitd_back = htoehci32(sc, EHCI_LINK_TERMINATE); usb2_pc_cpu_flush(td->page_cache); } @@ -2499,7 +2533,7 @@ ehci_device_isoc_fs_enter(struct usb2_xf * non-zero length */ usb2_get_page(xfer->frbuffers, buf_offset, &buf_res); - td->sitd_bp[0] = htole32(buf_res.physaddr); + td->sitd_bp[0] = htoehci32(sc, buf_res.physaddr); buf_offset += *plen; /* * NOTE: We need to subtract one from the offset so @@ -2544,9 +2578,9 @@ ehci_device_isoc_fs_enter(struct usb2_xf *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 00:20:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7AB106566B; Sun, 4 Jan 2009 00:20:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2A48C8FC19; Sun, 4 Jan 2009 00:20:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n040KIg3041123; Sun, 4 Jan 2009 00:20:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n040KIcc041121; Sun, 4 Jan 2009 00:20:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901040020.n040KIcc041121@svn.freebsd.org> From: Ed Schouten Date: Sun, 4 Jan 2009 00:20:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 00:20:19 -0000 Author: ed Date: Sun Jan 4 00:20:18 2009 New Revision: 186731 URL: http://svn.freebsd.org/changeset/base/186731 Log: Print control characters, even though they are normally not visible. With cons25, there are printable characters below 0x1B. This is not the case with ASCII, UTF-8, etc. but in this case we just have to. Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8 in the demo-application. Modified: head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken_demo.c Modified: head/sys/dev/syscons/teken/teken.c ============================================================================== --- head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:12:01 2009 (r186730) +++ head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:20:18 2009 (r186731) @@ -53,10 +53,14 @@ static FILE *df; #include "teken_wcwidth.h" #else /* !TEKEN_UTF8 */ static inline int -teken_wcwidth(teken_char_t c) +teken_wcwidth(teken_char_t c __unused) { +#ifdef TEKEN_CONS25 + return (1); +#else /* !TEKEN_CONS25 */ return (c <= 0x1B) ? -1 : 1; +#endif /* TEKEN_CONS25 */ } #endif /* TEKEN_UTF8 */ Modified: head/sys/dev/syscons/teken/teken_demo.c ============================================================================== --- head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:12:01 2009 (r186730) +++ head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:20:18 2009 (r186731) @@ -280,7 +280,9 @@ main(int argc __unused, char *argv[] __u exit(1); case 0: setenv("TERM", "cons25", 1); +#ifdef TEKEN_UTF8 setenv("LC_CTYPE", "UTF-8", 0); +#endif /* TEKEN_UTF8 */ execlp("zsh", "-zsh", NULL); execlp("bash", "-bash", NULL); execlp("sh", "-sh", NULL); From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 07:29:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B224106566C; Sun, 4 Jan 2009 07:29:05 +0000 (UTC) (envelope-from chinsan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A60F8FC14; Sun, 4 Jan 2009 07:29:05 +0000 (UTC) (envelope-from chinsan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n047T4GK049213; Sun, 4 Jan 2009 07:29:04 GMT (envelope-from chinsan@svn.freebsd.org) Received: (from chinsan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n047T4oF049212; Sun, 4 Jan 2009 07:29:04 GMT (envelope-from chinsan@svn.freebsd.org) Message-Id: <200901040729.n047T4oF049212@svn.freebsd.org> From: Chin-San Huang Date: Sun, 4 Jan 2009 07:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186732 - head/usr.sbin/pkg_install/add X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 07:29:05 -0000 Author: chinsan (doc,ports committer) Date: Sun Jan 4 07:29:04 2009 New Revision: 186732 URL: http://svn.freebsd.org/changeset/base/186732 Log: - s/no-scripts/no-script/ PR: docs/127732 Submitted by: TerryP MFC after: 3 days Modified: head/usr.sbin/pkg_install/add/pkg_add.1 Modified: head/usr.sbin/pkg_install/add/pkg_add.1 ============================================================================== --- head/usr.sbin/pkg_install/add/pkg_add.1 Sun Jan 4 00:20:18 2009 (r186731) +++ head/usr.sbin/pkg_install/add/pkg_add.1 Sun Jan 4 07:29:04 2009 (r186732) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2008 +.Dd Jan 4, 2009 .Dt PKG_ADD 1 .Os .Sh NAME @@ -90,7 +90,7 @@ if it is defined or in current directory .It Fl i , -no-deps Install the package without fetching and installing dependencies. -.It Fl I , -no-scripts +.It Fl I , -no-script If any installation scripts (pre-install or post-install) exist for a given package, do not execute them. .It Fl n , -dry-run From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 07:32:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CD7E106566B; Sun, 4 Jan 2009 07:32:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C74C8FC13; Sun, 4 Jan 2009 07:32:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n047W7cS049311; Sun, 4 Jan 2009 07:32:07 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n047W7c4049310; Sun, 4 Jan 2009 07:32:07 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200901040732.n047W7c4049310@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 4 Jan 2009 07:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186733 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 07:32:07 -0000 Author: marcel Date: Sun Jan 4 07:32:06 2009 New Revision: 186733 URL: http://svn.freebsd.org/changeset/base/186733 Log: Improve probing. o Don't check the dummy fields. o The entry is unused if either dp_mid is 0 or dp_sid is 0. o The start or end cylinder cannot be 0. o The start CHS cannot be equal to the end CHS. Submitted by: nyan Modified: head/sys/geom/part/g_part_pc98.c Modified: head/sys/geom/part/g_part_pc98.c ============================================================================== --- head/sys/geom/part/g_part_pc98.c Sun Jan 4 07:29:04 2009 (r186732) +++ head/sys/geom/part/g_part_pc98.c Sun Jan 4 07:32:06 2009 (r186733) @@ -333,7 +333,7 @@ g_part_pc98_probe(struct g_part_table *t struct g_provider *pp; u_char *buf, *p; int error, index, res, sum; - uint16_t magic; + uint16_t magic, ecyl, scyl; pp = cp->provider; @@ -365,11 +365,15 @@ g_part_pc98_probe(struct g_part_table *t for (index = 0; index < NDOSPART; index++) { p = buf + SECSIZE + index * DOSPARTSIZE; - if (p[2] != 0 || p[3] != 0) - goto out; - if (p[1] == 0) + if (p[0] == 0 || p[1] == 0) /* !dp_mid || !dp_sid */ continue; - if (le16dec(p + 10) == 0) + scyl = le16dec(p + 10); + ecyl = le16dec(p + 14); + if (scyl == 0 || ecyl == 0) + goto out; + if (p[8] == p[12] && /* dp_ssect == dp_esect */ + p[9] == p[13] && /* dp_shd == dp_ehd */ + scyl == ecyl) goto out; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 11:31:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D18521065672; Sun, 4 Jan 2009 11:31:03 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEB598FC08; Sun, 4 Jan 2009 11:31:03 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04BV36E056279; Sun, 4 Jan 2009 11:31:03 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04BV360056278; Sun, 4 Jan 2009 11:31:03 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <200901041131.n04BV360056278@svn.freebsd.org> From: Ivan Voras Date: Sun, 4 Jan 2009 11:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186735 - head/sbin/geom/class/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 11:31:04 -0000 Author: ivoras Date: Sun Jan 4 11:31:03 2009 New Revision: 186735 URL: http://svn.freebsd.org/changeset/base/186735 Log: Several significant updates: * Better wording of sections dealing with physical storage * A new section on assumptions gvirstor has on its consumer devices (components) and its interaction with file systems * Improved markup (by hrs@) Reviewed by: hrs Approved by: gnn (mentor) Modified: head/sbin/geom/class/virstor/gvirstor.8 Modified: head/sbin/geom/class/virstor/gvirstor.8 ============================================================================== --- head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 07:33:10 2009 (r186734) +++ head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 11:31:03 2009 (r186735) @@ -1,5 +1,4 @@ -.\" Copyright (c) 2005 Pawel Jakub Dawidek -.\" Copyright (c) 2005 Ivan Voras +.\" Copyright (c) 2006-2008 Ivan Voras .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2006 +.Dd December 17, 2008 .Dt GVIRSTOR 8 .Os .Sh NAME @@ -69,10 +68,17 @@ .Sh DESCRIPTION The .Nm -utility is used for setting up a storage device of arbitrary large size (for example, -several TB), consisting of an arbitrary number of physical storage devices with -total size <= the virtual size. Data for the virtual devices will be allocated from -physical devices on demand. In short, this is the virtual storage functionality. +utility is used for setting up a virtual storage device of arbitrary +large size +.Pq for example, several TB , +consisting of an arbitrary number of physical storage devices with the +total size which is equal to or smaller than the virtual size. Data +for the virtual devices will be allocated from physical devices on +demand. The idea behind +.Nm +is similar to the concept of Virtual Memory in operating systems, +effectively allowing users to overcommit on storage +.Pq free file system space . The first argument to .Nm indicates an action to be performed: @@ -82,12 +88,15 @@ Set up a virtual device from the given c .Ar name . Metadata are stored in the last sector of every component. Argument -.Ar virsize -is the size of new virtual device, with default being 2 TiB (2097152 MiB). +.Fl s Ar virsize +is the size of new virtual device, with default being 2 TiB +.Pq 2097152 MiB . Argument -.Ar chunksize -is the chunk size, with default being 4 MiB (4096 KiB). -The default is thus "-s 2097152 -m 4096". +.Fl m Ar chunksize +is the chunk size, with default being 4 MiB +.Pq 4096 KiB . +The default is thus +.Qq Fl s Ar 2097152 Fl m Ar 4096 . .It Cm stop Turn off an existing virtual device by its .Ar name . @@ -96,8 +105,10 @@ As with other GEOM classes, stopped geom .It Cm add Adds new components to existing virtual device by its .Ar name . -The specified virstor device must exist and be active (i.e. -module loaded, device present in /dev). +The specified virstor device must exist and be active +.Pq i.e. module loaded, device present in Pa /dev . +This action can be safely performed while the virstor device is in use +.Pq Qo hot Qc operation .It Cm remove Removes components from existing virtual device by its .Ar name . @@ -130,82 +141,97 @@ Hardcode providers' names in metadata. Be more verbose. .El .Sh EXIT STATUS -Exit status is 0 on success, and 1 if the command fails. +The +.Nm +utility exits 0 on success, and 1 if an error occurs. .Sh EXAMPLES The following example shows how to create a virtual device of default size -(2 TiB), of default chunk (extent) size (4 MiB), with two physical devices for -backing storage. +.Pq 2 TiB , +of default chunk +.Pq extent +size +.Pq 4 MiB , +with two physical devices for backing storage. .Bd -literal -offset indent -gvirstor label -v mydata /dev/ad4 /dev/ad6 -newfs /dev/virstor/mydata +.No gvirstor label -v Ar mydata Ar /dev/ad4 Ar /dev/ad6 +.No newfs Ar /dev/virstor/mydata .Ed .Pp From now on, the virtual device will be available via the .Pa /dev/virstor/mydata device entry. -To add a new physical device / provider to an active virstor device: +To add a new physical device / component to an active virstor device: .Bd -literal -offset indent -gvirstor add mydata ad8 +.No gvirstor add Ar mydata Ar ad8 .Ed .Pp -This will add physical storage (from ad8) to +This will add physical storage +.Ar ad8 +to .Pa /dev/virstor/mydata device. -To see device status information (including how much physical storage -is still available for the virtual device), use: +To see device status information +.Pq including how much physical storage is still available for the virtual device , +use: .Bd -literal -offset indent gvirstor list .Ed .Pp All standard .Xr geom 8 -subcommands (e.g. "status", "help") are also supported. -.Sh SYSCTLs +subcommands +.Pq e.g. Cm status , Cm help +are also supported. +.Sh SYSCTL VARIABLES .Nm -has several +has several .Xr sysctl 8 tunable variables. .Bd -literal -offset indent -.Pa int kern.geom.virstor.debug +.Va int kern.geom.virstor.debug .Ed .Pp This sysctl controls verbosity of the kernel module, in the range -1 to 15. Messages that are marked with higher verbosity levels than -this are supressed. Default value is 5 and it's not -recommented to set this tunable to less than 2, because level 1 messages +1 to 15. Messages that are marked with higher verbosity levels than +this are suppressed. Default value is 5 and it's not +recommended to set this tunable to less than 2, because level 1 messages are error events, and level 2 messages are system warnings. .Bd -literal -offset indent -.Pa int kern.geom.virstor.chunk_watermark +.Va int kern.geom.virstor.chunk_watermark .Ed .Pp Value in this sysctl sets warning watermark level for physical chunk usage on a single component. The warning is issued when a virstor component -has less than this many free chunks (default 100). +has less than this many free chunks +.Pq default 100 . .Bd -literal -offset indent -.Pa int kern.geom.virstor.component_watermark +.Va int kern.geom.virstor.component_watermark .Ed .Pp Value in this sysctl sets warning watermark level for component usage. -The warning is issed when there are less than this many unallocated -components (default is 1). +The warning is issued when there are less than this many unallocated +components +.Pq default is 1 . .Pp All these sysctls are also available as .Xr loader 8 tunables. -.Sh LOG MESSAGES +.Sh DIAGNOSTICS .Nm -kernel module issues log messages with prefixes in standardised format, +kernel module issues log messages with prefixes in standardized format, which is useful for log message filtering and dispatching. Each message line begins with .Bd -literal -offset indent -.Pa GEOM_VIRSTOR[%d]: +.Li GEOM_VIRSTOR[%d]: .Ed .Pp -The number (%d) is message verbosity / importance level, in the range -1 to 15. If a message filtering, dispatching or operator alert system is -used, it is recommended that messages with levels 1 and 2 be taken -seriously (for example, to catch out-of-space conditions as set by -watermark sysctls). +The number +.Pq %d +is message verbosity / importance level, in the range 1 to 15. If a +message filtering, dispatching or operator alert system is used, it is +recommended that messages with levels 1 and 2 be taken seriously +.Pq for example, to catch out-of-space conditions as set by watermark +sysctls . .Sh SEE ALSO .Xr geom 4 , .Xr geom 8 , @@ -218,10 +244,40 @@ The utility appeared in .Fx 7.0 . .Sh BUGS -Commands "add" and "remove" contain unavoidable critical sections -which may make the virstor device unusable if a power failure (or -other disruptive event) happens during their execution. -It's recommended to run them when the system is quiescent. +Commands +.Cm add +and +.Cm remove +contain unavoidable critical sections which may make the virstor +device unusable if a power failure +.Pq or other disruptive event +happens during their execution. It's recommended to run them when the +system is quiescent. +.Sh ASSUMPTIONS AND INTERACTION WITH FILE SYSTEMS +There are several assumptions that +.Nm +has in its operation: that the size of the virtual storage device will not +change once it's set, and that the sizes of individual physical storage +components will always remain constant during their existence. For +alternative ways to implement virtual or resizable file systems see +.Xr zfs 1M , +.Xr gconcat 8 and +.Xr growfs 8 . +.Pp +Note that +.Nm +has nontrivial interaction with file systems which initialize a large +number of on-disk structures during newfs. If such file systems +attempt to spread their structures across the drive media +.Pq like UFS/UFS2 does , +their efforts will be effectively foiled by sequential allocation of +chunks in +.Nm +and all their structures will be physically allocated at the start +of the first virstor component. This could have a significant impac +t on file system performance +.Pq which can in some rare cases be even positive . .Sh AUTHOR -.An Ivan Voras Aq ivoras@FreeBSD.org +.An Ivan Voras Aq ivoras@FreeBSD.org +.Pp Sponsored by Google Summer of Code 2006 From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 12:04:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 132C41065706; Sun, 4 Jan 2009 12:04:41 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id A91BD8FC20; Sun, 4 Jan 2009 12:04:40 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LJRig-000IFi-I3; Sun, 04 Jan 2009 14:04:38 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n04C4Zft080184 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Jan 2009 14:04:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n04C4ZsG039444; Sun, 4 Jan 2009 14:04:35 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n04C4Y7i039443; Sun, 4 Jan 2009 14:04:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 4 Jan 2009 14:04:34 +0200 From: Kostik Belousov To: Ed Schouten Message-ID: <20090104120434.GF93900@deviant.kiev.zoral.com.ua> References: <200901040020.n040KIcc041121@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kbCYTQG2MZjuOjyn" Content-Disposition: inline In-Reply-To: <200901040020.n040KIcc041121@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LJRig-000IFi-I3 c44239d637e79628a127cc02fa932537 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:04:42 -0000 --kbCYTQG2MZjuOjyn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 12:20:18AM +0000, Ed Schouten wrote: > Author: ed > Date: Sun Jan 4 00:20:18 2009 > New Revision: 186731 > URL: http://svn.freebsd.org/changeset/base/186731 >=20 > Log: > Print control characters, even though they are normally not visible. > =20 > With cons25, there are printable characters below 0x1B. This is not the > case with ASCII, UTF-8, etc. but in this case we just have to. > =20 > Also don't set LC_CTYPE to UTF-8 when libteken is compiled without UTF-8 > in the demo-application. >=20 > Modified: > head/sys/dev/syscons/teken/teken.c > head/sys/dev/syscons/teken/teken_demo.c >=20 > Modified: head/sys/dev/syscons/teken/teken.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:12:01 2009 (r186730) > +++ head/sys/dev/syscons/teken/teken.c Sun Jan 4 00:20:18 2009 (r186731) > @@ -53,10 +53,14 @@ static FILE *df; > #include "teken_wcwidth.h" > #else /* !TEKEN_UTF8 */ > static inline int > -teken_wcwidth(teken_char_t c) > +teken_wcwidth(teken_char_t c __unused) > { > =20 > +#ifdef TEKEN_CONS25 > + return (1); > +#else /* !TEKEN_CONS25 */ > return (c <=3D 0x1B) ? -1 : 1; > +#endif /* TEKEN_CONS25 */ > } > #endif /* TEKEN_UTF8 */ > =20 >=20 > Modified: head/sys/dev/syscons/teken/teken_demo.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:12:01 2009 (r18= 6730) > +++ head/sys/dev/syscons/teken/teken_demo.c Sun Jan 4 00:20:18 2009 (r18= 6731) > @@ -280,7 +280,9 @@ main(int argc __unused, char *argv[] __u > exit(1); > case 0: > setenv("TERM", "cons25", 1); > +#ifdef TEKEN_UTF8 > setenv("LC_CTYPE", "UTF-8", 0); > +#endif /* TEKEN_UTF8 */ > execlp("zsh", "-zsh", NULL); > execlp("bash", "-bash", NULL); > execlp("sh", "-sh", NULL); IMHO, it would be much easier to try and use the new code if the TEKEN_XXX defines would be implemented as both sysctl and kernel tunables. --kbCYTQG2MZjuOjyn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklgpdIACgkQC3+MBN1Mb4gbEQCfcMmuvBgtYpoGn4GlCssGPo6d 4bwAoN4fhbI4zaysxvCW26yC2wT2x65X =se5N -----END PGP SIGNATURE----- --kbCYTQG2MZjuOjyn-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 12:13:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31279106566B; Sun, 4 Jan 2009 12:13:33 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id BF3C08FC13; Sun, 4 Jan 2009 12:13:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id A7E9B1CE07; Sun, 4 Jan 2009 13:13:31 +0100 (CET) Date: Sun, 4 Jan 2009 13:13:31 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20090104121331.GC14235@hoeg.nl> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CFO0SFgG+t1lcV5s" Content-Disposition: inline In-Reply-To: <20090104120434.GF93900@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:13:33 -0000 --CFO0SFgG+t1lcV5s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Kostik Belousov wrote: > IMHO, it would be much easier to try and use the new code if the > TEKEN_XXX defines would be implemented as both sysctl and kernel > tunables. Yes. Eventually we should add tunables, but first I want to get it working correctly. Unfortunately there is a big amount of complexity when switching to xterm. I think it may be better to switch when we're moving to UTF-8 as well. If we want to switch to xterm without having UTF-8, I suspect we'll break lots of things related to character maps, box drawing, etc. But at least having a kernel tunable would be nice. I'll see what I can do. --=20 Ed Schouten WWW: http://80386.nl/ --CFO0SFgG+t1lcV5s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklgp+sACgkQ52SDGA2eCwXGvgCfdiWUXOptUgwEulHE79KqJ0+D lFsAmQHT/bHwag4+8Qs22DztII9Zy+qX =Rwdo -----END PGP SIGNATURE----- --CFO0SFgG+t1lcV5s-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 12:18:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36C1106564A; Sun, 4 Jan 2009 12:18:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D28C48FC08; Sun, 4 Jan 2009 12:18:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04CIIFq057164; Sun, 4 Jan 2009 12:18:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04CIIDe057163; Sun, 4 Jan 2009 12:18:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901041218.n04CIIDe057163@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 4 Jan 2009 12:18:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186736 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 12:18:19 -0000 Author: bz Date: Sun Jan 4 12:18:18 2009 New Revision: 186736 URL: http://svn.freebsd.org/changeset/base/186736 Log: Back out r186615; the sanitizing of the pointers in the error case is not needed and seems that it will not be needed either. Pointy hat: mine, mine, mine and not pho's Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Sun Jan 4 11:31:03 2009 (r186735) +++ head/sys/kern/kern_jail.c Sun Jan 4 12:18:18 2009 (r186736) @@ -329,11 +329,9 @@ jail_copyin_ips(struct jail *j) e_free_ip: #ifdef INET6 free(ip6, M_PRISON); - j->ip6 = NULL; #endif #ifdef INET free(ip4, M_PRISON); - j->ip4 = NULL; #endif return (error); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 15:25:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2D6A1065673 for ; Sun, 4 Jan 2009 15:25:57 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 1E3608FC19 for ; Sun, 4 Jan 2009 15:25:56 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 04 Jan 2009 15:25:54 -0000 Received: from p54A3FD83.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.253.131] by mail.gmx.net (mp031) with SMTP; 04 Jan 2009 16:25:54 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/i6t8KSTripo939g0MF5xkd9F2DhlfGj29XpSe5z 6425Pcfq6vlCvp Message-ID: <4960D501.70607@gmx.de> Date: Sun, 04 Jan 2009 16:25:53 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Alfred Perlstein References: <200901040012.n040C2gH040928@svn.freebsd.org> In-Reply-To: <200901040012.n040C2gH040928@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:25:58 -0000 Alfred Perlstein schrieb: > Author: alfred > Date: Sun Jan 4 00:12:01 2009 > New Revision: 186730 > URL: http://svn.freebsd.org/changeset/base/186730 > > Log: > [...] > Make "libusb20_desc_foreach()" more readable. In my part of the world we give credit or, at the very least, say "thank you" to the sender, when we apply patches sent to us. Disappointedly Christoph From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 15:41:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F5161065670; Sun, 4 Jan 2009 15:41:02 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CAF98FC19; Sun, 4 Jan 2009 15:41:02 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04Ff1Jq060754; Sun, 4 Jan 2009 15:41:01 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04Ff1Oh060753; Sun, 4 Jan 2009 15:41:01 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901041541.n04Ff1Oh060753@svn.freebsd.org> From: Daniel Gerzo Date: Sun, 4 Jan 2009 15:41:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186737 - head/sbin/geom/class/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:41:02 -0000 Author: danger (doc committer) Date: Sun Jan 4 15:41:01 2009 New Revision: 186737 URL: http://svn.freebsd.org/changeset/base/186737 Log: - grammar and language fixes - hard sentence breaks - trim EXIT STATUS section and move it to DIAGNOSTICS as well as use .Er macro - sort SEE ALSO MFC after: 7 days Modified: head/sbin/geom/class/virstor/gvirstor.8 Modified: head/sbin/geom/class/virstor/gvirstor.8 ============================================================================== --- head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 12:18:18 2009 (r186736) +++ head/sbin/geom/class/virstor/gvirstor.8 Sun Jan 4 15:41:01 2009 (r186737) @@ -29,7 +29,7 @@ .Os .Sh NAME .Nm gvirstor -.Nd "provides virtual data storage geom" +.Nd "control utility for virtual data storage devices" .Sh SYNOPSIS .Nm .Cm label @@ -72,9 +72,10 @@ utility is used for setting up a virtual large size .Pq for example, several TB , consisting of an arbitrary number of physical storage devices with the -total size which is equal to or smaller than the virtual size. Data -for the virtual devices will be allocated from physical devices on -demand. The idea behind +total size which is equal to or smaller than the virtual size. +Data for the virtual devices will be allocated from physical devices on +demand. +The idea behind .Nm is similar to the concept of Virtual Memory in operating systems, effectively allowing users to overcommit on storage @@ -82,35 +83,35 @@ effectively allowing users to overcommit The first argument to .Nm indicates an action to be performed: -.Bl -tag -width ".Cm destroy" +.Bl -tag -width ".Cm remove" .It Cm label Set up a virtual device from the given components with the specified .Ar name . -Metadata are stored in the last sector of every component. +Metadata is stored in the last sector of every component. Argument .Fl s Ar virsize -is the size of new virtual device, with default being 2 TiB +is the size of new virtual device, with default being set to 2 TiB .Pq 2097152 MiB . Argument .Fl m Ar chunksize -is the chunk size, with default being 4 MiB +is the chunk size, with default being set to 4 MiB .Pq 4096 KiB . -The default is thus +The default arguments are thus .Qq Fl s Ar 2097152 Fl m Ar 4096 . .It Cm stop -Turn off an existing virtual device by its +Turn off an existing virtual device with the given .Ar name . This command does not touch on-disk metadata. As with other GEOM classes, stopped geoms cannot be started manually. .It Cm add -Adds new components to existing virtual device by its +Adds new components to existing virtual device with the given .Ar name . The specified virstor device must exist and be active .Pq i.e. module loaded, device present in Pa /dev . This action can be safely performed while the virstor device is in use .Pq Qo hot Qc operation .It Cm remove -Removes components from existing virtual device by its +Removes components from existing virtual device with the given .Ar name . Only unallocated providers can be removed. .It Cm clear @@ -140,10 +141,6 @@ Hardcode providers' names in metadata. .It Fl v Be more verbose. .El -.Sh EXIT STATUS -The -.Nm -utility exits 0 on success, and 1 if an error occurs. .Sh EXAMPLES The following example shows how to create a virtual device of default size .Pq 2 TiB , @@ -165,12 +162,13 @@ To add a new physical device / component .No gvirstor add Ar mydata Ar ad8 .Ed .Pp -This will add physical storage +This will add physical storage of .Ar ad8 to .Pa /dev/virstor/mydata device. -To see device status information +.Pp +To see the device status information .Pq including how much physical storage is still available for the virtual device , use: .Bd -literal -offset indent @@ -192,17 +190,20 @@ tunable variables. .Ed .Pp This sysctl controls verbosity of the kernel module, in the range -1 to 15. Messages that are marked with higher verbosity levels than -this are suppressed. Default value is 5 and it's not -recommended to set this tunable to less than 2, because level 1 messages -are error events, and level 2 messages are system warnings. +1 to 15. +Messages that are marked with higher verbosity levels than this are +suppressed. +Default value is 5 and it is not recommended to set this tunable to less +than 2, because level 1 messages are error events, and level 2 messages +are system warnings. .Bd -literal -offset indent .Va int kern.geom.virstor.chunk_watermark .Ed .Pp -Value in this sysctl sets warning watermark level for physical chunk usage -on a single component. The warning is issued when a virstor component -has less than this many free chunks +Value in this sysctl sets warning watermark level for physical chunk +usage on a single component. +The warning is issued when a virstor component has less than this many +free chunks .Pq default 100 . .Bd -literal -offset indent .Va int kern.geom.virstor.component_watermark @@ -217,31 +218,33 @@ All these sysctls are also available as .Xr loader 8 tunables. .Sh DIAGNOSTICS +.Ex -std +.Pp .Nm kernel module issues log messages with prefixes in standardized format, -which is useful for log message filtering and dispatching. Each message -line begins with +which is useful for log message filtering and dispatching. +Each message line begins with .Bd -literal -offset indent .Li GEOM_VIRSTOR[%d]: .Ed .Pp The number .Pq %d -is message verbosity / importance level, in the range 1 to 15. If a -message filtering, dispatching or operator alert system is used, it is -recommended that messages with levels 1 and 2 be taken seriously +is message verbosity / importance level, in the range 1 to 15. +If a message filtering, dispatching or operator alert system is used, it +is recommended that messages with levels 1 and 2 be taken seriously .Pq for example, to catch out-of-space conditions as set by watermark -sysctls . +sysctls. .Sh SEE ALSO .Xr geom 4 , -.Xr geom 8 , -.Xr newfs 8 , .Xr fstab 5 , -.Xr glabel 8 +.Xr geom 8 , +.Xr glabel 8 , +.Xr newfs 8 .Sh HISTORY The .Nm -utility appeared in +utility first appeared in .Fx 7.0 . .Sh BUGS Commands @@ -251,15 +254,15 @@ and contain unavoidable critical sections which may make the virstor device unusable if a power failure .Pq or other disruptive event -happens during their execution. It's recommended to run them when the -system is quiescent. +happens during their execution. +It is recommended to run them when the system is quiescent. .Sh ASSUMPTIONS AND INTERACTION WITH FILE SYSTEMS There are several assumptions that .Nm has in its operation: that the size of the virtual storage device will not -change once it's set, and that the sizes of individual physical storage -components will always remain constant during their existence. For -alternative ways to implement virtual or resizable file systems see +change once it is set, and that the sizes of individual physical storage +components will always remain constant during their existence. +For alternative ways to implement virtual or resizable file systems see .Xr zfs 1M , .Xr gconcat 8 and .Xr growfs 8 . @@ -267,17 +270,18 @@ alternative ways to implement virtual or Note that .Nm has nontrivial interaction with file systems which initialize a large -number of on-disk structures during newfs. If such file systems -attempt to spread their structures across the drive media +number of on-disk structures during newfs. +If such file systems attempt to spread their structures across the drive +media .Pq like UFS/UFS2 does , their efforts will be effectively foiled by sequential allocation of chunks in .Nm and all their structures will be physically allocated at the start -of the first virstor component. This could have a significant impac -t on file system performance +of the first virstor component. +This could have a significant impact on file system performance .Pq which can in some rare cases be even positive . .Sh AUTHOR .An Ivan Voras Aq ivoras@FreeBSD.org .Pp -Sponsored by Google Summer of Code 2006 +Sponsored by Google Summer of Code 2006. From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 15:48:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AFA61065678; Sun, 4 Jan 2009 15:48:39 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 198D88FC1C; Sun, 4 Jan 2009 15:48:39 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04FmcjD060921; Sun, 4 Jan 2009 15:48:38 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04Fmcc5060920; Sun, 4 Jan 2009 15:48:38 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901041548.n04Fmcc5060920@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 4 Jan 2009 15:48:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186738 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:48:39 -0000 Author: stas Date: Sun Jan 4 15:48:38 2009 New Revision: 186738 URL: http://svn.freebsd.org/changeset/base/186738 Log: - Improve wording. - ae(4) first appeared in 7.1. Reflect this. Approved by: kib (mentor) MFC after: 1 week Modified: head/share/man/man4/ae.4 Modified: head/share/man/man4/ae.4 ============================================================================== --- head/share/man/man4/ae.4 Sun Jan 4 15:41:01 2009 (r186737) +++ head/share/man/man4/ae.4 Sun Jan 4 15:48:38 2009 (r186738) @@ -121,8 +121,7 @@ the network connection (cable). .It "ae%d: reset timeout." The card reset operation has been timed out. .It "ae%d: Generating random ethernet address." -No valid ethernet address was found neither in the controller registers not in -NVRAM. +No valid Ethernet address was found in the controller NVRAM and registers. Random locally administered address with ASUS OUI identifier will be used instead. .El @@ -135,8 +134,8 @@ instead. .Xr vlan 4 , .Xr ifconfig 8 .Sh BUGS -The Attansic L2 FastEthernet contoller supports DMA but do not use a descriptor -based transfer mechanism via scatter-gather DMA. +The Attansic L2 FastEthernet contoller supports DMA but does not use a +descriptor based transfer mechanism via scatter-gather DMA. Thus the data should be copied to/from the controller memory on each transmit/receive. Furthermore, a lot of data alignment restrictions apply. @@ -150,4 +149,4 @@ driver and this manual page was written .An Stanislav Sedov .Aq stas@FreeBSD.org . It first appeared in -.Fx 8.0 . +.Fx 7.1 . From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 15:49:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0628D106566C; Sun, 4 Jan 2009 15:49:31 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8AEA8FC0C; Sun, 4 Jan 2009 15:49:30 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04FnUFG060974; Sun, 4 Jan 2009 15:49:30 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04FnU51060972; Sun, 4 Jan 2009 15:49:30 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200901041549.n04FnU51060972@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 4 Jan 2009 15:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186739 - in head: share/man/man4 usr.sbin/cpucontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:49:31 -0000 Author: stas Date: Sun Jan 4 15:49:30 2009 New Revision: 186739 URL: http://svn.freebsd.org/changeset/base/186739 Log: - Improve wording. Approved by: kib (mentor) MFC after: 1 week Modified: head/share/man/man4/cpuctl.4 head/usr.sbin/cpucontrol/cpucontrol.8 Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Sun Jan 4 15:48:38 2009 (r186738) +++ head/share/man/man4/cpuctl.4 Sun Jan 4 15:49:30 2009 (r186739) @@ -55,7 +55,7 @@ CPU firmware updates. For each CPU present in the system, the special file .Pa /dev/cpuctl%d with the appropriate index will be created. -For multicore CPUs the +For multicore CPUs such special file will be created for each core. .Pp Currently, only i386 and amd64 processors are @@ -123,7 +123,7 @@ For additional information refer to .Bl -tag -width Er .It Bq Er ENXIO The operation requested is not supported by the device (e.g. unsupported -architecture or the CPU was disabled). +architecture or the CPU is disabled) .It Bq Er EINVAL Incorrect request was supplied, or microcode image is not correct. .It Bq Er ENOMEM Modified: head/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 Sun Jan 4 15:48:38 2009 (r186738) +++ head/usr.sbin/cpucontrol/cpucontrol.8 Sun Jan 4 15:49:30 2009 (r186739) @@ -77,7 +77,7 @@ Apply CPU firmware updates. The .Nm utility will walk through the configured data directories -and will apply all firmware patches available for this CPU. +and apply all firmware updates available for this CPU. .It Fl v Increase the verbosity level. .It Fl h @@ -111,6 +111,11 @@ use the following command: .Dq Li "cpucontrol -d /usr/local/share/cpuctl/ -u /dev/cpuctl0" .Sh SEE ALSO .Xr cpuctl 4 +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 8.0 . .Sh BUGS Yes, probably, report if any. .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 15:56:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B1B71065670; Sun, 4 Jan 2009 15:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 19D888FC13; Sun, 4 Jan 2009 15:56:50 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04FunRm061147; Sun, 4 Jan 2009 15:56:49 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04Funod061146; Sun, 4 Jan 2009 15:56:49 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901041556.n04Funod061146@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 4 Jan 2009 15:56:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 15:56:50 -0000 Author: kib Date: Sun Jan 4 15:56:49 2009 New Revision: 186740 URL: http://svn.freebsd.org/changeset/base/186740 Log: Do not incorrectly add the low 5 bits of the offset to the resulting position of the found zero bit. Submitted by: Jaakko Heinonen MFC after: 2 weeks Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h ============================================================================== --- head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:49:30 2009 (r186739) +++ head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:56:49 2009 (r186740) @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz mask = ~0U << (ofs & 31); bit = *p | ~mask; if (bit != ~0U) - return (ffs(~bit) + ofs - 1); + return (ffs(~bit) + (ofs & ~31U) - 1); p++; ofs = (ofs + 31U) & ~31U; } From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 16:28:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DEC3106566B; Sun, 4 Jan 2009 16:28:35 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) Received: from mta-2.ms.rz.rwth-aachen.de (mta-2.ms.rz.RWTH-Aachen.DE [134.130.7.73]) by mx1.freebsd.org (Postfix) with ESMTP id 1879C8FC0C; Sun, 4 Jan 2009 16:28:34 +0000 (UTC) (envelope-from chris@hitnet.RWTH-Aachen.DE) MIME-version: 1.0 Received: from ironport-out-1.rz.rwth-aachen.de ([134.130.5.40]) by mta-2.ms.rz.RWTH-Aachen.de (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008)) with ESMTP id <0KCY007IUF1L08D0@mta-2.ms.rz.RWTH-Aachen.de>; Sun, 04 Jan 2009 16:58:33 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.36,327,1228086000"; d="scan'208";a="95370145" Received: from smarthost-2.ms.rz.rwth-aachen.de (HELO smarthost.rwth-aachen.de) ([134.130.7.90]) by ironport-in-1.rz.rwth-aachen.de with ESMTP; Sun, 04 Jan 2009 16:58:33 +0100 Received: from bigboss.hitnet.rwth-aachen.de (bigspace.hitnet.RWTH-Aachen.DE [137.226.181.2]) by smarthost.rwth-aachen.de (8.13.8+Sun/8.13.8/1) with ESMTP id n04FwX4m024276; Sun, 04 Jan 2009 16:58:33 +0100 (CET) Received: from haakonia.hitnet.rwth-aachen.de ([137.226.181.92]) by bigboss.hitnet.rwth-aachen.de with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LJVN2-0000xk-VH; Sun, 04 Jan 2009 16:58:32 +0100 Received: by haakonia.hitnet.rwth-aachen.de (Postfix, from userid 1001) id A046B3F421; Sun, 04 Jan 2009 16:58:32 +0100 (CET) Date: Sun, 04 Jan 2009 16:58:32 +0100 From: Christian Brueffer To: Daniel Gerzo Message-id: <20090104155832.GA1257@haakonia.hitnet.RWTH-Aachen.DE> References: <200901041541.n04Ff1Oh060753@svn.freebsd.org> Content-type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary=Dxnq1zWXvFF0Q93v Content-disposition: inline In-reply-to: <200901041541.n04Ff1Oh060753@svn.freebsd.org> X-Operating-System: FreeBSD 6.4-STABLE X-PGP-Key: http://people.FreeBSD.org/~brueffer/brueffer.key.asc X-PGP-Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D User-Agent: Mutt/1.5.11 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186737 - head/sbin/geom/class/virstor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 16:28:35 -0000 --Dxnq1zWXvFF0Q93v Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 03:41:01PM +0000, Daniel Gerzo wrote: > Author: danger (doc committer) > Date: Sun Jan 4 15:41:01 2009 > New Revision: 186737 > URL: http://svn.freebsd.org/changeset/base/186737 >=20 > Log: [...] > - trim EXIT STATUS section and move it to DIAGNOSTICS as well as use .Er > macro >=20 While using .Ex is good, collapsing EXIT STATUS into DIAGNOSTICS is not. EXIT STATUS is a standard section in our manpages and it's orthogonal to DIAGNOSTICS. Please revert this part. - Christian --=20 Christian Brueffer chris@unixpages.org brueffer@FreeBSD.org GPG Key: http://people.freebsd.org/~brueffer/brueffer.key.asc GPG Fingerprint: A5C8 2099 19FF AACA F41B B29B 6C76 178C A0ED 982D --Dxnq1zWXvFF0Q93v Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFJYNyobHYXjKDtmC0RAiUJAKCVlFN/JLCU2ix4OffZObbE2znomwCguBJO 5c1NTHLDmA8XoZ1yJH5zFD4= =ZTsq -----END PGP SIGNATURE----- --Dxnq1zWXvFF0Q93v-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 17:08:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FD06106566C; Sun, 4 Jan 2009 17:08:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 22A538FC12; Sun, 4 Jan 2009 17:08:48 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n04H7fxX095092; Sun, 4 Jan 2009 10:07:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 04 Jan 2009 10:07:55 -0700 (MST) Message-Id: <20090104.100755.686402162.imp@bsdimp.com> To: obrien@freebsd.org From: "M. Warner Losh" In-Reply-To: <200901031014.n03AE1lA022458@svn.freebsd.org> References: <200901031014.n03AE1lA022458@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186713 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 17:08:48 -0000 In message: <200901031014.n03AE1lA022458@svn.freebsd.org> "David E. O'Brien" writes: : Author: obrien : Date: Sat Jan 3 10:14:01 2009 : New Revision: 186713 : URL: http://svn.freebsd.org/changeset/base/186713 : : Log: : + Add the -Q be-quiet flag for parallel jobs. : - Enable -Q by default for the moment - there is something weird : going on in the rescue build. This seems to also include other things not related to -Q, is that intentional: : Modified: head/usr.bin/make/var.c : ============================================================================== : --- head/usr.bin/make/var.c Sat Jan 3 05:32:37 2009 (r186712) : +++ head/usr.bin/make/var.c Sat Jan 3 10:14:01 2009 (r186713) : @@ -946,12 +946,14 @@ VarFindAny(const char name[], GNode *ctx : * The name and val arguments are duplicated so they may : * safely be freed. : */ : -static void : +static Var * : VarAdd(const char *name, const char *val, GNode *ctxt) : { : + Var *v; : : - Lst_AtFront(&ctxt->context, VarCreate(name, val, 0)); : + Lst_AtFront(&ctxt->context, v = VarCreate(name, val, 0)); : DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, name, val)); : + return (v); : } : : /** : @@ -1004,30 +1006,22 @@ Var_Set(const char *name, const char *va : n = VarPossiblyExpand(name, ctxt); : v = VarFindOnly(n, ctxt); : if (v == NULL) { : - VarAdd(n, val, ctxt); : - if (ctxt == VAR_CMD) { : - /* : - * Any variables given on the command line : - * are automatically exported to the : - * environment (as per POSIX standard) : - */ : - setenv(n, val, 1); : - } : + v = VarAdd(n, val, ctxt); : } else { : Buf_Clear(v->val); : Buf_Append(v->val, val); : - : - if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) { : - /* : - * Any variables given on the command line : - * are automatically exported to the : - * environment (as per POSIX standard) : - */ : - setenv(n, val, 1); : - } : DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, n, val)); : } : : + if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) { : + /* : + * Any variables given on the command line : + * are automatically exported to the : + * environment (as per POSIX standard) : + */ : + setenv(n, val, 1); : + } : + : free(n); : } : : @@ -2325,7 +2319,8 @@ match_var(const char str[], const char v : * None. The old string must be freed by the caller : */ : Buffer * : -Var_Subst(const char *str, GNode *ctxt, Boolean err) : +//Var_Subst(const char *var, const char *str, GNode *ctxt, Boolean undefErr) : +Var_Subst( const char *str, GNode *ctxt, Boolean err) : { : Boolean errorReported; : Buffer *buf; /* Buffer for forming things */ : From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 17:11:37 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB1391065670; Sun, 4 Jan 2009 17:11:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9019A8FC18; Sun, 4 Jan 2009 17:11:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n04HB7N6095141; Sun, 4 Jan 2009 10:11:07 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 04 Jan 2009 10:11:21 -0700 (MST) Message-Id: <20090104.101121.2139791946.imp@bsdimp.com> To: alfred@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200901040012.n040C2gH040928@svn.freebsd.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 17:11:38 -0000 In message: <200901040012.n040C2gH040928@svn.freebsd.org> Alfred Perlstein writes: : Sync with usb4bsd: Alfred, thanks for trudging these fixes into the tree. It is a thankless job that people will complain about... Speaking of complaining, is there a review process that can be joined for them that's more formal than "diff against hps' p4 tree and complain?" Warner From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 18:06:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF2AC106566C for ; Sun, 4 Jan 2009 18:06:21 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 4A91B8FC17 for ; Sun, 4 Jan 2009 18:06:21 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 04 Jan 2009 18:06:19 -0000 Received: from p54A3FD83.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.253.131] by mail.gmx.net (mp070) with SMTP; 04 Jan 2009 19:06:19 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX19O6o0YditOnpQMvsek+gYaaGTybL0tUuVWMjV8ye NjFB54hJZAGyop Message-ID: <4960FA9A.1090509@gmx.de> Date: Sun, 04 Jan 2009 19:06:18 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "David E. O'Brien" References: <200812262254.mBQMsrbR052676@svn.freebsd.org> In-Reply-To: <200812262254.mBQMsrbR052676@svn.freebsd.org> Content-Type: multipart/mixed; boundary="------------040804020300050601020108" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.49,0.46 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186504 - head/sbin/mount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 18:06:22 -0000 This is a multi-part message in MIME format. --------------040804020300050601020108 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi David, I'm pretty sure $SUPERNATURAL_BEING_OF_YOUR_CHOICE killed a kitten for the ugly hack you added to mount. The moment you overflow a buffer, you are in no man's land and there's no escape. I appended a patch, which solves this issue once and for all: The argv array gets dynamically expanded, when its limit is reached. Please - for all kittens out there - commit this patch. Christoph David E. O'Brien schrieb: > Author: obrien > Date: Fri Dec 26 22:54:53 2008 > New Revision: 186504 > URL: http://svn.freebsd.org/changeset/base/186504 > > Log: > Make the sub-'argc' static to make it harder to overwrite thru a buffer > overflow. > > Modified: > head/sbin/mount/mount.c > > Modified: head/sbin/mount/mount.c > ============================================================================== > --- head/sbin/mount/mount.c Fri Dec 26 22:47:11 2008 (r186503) > +++ head/sbin/mount/mount.c Fri Dec 26 22:54:53 2008 (r186504) > @@ -503,9 +503,10 @@ int > mountfs(const char *vfstype, const char *spec, const char *name, int flags, > const char *options, const char *mntopts) > { > + static int argc; > char *argv[MAX_ARGS]; > struct statfs sf; > - int argc, i, ret; > + int i, ret; > char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX]; > > /* resolve the mountpoint with realpath(3) */ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > --------------040804020300050601020108 Content-Type: text/plain; name="mount.diff" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="mount.diff" SW5kZXg6IG1vdW50LmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbW91bnQuYwkoUmV2aXNpb24gMTg2 NzQwKQorKysgbW91bnQuYwkoQXJiZWl0c2tvcGllKQpAQCAtNjgsMTYgKzY4LDE3IEBACiAj ZGVmaW5lIE1PVU5UX01FVEFfT1BUSU9OX0ZTVEFCCQkiZnN0YWIiCiAjZGVmaW5lIE1PVU5U X01FVEFfT1BUSU9OX0NVUlJFTlQJImN1cnJlbnQiCiAKLSNkZWZpbmUJTUFYX0FSR1MJCQkx MDAKLQogaW50IGRlYnVnLCBmc3RhYl9zdHlsZSwgdmVyYm9zZTsKK3N0YXRpYyBjaGFyICoq bW50X2FyZ3Y7CitzdGF0aWMgaW50IG1udF9hcmd2X3NpemU7CitzdGF0aWMgaW50IG1udF9h cmdjOwogCiBjaGFyICAgKmNhdG9wdChjaGFyICosIGNvbnN0IGNoYXIgKik7CiBzdHJ1Y3Qg c3RhdGZzICpnZXRtbnRwdChjb25zdCBjaGFyICopOwogaW50CWhhc29wdChjb25zdCBjaGFy ICosIGNvbnN0IGNoYXIgKik7CiBpbnQJaXNtb3VudGVkKHN0cnVjdCBmc3RhYiAqLCBzdHJ1 Y3Qgc3RhdGZzICosIGludCk7CiBpbnQJaXNyZW1vdW50YWJsZShjb25zdCBjaGFyICopOwot dm9pZAltYW5nbGUoY2hhciAqLCBpbnQgKiwgY2hhciAqW10pOworc3RhdGljIHZvaWQJbWFu Z2xlKGNoYXIgKik7CiBjaGFyICAgKnVwZGF0ZV9vcHRpb25zKGNoYXIgKiwgY2hhciAqLCBp bnQpOwogaW50CW1vdW50ZnMoY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICosIGNvbnN0IGNo YXIgKiwKIAkJCWludCwgY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICopOwpAQCAtNDk5LDEy ICs1MDAsMjIgQEAKIAlyZXR1cm4gKGZvdW5kKTsKIH0KIAorc3RhdGljIHZvaWQKK2FwcGVu ZF9hcmd2KGNoYXIgKmFyZykKK3sKKwlpZiAobW50X2FyZ2MgPT0gbW50X2FyZ3Zfc2l6ZSkg eworCQltbnRfYXJndl9zaXplID0gbW50X2FyZ3Zfc2l6ZSA9PSAwID8gMTYgOiBtbnRfYXJn dl9zaXplICogMjsKKwkJbW50X2FyZ3YgPSByZWFsbG9jKG1udF9hcmd2LCBzaXplb2YoKm1u dF9hcmd2KSAqIG1udF9hcmd2X3NpemUpOworCQlpZiAobW50X2FyZ3YgPT0gTlVMTCkKKwkJ CWVycngoMSwgInJlYWxsb2MgZmFpbGVkIik7CisJfQorCW1udF9hcmd2W21udF9hcmdjKytd ID0gYXJnOworfQorCiBpbnQKIG1vdW50ZnMoY29uc3QgY2hhciAqdmZzdHlwZSwgY29uc3Qg Y2hhciAqc3BlYywgY29uc3QgY2hhciAqbmFtZSwgaW50IGZsYWdzLAogCWNvbnN0IGNoYXIg Km9wdGlvbnMsIGNvbnN0IGNoYXIgKm1udG9wdHMpCiB7Ci0Jc3RhdGljIGludCBhcmdjOwot CWNoYXIgKmFyZ3ZbTUFYX0FSR1NdOwogCXN0cnVjdCBzdGF0ZnMgc2Y7CiAJaW50IGksIHJl dDsKIAljaGFyICpvcHRidWYsIGV4ZWNuYW1lW1BBVEhfTUFYXSwgbW50cGF0aFtQQVRIX01B WF07CkBAIC01NDIsMzIgKzU1MywyNyBAQAogCS8qIENvbnN0cnVjdCB0aGUgbmFtZSBvZiB0 aGUgYXBwcm9wcmlhdGUgbW91bnQgY29tbWFuZCAqLwogCSh2b2lkKXNucHJpbnRmKGV4ZWNu YW1lLCBzaXplb2YoZXhlY25hbWUpLCAibW91bnRfJXMiLCB2ZnN0eXBlKTsKIAotCWFyZ2Mg PSAwOwotCWFyZ3ZbYXJnYysrXSA9IGV4ZWNuYW1lOwotCW1hbmdsZShvcHRidWYsICZhcmdj LCBhcmd2KTsKLQlhcmd2W2FyZ2MrK10gPSBzdHJkdXAoc3BlYyk7Ci0JYXJndlthcmdjKytd ID0gc3RyZHVwKG5hbWUpOwotCWFyZ3ZbYXJnY10gPSBOVUxMOworCWFwcGVuZF9hcmd2KGV4 ZWNuYW1lKTsKKwltYW5nbGUob3B0YnVmKTsKKwlhcHBlbmRfYXJndihzdHJkdXAoc3BlYykp OworCWFwcGVuZF9hcmd2KHN0cmR1cChuYW1lKSk7CisJYXBwZW5kX2FyZ3YoTlVMTCk7CiAK LQlpZiAoTUFYX0FSR1MgPD0gYXJnYyApCi0JCWVycngoMSwgIkNhbm5vdCBwcm9jZXNzIG1v cmUgdGhhbiAlZCBtb3VudCBhcmd1bWVudHMiLAotCQkgICAgTUFYX0FSR1MpOwotCiAJaWYg KGRlYnVnKSB7CiAJCWlmICh1c2VfbW91bnRwcm9nKHZmc3R5cGUpKQogCQkJcHJpbnRmKCJl eGVjOiBtb3VudF8lcyIsIHZmc3R5cGUpOwogCQllbHNlCiAJCQlwcmludGYoIm1vdW50IC10 ICVzIiwgdmZzdHlwZSk7Ci0JCWZvciAoaSA9IDE7IGkgPCBhcmdjOyBpKyspCi0JCQkodm9p ZClwcmludGYoIiAlcyIsIGFyZ3ZbaV0pOworCQlmb3IgKGkgPSAxOyBpIDwgbW50X2FyZ2M7 IGkrKykKKwkJCSh2b2lkKXByaW50ZigiICVzIiwgbW50X2FyZ3ZbaV0pOwogCQkodm9pZClw cmludGYoIlxuIik7CiAJCXJldHVybiAoMCk7CiAJfQogCiAJaWYgKHVzZV9tb3VudHByb2co dmZzdHlwZSkpIHsKLQkJcmV0ID0gZXhlY19tb3VudHByb2cobmFtZSwgZXhlY25hbWUsIGFy Z3YpOworCQlyZXQgPSBleGVjX21vdW50cHJvZyhuYW1lLCBleGVjbmFtZSwgbW50X2FyZ3Yp OwogCX0gZWxzZSB7Ci0JCXJldCA9IG1vdW50X2ZzKHZmc3R5cGUsIGFyZ2MsIGFyZ3YpOwor CQlyZXQgPSBtb3VudF9mcyh2ZnN0eXBlLCBtbnRfYXJnYywgbW50X2FyZ3YpOwogCX0KIAog CWZyZWUob3B0YnVmKTsKQEAgLTY2OSwxMyArNjc1LDExIEBACiAJcmV0dXJuIChjcCk7CiB9 CiAKLXZvaWQKLW1hbmdsZShjaGFyICpvcHRpb25zLCBpbnQgKmFyZ2NwLCBjaGFyICphcmd2 W10pCitzdGF0aWMgdm9pZAorbWFuZ2xlKGNoYXIgKm9wdGlvbnMpCiB7CiAJY2hhciAqcCwg KnM7Ci0JaW50IGFyZ2M7CiAKLQlhcmdjID0gKmFyZ2NwOwogCWZvciAocyA9IG9wdGlvbnM7 IChwID0gc3Ryc2VwKCZzLCAiLCIpKSAhPSBOVUxMOykKIAkJaWYgKCpwICE9ICdcMCcpIHsK IAkJCWlmIChzdHJjbXAocCwgIm5vYXV0byIpID09IDApIHsKQEAgLTcwNywxOSArNzExLDE3 IEBACiAJCQkgICAgc2l6ZW9mKGdyb3VwcXVvdGFlcSkgLSAxKSA9PSAwKSB7CiAJCQkJY29u dGludWU7CiAJCQl9IGVsc2UgaWYgKCpwID09ICctJykgewotCQkJCWFyZ3ZbYXJnYysrXSA9 IHA7CisJCQkJYXBwZW5kX2FyZ3YocCk7CiAJCQkJcCA9IHN0cmNocihwLCAnPScpOwogCQkJ CWlmIChwICE9IE5VTEwpIHsKIAkJCQkJKnAgPSAnXDAnOwotCQkJCQlhcmd2W2FyZ2MrK10g PSBwKzE7CisJCQkJCWFwcGVuZF9hcmd2KHAgKyAxKTsKIAkJCQl9CiAJCQl9IGVsc2Ugewot CQkJCWFyZ3ZbYXJnYysrXSA9IHN0cmR1cCgiLW8iKTsKLQkJCQlhcmd2W2FyZ2MrK10gPSBw OworCQkJCWFwcGVuZF9hcmd2KHN0cmR1cCgiLW8iKSk7CisJCQkJYXBwZW5kX2FyZ3YocCk7 CiAJCQl9CiAJCX0KLQotCSphcmdjcCA9IGFyZ2M7CiB9CiAKIAo= --------------040804020300050601020108-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 19:03:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31A18106564A; Sun, 4 Jan 2009 19:03:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 201768FC08; Sun, 4 Jan 2009 19:03:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04J3hxL071798; Sun, 4 Jan 2009 19:03:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04J3hNs071797; Sun, 4 Jan 2009 19:03:43 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901041903.n04J3hNs071797@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 19:03:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186745 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:03:43 -0000 Author: rwatson Date: Sun Jan 4 19:03:42 2009 New Revision: 186745 URL: http://svn.freebsd.org/changeset/base/186745 Log: Remove now-unused pr_ousrreq from struct protosw. It may not have been used since the last millenia. Modified: head/sys/sys/protosw.h Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Sun Jan 4 18:18:59 2009 (r186744) +++ head/sys/sys/protosw.h Sun Jan 4 19:03:42 2009 (r186745) @@ -89,8 +89,6 @@ struct protosw { pr_output_t *pr_output; /* output to protocol (from above) */ pr_ctlinput_t *pr_ctlinput; /* control input (from below) */ pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ -/* user-protocol hook */ - pr_usrreq_t *pr_ousrreq; /* utility hooks */ pr_init_t *pr_init; pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 19:16:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D07B9106566B; Sun, 4 Jan 2009 19:16:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEB748FC0C; Sun, 4 Jan 2009 19:16:37 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04JGal1072103; Sun, 4 Jan 2009 19:16:36 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04JGadR072101; Sun, 4 Jan 2009 19:16:36 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901041916.n04JGadR072101@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 19:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186746 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:16:38 -0000 Author: rwatson Date: Sun Jan 4 19:16:36 2009 New Revision: 186746 URL: http://svn.freebsd.org/changeset/base/186746 Log: Remove two further uses (debugging and NULLing) of pr_ousrreq, missed due to svn commit in the wrong directory. Spotted by: bz Modified: head/sys/kern/uipc_debug.c head/sys/kern/uipc_domain.c Modified: head/sys/kern/uipc_debug.c ============================================================================== --- head/sys/kern/uipc_debug.c Sun Jan 4 19:03:42 2009 (r186745) +++ head/sys/kern/uipc_debug.c Sun Jan 4 19:16:36 2009 (r186746) @@ -322,7 +322,6 @@ db_print_protosw(struct protosw *pr, con db_print_indent(indent); db_printf("pr_ctloutput: %p ", pr->pr_ctloutput); - db_printf("pr_ousrreq: %p ", pr->pr_ousrreq); db_printf("pr_init: %p\n", pr->pr_init); db_print_indent(indent); @@ -331,7 +330,6 @@ db_print_protosw(struct protosw *pr, con db_printf("pr_drain: %p\n", pr->pr_drain); db_print_indent(indent); - db_printf("pr_ousrreq: %p\n", pr->pr_ousrreq); } static void Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Sun Jan 4 19:03:42 2009 (r186745) +++ head/sys/kern/uipc_domain.c Sun Jan 4 19:16:36 2009 (r186746) @@ -426,7 +426,6 @@ found: dpr->pr_output = NULL; dpr->pr_ctlinput = NULL; dpr->pr_ctloutput = NULL; - dpr->pr_ousrreq = NULL; dpr->pr_init = NULL; dpr->pr_fasttimo = NULL; dpr->pr_slowtimo = NULL; From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 19:22:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AC971065674; Sun, 4 Jan 2009 19:22:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1984B8FC13; Sun, 4 Jan 2009 19:22:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04JMrGN072276; Sun, 4 Jan 2009 19:22:53 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04JMrLt072275; Sun, 4 Jan 2009 19:22:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901041922.n04JMrLt072275@svn.freebsd.org> From: Ed Schouten Date: Sun, 4 Jan 2009 19:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186747 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:22:54 -0000 Author: ed Date: Sun Jan 4 19:22:53 2009 New Revision: 186747 URL: http://svn.freebsd.org/changeset/base/186747 Log: Remove Giant locking from domains list. During boot, the domain list is locked with Giant. It is not possible to register any protocols after the system has booted, so the lock is only used to protect insertion of entries. There is already a mutex in uipc_domain.c called dom_mtx. Use this mutex to lock the list, instead of using Giant. It won't matter anything with respect to performance, but we'll never get rid of Giant if we don't remove from places where we don't need it. Approved by: rwatson MFC after: 3 weeks Modified: head/sys/kern/uipc_domain.c Modified: head/sys/kern/uipc_domain.c ============================================================================== --- head/sys/kern/uipc_domain.c Sun Jan 4 19:16:36 2009 (r186746) +++ head/sys/kern/uipc_domain.c Sun Jan 4 19:22:53 2009 (r186747) @@ -72,7 +72,7 @@ static void pfslowtimo(void *); struct domain *domains; /* registered protocol domains */ int domain_init_status = 0; -struct mtx dom_mtx; /* domain list lock */ +static struct mtx dom_mtx; /* domain list lock */ MTX_SYSINIT(domain, &dom_mtx, "domain list", MTX_DEF); /* @@ -338,13 +338,13 @@ found: * Protect us against races when two protocol registrations for * the same protocol happen at the same time. */ - mtx_lock(&Giant); + mtx_lock(&dom_mtx); /* The new protocol must not yet exist. */ for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) { if ((pr->pr_type == npr->pr_type) && (pr->pr_protocol == npr->pr_protocol)) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EEXIST); /* XXX: Check only protocol? */ } /* While here, remember the first free spacer. */ @@ -354,7 +354,7 @@ found: /* If no free spacer is found we can't add the new protocol. */ if (fpr == NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (ENOMEM); } @@ -362,7 +362,7 @@ found: bcopy(npr, fpr, sizeof(*fpr)); /* Job is done, no more protection required. */ - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); /* Initialize and activate the protocol. */ protosw_init(fpr); @@ -398,13 +398,13 @@ found: dpr = NULL; /* Lock out everyone else while we are manipulating the protosw. */ - mtx_lock(&Giant); + mtx_lock(&dom_mtx); /* The protocol must exist and only once. */ for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++) { if ((pr->pr_type == type) && (pr->pr_protocol == protocol)) { if (dpr != NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EMLINK); /* Should not happen! */ } else dpr = pr; @@ -413,7 +413,7 @@ found: /* Protocol does not exist. */ if (dpr == NULL) { - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (EPROTONOSUPPORT); } @@ -433,7 +433,7 @@ found: dpr->pr_usrreqs = &nousrreqs; /* Job is done, not more protection required. */ - mtx_unlock(&Giant); + mtx_unlock(&dom_mtx); return (0); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 19:23:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0679E106566C; Sun, 4 Jan 2009 19:23:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95DA8FC19; Sun, 4 Jan 2009 19:23:44 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04JNi7x072343; Sun, 4 Jan 2009 19:23:44 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04JNiZc072342; Sun, 4 Jan 2009 19:23:44 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901041923.n04JNiZc072342@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 19:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186748 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 19:23:45 -0000 Author: rwatson Date: Sun Jan 4 19:23:44 2009 New Revision: 186748 URL: http://svn.freebsd.org/changeset/base/186748 Log: Remove reference to pr_ousrreq from domain(9) since it's now gone from struct protosw. Submitted by: bz MFC after: 3 weeks Modified: head/share/man/man9/domain.9 Modified: head/share/man/man9/domain.9 ============================================================================== --- head/share/man/man9/domain.9 Sun Jan 4 19:22:53 2009 (r186747) +++ head/share/man/man9/domain.9 Sun Jan 4 19:23:44 2009 (r186748) @@ -94,8 +94,6 @@ struct protosw { pr_output_t *pr_output; /* output to protocol (from above) */ pr_ctlinput_t *pr_ctlinput; /* control input (from below) */ pr_ctloutput_t *pr_ctloutput; /* control output (from above) */ -/* user-protocol hook */ - pr_usrreq_t *pr_ousrreq; /* utility hooks */ pr_init_t *pr_init; pr_fasttimo_t *pr_fasttimo; /* fast timeout (200ms) */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 20:43:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D181065677; Sun, 4 Jan 2009 20:43:26 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E31698FC1B; Sun, 4 Jan 2009 20:43:24 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <49611F6B.10802@FreeBSD.org> Date: Sun, 04 Jan 2009 20:43:23 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: obrien@freebsd.org References: <200812192020.mBJKKEIo081792@svn.freebsd.org> <20081223182314.GC25145@dragon.NUXI.org> In-Reply-To: <20081223182314.GC25145@dragon.NUXI.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 20:43:26 -0000 David O'Brien wrote: > On Sun, Dec 21, 2008 at 10:15:21AM -0200, Carlos A. M. dos Santos wrote: >> On Fri, Dec 19, 2008 at 6:20 PM, David E. O'Brien wrote: >>> Author: obrien >>> Date: Fri Dec 19 20:20:14 2008 >>> New Revision: 186337 >>> URL: http://svn.freebsd.org/changeset/base/186337 >>> >>> Log: >>> burncd(8) doesn't handle signals and interrupting burncd during operation. >>> For example, ^C (SIGINT) may leave the drive spinning and locked. >>> This may also happen if you try to write a too-large image to a disc >>> and burncd(8) exits with an I/O error. >>> >>> Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave >>> burner in a sane state when burning is interrupted with SIGHUP, SIGINT, >>> SIGTERM, or in case an I/O error occurs during write. >>> Note, that blanking will still continue after interrupt but it seems to >>> finish correctly even after burncd(8) has quit. >>> >>> Also, while I'm here bump WARNS to "6". >>> >>> PR: 48730 >>> Submitted by: Jaakko Heinonen >> While you are here, would you mind taking a look at bin/123693, either >> committing the proposed patch or closing the PR if my proposition is >> not acceptable? > > Yep, I already have that patch to look at. Note it was hell getting the > patch - its best to not attach it when it will be base64 encoded - we > have no easy way of extracting such encoded attachements. > AFAIK, the web PR interface will detect base64-encoded attachments and present them for download. Kris From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 20:59:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A78F1065670; Sun, 4 Jan 2009 20:59:23 +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 48C6F8FC12; Sun, 4 Jan 2009 20:59:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04KxN5i074101; Sun, 4 Jan 2009 20:59:23 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04KxNhW074100; Sun, 4 Jan 2009 20:59:23 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901042059.n04KxNhW074100@svn.freebsd.org> From: Doug Barton Date: Sun, 4 Jan 2009 20:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186749 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 20:59:24 -0000 Author: dougb Date: Sun Jan 4 20:59:23 2009 New Revision: 186749 URL: http://svn.freebsd.org/changeset/base/186749 Log: Instead of using obj and all targets which are not cross-build aware, use _obj and everything which are. Submitted by: ru Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 19:23:44 2009 (r186748) +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 20:59:23 2009 (r186749) @@ -592,10 +592,11 @@ case "${RERUN}" in ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac + od=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} obj SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} all SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 21:13:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B48D106566B; Sun, 4 Jan 2009 21:13:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0258FC1B; Sun, 4 Jan 2009 21:13:51 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04LDpdw074401; Sun, 4 Jan 2009 21:13:51 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04LDpiw074400; Sun, 4 Jan 2009 21:13:51 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901042113.n04LDpiw074400@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 21:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186750 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 21:13:52 -0000 Author: rwatson Date: Sun Jan 4 21:13:51 2009 New Revision: 186750 URL: http://svn.freebsd.org/changeset/base/186750 Log: struct ip6protosw is a copy of struct protosw, so remove pr_usrreq there to reflect removal from struct protosw. Spotted by: ed Modified: head/sys/netinet6/ip6protosw.h Modified: head/sys/netinet6/ip6protosw.h ============================================================================== --- head/sys/netinet6/ip6protosw.h Sun Jan 4 20:59:23 2009 (r186749) +++ head/sys/netinet6/ip6protosw.h Sun Jan 4 21:13:51 2009 (r186750) @@ -126,11 +126,6 @@ struct ip6protosw { int (*pr_ctloutput) /* control output (from above) */ __P((struct socket *, struct sockopt *)); -/* user-protocol hook */ - int (*pr_usrreq) /* user request: see list below */ - __P((struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *, struct thread *)); - /* utility hooks */ void (*pr_init) /* initialization hook */ __P((void)); From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 21:53:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31F9F106574F; Sun, 4 Jan 2009 21:53:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 207468FC17; Sun, 4 Jan 2009 21:53:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04Lrhid075149; Sun, 4 Jan 2009 21:53:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04LrgkD075147; Sun, 4 Jan 2009 21:53:42 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901042153.n04LrgkD075147@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 21:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 21:53:44 -0000 Author: rwatson Date: Sun Jan 4 21:53:42 2009 New Revision: 186751 URL: http://svn.freebsd.org/changeset/base/186751 Log: Unlike with struct protosw, several instances of struct ip6protosw did not use C99-style sparse structure initialization, so remove NULL assignments for now-removed pr_usrreq function pointers. Reported by: Chris Ruiz Modified: head/sys/netinet6/in6_gif.c head/sys/netipsec/xform_ipip.c Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Sun Jan 4 21:13:51 2009 (r186750) +++ head/sys/netinet6/in6_gif.c Sun Jan 4 21:53:42 2009 (r186751) @@ -78,7 +78,6 @@ extern struct domain inet6domain; struct ip6protosw in6_gif_protosw = { SOCK_RAW, &inet6domain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, in6_gif_input, rip6_output, 0, rip6_ctloutput, - 0, 0, 0, 0, 0, &rip6_usrreqs }; Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Sun Jan 4 21:13:51 2009 (r186750) +++ head/sys/netipsec/xform_ipip.c Sun Jan 4 21:53:42 2009 (r186751) @@ -673,7 +673,6 @@ static struct ip6protosw ipe6_protosw = { SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR|PR_LASTHDR, ip4_input6, 0, 0, rip_ctloutput, - 0, 0, 0, 0, 0, &rip_usrreqs }; From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:07:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD8701065675; Sun, 4 Jan 2009 22:07:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 915F88FC20; Sun, 4 Jan 2009 22:07:18 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8739C1CE79; Sun, 4 Jan 2009 23:07:16 +0100 (CET) Date: Sun, 4 Jan 2009 23:07:16 +0100 From: Ed Schouten To: Robert Watson Message-ID: <20090104220716.GL14235@hoeg.nl> References: <200901042153.n04LrgkD075147@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="P8VDRTGkfyc6BSVj" Content-Disposition: inline In-Reply-To: <200901042153.n04LrgkD075147@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:07:19 -0000 --P8VDRTGkfyc6BSVj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Robert Watson wrote: > Unlike with struct protosw, several instances of struct ip6protosw > did not use C99-style sparse structure initialization, so remove > NULL assignments for now-removed pr_usrreq function pointers. Maybe we should convert them to use the C99-style initialisation. This could prevent similar issues in the future, right? --=20 Ed Schouten WWW: http://80386.nl/ --P8VDRTGkfyc6BSVj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklhMxQACgkQ52SDGA2eCwXv6QCeMf6CL9/FbdPJb25zBCg9Ut6a rq4An38EgtqF9hi6UvF5JikTNko3PunJ =geSB -----END PGP SIGNATURE----- --P8VDRTGkfyc6BSVj-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:11:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00DFF106566C; Sun, 4 Jan 2009 22:11:25 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DA1C08FC13; Sun, 4 Jan 2009 22:11:23 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4961340B.5010306@FreeBSD.org> Date: Sun, 04 Jan 2009 22:11:23 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Konstantin Belousov References: <200901041556.n04Funod061146@svn.freebsd.org> In-Reply-To: <200901041556.n04Funod061146@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:11:25 -0000 Konstantin Belousov wrote: > Author: kib > Date: Sun Jan 4 15:56:49 2009 > New Revision: 186740 > URL: http://svn.freebsd.org/changeset/base/186740 > > Log: > Do not incorrectly add the low 5 bits of the offset to the resulting > position of the found zero bit. > > Submitted by: Jaakko Heinonen > MFC after: 2 weeks > > Modified: > head/sys/gnu/fs/ext2fs/ext2_bitops.h Does this fix ext2fs on amd64? Kris > Modified: head/sys/gnu/fs/ext2fs/ext2_bitops.h > ============================================================================== > --- head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:49:30 2009 (r186739) > +++ head/sys/gnu/fs/ext2fs/ext2_bitops.h Sun Jan 4 15:56:49 2009 (r186740) > @@ -84,7 +84,7 @@ find_next_zero_bit(void *data, size_t sz > mask = ~0U << (ofs & 31); > bit = *p | ~mask; > if (bit != ~0U) > - return (ffs(~bit) + ofs - 1); > + return (ffs(~bit) + (ofs & ~31U) - 1); > p++; > ofs = (ofs + 31U) & ~31U; > } From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:14:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47DAC1065733; Sun, 4 Jan 2009 22:14:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 241E08FC1B; Sun, 4 Jan 2009 22:14:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B3DD346B17; Sun, 4 Jan 2009 17:14:16 -0500 (EST) Date: Sun, 4 Jan 2009 22:14:16 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ed Schouten In-Reply-To: <20090104220716.GL14235@hoeg.nl> Message-ID: References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:14:17 -0000 On Sun, 4 Jan 2009, Ed Schouten wrote: > * Robert Watson wrote: >> Unlike with struct protosw, several instances of struct ip6protosw >> did not use C99-style sparse structure initialization, so remove >> NULL assignments for now-removed pr_usrreq function pointers. > > Maybe we should convert them to use the C99-style initialisation. This could > prevent similar issues in the future, right? I think Bjoern already has a work-in-progress on this one, but yes, that would be a good idea. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:15:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B479106567F; Sun, 4 Jan 2009 22:15:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0AAEB8FC32; Sun, 4 Jan 2009 22:15:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04MFFvB075657; Sun, 4 Jan 2009 22:15:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04MFFjx075656; Sun, 4 Jan 2009 22:15:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901042215.n04MFFjx075656@svn.freebsd.org> From: Robert Watson Date: Sun, 4 Jan 2009 22:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186752 - head/sys/netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:15:17 -0000 Author: rwatson Date: Sun Jan 4 22:15:15 2009 New Revision: 186752 URL: http://svn.freebsd.org/changeset/base/186752 Log: Fix non-C99 initialization for protosw initializing pr_ousrreq. Modified: head/sys/netipsec/xform_ipip.c Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Sun Jan 4 21:53:42 2009 (r186751) +++ head/sys/netipsec/xform_ipip.c Sun Jan 4 22:15:15 2009 (r186752) @@ -664,7 +664,6 @@ static struct protosw ipe4_protosw = { SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR, ip4_input, 0, 0, rip_ctloutput, - 0, 0, 0, 0, 0, &rip_usrreqs }; From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:17:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1463106564A; Sun, 4 Jan 2009 22:17:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 535B78FC18; Sun, 4 Jan 2009 22:17:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LJbI4-000IUq-9L; Mon, 05 Jan 2009 00:17:48 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n04MHgqH012169 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 00:17:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n04MHgWQ099394; Mon, 5 Jan 2009 00:17:42 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n04MHgb1099393; Mon, 5 Jan 2009 00:17:42 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 5 Jan 2009 00:17:42 +0200 From: Kostik Belousov To: Kris Kennaway Message-ID: <20090104221742.GK93900@deviant.kiev.zoral.com.ua> References: <200901041556.n04Funod061146@svn.freebsd.org> <4961340B.5010306@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6K2R/cS9K4qvcBNq" Content-Disposition: inline In-Reply-To: <4961340B.5010306@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LJbI4-000IUq-9L 1564a66b36ad10949adc6ddcacf89c23 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:17:51 -0000 --6K2R/cS9K4qvcBNq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 04, 2009 at 10:11:23PM +0000, Kris Kennaway wrote: > Konstantin Belousov wrote: > >Author: kib > >Date: Sun Jan 4 15:56:49 2009 > >New Revision: 186740 > >URL: http://svn.freebsd.org/changeset/base/186740 > > > >Log: > > Do not incorrectly add the low 5 bits of the offset to the resulting > > position of the found zero bit. > > =20 > > Submitted by: Jaakko Heinonen > > MFC after: 2 weeks > > > >Modified: > > head/sys/gnu/fs/ext2fs/ext2_bitops.h >=20 > Does this fix ext2fs on amd64? Submitter claims that yes, I only tested the function that was patched. --6K2R/cS9K4qvcBNq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklhNYQACgkQC3+MBN1Mb4gGjgCfRLx7h9SnyFRNkg7g1RKTSSd+ zMgAnjMQd8XX1JIJ+skNJKU3cGhYFMB3 =PjiF -----END PGP SIGNATURE----- --6K2R/cS9K4qvcBNq-- From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:22:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA725106566C; Sun, 4 Jan 2009 22:22:09 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from dhcp-172-28-76-114.eur.corp.google.com (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8F4198FC12; Sun, 4 Jan 2009 22:22:08 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <4961368F.8090002@FreeBSD.org> Date: Sun, 04 Jan 2009 22:22:07 +0000 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Kostik Belousov References: <200901041556.n04Funod061146@svn.freebsd.org> <4961340B.5010306@FreeBSD.org> <20090104221742.GK93900@deviant.kiev.zoral.com.ua> In-Reply-To: <20090104221742.GK93900@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186740 - head/sys/gnu/fs/ext2fs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:22:10 -0000 Kostik Belousov wrote: > On Sun, Jan 04, 2009 at 10:11:23PM +0000, Kris Kennaway wrote: >> Konstantin Belousov wrote: >>> Author: kib >>> Date: Sun Jan 4 15:56:49 2009 >>> New Revision: 186740 >>> URL: http://svn.freebsd.org/changeset/base/186740 >>> >>> Log: >>> Do not incorrectly add the low 5 bits of the offset to the resulting >>> position of the found zero bit. >>> >>> Submitted by: Jaakko Heinonen >>> MFC after: 2 weeks >>> >>> Modified: >>> head/sys/gnu/fs/ext2fs/ext2_bitops.h >> Does this fix ext2fs on amd64? > > Submitter claims that yes, I only tested the function that was patched. Great! I thought I had filed a PR about this but can't find it now. Kris From owner-svn-src-all@FreeBSD.ORG Sun Jan 4 22:24:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59B40106566B; Sun, 4 Jan 2009 22:24:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48AD68FC08; Sun, 4 Jan 2009 22:24:48 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n04MOl78075868; Sun, 4 Jan 2009 22:24:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n04MOlK7075867; Sun, 4 Jan 2009 22:24:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901042224.n04MOlK7075867@svn.freebsd.org> From: Ed Schouten Date: Sun, 4 Jan 2009 22:24:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186753 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2009 22:24:49 -0000 Author: ed Date: Sun Jan 4 22:24:47 2009 New Revision: 186753 URL: http://svn.freebsd.org/changeset/base/186753 Log: Fix rendering glitch in cons25 emulation. Because we now have cons25-style linewrapping, we must also use cons25- style reverse linewrapping. This means that a ^H on column 0 will move the cursor one line up. Also fix a small regression: if the user invokes a RIS (Reset to Initial State), we must show the cursor again. Spotted by: Paul B. Mahol Modified: head/sys/dev/syscons/teken/teken_subr.h Modified: head/sys/dev/syscons/teken/teken_subr.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr.h Sun Jan 4 22:15:15 2009 (r186752) +++ head/sys/dev/syscons/teken/teken_subr.h Sun Jan 4 22:24:47 2009 (r186753) @@ -198,11 +198,22 @@ static void teken_subr_backspace(teken_t *t) { +#ifdef TEKEN_CONS25 + if (t->t_cursor.tp_col == 0) { + if (t->t_cursor.tp_row == t->t_originreg.ts_begin) + return; + t->t_cursor.tp_row--; + t->t_cursor.tp_col = t->t_winsize.tp_col - 1; + } else { + t->t_cursor.tp_col--; + } +#else /* !TEKEN_CONS25 */ if (t->t_cursor.tp_col == 0) return; t->t_cursor.tp_col--; t->t_stateflags &= ~TS_WRAPPED; +#endif /* TEKEN_CONS25 */ teken_funcs_cursor(t); } @@ -862,6 +873,7 @@ teken_subr_reset_to_initial_state(teken_ teken_subr_do_reset(t); teken_subr_erase_display(t, 2); + teken_funcs_param(t, TP_SHOWCURSOR, 1); teken_funcs_cursor(t); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 03:06:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE4EB106566C; Mon, 5 Jan 2009 03:06:56 +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 9323D8FC08; Mon, 5 Jan 2009 03:06:56 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0536uP9082978; Mon, 5 Jan 2009 03:06:56 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0536usp082977; Mon, 5 Jan 2009 03:06:56 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200901050306.n0536usp082977@svn.freebsd.org> From: Ken Smith Date: Mon, 5 Jan 2009 03:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186754 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 03:06:57 -0000 Author: kensmith Date: Mon Jan 5 03:06:55 2009 New Revision: 186754 URL: http://svn.freebsd.org/changeset/base/186754 Log: End stable/7 code freeze. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sun Jan 4 22:24:47 2009 (r186753) +++ svnadmin/conf/approvers Mon Jan 5 03:06:55 2009 (r186754) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -^stable/7/ re +#^stable/7/ re #^stable/6/ re ^releng/7.1/ re ^releng/7.0/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 03:50:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8807C1065673; Mon, 5 Jan 2009 03:50:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72C1C8FC12; Mon, 5 Jan 2009 03:50:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n053o5AY083909; Mon, 5 Jan 2009 03:50:05 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n053o5a0083907; Mon, 5 Jan 2009 03:50:05 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050350.n053o5a0083907@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 03:50:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186755 - in stable/7/release/doc: en_US.ISO8859-1/errata share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 03:50:06 -0000 Author: hrs Date: Mon Jan 5 03:50:04 2009 New Revision: 186755 URL: http://svn.freebsd.org/changeset/base/186755 Log: - Trim old Errata. - Bump version numbers. - Document Errata items for 7.1R: em(4) -> igb(4) change, ae(4) missing in 7.1R relnotes, and s/get_setaffinity()/sched_setaffinity()/ in 7.1R relnotes. Approved by: re (implicit) Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml stable/7/release/doc/share/sgml/release.ent Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 03:06:55 2009 (r186754) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 03:50:04 2009 (r186755) @@ -16,7 +16,7 @@ %release; - + ]>
@@ -41,6 +41,7 @@ 2008 + 2009 The &os; Documentation Project @@ -125,11 +126,9 @@ Security Advisories -No advisories. -]]> -The following security advisories pertain to &os; &release.bugfix;. For more information, consult the individual advisories available from . @@ -154,128 +153,72 @@ 17 April 2008 OpenSSH X11-forwarding privilege escalation - - SA-08:06.bind - 13 July 2008 - DNS cache poisoning - - - SA-08:07.amd64 - 3 September 2008 - amd64 swapgs local privilege escalation - - - SA-08:08.nmount - 3 September 2008 - &man.nmount.2; local arbitrary code execution - - - SA-08:09.icmp6 - 3 September 2008 - Remote kernel panics on IPv6 connections - - - SA-08:10.nd6 - 1 October 2008 - IPv6 Neighbor Discovery Protocol routing vulnerability - - - SA-08:11.arc4random - 24 November 2008 - &man.arc4random.9; predictable sequence vulnerability - - - SA-08:12.ftpd - 23 December 2008 - Cross-site request forgery in &man.ftpd.8; - - - SA-08:13.protosw - 23 December 2008 - netgraph / bluetooth privilege escalation - -]]> +--> Open Issues -No open issues. -]]> - -[20080229] &man.tcpdump.1; does not correctly print the - TX/RX rates for 802.11 frames. This issue has been fixed on the - HEAD and RELENG_7 branches. - - [20080229] A bug in Linux emulation may cause segmentation - faults for some Linux programs using &man.mmap.2;. This issue - has been fixed on the HEAD and RELENG_7 branches. - - [20080229] Instances of packet corruption and instability - have been observed with the &man.re.4; network driver. Some - users have reported that using a newer version of this driver - (on HEAD) has solved their problems, or at least mitigated - them. - - [20080229, updated 20080817] A change in the way that &os; sends TCP options - has been reported to cause connectivity issues. - This problem has been corrected on - HEAD and the RELENG_7 and RELENG_7_0 branches.. Further - details are contained in errta notice - FreeBSD-EN-08:02.tcp. - - [20080307] The &os; implementation of SCTP currently depends - on having INET6 support compiled into the - kernel. This requirement is planned to be removed in future - releases. - - [20080307] Source upgrades from &os; - 6.X to &os; &release.bugfix; will - generate warnings from &man.kldxref.8; during - the installkernel step. These warnings are - harmless and can be ignored. - - [20080307] The &man.crypto.4; driver, which is required for - IPsec functionality, has severe problems on &os;/&arch.powerpc; - (a kernel with device crypto included in its - configuration will be non-functional). - -]]> + [20090105] As in the Announcement of 7.1-RELEASE, certain Intel NICs + will come up as &man.igb.4; instead of &man.em.4; in this + release. There are only 3 PCI ID's that should have + their name changed from &man.em.4; to &man.igb.4;: + + + + 0x10A78086 + + + + 0x10A98086 + + + + 0x10D68086 + + + + You should be able to determine if your card will + change names by running the following command: + + &prompt.user; pciconf -l +. . . +em0@pci0:0:25:0: class=0x020000 card=0x02381028 chip=0x10c08086 rev=0x02 hdr=0x00 + + and for the line representing your NIC (should be named + em on older systems, + e.g. em0 or em1, etc) + check the fourth column. If that says + chip=0x10a78086 (or one of the other two IDs + given above) you will have the adapter's name change. + + [20090105] The Release Notes for 7.1-RELEASE should have mentioned + changes that the &man.ae.4; driver has been added to provide support + for the Attansic/Atheros L2 FastEthernet controllers. + This driver is not enabled in GENERIC + kernels for this release. + + [20090105] The Release Notes for 7.1-RELEASE included the + following misdescriptions: + + + + In the entry of &man.linux.4; ABI support, + get_setaffinity() should have been + sched_setaffinity(). + + Late-Breaking News and Corrections -No news. -]]> - -[20080229] The &os; &release.bugfix; release documentation - (release notes, hardware notes, and so forth) all contained a - note that users of &os; 7-STABLE should be subscribed to - the freebsd-current mailing list. This note - should not have appeared. - - [20080229] The release notes gave an incorrect version - number for KDE. The correct version number is 3.5.8. - -]]>
Modified: stable/7/release/doc/share/sgml/release.ent ============================================================================== --- stable/7/release/doc/share/sgml/release.ent Mon Jan 5 03:06:55 2009 (r186754) +++ stable/7/release/doc/share/sgml/release.ent Mon Jan 5 03:50:04 2009 (r186755) @@ -6,12 +6,12 @@ - + - + - + @@ -40,7 +40,7 @@ - + From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 04:26:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A0211065676; Mon, 5 Jan 2009 04:26:25 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 272A88FC24; Mon, 5 Jan 2009 04:26:25 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n054QPkr084705; Mon, 5 Jan 2009 04:26:25 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n054QPaQ084704; Mon, 5 Jan 2009 04:26:25 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901050426.n054QPaQ084704@svn.freebsd.org> From: Rong-En Fan Date: Mon, 5 Jan 2009 04:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186756 - stable/7/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 04:26:25 -0000 Author: rafan Date: Mon Jan 5 04:26:24 2009 New Revision: 186756 URL: http://svn.freebsd.org/changeset/base/186756 Log: MFC r184459 - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves one zombie process because it does not do the cleanup. For a long running NIS/YP server, it will have lots of zombie processes on it. Fix that by ignoring the SIGCHLD signal since we don't really care about the exit status in this case. PR: bin/91980 Reported by: Arjan van der Velde Submitted by: Jui-Nan Lin" Reviewed by: delphij Modified: stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Modified: stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c ============================================================================== --- stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 03:50:04 2009 (r186755) +++ stable/7/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 04:26:24 2009 (r186756) @@ -165,6 +165,7 @@ main(int argc, char *argv[]) struct sockaddr_in saddr; socklen_t asize = sizeof (saddr); struct netconfig *nconf; + struct sigaction sa; void *localhandle; int ch; char *mastername; @@ -268,6 +269,9 @@ the %s domain -- aborting", yppasswd_dom } } openlog("rpc.yppasswdd", LOG_PID, LOG_DAEMON); + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT; + sigaction(SIGCHLD, &sa, NULL); rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 04:45:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB97106579F; Mon, 5 Jan 2009 04:45:18 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 275DB8FC13; Mon, 5 Jan 2009 04:45:18 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n054jITF085135; Mon, 5 Jan 2009 04:45:18 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n054jIs1085134; Mon, 5 Jan 2009 04:45:18 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200901050445.n054jIs1085134@svn.freebsd.org> From: Ken Smith Date: Mon, 5 Jan 2009 04:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186757 - stable/7/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 04:45:19 -0000 Author: kensmith Date: Mon Jan 5 04:45:17 2009 New Revision: 186757 URL: http://svn.freebsd.org/changeset/base/186757 Log: Release is done, bump stable/7 to -STABLE. Modified: stable/7/sys/conf/newvers.sh Modified: stable/7/sys/conf/newvers.sh ============================================================================== --- stable/7/sys/conf/newvers.sh Mon Jan 5 04:26:24 2009 (r186756) +++ stable/7/sys/conf/newvers.sh Mon Jan 5 04:45:17 2009 (r186757) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.1" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 05:00:36 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0633F1065675; Mon, 5 Jan 2009 05:00:36 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E46CB8FC13; Mon, 5 Jan 2009 05:00:35 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id CBDEC1A3C3A; Sun, 4 Jan 2009 21:00:35 -0800 (PST) Date: Sun, 4 Jan 2009 21:00:35 -0800 From: Alfred Perlstein To: Christoph Mallon Message-ID: <20090105050035.GW60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <4960D501.70607@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4960D501.70607@gmx.de> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:00:36 -0000 * Christoph Mallon [090104 07:52] wrote: > Alfred Perlstein schrieb: > >Author: alfred > >Date: Sun Jan 4 00:12:01 2009 > >New Revision: 186730 > >URL: http://svn.freebsd.org/changeset/base/186730 > > > >Log: > >[...] > > Make "libusb20_desc_foreach()" more readable. > > In my part of the world we give credit or, at the very least, say "thank > you" to the sender, when we apply patches sent to us. > > > Disappointedly > Christoph Was this something you submitted to Hans? If so I will ask him to try to retain credits going forward. -- - Alfred Perlstein From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 05:04:15 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4FEB1065674; Mon, 5 Jan 2009 05:04:15 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id BF2C18FC13; Mon, 5 Jan 2009 05:04:15 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id A07471A3C3A; Sun, 4 Jan 2009 21:04:15 -0800 (PST) Date: Sun, 4 Jan 2009 21:04:15 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20090105050415.GY60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090104.101121.2139791946.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104.101121.2139791946.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:04:16 -0000 * M. Warner Losh [090104 09:11] wrote: > In message: <200901040012.n040C2gH040928@svn.freebsd.org> > Alfred Perlstein writes: > : Sync with usb4bsd: > > Alfred, > > thanks for trudging these fixes into the tree. It is a thankless job > that people will complain about... > > Speaking of complaining, is there a review process that can be joined > for them that's more formal than "diff against hps' p4 tree and > complain?" We're trying to figure out a way to do this. We haven't had much luck exploring svk/hg/git as they're just about as much work as shipping patches back and forth. I asked core for a restricted "users/hps" area under svn for Hans to put code, but that was denied, perhaps now it's time to reconsider that? -- - Alfred Perlstein From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 05:14:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8BCA1065674; Mon, 5 Jan 2009 05:14:26 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96E618FC16; Mon, 5 Jan 2009 05:14:26 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055EQki085693; Mon, 5 Jan 2009 05:14:26 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055EQsG085692; Mon, 5 Jan 2009 05:14:26 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200901050514.n055EQsG085692@svn.freebsd.org> From: Joseph Koshy Date: Mon, 5 Jan 2009 05:14:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186758 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:14:27 -0000 Author: jkoshy Date: Mon Jan 5 05:14:26 2009 New Revision: 186758 URL: http://svn.freebsd.org/changeset/base/186758 Log: Add a README. Added: head/lib/libelf/README (contents, props changed) Added: head/lib/libelf/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libelf/README Mon Jan 5 05:14:26 2009 (r186758) @@ -0,0 +1,12 @@ +# $FreeBSD$ +# $NetBSD$ + +libelf: a BSD-licensed implementation of the ELF(3)/GELF(3) API. + +Documentation: + * Manual page elf.3 contains an overview of the library. Other + manual pages document individual APIs in the library. + * A tutorial "libelf by Example" is available at: + http://people.freebsd.org/~jkoshy/download/libelf/article.html + +For ongoing development please see http://elftoolchain.sourceforge.net/ From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 05:53:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 956C41065672; Mon, 5 Jan 2009 05:53:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80FA48FC0C; Mon, 5 Jan 2009 05:53:14 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055rElc086399; Mon, 5 Jan 2009 05:53:14 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055rEmL086398; Mon, 5 Jan 2009 05:53:14 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050553.n055rEmL086398@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 05:53:14 +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: r186759 - stable/7/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:53:15 -0000 Author: hrs Date: Mon Jan 5 05:53:14 2009 New Revision: 186759 URL: http://svn.freebsd.org/changeset/base/186759 Log: - Trim old items. - Fix indent. Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jan 5 05:14:26 2009 (r186758) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jan 5 05:53:14 2009 (r186759) @@ -12,342 +12,238 @@ ]>
- - &os; &release.current; Release Notes + + &os; &release.current; Release Notes - The &os; Project + The &os; Project - $FreeBSD$ + $FreeBSD$ - - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - The &os; Documentation Project - - - - &tm-attrib.freebsd; - &tm-attrib.ibm; - &tm-attrib.ieee; - &tm-attrib.intel; - &tm-attrib.sparc; - &tm-attrib.general; - - - - The release notes for &os; &release.current; contain a summary - of the changes made to the &os; base system on the - &release.branch; development line. - This document lists applicable security advisories that were issued since - the last release, as well as significant changes to the &os; - kernel and userland. - Some brief remarks on upgrading are also presented. - - - - - Introduction - - This document contains the release notes for &os; - &release.current;. It - describes recently added, changed, or deleted features of &os;. - It also provides some notes on upgrading - from previous versions of &os;. + + 2000 + 2001 + 2002 + 2003 + 2004 + 2005 + 2006 + 2007 + 2008 + 2009 + The &os; Documentation Project + + + + &tm-attrib.freebsd; + &tm-attrib.ibm; + &tm-attrib.ieee; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + The release notes for &os; &release.current; contain a summary + of the changes made to the &os; base system on the + &release.branch; development line. + This document lists applicable security advisories that were issued since + the last release, as well as significant changes to the &os; + kernel and userland. + Some brief remarks on upgrading are also presented. + + + + + Introduction + + This document contains the release notes for &os; + &release.current;. It + describes recently added, changed, or deleted features of &os;. + It also provides some notes on upgrading + from previous versions of &os;. The &release.type; distribution to which these release notes - apply represents the latest point along the &release.branch; development - branch since &release.branch; was created. Information regarding pre-built, binary - &release.type; distributions along this branch - can be found at . + The &release.type; distribution to which these release notes + apply represents the latest point along the &release.branch; development + branch since &release.branch; was created. Information regarding pre-built, binary + &release.type; distributions along this branch + can be found at . ]]> The &release.type; distribution to which these release notes - apply represents a point along the &release.branch; development - branch between &release.prev; and the future &release.next;. - Information regarding - pre-built, binary &release.type; distributions along this branch - can be found at . + The &release.type; distribution to which these release notes + apply represents a point along the &release.branch; development + branch between &release.prev; and the future &release.next;. + Information regarding + pre-built, binary &release.type; distributions along this branch + can be found at . ]]> This distribution of &os; &release.current; is a - &release.type; distribution. It can be found at or any of its mirrors. More - information on obtaining this (or other) &release.type; - distributions of &os; can be found in the Obtaining - &os; appendix to the &os; - Handbook. + This distribution of &os; &release.current; is a + &release.type; distribution. It can be found at or any of its mirrors. More + information on obtaining this (or other) &release.type; + distributions of &os; can be found in the Obtaining + &os; appendix to the &os; Handbook. ]]> - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with - late-breaking information discovered late in the - release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. - - - - - What's New - - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. - - - Security Advisories - - - - - - Kernel Changes - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - [&arch.amd64;, &arch.i386;] The ULE - scheduler is now the default process scheduler - in GENERIC kernels. + All users are encouraged to consult the release errata before + installing &os;. The errata document is updated with + late-breaking information discovered late in the + release cycle or after the release. Typically, it contains + information on known bugs, security advisories, and corrections to + documentation. An up-to-date copy of the errata for &os; + &release.current; can be found on the &os; Web site. + + + + What's New + + This section describes the most user-visible new or changed + features in &os; since &release.prev;. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. - - Boot Loader Changes + + Security Advisories + - [&arch.amd64;, &arch.i386;] The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - [&arch.amd64;, &arch.i386;] A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. - - - - - Hardware Support - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. - - - Multimedia Support - - - - - - Network Interface Support - - The &man.ale.4; driver has been added to provide support - for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. - This driver is not enabled in GENERIC - kernels for this release. - - The &man.em.4; driver has been split into two drivers - with some common parts. The &man.em.4; driver will continue - to support adapters up to the 82575, as well as new - client/desktop adapters. A new &man.igb.4; driver - will support new server adapters. - - [&arch.amd64;, &arch.i386;] The &man.wpi.4; driver has - been updated to include a number of stability fixes. - - - - - - Network Protocols + + Kernel Changes - - - - Disks and Storage + + Boot Loader Changes - The &man.aac.4; driver now supports volumes larger than - 2TB in size. + + - The &man.hptrr.4; driver has been updated to version 1.2 - from Highpoint. + + Hardware Support - + - - File Systems + + Multimedia Support - - - + + - - Userland Changes + + Network Interface Support - The &man.adduser.8; utility now supports - a option to set the mode of a new user's - home directory. - - &man.chflags.1; now supports a flag for - verbose output and a flag to ignore errors - with the same semantics as (for example) - &man.chmod.1;. - - The &man.realpath.1; utility now supports - a flag to suppress warnings; it now also - accepts multiple paths on its command line. - - &man.cron.8; now supports a option, - which can help managing cron mails in massive hosting - environment. + - &man.ypserv.8; now supports a option to - specify the port number on which it should listen. + + - - <filename>/etc/rc.d</filename> Scripts + + Network Protocols - - - - - - Contributed Software + - AMD has been updated from 6.0.10 - to 6.1.5. + - awk has been updated from 1 May - 2007 release to the 23 October 2007 release. + + Disks and Storage - bzip2 has been updated from 1.0.4 - to 1.0.5. + - OpenPAM has been updated from the - Figwort release to the Hydrangea release. + - OpenSSH has been updated from - 4.5p1 to 5.1p1. + + File Systems - sendmail has been updated from - 8.14.2 to 8.14.3. + + + - The timezone database has been updated from - the tzdata2007h release to - the tzdata2008b release. + + Userland Changes - + - - Ports/Packages Collection Infrastructure + + <filename>/etc/rc.d</filename> Scripts - + + + - + + Contributed Software - - Release Engineering and Integration + + - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. + + Ports/Packages Collection Infrastructure - + - - Documentation + - - - + + Release Engineering and Integration - - Upgrading from previous releases of &os; + + - [&arch.i386;, &arch.amd64;] Beginning with &os; 6.2-RELEASE, - binary upgrades between RELEASE versions (and snapshots of the - various security branches) are supported using the - &man.freebsd-update.8; utility. The binary upgrade procedure will - update unmodified userland utilities, as well as unmodified GENERIC or - SMP kernels distributed as a part of an official &os; release. - The &man.freebsd-update.8; utility requires that the host being - upgraded have Internet connectivity. + + Documentation - An older form of binary upgrade is supported through the - Upgrade option from the main &man.sysinstall.8; - menu on CDROM distribution media. This type of binary upgrade - may be useful on non-&arch.i386;, non-&arch.amd64; machines - or on systems with no Internet connectivity. + + + - Source-based upgrades (those based on recompiling the &os; - base system from source code) from previous versions are - supported, according to the instructions in - /usr/src/UPDATING. + + Upgrading from previous releases of &os; - - Upgrading &os; should, of course, only be attempted after - backing up all data and configuration - files. - - + Beginning with &os; 6.2-RELEASE, binary + upgrades between RELEASE versions (and snapshots of the various + security branches) are supported using the + &man.freebsd-update.8; utility. The binary upgrade procedure + will update unmodified userland utilities, as well as unmodified + GENERIC or SMP kernels distributed as a part of an official &os; + release. The &man.freebsd-update.8; utility requires that the + host being upgraded have Internet connectivity. + + An older form of binary upgrade is supported through the + Upgrade option from the main + &man.sysinstall.8; menu on CDROM distribution media. This type + of binary upgrade may be useful on non-&arch.i386;, + non-&arch.amd64; machines or on systems with no Internet + connectivity. + + Source-based upgrades (those based on recompiling the &os; + base system from source code) from previous versions are + supported, according to the instructions in + /usr/src/UPDATING. + + + Upgrading &os; should, of course, only be attempted after + backing up all data and configuration + files. + +
From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 05:54:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E222C1065674; Mon, 5 Jan 2009 05:54:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D05748FC14; Mon, 5 Jan 2009 05:54:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055sDjZ086455; Mon, 5 Jan 2009 05:54:13 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055sDGp086454; Mon, 5 Jan 2009 05:54:13 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050554.n055sDGp086454@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 05:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186760 - stable/7/release/doc/share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:54:14 -0000 Author: hrs Date: Mon Jan 5 05:54:13 2009 New Revision: 186760 URL: http://svn.freebsd.org/changeset/base/186760 Log: Update &release.manpath.*;. Modified: stable/7/release/doc/share/sgml/release.ent Modified: stable/7/release/doc/share/sgml/release.ent ============================================================================== --- stable/7/release/doc/share/sgml/release.ent Mon Jan 5 05:53:14 2009 (r186759) +++ stable/7/release/doc/share/sgml/release.ent Mon Jan 5 05:54:13 2009 (r186760) @@ -36,9 +36,8 @@ - - - + + @@ -58,4 +57,3 @@ - From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 05:56:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ED4B10656E0; Mon, 5 Jan 2009 05:56:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ECEDB8FC13; Mon, 5 Jan 2009 05:56:19 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n055uJB4086558; Mon, 5 Jan 2009 05:56:19 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n055uJvt086555; Mon, 5 Jan 2009 05:56:19 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050556.n055uJvt086555@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 05:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186761 - in stable/7/release/doc: . share/mk share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 05:56:22 -0000 Author: hrs Date: Mon Jan 5 05:56:19 2009 New Revision: 186761 URL: http://svn.freebsd.org/changeset/base/186761 Log: Clean up a DSSSL file for release documents: Remove {,no.}include.historic, Fix arch="" support, and Update platform list in README. Modified: stable/7/release/doc/README stable/7/release/doc/share/mk/doc.relnotes.mk stable/7/release/doc/share/sgml/release.dsl Modified: stable/7/release/doc/README ============================================================================== --- stable/7/release/doc/README Mon Jan 5 05:54:13 2009 (r186760) +++ stable/7/release/doc/README Mon Jan 5 05:56:19 2009 (r186761) @@ -99,9 +99,10 @@ element will be included. For example: SPARC64-specific text -The currently-supported architectures are i386, sparc64, and -ia64. An element may appear for multiple architectures by specifying -a comma-separated list of architectures (i.e. arch="sparc64,ia64"). +The currently-supported architectures are amd64, arm, i386, ia64, +pc98, powerpc, and sparc64. An element may appear for multiple +architectures by specifying a comma-separated list of architectures +(i.e. arch="sparc64,ia64"). When creating a translation, make a new directory under this directory with a language code (paralleling the DocProj directory Modified: stable/7/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/7/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:54:13 2009 (r186760) +++ stable/7/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:56:19 2009 (r186761) @@ -11,23 +11,6 @@ DSLHTML?= ${RELN_ROOT}/share/sgml/defaul DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl # -# Tweakable Makefile variables -# -# INCLUDE_HISTORIC Used by relnotes document only. When set, -# causes all release notes entries to be printed, -# even those marked as "historic". If not set -# (the default), only print "non-historic" -# release note entries. To designate a release -# note entry as "historic", add a role="historic" -# attribute to the applicable element(s). -# -.if defined(INCLUDE_HISTORIC) -JADEFLAGS+= -iinclude.historic -.else -JADEFLAGS+= -ino.include.historic -.endif - -# # Automatic device list generation: # .if exists(${RELN_ROOT}/../man4) Modified: stable/7/release/doc/share/sgml/release.dsl ============================================================================== --- stable/7/release/doc/share/sgml/release.dsl Mon Jan 5 05:54:13 2009 (r186760) +++ stable/7/release/doc/share/sgml/release.dsl Mon Jan 5 05:56:19 2009 (r186761) @@ -3,8 +3,6 @@ - - %release.ent; @@ -14,14 +12,6 @@ -; Configure behavior of this stylesheet - - - ; String manipulation functions (define (split-string-to-list STR) ;; return list of STR separated with char #\ or #\, @@ -54,92 +44,6 @@ ((equal? STR (car s)) #t) (else (loop (cdr s)))))) -; Deal with conditional inclusion of text via entities. -(default - (let* ((arch (attribute-string (normalize "arch"))) - (role (attribute-string (normalize "role"))) - (for-arch (entity-text "arch"))) - (cond - - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - - ; If arch= not specified, then print unconditionally. This clause - ; handles the majority of cases. - ((or (equal? arch #f) (equal? arch "")) - (next-match)) - - ; arch= specified, see if it's equal to "all". If so, then - ; print unconditionally. Note that this clause could be - ; combined with the check to see if arch= wasn't specified - ; or was empty; they have the same outcome. - ((equal? arch "all") - (next-match)) - - ; arch= specified. If we're building for all architectures, - ; then print it prepended with the set of architectures to which - ; this element applies. - ; - ; XXX This doesn't work. -; ((equal? for-arch "all") -; (sosofo-append (literal "[") (literal arch) (literal "] ") -; (process-children))) - - ; arch= specified, so we need to check to see if the specified - ; parameter includes the architecture we're building for. - ((string-list-match? for-arch (split-string-to-list arch)) - (next-match)) - - ; None of the above - (else (empty-sosofo))))) - -(mode qandatoc - (default - (let* ((arch (attribute-string (normalize "arch"))) - (role (attribute-string (normalize "role"))) - (for-arch (entity-text "arch"))) - (cond - - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - - ; If arch= not specified, then print unconditionally. This clause - ; handles the majority of cases. - ((or (equal? arch #f) (equal? arch "")) - (next-match)) - - ; arch= specified, see if it's equal to "all". If so, then - ; print unconditionally. Note that this clause could be - ; combined with the check to see if arch= wasn't specified - ; or was empty; they have the same outcome. - ((equal? arch "all") - (next-match)) - - ; arch= specified. If we're building for all architectures, - ; then print it prepended with the set of architectures to which - ; this element applies. - ; - ; XXX This doesn't work. -; ((equal? for-arch "all") -; (sosofo-append (literal "[") (literal arch) (literal "] ") -; (process-children))) - - ; arch= specified, so we need to check to see if the specified - ; parameter includes the architecture we're building for. - ((string-list-match? for-arch (split-string-to-list arch)) - (next-match)) - - ; None of the above - (else (empty-sosofo)))))) - ; We might have some sect1 level elements where the modification times ; are significant. An example of this is the "What's New" section in ; the release notes. We enable the printing of pubdate entry in @@ -150,6 +54,88 @@ ; Put URLs in footnotes, and put footnotes at the bottom of each page. (define bop-footnotes #t) (define %footnote-ulinks% #t) + + (define ($paragraph$) + (let ((arch (attribute-string (normalize "arch"))) + (role (attribute-string (normalize "role"))) + (arch-string (entity-text "arch")) + (merged-string (entity-text "merged"))) + (if (or (equal? (print-backend) 'tex) + (equal? (print-backend) #f)) + ;; avoid using country: characteristic because of a JadeTeX bug... + (make paragraph + first-line-start-indent: (if (is-first-para) + %para-indent-firstpara% + %para-indent%) + space-before: %para-sep% + space-after: (if (INLIST?) + 0pt + %para-sep%) + quadding: %default-quadding% + hyphenate?: %hyphenation% + language: (dsssl-language-code) + (make sequence + (cond + ;; If arch= not specified, then print unconditionally. This clause + ;; handles the majority of cases. + ((or (equal? arch #f) + (equal? arch "") + (equal? arch "all")) + (process-children-trim)) + (else + (make sequence + (literal "[") + (let loop ((prev (car (split-string-to-list arch))) + (rest (cdr (split-string-to-list arch)))) + (make sequence + (literal prev) + (if (not (null? rest)) + (make sequence + (literal ", ") + (loop (car rest) (cdr rest))) + (empty-sosofo)))) + (literal "] ") + (process-children-trim)))) + (if (and (not (null? role)) (equal? role "merged")) + (literal " [" merged-string "]") + (empty-sosofo)))) + (make paragraph + first-line-start-indent: (if (is-first-para) + %para-indent-firstpara% + %para-indent%) + space-before: %para-sep% + space-after: (if (INLIST?) + 0pt + %para-sep%) + quadding: %default-quadding% + hyphenate?: %hyphenation% + language: (dsssl-language-code) + country: (dsssl-country-code) + (make sequence + (cond + ;; If arch= not specified, then print unconditionally. This clause + ;; handles the majority of cases. + ((or (equal? arch #f) + (equal? arch "") + (equal? arch "all")) + (process-children-trim)) + (else + (make sequence + (literal "[") + (let loop ((prev (car (split-string-to-list arch))) + (rest (cdr (split-string-to-list arch)))) + (make sequence + (literal prev) + (if (not (null? rest)) + (make sequence + (literal ", ") + (loop (car rest) (cdr rest))) + (empty-sosofo)))) + (literal "] ") + (process-children-trim)))) + (if (and (not (null? role)) (equal? role "merged")) + (literal " [" merged-string "]") + (empty-sosofo))))))) ]]> (define (toc-depth nd) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 06:02:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A5341065672; Mon, 5 Jan 2009 06:02:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 865FA8FC12; Mon, 5 Jan 2009 06:02:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0562HF1086720; Mon, 5 Jan 2009 06:02:17 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0562HIo086716; Mon, 5 Jan 2009 06:02:17 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050602.n0562HIo086716@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 06:02:17 +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: r186762 - in stable/6/release/doc: en_US.ISO8859-1/relnotes/common share/mk share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 06:02:18 -0000 Author: hrs Date: Mon Jan 5 06:02:17 2009 New Revision: 186762 URL: http://svn.freebsd.org/changeset/base/186762 Log: - Trim old relnotes items. - Remove {,no.}include.historic knob. Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent stable/6/release/doc/share/mk/doc.relnotes.mk stable/6/release/doc/share/sgml/release.dsl Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml Mon Jan 5 06:02:17 2009 (r186762) @@ -15,6 +15,7 @@ 2006 2007 2008 + 2009 The &os; Documentation Project @@ -133,11 +134,7 @@ - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - + @@ -199,16 +196,7 @@ Contributed Software - bzip2 has been updated from 1.0.4 - to 1.0.5. - - sendmail has been updated from - 8.14.2 to 8.14.3. - - The timezone database has been updated from - the tzdata2007k release to - the tzdata2008b release. - + @@ -221,11 +209,7 @@ Release Engineering and Integration - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. - + Modified: stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/en_US.ISO8859-1/relnotes/common/relnotes.ent Mon Jan 5 06:02:17 2009 (r186762) @@ -2,11 +2,6 @@ - - - - - Modified: stable/6/release/doc/share/mk/doc.relnotes.mk ============================================================================== --- stable/6/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 06:02:17 2009 (r186762) @@ -11,23 +11,6 @@ DSLHTML?= ${RELN_ROOT}/share/sgml/defaul DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl # -# Tweakable Makefile variables -# -# INCLUDE_HISTORIC Used by relnotes document only. When set, -# causes all release notes entries to be printed, -# even those marked as "historic". If not set -# (the default), only print "non-historic" -# release note entries. To designate a release -# note entry as "historic", add a role="historic" -# attribute to the applicable element(s). -# -.if defined(INCLUDE_HISTORIC) -JADEFLAGS+= -iinclude.historic -.else -JADEFLAGS+= -ino.include.historic -.endif - -# # Automatic device list generation: # .if exists(${RELN_ROOT}/../man4) Modified: stable/6/release/doc/share/sgml/release.dsl ============================================================================== --- stable/6/release/doc/share/sgml/release.dsl Mon Jan 5 05:56:19 2009 (r186761) +++ stable/6/release/doc/share/sgml/release.dsl Mon Jan 5 06:02:17 2009 (r186762) @@ -3,8 +3,6 @@ - - %release.ent; @@ -14,14 +12,6 @@ -; Configure behavior of this stylesheet - - - ; String manipulation functions (define (split-string-to-list STR) ;; return list of STR separated with char #\ or #\, @@ -60,13 +50,6 @@ (for-arch (entity-text "arch"))) (cond - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - ; If arch= not specified, then print unconditionally. This clause ; handles the majority of cases. ((or (equal? arch #f) (equal? arch "")) @@ -103,13 +86,6 @@ (for-arch (entity-text "arch"))) (cond - ; If role=historic, and we're not printing historic things, then - ; don't output this element. - ((and (equal? role "historic") - (not %include-historic%)) - (empty-sosofo)) - - ; If arch= not specified, then print unconditionally. This clause ; handles the majority of cases. ((or (equal? arch #f) (equal? arch "")) @@ -171,7 +147,6 @@ (u (string-append "&release.man.url;?query=" (data r) "&" "sektion=" (data m)))) (case v - (("xfree86") (string-append u "&" "manpath=XFree86+&release.manpath.xfree86;" )) (("xorg") (string-append u "&" "manpath=Xorg+&release.manpath.xorg;" )) (("netbsd") (string-append u "&" "manpath=NetBSD+&release.manpath.netbsd;")) (("ports") (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd-ports;")) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 08:33:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AD2E106564A; Mon, 5 Jan 2009 08:33:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 236568FC16; Mon, 5 Jan 2009 08:33:57 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n058XvBg089556; Mon, 5 Jan 2009 08:33:57 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n058Xvxf089555; Mon, 5 Jan 2009 08:33:57 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050833.n058Xvxf089555@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 08:33:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186763 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 08:33:58 -0000 Author: hrs Date: Mon Jan 5 08:33:56 2009 New Revision: 186763 URL: http://svn.freebsd.org/changeset/base/186763 Log: Add missing items in relnotes as Errata items: - jme(4), age(4), malo(4), bm(4), et(4), and glxsb(4). - multiple routing table support. Spotted by: weongyo and yongari Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 06:02:17 2009 (r186762) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 08:33:56 2009 (r186763) @@ -195,6 +195,10 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 check the fourth column. If that says chip=0x10a78086 (or one of the other two IDs given above) you will have the adapter's name change. + + + + Late-Breaking News and Corrections [20090105] The Release Notes for 7.1-RELEASE should have mentioned changes that the &man.ae.4; driver has been added to provide support @@ -213,12 +217,129 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 - + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.jme.4; driver has been added to + provide support for PCIe adapters based on JMicron JMC250 + gigabit Ethernet and JMC260 fast Ethernet controllers. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.age.4; driver has been added to + provide support for Attansic/Atheros L1 gigabit Ethernet + controller. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.malo.4; driver has been added to + provide support for Marvell Libertas 88W8335 based PCI network + adapters. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the bm(4) driver has been added to + provide support for Apple Big Mac (BMAC) Ethernet controller, + found on various Apple G3 models. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the et(4) driver has been added to + provide support for Agere ET1310 10/100/Gigabit Ethernet + controller. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned changes that the &man.glxsb.4; driver has been added + to provide support for the Security Block in AMD Geode LX + processors. + + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned that &os; now supports multiple routing tables. To + enable this, the following steps are needed: - - Late-Breaking News and Corrections + + + Add the following kernel configuration option and + rebuild the kernel. The 2 is the + number of FIB (the maximum value is 16). + + options ROUTETABLES=2 + + The procedure for rebuilding the &os; kernel is + described in the &os; + Handbook. + + This number can be modified on boot time. To do so, add + the following to /boot/loader.conf and + reboot the system: - No news. - + net.fibs=6 + + + Set a loader tunable net.my_fibnum if + needed. This means the default number of routing tables. + If not specified, 0 will be used. + + + + Set a loader tunable + net.add_addr_allfibs if needed. This + enables to add routes to all FIBs for new interfaces by + default. When this is set to 0, it will + only allocate routes on interface changes for the FIB of the + caller when adding a new set of addresses to an interface. + Note that this tunable is set to 1 by + default. + + + + To select one of the FIBs, the new &man.setfib.1; utility + can be used. This set an associated FIB with the process. For + example: + + &prompt.root; setfib -3 ping target.example.com + + The FIB #3 will be used for the &man.ping.8; command. + + The FIB which the packet will be associated with will be + determined in the following rules: + + + + All packets which have a FIB associated with them will + use the FIB. If not, FIB #0 will be used. + + + + A packet received on an interface for forwarding uses + FIB #0. + + + + A TCP listen socket associated with an FIB will generate + accept sockets which are associated with the same FIB. + + + + A packet generated in response to other packet uses the + FIB associated with the packet being responded to. + + + + A packet generated on tunnel interfaces such as + &man.gif.4; and &man.tun.4; will be encapsulated using the + FIB of the process which set up the tunnel. + + + + Routing messages will be associated with the process's + FIB. + + + + Also, the &man.ipfw.8; now supports an action rule + setfib. The following action: + + setfib fibnum + + will make the matched packet use the FIB specified in + fibnum. The rule processing + continues at the next rule. + From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 08:56:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C1B4106564A; Mon, 5 Jan 2009 08:56:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 593108FC13; Mon, 5 Jan 2009 08:56:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n058ujHI089970; Mon, 5 Jan 2009 08:56:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n058ujil089969; Mon, 5 Jan 2009 08:56:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901050856.n058ujil089969@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 08:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186764 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 08:56:48 -0000 Author: hrs Date: Mon Jan 5 08:56:45 2009 New Revision: 186764 URL: http://svn.freebsd.org/changeset/base/186764 Log: Add explanation of FIB. Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 08:33:56 2009 (r186763) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 08:56:45 2009 (r186764) @@ -254,8 +254,9 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 Add the following kernel configuration option and - rebuild the kernel. The 2 is the - number of FIB (the maximum value is 16). + rebuild the kernel. The 2 is the number + of FIB (Forward Information Base, synonym for a routing + table here). The maximum value is 16. options ROUTETABLES=2 From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 12:10:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECBE5106566C; Mon, 5 Jan 2009 12:10:23 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBA5C8FC12; Mon, 5 Jan 2009 12:10:23 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05CAMjF095671; Mon, 5 Jan 2009 12:10:22 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05CAMba095670; Mon, 5 Jan 2009 12:10:22 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200901051210.n05CAMba095670@svn.freebsd.org> From: Tom Rhodes Date: Mon, 5 Jan 2009 12:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186768 - head/sbin/mount_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 12:10:24 -0000 Author: trhodes Date: Mon Jan 5 12:10:22 2009 New Revision: 186768 URL: http://svn.freebsd.org/changeset/base/186768 Log: Add missing qualifier which was missed in the previous commit. Noticed by: brooks Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 ============================================================================== --- head/sbin/mount_msdosfs/mount_msdosfs.8 Mon Jan 5 10:43:48 2009 (r186767) +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Mon Jan 5 12:10:22 2009 (r186768) @@ -75,7 +75,7 @@ The following MSDOS file system-specific .Bl -tag -width indent .It Cm large Support file systems larger than 128 gigabytes at the expense -of 32 bytes of kernel memory. +of 32 bytes of kernel memory for each file on disk. This memory will not be reclaimed until the file system has been unmounted. .It Cm longnames From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 12:18:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D93DE106566B; Mon, 5 Jan 2009 12:18:46 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C82578FC12; Mon, 5 Jan 2009 12:18:46 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05CIkJb095856; Mon, 5 Jan 2009 12:18:46 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05CIk9G095855; Mon, 5 Jan 2009 12:18:46 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200901051218.n05CIk9G095855@svn.freebsd.org> From: Tom Rhodes Date: Mon, 5 Jan 2009 12:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186769 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 12:18:47 -0000 Author: trhodes Date: Mon Jan 5 12:18:46 2009 New Revision: 186769 URL: http://svn.freebsd.org/changeset/base/186769 Log: Note that the protocol argument can be set to 0. PR: 127890 Reviewed by: rwatson Modified: head/lib/libc/sys/socket.2 Modified: head/lib/libc/sys/socket.2 ============================================================================== --- head/lib/libc/sys/socket.2 Mon Jan 5 12:10:22 2009 (r186768) +++ head/lib/libc/sys/socket.2 Mon Jan 5 12:18:46 2009 (r186769) @@ -28,7 +28,7 @@ .\" From: @(#)socket.2 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd August 4, 2008 +.Dd January 5, 2009 .Dt SOCKET 2 .Os .Sh NAME @@ -131,6 +131,11 @@ in which communication is to take place; see .Xr protocols 5 . .Pp +The +.Fa protocol +argument may be set to zero (0) to request the default +implementation of a socket type for the protocol, if any. +.Pp Sockets of type .Dv SOCK_STREAM are full-duplex byte streams, similar From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 12:35:37 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85ABB10656C2; Mon, 5 Jan 2009 12:35:37 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from pittgoth.com (pittgoth.com [205.134.163.206]) by mx1.freebsd.org (Postfix) with ESMTP id 435C38FC0C; Mon, 5 Jan 2009 12:35:37 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from localhost.fbsdsecure.org (c-68-83-213-214.hsd1.va.comcast.net [68.83.213.214]) (authenticated bits=0) by pittgoth.com (8.14.3/8.14.3) with ESMTP id n05CAu8o026338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 5 Jan 2009 07:10:57 -0500 (EST) (envelope-from trhodes@FreeBSD.org) Date: Mon, 5 Jan 2009 07:10:55 -0500 From: Tom Rhodes To: Brooks Davis Message-Id: <20090105071055.569e16c3.trhodes@FreeBSD.org> In-Reply-To: <20090102165652.GA8152@lor.one-eyed-alien.net> References: <200812231335.mBNDZRBZ003693@svn.freebsd.org> <20090102165652.GA8152@lor.one-eyed-alien.net> X-Mailer: Sylpheed version 1.0.6 (GTK+ 1.2.10; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186429 - head/sbin/mount_msdosfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 12:35:39 -0000 On Fri, 2 Jan 2009 10:56:52 -0600 Brooks Davis wrote: > On Tue, Dec 23, 2008 at 01:35:27PM +0000, Tom Rhodes wrote: > > Author: trhodes > > Date: Tue Dec 23 13:35:26 2008 > > New Revision: 186429 > > URL: http://svn.freebsd.org/changeset/base/186429 > > > > Log: > > Document the "-o large" option. > > > > PR: 129792 > > > > Modified: > > head/sbin/mount_msdosfs/mount_msdosfs.8 > > > > Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 > > ============================================================================== > > --- head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:09:17 2008 (r186428) > > +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:35:26 2008 (r186429) > > @@ -30,7 +30,7 @@ > > .\" > > .\" $FreeBSD$ > > .\" > > -.Dd April 7, 1994 > > +.Dd December 23, 2008 > > .Dt MOUNT_MSDOSFS 8 > > .Os > > .Sh NAME > > @@ -73,6 +73,11 @@ as described in > > .Xr mount 8 . > > The following MSDOS file system-specific options are available: > > .Bl -tag -width indent > > +.It Cm large > > +Support file systems larger than 128 gigabytes at the expense > > +of 32 bytes of kernel memory. > > The second half of this sentence doesn't make sense. If it's 32-bytes > per file system, that's not worth mentioning since the mount table > entry is going to be a bigger than that. Presumably there's a missing > qualifier like "per file opened" or something. For each file on disk, I've committed a fix, thanks! -- Tom Rhodes From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 13:06:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF7171065678; Mon, 5 Jan 2009 13:06:03 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD13E8FC17; Mon, 5 Jan 2009 13:06:03 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05D63Nq096963; Mon, 5 Jan 2009 13:06:03 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05D63et096962; Mon, 5 Jan 2009 13:06:03 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901051306.n05D63et096962@svn.freebsd.org> From: Rong-En Fan Date: Mon, 5 Jan 2009 13:06:03 +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: r186772 - stable/6/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:06:04 -0000 Author: rafan Date: Mon Jan 5 13:06:03 2009 New Revision: 186772 URL: http://svn.freebsd.org/changeset/base/186772 Log: MFC r184459 - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves one zombie process because it does not do the cleanup. For a long running NIS/YP server, it will have lots of zombie processes on it. Fix that by ignoring the SIGCHLD signal since we don't really care about the exit status in this case. PR: bin/91980 Reported by: Arjan van der Velde Submitted by: Jui-Nan Lin" Reviewed by: delphij Modified: stable/6/usr.sbin/rpc.yppasswdd/ (props changed) stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Modified: stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c ============================================================================== --- stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 12:58:43 2009 (r186771) +++ stable/6/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Mon Jan 5 13:06:03 2009 (r186772) @@ -165,6 +165,7 @@ main(int argc, char *argv[]) struct sockaddr_in saddr; socklen_t asize = sizeof (saddr); struct netconfig *nconf; + struct sigaction sa; void *localhandle; int ch; char *mastername; @@ -268,6 +269,9 @@ the %s domain -- aborting", yppasswd_dom } } openlog("rpc.yppasswdd", LOG_PID, LOG_DAEMON); + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT; + sigaction(SIGCHLD, &sa, NULL); rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 13:10:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83614106566B; Mon, 5 Jan 2009 13:10:06 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 705F78FC17; Mon, 5 Jan 2009 13:10:06 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05DA65J097071; Mon, 5 Jan 2009 13:10:06 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05DA6UQ097067; Mon, 5 Jan 2009 13:10:06 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200901051310.n05DA6UQ097067@svn.freebsd.org> From: Florent Thoumie Date: Mon, 5 Jan 2009 13:10:06 +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: r186773 - in stable/7/usr.sbin/pkg_install: . create lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:10:07 -0000 Author: flz Date: Mon Jan 5 13:10:06 2009 New Revision: 186773 URL: http://svn.freebsd.org/changeset/base/186773 Log: Synchronize pkg_install with HEAD (20080708): r180361: actually enable '-n' for pkg_create(1) r181376: use humanize_number to report pen-sizes Modified: stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pkg_install/Makefile.inc stable/7/usr.sbin/pkg_install/create/main.c stable/7/usr.sbin/pkg_install/lib/lib.h stable/7/usr.sbin/pkg_install/lib/pen.c Modified: stable/7/usr.sbin/pkg_install/Makefile.inc ============================================================================== --- stable/7/usr.sbin/pkg_install/Makefile.inc Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/Makefile.inc Mon Jan 5 13:10:06 2009 (r186773) @@ -4,6 +4,9 @@ LIBINSTALL= ${.OBJDIR}/../lib/libinstall.a +DPADD+= ${LIBUTIL} +LDADD+= -lutil + .if ${MK_OPENSSL} != "no" && \ defined(LDADD) && ${LDADD:M-lfetch} != "" DPADD+= ${LIBSSL} ${LIBCRYPTO} Modified: stable/7/usr.sbin/pkg_install/create/main.c ============================================================================== --- stable/7/usr.sbin/pkg_install/create/main.c Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/create/main.c Mon Jan 5 13:10:06 2009 (r186773) @@ -208,6 +208,10 @@ main(int argc, char **argv) Recursive = TRUE; break; + case 'n': + Regenerate = FALSE; + break; + case 0: if (Help) usage(); Modified: stable/7/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/lib.h Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/lib/lib.h Mon Jan 5 13:10:06 2009 (r186773) @@ -105,7 +105,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20080612 +#define PKG_INSTALL_VERSION 20080708 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: stable/7/usr.sbin/pkg_install/lib/pen.c ============================================================================== --- stable/7/usr.sbin/pkg_install/lib/pen.c Mon Jan 5 13:06:03 2009 (r186772) +++ stable/7/usr.sbin/pkg_install/lib/pen.c Mon Jan 5 13:10:06 2009 (r186773) @@ -23,6 +23,7 @@ __FBSDID("$FreeBSD$"); #include "lib.h" #include +#include #include #include #include @@ -44,6 +45,7 @@ find_play_pen(char *pen, off_t sz) { char *cp; struct stat sb; + char humbuf[6]; if (pen[0] && isdir(dirname(pen)) == TRUE && (min_free(dirname(pen)) >= sz)) return pen; @@ -59,10 +61,12 @@ find_play_pen(char *pen, off_t sz) strcpy(pen, "/usr/tmp/instmp.XXXXXX"); else { cleanup(0); + humanize_number(humbuf, sizeof humbuf, sz, "", HN_AUTOSCALE, + HN_NOSPACE); errx(2, "%s: can't find enough temporary space to extract the files, please set your\n" -"PKG_TMPDIR environment variable to a location with at least %ld bytes\n" -"free", __func__, (long)sz); +"PKG_TMPDIR environment variable to a location with at least %s bytes\n" +"free", __func__, humbuf); return NULL; } return pen; @@ -98,6 +102,8 @@ popPen(char *pen) char * make_playpen(char *pen, off_t sz) { + char humbuf1[6], humbuf2[6]; + if (!find_play_pen(pen, sz)) return NULL; @@ -111,8 +117,13 @@ make_playpen(char *pen, off_t sz) } if (Verbose) { - if (sz) - fprintf(stderr, "Requested space: %d bytes, free space: %lld bytes in %s\n", (int)sz, (long long)min_free(pen), pen); + if (sz) { + humanize_number(humbuf1, sizeof humbuf1, sz, "", HN_AUTOSCALE, + HN_NOSPACE); + humanize_number(humbuf2, sizeof humbuf2, min_free(pen), + "", HN_AUTOSCALE, HN_NOSPACE); + fprintf(stderr, "Requested space: %s bytes, free space: %s bytes in %s\n", humbuf1, humbuf2, pen); + } } if (min_free(pen) < sz) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 13:46:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66B4D106566B; Mon, 5 Jan 2009 13:46:26 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 25C478FC17; Mon, 5 Jan 2009 13:46:26 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 09C946D43F; Mon, 5 Jan 2009 13:46:25 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E4B9E844F2; Mon, 5 Jan 2009 14:46:24 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Luigi Rizzo References: <200812262231.mBQMVjHC052150@svn.freebsd.org> Date: Mon, 05 Jan 2009 14:46:24 +0100 In-Reply-To: <200812262231.mBQMVjHC052150@svn.freebsd.org> (Luigi Rizzo's message of "Fri, 26 Dec 2008 22:31:45 +0000 (UTC)") Message-ID: <867i59lvbj.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186502 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:46:27 -0000 Luigi Rizzo writes: > Log: > Clarify the behaviour of conditionals when dealing with comparisons. > In particular, point out that string comparison can only use !=3D and = =3D=3D > (how weird, given that the underlying call to strcmp returns more > information), that floating point values are correctly interpreted > as numbers, and that the left-hand side must be a variable expansion. Any chance of fixing items 1 and 3? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 13:55:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFCB3106566B; Mon, 5 Jan 2009 13:55:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CCECD8FC0C; Mon, 5 Jan 2009 13:55:17 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05DtHeF097994; Mon, 5 Jan 2009 13:55:17 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05DtHoD097993; Mon, 5 Jan 2009 13:55:17 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901051355.n05DtHoD097993@svn.freebsd.org> From: Randall Stewart Date: Mon, 5 Jan 2009 13:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186775 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:55:18 -0000 Author: rrs Date: Mon Jan 5 13:55:17 2009 New Revision: 186775 URL: http://svn.freebsd.org/changeset/base/186775 Log: Add the missing PRU_FLUSH and 'FLUSH' defines noticed by rwatson. Opps.. Modified: head/sys/sys/protosw.h Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Mon Jan 5 13:18:39 2009 (r186774) +++ head/sys/sys/protosw.h Mon Jan 5 13:55:17 2009 (r186775) @@ -170,7 +170,8 @@ struct protosw { #define PRU_SEND_EOF 22 /* send and close */ #define PRU_SOSETLABEL 23 /* MAC label change */ #define PRU_CLOSE 24 /* socket close */ -#define PRU_NREQ 24 +#define PRU_FLUSH 25 /* flush the socket */ +#define PRU_NREQ 25 #ifdef PRUREQUESTS const char *prurequests[] = { @@ -180,7 +181,7 @@ const char *prurequests[] = { "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", - "CLOSE", + "CLOSE", "FLUSH", }; #endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 13:56:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE2391065672; Mon, 5 Jan 2009 13:56:18 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id ABC278FC17; Mon, 5 Jan 2009 13:56:18 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D31A26D43F; Mon, 5 Jan 2009 13:56:17 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id B4634844F2; Mon, 5 Jan 2009 14:56:17 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "David E. O'Brien" References: <200812231757.mBNHvI9c009238@svn.freebsd.org> Date: Mon, 05 Jan 2009 14:56:17 +0100 In-Reply-To: <200812231757.mBNHvI9c009238@svn.freebsd.org> (David E. O'Brien's message of "Tue, 23 Dec 2008 17:57:18 +0000 (UTC)") Message-ID: <863afxluv2.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186444 - head/usr.sbin/burncd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 13:56:20 -0000 "David E. O'Brien" writes: > -static int global_fd_for_cleanup, quiet, verbose, saved_block_size, notr= acks; > +static int quiet, verbose, saved_block_size, notracks; > +static volatile int global_fd_for_cleanup; The correct type is sig_atomic_t (which in FreeBSD is either int or long depending on the platform) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 14:21:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32180106564A; Mon, 5 Jan 2009 14:21:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204BB8FC16; Mon, 5 Jan 2009 14:21:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05ELoxA098514; Mon, 5 Jan 2009 14:21:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05ELnlC098512; Mon, 5 Jan 2009 14:21:49 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901051421.n05ELnlC098512@svn.freebsd.org> From: Robert Watson Date: Mon, 5 Jan 2009 14:21:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186776 - in head/sys: amd64/conf i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 14:21:50 -0000 Author: rwatson Date: Mon Jan 5 14:21:49 2009 New Revision: 186776 URL: http://svn.freebsd.org/changeset/base/186776 Log: Add commented out options KDTRACE_HOOKS and, for amd64, KDRACE_FRAME, to GENERIC configuration files. This brings what's in 8.x in sync with what is in 7.x, but does not change any current defaults. Possibly they should now be enabled in head by default? Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Mon Jan 5 13:55:17 2009 (r186775) +++ head/sys/amd64/conf/GENERIC Mon Jan 5 14:21:49 2009 (r186776) @@ -65,6 +65,8 @@ options KBD_INSTALL_CDEV # install a CD options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +#options KDTRACE_FRAME # Ensure frames are compiled in +#options KDTRACE_HOOKS # Kernel DTrace hooks # Debugging for use in -current options KDB # Enable kernel debugger support. Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Mon Jan 5 13:55:17 2009 (r186775) +++ head/sys/i386/conf/GENERIC Mon Jan 5 14:21:49 2009 (r186776) @@ -65,6 +65,7 @@ options KBD_INSTALL_CDEV # install a CD options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +#options KDTRACE_HOOKS # Kernel DTrace hooks # Debugging for use in -current options KDB # Enable kernel debugger support. From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 14:24:33 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A51B81065670; Mon, 5 Jan 2009 14:24:33 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 60D078FC1E; Mon, 5 Jan 2009 14:24:33 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 7189B73098; Mon, 5 Jan 2009 15:29:29 +0100 (CET) Date: Mon, 5 Jan 2009 15:29:29 +0100 From: Luigi Rizzo To: Dag-Erling Sm??rgrav Message-ID: <20090105142929.GA70683@onelab2.iet.unipi.it> References: <200812262231.mBQMVjHC052150@svn.freebsd.org> <867i59lvbj.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <867i59lvbj.fsf@ds4.des.no> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r186502 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 14:24:34 -0000 On Mon, Jan 05, 2009 at 02:46:24PM +0100, Dag-Erling Sm??rgrav wrote: > Luigi Rizzo writes: > > Log: > > Clarify the behaviour of conditionals when dealing with comparisons. > > In particular, point out that string comparison can only use != and == > > (how weird, given that the underlying call to strcmp returns more > > information), that floating point values are correctly interpreted > > as numbers, and that the left-hand side must be a variable expansion. > > Any chance of fixing items 1 and 3? item 1 is easy except perhaps for Locale issues which however should not be a big deal in this context. item 3 should also be easy. But the thing i wonder about is whether there is any standard that mandates this beviour, or we are relatively free to make enhancements to our "make" program. cheers luigi From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 15:18:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119C11065673; Mon, 5 Jan 2009 15:18:17 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1E068FC16; Mon, 5 Jan 2009 15:18:16 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05FIGx6099942; Mon, 5 Jan 2009 15:18:16 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05FIGli099929; Mon, 5 Jan 2009 15:18:16 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200901051518.n05FIGli099929@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 5 Jan 2009 15:18:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:18:17 -0000 Author: lulf Date: Mon Jan 5 15:18:16 2009 New Revision: 186781 URL: http://svn.freebsd.org/changeset/base/186781 Log: Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now fetch a complete CVS repository. Support for rsync update of regular files are also included, but are not yet enabled. The change should not have an impact on existing csup usage, as little of the existing code has changed. Added: head/contrib/csup/lex.rcs.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/lex.rcs.c head/contrib/csup/rcsfile.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsfile.c head/contrib/csup/rcsfile.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsfile.h head/contrib/csup/rcsparse.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsparse.c head/contrib/csup/rcsparse.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcsparse.h head/contrib/csup/rcstokenizer.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcstokenizer.h head/contrib/csup/rcstokenizer.l - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rcstokenizer.l head/contrib/csup/rsyncfile.c - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rsyncfile.c head/contrib/csup/rsyncfile.h - copied unchanged from r186779, projects/csup_cvsmode/contrib/csup/rsyncfile.h Modified: head/contrib/csup/ (props changed) head/contrib/csup/GNUmakefile head/contrib/csup/Makefile head/contrib/csup/TODO head/contrib/csup/config.c head/contrib/csup/detailer.c head/contrib/csup/diff.c head/contrib/csup/diff.h head/contrib/csup/fattr.c head/contrib/csup/fattr.h head/contrib/csup/keyword.c head/contrib/csup/keyword.h head/contrib/csup/lister.c head/contrib/csup/misc.c head/contrib/csup/misc.h head/contrib/csup/mux.c head/contrib/csup/proto.c head/contrib/csup/proto.h head/contrib/csup/status.c head/contrib/csup/stream.c head/contrib/csup/stream.h head/contrib/csup/updater.c head/usr.bin/csup/ (props changed) head/usr.bin/csup/Makefile Modified: head/contrib/csup/GNUmakefile ============================================================================== --- head/contrib/csup/GNUmakefile Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/GNUmakefile Mon Jan 5 15:18:16 2009 (r186781) @@ -12,8 +12,9 @@ GROUP?= 0 UNAME= $(shell uname -s) SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ - globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c pathcomp.c \ - parse.c proto.c status.c stream.c threads.c token.c updater.c + globtree.c idcache.c keyword.c lex.rcs.c lister.c main.c misc.c mux.c \ + pathcomp.c parse.c proto.c rcsfile.c rcsparse.c rsyncfile.c status.c \ + stream.c threads.c token.c updater.c OBJS= $(SRCS:.c=.o) WARNS= -Wall -W -Wno-unused-parameter -Wmissing-prototypes -Wpointer-arith \ Modified: head/contrib/csup/Makefile ============================================================================== --- head/contrib/csup/Makefile Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/Makefile Mon Jan 5 15:18:16 2009 (r186781) @@ -9,10 +9,11 @@ UNAME!= /usr/bin/uname -s PROG= csup SRCS= attrstack.c config.c detailer.c diff.c fattr.c fixups.c fnmatch.c \ globtree.c idcache.c keyword.c lister.c main.c misc.c mux.c parse.y \ - pathcomp.c proto.c status.c stream.c threads.c token.l updater.c + pathcomp.c proto.c status.c stream.c threads.c token.l updater.c \ + rcsfile.c rcsparse.c lex.rcs.c rsyncfile.c CFLAGS+= -I. -I${.CURDIR} -g -pthread -DHAVE_FFLAGS -DNDEBUG -WARNS?= 6 +WARNS?= 1 # A bit of tweaking is needed to get this Makefile working # with the bsd.prog.mk of all the *BSD OSes... Modified: head/contrib/csup/TODO ============================================================================== --- head/contrib/csup/TODO Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/TODO Mon Jan 5 15:18:16 2009 (r186781) @@ -28,4 +28,3 @@ MISSING FEATURES: checkout files (files in CVS/ subdirectores), a command line override to only update a specific collection and a third verbosity level to display commit log messages. -- Add support for CVS mode (maybe?). Modified: head/contrib/csup/config.c ============================================================================== --- head/contrib/csup/config.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/config.c Mon Jan 5 15:18:16 2009 (r186781) @@ -133,7 +133,6 @@ config_init(const char *file, struct col coll->co_options &= ~CO_CHECKRCS; /* In recent versions, we always try to set the file modes. */ coll->co_options |= CO_SETMODE; - /* XXX We don't support the rsync updating algorithm yet. */ coll->co_options |= CO_NORSYNC; error = config_parse_refusefiles(coll); if (error) @@ -444,10 +443,6 @@ coll_add(char *name) "\"%s\"\n", cur_coll->co_name); exit(1); } - if (!(cur_coll->co_options & CO_CHECKOUTMODE)) { - lprintf(-1, "Client only supports checkout mode\n"); - exit(1); - } if (!STAILQ_EMPTY(&colls)) { coll = STAILQ_LAST(&colls, coll, co_next); if (strcmp(coll->co_host, cur_coll->co_host) != 0) { Modified: head/contrib/csup/detailer.c ============================================================================== --- head/contrib/csup/detailer.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/detailer.c Mon Jan 5 15:18:16 2009 (r186781) @@ -30,13 +30,21 @@ #include #include #include +#include + +#include +#include +#include #include "config.h" #include "detailer.h" #include "fixups.h" +#include "globtree.h" #include "misc.h" #include "mux.h" #include "proto.h" +#include "rcsfile.h" +#include "rsyncfile.h" #include "status.h" #include "stream.h" @@ -56,8 +64,16 @@ struct detailer { static int detailer_batch(struct detailer *); static int detailer_coll(struct detailer *, struct coll *, struct status *); -static int detailer_dofile(struct detailer *, struct coll *, +static int detailer_dofile_co(struct detailer *, struct coll *, struct status *, char *); +static int detailer_dofile_rcs(struct detailer *, struct coll *, + char *, char *); +static int detailer_dofile_regular(struct detailer *, char *, char *); +static int detailer_dofile_rsync(struct detailer *, char *, char *); +static int detailer_checkrcsattr(struct detailer *, struct coll *, char *, + struct fattr *, int); +int detailer_send_details(struct detailer *, struct coll *, char *, + char *, struct fattr *); void * detailer(void *arg) @@ -186,8 +202,13 @@ detailer_batch(struct detailer *d) } if (fixup->f_coll != coll) break; - error = proto_printf(wr, "Y %s %s %s\n", fixup->f_name, - coll->co_tag, coll->co_date); + if (coll->co_options & CO_CHECKOUTMODE) + error = proto_printf(wr, "Y %s %s %s\n", + fixup->f_name, coll->co_tag, coll->co_date); + else { + error = proto_printf(wr, "A %s\n", + fixup->f_name); + } if (error) return (DETAILER_ERR_WRITE); fixup = NULL; @@ -208,12 +229,14 @@ detailer_batch(struct detailer *d) static int detailer_coll(struct detailer *d, struct coll *coll, struct status *st) { + struct fattr *rcsattr; struct stream *rd, *wr; - char *cmd, *file, *line, *msg; - int error; + char *attr, *cmd, *file, *line, *msg, *path, *target; + int error, attic; rd = d->rd; wr = d->wr; + attic = 0; line = stream_getln(rd, NULL); if (line == NULL) return (DETAILER_ERR_READ); @@ -226,17 +249,84 @@ detailer_coll(struct detailer *d, struct /* Delete file. */ file = proto_get_ascii(&line); if (file == NULL || line != NULL) - return (DETAILER_ERR_PROTO); + return (DETAILER_ERR_PROTO); error = proto_printf(wr, "D %s\n", file); if (error) return (DETAILER_ERR_WRITE); break; + case 'I': + case 'i': + case 'j': + /* Directory operations. */ + file = proto_get_ascii(&line); + if (file == NULL || line != NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s\n", cmd, file); + if (error) + return (DETAILER_ERR_WRITE); + break; + case 'J': + /* Set directory attributes. */ + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || line != NULL || attr == NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s %s\n", cmd, file, attr); + if (error) + return (DETAILER_ERR_WRITE); + break; + case 'H': + case 'h': + /* Create a hard link. */ + file = proto_get_ascii(&line); + target = proto_get_ascii(&line); + if (file == NULL || target == NULL) + return (DETAILER_ERR_PROTO); + error = proto_printf(wr, "%s %s %s\n", cmd, file, + target); + break; + case 't': + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || attr == NULL || line != NULL) { + return (DETAILER_ERR_PROTO); + } + rcsattr = fattr_decode(attr); + if (rcsattr == NULL) { + return (DETAILER_ERR_PROTO); + } + error = detailer_checkrcsattr(d, coll, file, rcsattr, + 1); + break; + + case 'T': + file = proto_get_ascii(&line); + attr = proto_get_ascii(&line); + if (file == NULL || attr == NULL || line != NULL) + return (DETAILER_ERR_PROTO); + rcsattr = fattr_decode(attr); + if (rcsattr == NULL) + return (DETAILER_ERR_PROTO); + error = detailer_checkrcsattr(d, coll, file, rcsattr, + 0); + break; + case 'U': /* Add or update file. */ file = proto_get_ascii(&line); if (file == NULL || line != NULL) return (DETAILER_ERR_PROTO); - error = detailer_dofile(d, coll, st, file); + if (coll->co_options & CO_CHECKOUTMODE) { + error = detailer_dofile_co(d, coll, st, file); + } else { + path = cvspath(coll->co_prefix, file, 0); + rcsattr = fattr_frompath(path, FATTR_NOFOLLOW); + error = detailer_send_details(d, coll, file, + path, rcsattr); + if (rcsattr != NULL) + fattr_free(rcsattr); + free(path); + } if (error) return (error); break; @@ -261,14 +351,110 @@ detailer_coll(struct detailer *d, struct return (0); } +/* + * Tell the server to update a regular file. + */ static int -detailer_dofile(struct detailer *d, struct coll *coll, struct status *st, - char *file) +detailer_dofile_regular(struct detailer *d, char *name, char *path) { + struct stream *wr; + struct stat st; char md5[MD5_DIGEST_SIZE]; + int error; + + wr = d->wr; + error = stat(path, &st); + /* If we don't have it or it's unaccessible, we want it again. */ + if (error) { + proto_printf(wr, "A %s\n", name); + return (0); + } + + /* If not, we want the file to be updated. */ + error = MD5_File(path, md5); + if (error) { + lprintf(-1, "Error reading \"%s\"\n", name); + return (error); + } + error = proto_printf(wr, "R %s %O %s\n", name, st.st_size, md5); + if (error) + return (DETAILER_ERR_WRITE); + return (0); +} + +/* + * Tell the server to update a file with the rsync algorithm. + */ +static int +detailer_dofile_rsync(struct detailer *d, char *name, char *path) +{ + struct stream *wr; + struct rsyncfile *rf; + + wr = d->wr; + rf = rsync_open(path, 0, 1); + if (rf == NULL) { + /* Fallback if we fail in opening it. */ + proto_printf(wr, "A %s\n", name); + return (0); + } + proto_printf(wr, "r %s %z %z\n", name, rsync_filesize(rf), + rsync_blocksize(rf)); + /* Detail the blocks. */ + while (rsync_nextblock(rf) != 0) + proto_printf(wr, "%s %s\n", rsync_rsum(rf), rsync_blockmd5(rf)); + proto_printf(wr, ".\n"); + rsync_close(rf); + return (0); +} + +/* + * Tell the server to update an RCS file that we have, or send it if we don't. + */ +static int +detailer_dofile_rcs(struct detailer *d, struct coll *coll, char *name, + char *path) +{ + struct stream *wr; + struct fattr *fa; + struct rcsfile *rf; + int error; + + wr = d->wr; + path = atticpath(coll->co_prefix, name); + fa = fattr_frompath(path, FATTR_NOFOLLOW); + if (fa == NULL) { + /* We don't have it, so send request to get it. */ + error = proto_printf(wr, "A %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + free(path); + return (0); + } + + rf = rcsfile_frompath(path, name, coll->co_cvsroot, coll->co_tag, 1); + free(path); + if (rf == NULL) { + error = proto_printf(wr, "A %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + return (0); + } + /* Tell to update the RCS file. The client version details follow. */ + rcsfile_send_details(rf, wr); + rcsfile_free(rf); + fattr_free(fa); + return (0); +} + +static int +detailer_dofile_co(struct detailer *d, struct coll *coll, struct status *st, + char *file) +{ struct stream *wr; struct fattr *fa; struct statusrec *sr; + char md5[MD5_DIGEST_SIZE]; char *path; int error, ret; @@ -337,3 +523,81 @@ detailer_dofile(struct detailer *d, stru return (DETAILER_ERR_WRITE); return (0); } + +int +detailer_checkrcsattr(struct detailer *d, struct coll *coll, char *name, + struct fattr *server_attr, int attic) +{ + struct fattr *client_attr; + char *attr, *path; + int error; + + /* + * I don't think we can use the status file, since it only records file + * attributes in cvsmode. + */ + client_attr = NULL; + path = cvspath(coll->co_prefix, name, attic); + if (path == NULL) { + return (DETAILER_ERR_PROTO); + } + + if (access(path, F_OK) == 0 && + ((client_attr = fattr_frompath(path, FATTR_NOFOLLOW)) != NULL) && + fattr_equal(client_attr, server_attr)) { + attr = fattr_encode(client_attr, NULL, 0); + if (attic) { + error = proto_printf(d->wr, "l %s %s\n", name, attr); + } else { + error = proto_printf(d->wr, "L %s %s\n", name, attr); + } + free(attr); + free(path); + fattr_free(client_attr); + if (error) + return (DETAILER_ERR_WRITE); + return (0); + } + /* We don't have it, so tell the server to send it. */ + error = detailer_send_details(d, coll, name, path, client_attr); + fattr_free(client_attr); + free(path); + return (error); +} + +int +detailer_send_details(struct detailer *d, struct coll *coll, char *name, + char *path, struct fattr *fa) +{ + int error; + size_t len; + + /* + * Try to check if the file exists either live or dead to see if we can + * edit it and put it live or dead, rather than receiving the entire + * file. + */ + if (fa == NULL) { + path = atticpath(coll->co_prefix, name); + fa = fattr_frompath(path, FATTR_NOFOLLOW); + } + if (fa == NULL) { + error = proto_printf(d->wr, "A %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + } else if (fattr_type(fa) == FT_FILE) { + if (isrcs(name, &len) && !(coll->co_options & CO_NORCS)) { + detailer_dofile_rcs(d, coll, name, path); + } else if (!(coll->co_options & CO_NORSYNC) && + !globtree_test(coll->co_norsync, name)) { + detailer_dofile_rsync(d, name, path); + } else { + detailer_dofile_regular(d, name, path); + } + } else { + error = proto_printf(d->wr, "N %s\n", name); + if (error) + return (DETAILER_ERR_WRITE); + } + return (0); +} Modified: head/contrib/csup/diff.c ============================================================================== --- head/contrib/csup/diff.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/diff.c Mon Jan 5 15:18:16 2009 (r186781) @@ -26,9 +26,12 @@ * $FreeBSD$ */ +#include + #include #include #include +#include #include #include @@ -36,15 +39,20 @@ #include "keyword.h" #include "misc.h" #include "stream.h" +#include "queue.h" typedef long lineno_t; #define EC_ADD 0 #define EC_DEL 1 +#define MAXKEY LONG_MAX /* Editing command and state. */ struct editcmd { int cmd; + long key; + int havetext; + int offset; lineno_t where; lineno_t count; lineno_t lasta; @@ -55,20 +63,28 @@ struct editcmd { struct diffinfo *di; struct stream *orig; struct stream *dest; + LIST_ENTRY(editcmd) next; +}; + +struct diffstart { + LIST_HEAD(, editcmd) dhead; }; static int diff_geteditcmd(struct editcmd *, char *); static int diff_copyln(struct editcmd *, lineno_t); +static int diff_ignoreln(struct editcmd *, lineno_t); static void diff_write(struct editcmd *, void *, size_t); +static int diff_insert_edit(struct diffstart *, struct editcmd *); +static void diff_free(struct diffstart *); int diff_apply(struct stream *rd, struct stream *orig, struct stream *dest, - struct keyword *keyword, struct diffinfo *di) + struct keyword *keyword, struct diffinfo *di, int comode) { struct editcmd ec; lineno_t i; - char *line; size_t size; + char *line; int empty, error, noeol; memset(&ec, 0, sizeof(ec)); @@ -104,7 +120,7 @@ diff_apply(struct stream *rd, struct str line = stream_getln(rd, &size); if (line == NULL) return (-1); - if (line[0] == '.') { + if (comode && line[0] == '.') { line++; size--; } @@ -124,10 +140,10 @@ diff_apply(struct stream *rd, struct str } line = stream_getln(rd, NULL); } - if (line == NULL) + if (comode && line == NULL) return (-1); /* If we got ".+", there's no ending newline. */ - if (strcmp(line, ".+") == 0 && !empty) + if (comode && strcmp(line, ".+") == 0 && !empty) noeol = 1; ec.where = 0; while ((line = stream_getln(orig, &size)) != NULL) @@ -143,6 +159,198 @@ diff_apply(struct stream *rd, struct str return (0); } +/* + * Reverse a diff using the same algorithm as in cvsup. + */ +static int +diff_write_reverse(struct stream *dest, struct diffstart *ds) +{ + struct editcmd *ec, *nextec; + long editline, endline, firstoutputlinedeleted; + long num_added, num_deleted, startline; + int num; + + nextec = LIST_FIRST(&ds->dhead); + editline = 0; + num = 0; + while (nextec != NULL) { + ec = nextec; + nextec = LIST_NEXT(nextec, next); + if (nextec == NULL) + break; + num++; + num_deleted = 0; + if (ec->havetext) + num_deleted = ec->count; + num_added = num_deleted + nextec->offset - ec->offset; + if (num_deleted > 0) { + firstoutputlinedeleted = ec->key - num_deleted + 1; + stream_printf(dest, "d%ld %ld\n", firstoutputlinedeleted, + num_deleted); + if (num_added <= 0) + continue; + } + if (num_added > 0) { + stream_printf(dest, "a%ld %ld\n", ec->key, num_added); + startline = ec->key - num_deleted + 1 + ec->offset; + endline = startline + num_added - 1; + + /* Copy lines from original file. First ignore some. */ + ec->editline = editline; + diff_ignoreln(ec, startline - 1); + diff_copyln(ec, endline); + editline = ec->editline; + } + } + return (0); +} + +/* + * Insert a diff into the list sorted on key. Should perhaps use quicker + * algorithms than insertion sort, but do this for now. + */ +static int +diff_insert_edit(struct diffstart *ds, struct editcmd *ec) +{ + struct editcmd *curec; + + if (ec == NULL) + return (0); + + if (LIST_EMPTY(&ds->dhead)) { + LIST_INSERT_HEAD(&ds->dhead, ec, next); + return (0); + } + + /* Insertion sort based on key. */ + LIST_FOREACH(curec, &ds->dhead, next) { + if (ec->key < curec->key) { + LIST_INSERT_BEFORE(curec, ec, next); + return (0); + } + if (LIST_NEXT(curec, next) == NULL) + break; + } + /* Just insert it after. */ + LIST_INSERT_AFTER(curec, ec, next); + return (0); +} + +static void +diff_free(struct diffstart *ds) +{ + struct editcmd *ec; + + while(!LIST_EMPTY(&ds->dhead)) { + ec = LIST_FIRST(&ds->dhead); + LIST_REMOVE(ec, next); + free(ec); + } +} + +/* + * Write the reverse diff from the diff in rd, and original file into + * destination. This algorithm is the same as used in cvsup. + */ +int +diff_reverse(struct stream *rd, struct stream *orig, struct stream *dest, + struct keyword *keyword, struct diffinfo *di) +{ + struct diffstart ds; + struct editcmd ec, *addec, *delec; + lineno_t i; + char *line; + int error, offset; + + memset(&ec, 0, sizeof(ec)); + ec.orig = orig; + ec.dest = dest; + ec.keyword = keyword; + ec.di = di; + addec = NULL; + delec = NULL; + ec.havetext = 0; + offset = 0; + LIST_INIT(&ds.dhead); + + /* Start with next since we need it. */ + line = stream_getln(rd, NULL); + /* First we build up the list of diffs from input. */ + while (line != NULL) { + error = diff_geteditcmd(&ec, line); + if (error) + break; + if (ec.cmd == EC_ADD) { + addec = xmalloc(sizeof(struct editcmd)); + *addec = ec; + addec->havetext = 1; + /* Ignore the lines we was supposed to add. */ + for (i = 0; i < ec.count; i++) { + line = stream_getln(rd, NULL); + if (line == NULL) + return (-1); + } + + /* Get the next diff command if we have one. */ + addec->key = addec->where + addec->count - offset; + if (delec != NULL && + delec->key == addec->key - addec->count) { + delec->key = addec->key; + delec->havetext = addec->havetext; + delec->count = addec->count; + diff_insert_edit(&ds, delec); + free(addec); + delec = NULL; + addec = NULL; + } else { + if (delec != NULL) { + diff_insert_edit(&ds, delec); + } + delec = NULL; + addec->offset = offset; + diff_insert_edit(&ds, addec); + addec = NULL; + } + offset -= ec.count; + } else if (ec.cmd == EC_DEL) { + if (delec != NULL) { + /* Update offset to our next. */ + diff_insert_edit(&ds, delec); + delec = NULL; + } + delec = xmalloc(sizeof(struct editcmd)); + *delec = ec; + delec->key = delec->where - 1 - offset; + delec->offset = offset; + delec->count = 0; + delec->havetext = 0; + /* Important to use the count we had before reset.*/ + offset += ec.count; + } + line = stream_getln(rd, NULL); + } + + while (line != NULL) + line = stream_getln(rd, NULL); + if (delec != NULL) { + diff_insert_edit(&ds, delec); + delec = NULL; + } + + addec = xmalloc(sizeof(struct editcmd)); + /* Should be filesize, but we set it to max value. */ + addec->key = MAXKEY; + addec->offset = offset; + addec->havetext = 0; + addec->count = 0; + diff_insert_edit(&ds, addec); + addec = NULL; + diff_write_reverse(dest, &ds); + diff_free(&ds); + stream_flush(dest); + return (0); +} + /* Get an editing command from the diff. */ static int diff_geteditcmd(struct editcmd *ec, char *line) @@ -181,8 +389,8 @@ diff_geteditcmd(struct editcmd *ec, char static int diff_copyln(struct editcmd *ec, lineno_t to) { - char *line; size_t size; + char *line; while (ec->editline < to) { line = stream_getln(ec->orig, &size); @@ -194,12 +402,28 @@ diff_copyln(struct editcmd *ec, lineno_t return (0); } +/* Ignore lines from the original version of the file up to line "to". */ +static int +diff_ignoreln(struct editcmd *ec, lineno_t to) +{ + size_t size; + char *line; + + while (ec->editline < to) { + line = stream_getln(ec->orig, &size); + if (line == NULL) + return (-1); + ec->editline++; + } + return (0); +} + /* Write a new line to the file, expanding RCS keywords appropriately. */ static void diff_write(struct editcmd *ec, void *buf, size_t size) { - char *line, *newline; size_t newsize; + char *line, *newline; int ret; line = buf; Modified: head/contrib/csup/diff.h ============================================================================== --- head/contrib/csup/diff.h Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/diff.h Mon Jan 5 15:18:16 2009 (r186781) @@ -45,6 +45,8 @@ struct diffinfo { }; int diff_apply(struct stream *, struct stream *, struct stream *, - struct keyword *, struct diffinfo *); + struct keyword *, struct diffinfo *, int); +int diff_reverse(struct stream *, struct stream *, + struct stream *, struct keyword *, struct diffinfo *); #endif /* !_DIFF_H_ */ Modified: head/contrib/csup/fattr.c ============================================================================== --- head/contrib/csup/fattr.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/fattr.c Mon Jan 5 15:18:16 2009 (r186781) @@ -44,7 +44,7 @@ /* * Include the appropriate definition for the file attributes we support. * There are two different files: fattr_bsd.h for BSD-like systems that - * support the extended file flags à la chflags() and fattr_posix.h for + * support the extended file flags a la chflags() and fattr_posix.h for * bare POSIX systems that don't. */ #ifdef HAVE_FFLAGS @@ -449,7 +449,7 @@ fattr_encode(const struct fattr *fa, fat piece++; } if (mask & FA_DEV) { - vallen = snprintf(piece->val, sizeof(piece->val), "%lld", + vallen = snprintf(piece->val, sizeof(piece->val), "%llx", (long long)fa->dev); len += snprintf(piece->len, sizeof(piece->len), "%lld", (long long)vallen) + vallen + 1; @@ -534,6 +534,13 @@ fattr_getlinkcount(const struct fattr *f return (fa->linkcount); } +char * +fattr_getlinktarget(const struct fattr *fa) +{ + + return (fa->linktarget); +} + /* * Eat the specified attribute and put it in the file attribute * structure. Returns NULL on error, or a pointer to the next @@ -732,18 +739,28 @@ fattr_makenode(const struct fattr *fa, c mode_t modemask, mode; int error; + error = 0; + if (fa->mask & FA_OWNER && fa->mask & FA_GROUP) modemask = FA_SETIDMASK | FA_PERMMASK; else modemask = FA_PERMMASK; /* We only implement fattr_makenode() for dirs for now. */ - assert(fa->type == FT_DIRECTORY); if (fa->mask & FA_MODE) mode = fa->mode & modemask; else mode = 0700; - error = mkdir(path, mode); + + if (fa->type == FT_DIRECTORY) + error = mkdir(path, mode); + else if (fa->type == FT_SYMLINK) { + error = symlink(fa->linktarget, path); + } else if (fa->type == FT_CDEV) { + lprintf(-1, "Character devices not supported!\n"); + } else if (fa->type == FT_BDEV) { + lprintf(-1, "Block devices not supported!\n"); + } return (error); } @@ -823,6 +840,19 @@ fattr_install(struct fattr *fa, const ch } #endif + /* + * If it is changed from a file to a symlink, remove the file + * and create the symlink. + */ + if (inplace && (fa->type == FT_SYMLINK) && + (old->type == FT_FILE)) { + error = unlink(topath); + if (error) + goto bad; + error = symlink(fa->linktarget, topath); + if (error) + goto bad; + } /* Determine whether we need to remove the target first. */ if (!inplace && (fa->type == FT_DIRECTORY) != (old->type == FT_DIRECTORY)) { @@ -853,8 +883,9 @@ fattr_install(struct fattr *fa, const ch if (mask & FA_GROUP) gid = fa->gid; error = chown(frompath, uid, gid); - if (error) + if (error) { goto bad; + } } if (mask & FA_MODE) { newmode = fa->mode & modemask; @@ -901,6 +932,9 @@ fattr_equal(const struct fattr *fa1, con mask = fa1->mask & fa2->mask; if (fa1->type == FT_UNKNOWN || fa2->type == FT_UNKNOWN) return (0); + if (mask & FA_FILETYPE) + if (fa1->type != fa2->type) + return (0); if (mask & FA_MODTIME) if (fa1->modtime != fa2->modtime) return (0); @@ -936,3 +970,12 @@ fattr_equal(const struct fattr *fa1, con return (0); return (1); } + +/* + * Must have to get the correct filesize sendt by the server. + */ +off_t +fattr_filesize(const struct fattr *fa) +{ + return (fa->size); +} Modified: head/contrib/csup/fattr.h ============================================================================== --- head/contrib/csup/fattr.h Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/fattr.h Mon Jan 5 15:18:16 2009 (r186781) @@ -101,6 +101,7 @@ int fattr_type(const struct fattr *); void fattr_maskout(struct fattr *, int); int fattr_getmask(const struct fattr *); nlink_t fattr_getlinkcount(const struct fattr *); +char *fattr_getlinktarget(const struct fattr *); void fattr_umask(struct fattr *, mode_t); void fattr_merge(struct fattr *, const struct fattr *); void fattr_mergedefault(struct fattr *); @@ -111,5 +112,7 @@ int fattr_install(struct fattr *, cons int fattr_equal(const struct fattr *, const struct fattr *); void fattr_free(struct fattr *); int fattr_supported(int); +off_t fattr_filesize(const struct fattr *); + #endif /* !_FATTR_H_ */ Modified: head/contrib/csup/keyword.c ============================================================================== --- head/contrib/csup/keyword.c Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/keyword.c Mon Jan 5 15:18:16 2009 (r186781) @@ -152,6 +152,29 @@ keyword_decode_expand(const char *expand return (-1); } +const char * +keyword_encode_expand(int expand) +{ + + switch (expand) { + case EXPAND_DEFAULT: + return ("."); + case EXPAND_KEYVALUE: + return ("kv"); + case EXPAND_KEYVALUELOCKER: + return ("kvl"); + case EXPAND_KEY: + return ("k"); + case EXPAND_OLD: + return ("o"); + case EXPAND_BINARY: + return ("b"); + case EXPAND_VALUE: + return ("v"); + } + return (NULL); +} + void keyword_free(struct keyword *keyword) { Modified: head/contrib/csup/keyword.h ============================================================================== --- head/contrib/csup/keyword.h Mon Jan 5 15:02:05 2009 (r186780) +++ head/contrib/csup/keyword.h Mon Jan 5 15:18:16 2009 (r186781) @@ -42,6 +42,7 @@ struct keyword; struct keyword *keyword_new(void); int keyword_decode_expand(const char *); +const char *keyword_encode_expand(int); int keyword_alias(struct keyword *, const char *, const char *); int keyword_enable(struct keyword *, const char *); int keyword_disable(struct keyword *, const char *); Copied: head/contrib/csup/lex.rcs.c (from r186779, projects/csup_cvsmode/contrib/csup/lex.rcs.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/csup/lex.rcs.c Mon Jan 5 15:18:16 2009 (r186781, copy of r186779, projects/csup_cvsmode/contrib/csup/lex.rcs.c) @@ -0,0 +1,2094 @@ + +#line 3 "lex.rcs.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 15:38:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C410B1065670; Mon, 5 Jan 2009 15:38:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0E758FC1A; Mon, 5 Jan 2009 15:38:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Fcjso000461; Mon, 5 Jan 2009 15:38:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05FcjU8000460; Mon, 5 Jan 2009 15:38:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200901051538.n05FcjU8000460@svn.freebsd.org> From: Hiroki Sato Date: Mon, 5 Jan 2009 15:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186782 - stable/7/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 15:38:47 -0000 Author: hrs Date: Mon Jan 5 15:38:45 2009 New Revision: 186782 URL: http://svn.freebsd.org/changeset/base/186782 Log: Add more missing bits: procstat(1). Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 15:18:16 2009 (r186781) +++ stable/7/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jan 5 15:38:45 2009 (r186782) @@ -200,6 +200,13 @@ em0@pci0:0:25:0: class=0x020000 card=0x0 Late-Breaking News and Corrections + [20090105] The Release Notes for 7.1-RELEASE should have + mentioned that the &man.procstat.1; utility has been added. + This is a process inspection utility which provides both some of + the missing functionality from &man.procfs.5; and new + functionality for monitoring and debugging specific + processes. + [20090105] The Release Notes for 7.1-RELEASE should have mentioned changes that the &man.ae.4; driver has been added to provide support for the Attansic/Atheros L2 FastEthernet controllers. From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 16:00:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12600106567E; Mon, 5 Jan 2009 16:00:30 +0000 (UTC) (envelope-from lulf@freebsd.org) Received: from bene1.itea.ntnu.no (bene1.itea.ntnu.no [IPv6:2001:700:300:3::56]) by mx1.freebsd.org (Postfix) with ESMTP id 571738FC21; Mon, 5 Jan 2009 16:00:29 +0000 (UTC) (envelope-from lulf@freebsd.org) Received: from localhost (localhost [127.0.0.1]) by bene1.itea.ntnu.no (Postfix) with ESMTP id A3BAE2401E; Mon, 5 Jan 2009 17:00:27 +0100 (CET) Received: from carrot (unknown [IPv6:2001:700:300:3::184]) by bene1.itea.ntnu.no (Postfix) with ESMTP id 2F91E2401C; Mon, 5 Jan 2009 17:00:27 +0100 (CET) Date: Mon, 5 Jan 2009 17:00:25 +0100 From: Ulf Lilleengen To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20090105160025.GA22123@carrot.lan> References: <200901051518.n05FIGli099929@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901051518.n05FIGli099929@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Debian amavisd-new at bene1.itea.ntnu.no Cc: naddy@freebsd.org, kris@freebsd.org Subject: Re: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:00:31 -0000 On Mon, Jan 05, 2009 at 03:18:16PM +0000, Ulf Lilleengen wrote: > Author: lulf > Date: Mon Jan 5 15:18:16 2009 > New Revision: 186781 > URL: http://svn.freebsd.org/changeset/base/186781 > > Log: > Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now > fetch a complete CVS repository. Support for rsync update of regular files are > also included, but are not yet enabled. The change should not have an impact on > existing csup usage, as little of the existing code has changed. > A big thanks to naddy@ and kris@ for help with testing and reproducing problems. -- Ulf Lilleengen From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 16:05:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68C591065672; Mon, 5 Jan 2009 16:05:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 22BF68FC1B; Mon, 5 Jan 2009 16:05:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n05G4X3o014020; Mon, 5 Jan 2009 09:04:33 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 05 Jan 2009 09:04:49 -0700 (MST) Message-Id: <20090105.090449.-1253035084.imp@bsdimp.com> To: alfred@freebsd.org From: "M. Warner Losh" In-Reply-To: <20090105050415.GY60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090104.101121.2139791946.imp@bsdimp.com> <20090105050415.GY60686@elvis.mu.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:05:26 -0000 In message: <20090105050415.GY60686@elvis.mu.org> Alfred Perlstein writes: : * M. Warner Losh [090104 09:11] wrote: : > In message: <200901040012.n040C2gH040928@svn.freebsd.org> : > Alfred Perlstein writes: : > : Sync with usb4bsd: : > : > Alfred, : > : > thanks for trudging these fixes into the tree. It is a thankless job : > that people will complain about... : > : > Speaking of complaining, is there a review process that can be joined : > for them that's more formal than "diff against hps' p4 tree and : > complain?" : : We're trying to figure out a way to do this. We haven't had much : luck exploring svk/hg/git as they're just about as much work as : shipping patches back and forth. : : I asked core for a restricted "users/hps" area under svn for Hans : to put code, but that was denied, perhaps now it's time to reconsider : that? And also: > In my part of the world we give credit or, at the very least, say "thank > you" to the sender, when we apply patches sent to us. One of the things that works well in Linux is the patch queues that they have. You submit a patch, people talk about it, and various tags get added to it. They break things down into a series of mostly independent patches. Maybe we should try to initiate something like this so that we can comment on changes more easily, as well as track submitters and the like as things pass through Hans. Consider it an experiment to see if we can do things to help improve our world? Warner From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 16:25:36 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6842810656C3; Mon, 5 Jan 2009 16:25:36 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5549F8FC17; Mon, 5 Jan 2009 16:25:36 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05GPaFL001364; Mon, 5 Jan 2009 16:25:36 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05GPakZ001363; Mon, 5 Jan 2009 16:25:36 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901051625.n05GPakZ001363@svn.freebsd.org> From: Giorgos Keramidas Date: Mon, 5 Jan 2009 16:25:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186783 - head/share/man/man7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:25:38 -0000 Author: keramida (doc committer) Date: Mon Jan 5 16:25:36 2009 New Revision: 186783 URL: http://svn.freebsd.org/changeset/base/186783 Log: Document the NO_XXX options supported by our Makefile.inc1. Noticed by: simon Reviewed by: imp MFC after: 1 week Modified: head/share/man/man7/build.7 Modified: head/share/man/man7/build.7 ============================================================================== --- head/share/man/man7/build.7 Mon Jan 5 15:38:45 2009 (r186782) +++ head/share/man/man7/build.7 Mon Jan 5 16:25:36 2009 (r186783) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2006 +.Dd January 5, 2009 .Dt BUILD 7 .Os .Sh NAME @@ -373,6 +373,69 @@ value for that platform. .El .Pp Builds under directory +.Pa /usr/src +are also influenced by defining one or more the following symbols, +using the +.Fl D +option of +.Xr make 1 : +.Bl -tag -width ".Va -DNO_KERNELDEPEND" +.It Va NO_CLEANDIR +If set, the build targets that clean parts of the object tree use the +equivalent of +.Dq make clean +instead of +.Dq make cleandir . +.It Va NO_CLEAN +If set, no object tree files are cleaned at all. +Setting +.Va NO_CLEAN +implies +.Va NO_KERNELCLEAN , +so when +.Va NO_CLEAN +is set no kernel objects are cleaned either. +.It Va NO_CTF +If set, the build process does not run the DTrace CTF conversion tools +on built objects. +.It Va NO_SHARE +If set, the build does not descend into the +.Pa /usr/src/share +subdirectory (i.e. manpages, locale data files, timezone data files and +other +.Pa /usr/src/share +files will not be rebuild from their sources). +.It Va NO_KERNELCLEAN +If set, the build process does not run +.Dq make clean +as part of the +.Cm buildkernel +target. +.It Va NO_KERNELCONFIG +If set, the build process does not run +.Xr config 8 +as part of the +.Cm buildkernel +target. +.It Va NO_KERNELDEPEND +If set, the build process does not run +.Dq make depend +as part of the +.Cm buildkernel +target. +.It Va NO_DOCUPDATE +If set, the update process does not update the source of the +.Fx +documentation as part of the +.Dq make update +target. +.It Va NO_PORTSUPDATE +If set, the update process does not update the Ports tree as part of the +.Dq make update +target. +.El +.Pp +Builds under directory .Pa /usr/doc are influenced by the following .Xr make 1 From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 16:47:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D575F10656F4; Mon, 5 Jan 2009 16:47:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3B258FC1C; Mon, 5 Jan 2009 16:47:42 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Glg0P001762; Mon, 5 Jan 2009 16:47:42 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Glgf5001761; Mon, 5 Jan 2009 16:47:42 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901051647.n05Glgf5001761@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 5 Jan 2009 16:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186784 - head/usr.sbin/burncd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:47:43 -0000 Author: obrien Date: Mon Jan 5 16:47:42 2009 New Revision: 186784 URL: http://svn.freebsd.org/changeset/base/186784 Log: Correct the type for the global var accessed in sig handlers. Modified: head/usr.sbin/burncd/burncd.c Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Mon Jan 5 16:25:36 2009 (r186783) +++ head/usr.sbin/burncd/burncd.c Mon Jan 5 16:47:42 2009 (r186784) @@ -59,7 +59,7 @@ struct track_info { }; static struct track_info tracks[100]; static int quiet, verbose, saved_block_size, notracks; -static volatile int global_fd_for_cleanup; +static volatile sig_atomic_t global_fd_for_cleanup; void add_track(char *, int, int, int); void do_DAO(int fd, int, int); From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 16:48:33 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57D6B1065691; Mon, 5 Jan 2009 16:48:33 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 18C048FC14; Mon, 5 Jan 2009 16:48:32 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n05GmWko050519; Mon, 5 Jan 2009 08:48:32 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n05GmWu2050518; Mon, 5 Jan 2009 08:48:32 -0800 (PST) (envelope-from obrien) Date: Mon, 5 Jan 2009 08:48:32 -0800 From: "David O'Brien" To: Kris Kennaway Message-ID: <20090105164832.GF46222@dragon.NUXI.org> References: <200812192020.mBJKKEIo081792@svn.freebsd.org> <20081223182314.GC25145@dragon.NUXI.org> <49611F6B.10802@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49611F6B.10802@FreeBSD.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: "Carlos A. M. dos Santos" , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186337 - head/usr.sbin/burncd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:48:33 -0000 On Sun, Jan 04, 2009 at 08:43:23PM +0000, Kris Kennaway wrote: > David O'Brien wrote: >> On Sun, Dec 21, 2008 at 10:15:21AM -0200, Carlos A. M. dos Santos wrote: >>> On Fri, Dec 19, 2008 at 6:20 PM, David E. O'Brien >>> wrote: >>>> Author: obrien >>>> Date: Fri Dec 19 20:20:14 2008 >>>> New Revision: 186337 >>>> URL: http://svn.freebsd.org/changeset/base/186337 >>>> >>>> Log: >>>> burncd(8) doesn't handle signals and interrupting burncd during >>>> operation. >>>> For example, ^C (SIGINT) may leave the drive spinning and locked. >>>> This may also happen if you try to write a too-large image to a disc >>>> and burncd(8) exits with an I/O error. >>>> >>>> Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave >>>> burner in a sane state when burning is interrupted with SIGHUP, SIGINT, >>>> SIGTERM, or in case an I/O error occurs during write. >>>> Note, that blanking will still continue after interrupt but it seems to >>>> finish correctly even after burncd(8) has quit. >>>> >>>> Also, while I'm here bump WARNS to "6". >>>> >>>> PR: 48730 >>>> Submitted by: Jaakko Heinonen >>> While you are here, would you mind taking a look at bin/123693, either >>> committing the proposed patch or closing the PR if my proposition is >>> not acceptable? >> Yep, I already have that patch to look at. Note it was hell getting the >> patch - its best to not attach it when it will be base64 encoded - we >> have no easy way of extracting such encoded attachements. >> > > AFAIK, the web PR interface will detect base64-encoded attachments and > present them for download. Everytime I tried, I wound up with a binary file being downloaded. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 16:54:35 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE5D510656C0; Mon, 5 Jan 2009 16:54:35 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-2.dlr.de (smtp-3.dlr.de [195.37.61.187]) by mx1.freebsd.org (Postfix) with ESMTP id 3DAFB8FC19; Mon, 5 Jan 2009 16:54:35 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from exbe05.intra.dlr.de ([192.168.35.38]) by smtp-2.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Mon, 5 Jan 2009 17:41:17 +0100 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: Mon, 5 Jan 2009 17:40:33 +0100 Message-ID: In-Reply-To: <20090105142929.GA70683@onelab2.iet.unipi.it> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: svn commit: r186502 - head/usr.bin/make Thread-Index: AclvQV7Nb+xtC05nTU6BlMQwnrhOLgAEeCew References: <200812262231.mBQMVjHC052150@svn.freebsd.org> <867i59lvbj.fsf@ds4.des.no> <20090105142929.GA70683@onelab2.iet.unipi.it> From: To: , X-OriginalArrivalTime: 05 Jan 2009 16:41:17.0906 (UTC) FILETIME=[6E873320:01C96F54] Cc: svn-src-head@FreeBSD.org, luigi@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: RE: svn commit: r186502 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 16:54:36 -0000 > -----Original Message----- > From: owner-src-committers@FreeBSD.org=20 > [mailto:owner-src-committers@FreeBSD.org] On Behalf Of Luigi Rizzo > Sent: Monday, January 05, 2009 3:29 PM > To: Dag-Erling Sm??rgrav > Cc: Luigi Rizzo; src-committers@FreeBSD.org;=20 > svn-src-all@FreeBSD.org; svn-src-head@FreeBSD.org > Subject: Re: svn commit: r186502 - head/usr.bin/make >=20 > On Mon, Jan 05, 2009 at 02:46:24PM +0100, Dag-Erling Sm??rgrav wrote: > > Luigi Rizzo writes: > > > Log: > > > Clarify the behaviour of conditionals when dealing with=20 > comparisons. > > > In particular, point out that string comparison can=20 > only use !=3D and =3D=3D > > > (how weird, given that the underlying call to strcmp=20 > returns more > > > information), that floating point values are correctly=20 > interpreted > > > as numbers, and that the left-hand side must be a=20 > variable expansion. > >=20 > > Any chance of fixing items 1 and 3? >=20 > item 1 is easy except perhaps for Locale issues which however=20 > should not > be a big deal in this context. > item 3 should also be easy. >=20 > But the thing i wonder about is whether there is any standard that > mandates this beviour, or we are relatively free to make enhancements > to our "make" program. >From the Posix standpoint of view, we can do what we want as long as we are not syntax compatible with posix-make :-) This is the reason, why most of our make extensions are compatible with posix. As soon as you have a construct that is a syntax error according to the Posix specification you invoke implementation-defined behaviour and as such you just have to document it. There are several of these escape mechanisms in the standard: the .POSIX pseudo-target and all targets that start with a dot and consist of uppercase letters. With regard to conditionals: there is no standard. Posix decided to standard only minimal make, which is roughly compatible to V7 make. If you change things like conditional semantics you should: (1) document it, and (2) arrange a full ports build with the portcluster people. This takes some days, but is a good thing to do. harti From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 17:12:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05E4D1065696; Mon, 5 Jan 2009 17:12:04 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id CA7D98FC29; Mon, 5 Jan 2009 17:12:03 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n05HC22w046870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 09:12:02 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49623F62.6000206@freebsd.org> Date: Mon, 05 Jan 2009 09:12:02 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901042059.n04KxNhW074100@svn.freebsd.org> In-Reply-To: <200901042059.n04KxNhW074100@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186749 - head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:12:04 -0000 Doug Barton wrote: > Author: dougb > Date: Sun Jan 4 20:59:23 2009 > New Revision: 186749 > URL: http://svn.freebsd.org/changeset/base/186749 > > Log: > Instead of using obj and all targets which are not cross-build aware, > use _obj and everything which are. > > Submitted by: ru > > Modified: > head/usr.sbin/mergemaster/mergemaster.sh > > Modified: head/usr.sbin/mergemaster/mergemaster.sh > ============================================================================== > --- head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 19:23:44 2009 (r186748) > +++ head/usr.sbin/mergemaster/mergemaster.sh Sun Jan 4 20:59:23 2009 (r186749) > @@ -592,10 +592,11 @@ case "${RERUN}" in > ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs > ;; > esac > + od=${TEMPROOT}/usr/obj > ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && > - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} obj SUBDIR_OVERRIDE=etc && > - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} all SUBDIR_OVERRIDE=etc && > - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || > + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && > + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && > + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || > { echo ''; > echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; > echo " the temproot environment"; > > > This fixes my cross-install setup; thank you. Sam From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 17:15:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0714106564A; Mon, 5 Jan 2009 17:15:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id C10E88FC1D; Mon, 5 Jan 2009 17:15:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n05HFOEw051239; Mon, 5 Jan 2009 09:15:24 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n05HFOiN051238; Mon, 5 Jan 2009 09:15:24 -0800 (PST) (envelope-from obrien) Date: Mon, 5 Jan 2009 09:15:24 -0800 From: "David O'Brien" To: Ed Schouten Message-ID: <20090105171523.GC50568@dragon.NUXI.org> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104121331.GC14235@hoeg.nl> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:15:53 -0000 On Sun, Jan 04, 2009 at 01:13:31PM +0100, Ed Schouten wrote: > * Kostik Belousov wrote: > > IMHO, it would be much easier to try and use the new code if the > > TEKEN_XXX defines would be implemented as both sysctl and kernel > > tunables. > > Yes. Eventually we should add tunables, but first I want to get it > working correctly. Unfortunately there is a big amount of complexity > when switching to xterm. Why xterm and not vt100? -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 17:22:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D558110656F0; Mon, 5 Jan 2009 17:22:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 1E7968FC52; Mon, 5 Jan 2009 17:22:44 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 18AD01CCFB; Mon, 5 Jan 2009 18:22:43 +0100 (CET) Date: Mon, 5 Jan 2009 18:22:43 +0100 From: Ed Schouten To: David O'Brien Message-ID: <20090105172243.GO14235@hoeg.nl> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Zz8eIV9MTSc31S3o" Content-Disposition: inline In-Reply-To: <20090105171523.GC50568@dragon.NUXI.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:23:05 -0000 --Zz8eIV9MTSc31S3o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello David, * David O'Brien wrote: > Why xterm and not vt100? The reason I'm proposing xterm, is because it is the best supported terminal type out there. Example: if we would use TERM=3Dvt100, we would only get black & white. If we use TERM=3Dvt100-color, we do get the colors, but unfortunately we won't be compatible with other operating systems. Solaris, for example, has no termtype called vt100-color. This means the user has to change TERM by hand. TERM=3Dxterm has proven to be very portable across different operating systems and there are a lot of other pieces of software that try to mimic it. At least the Terminal application in OS X, GNOME's gnome-terminal, maybe KDE's Konsole as well. I hope that answers your question? --=20 Ed Schouten WWW: http://80386.nl/ --Zz8eIV9MTSc31S3o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkliQeMACgkQ52SDGA2eCwVogwCfURlPVXsPi3NwQx7frR81QLQ3 WNkAn3/5v6FfmNLpvv89KWBYCEgcz1Ej =9dbw -----END PGP SIGNATURE----- --Zz8eIV9MTSc31S3o-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 17:30:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F052A1065672; Mon, 5 Jan 2009 17:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id A1CB98FC17; Mon, 5 Jan 2009 17:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 0184141C67B; Mon, 5 Jan 2009 18:30:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id Jvbyf+LnqPTE; Mon, 5 Jan 2009 18:30:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 60D7441C677; Mon, 5 Jan 2009 18:30:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5C2814448DD; Mon, 5 Jan 2009 17:26:09 +0000 (UTC) Date: Mon, 5 Jan 2009 17:26:09 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Robert Watson In-Reply-To: Message-ID: <20090105172400.T45399@maildrop.int.zabbadoz.net> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:30:09 -0000 On Sun, 4 Jan 2009, Robert Watson wrote: > > On Sun, 4 Jan 2009, Ed Schouten wrote: > >> * Robert Watson wrote: >>> Unlike with struct protosw, several instances of struct ip6protosw >>> did not use C99-style sparse structure initialization, so remove >>> NULL assignments for now-removed pr_usrreq function pointers. >> >> Maybe we should convert them to use the C99-style initialisation. This >> could prevent similar issues in the future, right? > > I think Bjoern already has a work-in-progress on this one, but yes, that > would be a good idea. I have broken it out from a larger patch; the C99 initializer is here: http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff I case someone can give it a quick glance I'll commit them. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 17:38:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8D60106564A; Mon, 5 Jan 2009 17:38:03 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B76808FC0C; Mon, 5 Jan 2009 17:38:03 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Hc35O005456; Mon, 5 Jan 2009 17:38:03 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Hc383005455; Mon, 5 Jan 2009 17:38:03 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901051738.n05Hc383005455@svn.freebsd.org> From: Maxim Konovalov Date: Mon, 5 Jan 2009 17:38:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186785 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:38:04 -0000 Author: maxim Date: Mon Jan 5 17:38:03 2009 New Revision: 186785 URL: http://svn.freebsd.org/changeset/base/186785 Log: o FreeBSD 7.1 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Mon Jan 5 16:47:42 2009 (r186784) +++ head/share/misc/bsd-family-tree Mon Jan 5 17:38:03 2009 (r186785) @@ -221,9 +221,13 @@ FreeBSD 5.2 | | *--FreeBSD | | | | DragonFly 1.12.0 | 7.0 | | | | | | | | | | OpenBSD 4.3 | - | V | | | | DragonFly 2.0.0 - | FreeBSD | | OpenBSD 4.4 | - | 6.4 | | | | + | | | | | | DragonFly 2.0.0 + | | FreeBSD | | OpenBSD 4.4 | + | | 6.4 | | | | + | | | | | | + | FreeBSD 7.1 | | | | + | | | | | | + | V | | | | | | | | | FreeBSD 8 -current | NetBSD -current OpenBSD -current | | | | | | @@ -490,6 +494,7 @@ OpenBSD 4.3 2008-05-01 [OBD] DragonFly 2.0.0 2008-07-21 [DFB] OpenBSD 4.4 2008-11-01 [OBD] FreeBSD 6.4 2008-11-28 [FBD] +FreeBSD 7.1 2009-01-04 [FBD] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 17:47:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0C51065680; Mon, 5 Jan 2009 17:47:03 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id C93968FC23; Mon, 5 Jan 2009 17:47:02 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by bwz12 with SMTP id 12so20266022bwz.19 for ; Mon, 05 Jan 2009 09:47:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=VC5BIrvhk0Yw3wFkETLU09R23AHuzW6hieXyik1tcd0=; b=RPzwXZfsHC9ehU2azEwSoOM5Qolqfn5yC4EJBVqgMc3WOQpJBJ56RdN3Y7HxG5HQoL gxSNhwfHwKNjp+ouu//HHvyEwOu5XYCq2s83YdiXxH7Bsn7ilDdSUiIAcXVkHU5jBJjD LfgmLtUBSPMake+n0uDeq1Kw9dFIMqY25ankM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=HFgwSGkXDMn6bMmSVD7tcJxLjYrAIaPQhOeCfU1iZ7t5hMeQ/XBqJafc8uVBT5znbS k+7dmKyZxstAUFOaDzqHl5eCuqpsEHpasV6nVdCdj4snOAJqpNROFn7PpMDJYZCBM5wp aRhTC/fP5yMdb/afOe9JiR1e2gfGxJCxrhMQ4= Received: by 10.181.48.13 with SMTP id a13mr8163169bkk.43.1231177603128; Mon, 05 Jan 2009 09:46:43 -0800 (PST) Received: by 10.180.208.17 with HTTP; Mon, 5 Jan 2009 09:46:42 -0800 (PST) Message-ID: <9bbcef730901050946q64b59c9bvc0a5b587b2e7bb11@mail.gmail.com> Date: Mon, 5 Jan 2009 18:46:42 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Ed Schouten" In-Reply-To: <20090105172243.GO14235@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> X-Google-Sender-Auth: 9864927f289ca220 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 17:47:05 -0000 2009/1/5 Ed Schouten : > Hello David, > > * David O'Brien wrote: >> Why xterm and not vt100? > > The reason I'm proposing xterm, is because it is the best supported > terminal type out there. Example: if we would use TERM=vt100, we would > only get black & white. If we use TERM=vt100-color, we do get the > colors, but unfortunately we won't be compatible with other operating > systems. Solaris, for example, has no termtype called vt100-color. This > means the user has to change TERM by hand. > > TERM=xterm has proven to be very portable across different operating > systems and there are a lot of other pieces of software that try to > mimic it. At least the Terminal application in OS X, GNOME's > gnome-terminal, maybe KDE's Konsole as well. > > I hope that answers your question? Also, isn't xterm better suited for UTF-8? From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 18:08:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B14106568A; Mon, 5 Jan 2009 18:08:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 32DBF8FC21; Mon, 5 Jan 2009 18:08:40 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 597801CCFB; Mon, 5 Jan 2009 19:08:39 +0100 (CET) Date: Mon, 5 Jan 2009 19:08:39 +0100 From: Ed Schouten To: "Bjoern A. Zeeb" Message-ID: <20090105180839.GP14235@hoeg.nl> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lz5aeKxNMHO5Q25g" Content-Disposition: inline In-Reply-To: <20090105172400.T45399@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 18:08:41 -0000 --lz5aeKxNMHO5Q25g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bjoern A. Zeeb wrote: > I have broken it out from a larger patch; the C99 initializer is here: > http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff > > I case someone can give it a quick glance I'll commit them. Looks good, but I'm not a sys/net* guru. ;-) --=20 Ed Schouten WWW: http://80386.nl/ --lz5aeKxNMHO5Q25g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkliTKcACgkQ52SDGA2eCwWYegCeO7RL1+g6C0m/j//NTRkm1PH8 PMIAn325WzBE6HmJYPa3+fDs3Rm0hOJY =IJAh -----END PGP SIGNATURE----- --lz5aeKxNMHO5Q25g-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 18:13:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86F571065676 for ; Mon, 5 Jan 2009 18:13:18 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id C69E18FC2B for ; Mon, 5 Jan 2009 18:13:17 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jan 2009 18:13:15 -0000 Received: from p54A3E58D.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.141] by mail.gmx.net (mp015) with SMTP; 05 Jan 2009 19:13:15 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/pGslCFnHpLtQ9jeRaXkUo6dtKkVLe9istaJGuzh RrWpqjvwtk66P6 Message-ID: <49624DB9.8080900@gmx.de> Date: Mon, 05 Jan 2009 19:13:13 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> In-Reply-To: <20090105172400.T45399@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Cc: svn-src-head@freebsd.org, Ed Schouten , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 18:13:18 -0000 Bjoern A. Zeeb schrieb: > I have broken it out from a larger patch; the C99 initializer is here: > http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff > > I case someone can give it a quick glance I'll commit them. + .pr_flags = PR_ATOMIC|PR_ADDR, style(9) wants spaces around binary operators. The designator initializers seem to be correct. Christoph From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 18:16:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25A5106566B; Mon, 5 Jan 2009 18:16:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id A25998FC08; Mon, 5 Jan 2009 18:16:45 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 10C9E1CCFB; Mon, 5 Jan 2009 19:16:45 +0100 (CET) Date: Mon, 5 Jan 2009 19:16:45 +0100 From: Ed Schouten To: Ivan Voras Message-ID: <20090105181645.GQ14235@hoeg.nl> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> <9bbcef730901050946q64b59c9bvc0a5b587b2e7bb11@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wiP8eU6Yj5r7oh2+" Content-Disposition: inline In-Reply-To: <9bbcef730901050946q64b59c9bvc0a5b587b2e7bb11@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 18:16:47 -0000 --wiP8eU6Yj5r7oh2+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Ivan Voras wrote: > Also, isn't xterm better suited for UTF-8? Yes. I have yet to confirm this, but I suspect things may go wrong when you run a non-UTF-8 aware application that performs box drawing inside a UTF-8 aware cons25 emulator. With cons25, the box drawing characters are above 0x7f, which is obviously not compatible with UTF-8. With xterm you can use the UTF-8 codepoints or switch to the special character map with the box drawing characters. When your application doesn't use UTF-8, it should only generate bytes below 0x80. --=20 Ed Schouten WWW: http://80386.nl/ --wiP8eU6Yj5r7oh2+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkliTo0ACgkQ52SDGA2eCwVUtACaA9UB5JfeYeslBRk/HhnGqasN scQAn16uNE42tvc9roT5KSeyT6qiaGG0 =cNfl -----END PGP SIGNATURE----- --wiP8eU6Yj5r7oh2+-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 19:39:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37928106566B; Mon, 5 Jan 2009 19:39:43 +0000 (UTC) (envelope-from prvs=julian=24935958a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 160408FC0C; Mon, 5 Jan 2009 19:39:42 +0000 (UTC) (envelope-from prvs=julian=24935958a@elischer.org) Received: from jelischer-laptop.sfo.ironport.com (HELO julian-mac.elischer.org) ([10.251.22.38]) by smtp-outbound.ironport.com with ESMTP; 05 Jan 2009 11:09:38 -0800 Message-ID: <49625AF6.5040407@elischer.org> Date: Mon, 05 Jan 2009 11:09:42 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Ed Schouten References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <20090105180839.GP14235@hoeg.nl> In-Reply-To: <20090105180839.GP14235@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Robert Watson , src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:39:43 -0000 Ed Schouten wrote: > * Bjoern A. Zeeb wrote: >> I have broken it out from a larger patch; the C99 initializer is here: >> http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff >> >> I case someone can give it a quick glance I'll commit them. > > Looks good, but I'm not a sys/net* guru. ;-) > looks fine.. From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 19:40:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 924201065673; Mon, 5 Jan 2009 19:40:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854AE8FC1F; Mon, 5 Jan 2009 19:40:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Je9m7008937; Mon, 5 Jan 2009 19:40:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Je9pD008934; Mon, 5 Jan 2009 19:40:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901051940.n05Je9pD008934@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 19: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: r186786 - stable/7/sys/dev/mmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:40:11 -0000 Author: mav Date: Mon Jan 5 19:40:09 2009 New Revision: 186786 URL: http://svn.freebsd.org/changeset/base/186786 Log: Sync MMC/SD subsystem with HEAD. Add support for MMC and SDHC cards, high speed timing, wide bus, multiblock transfers and many other features. Modified: stable/7/sys/dev/mmc/bridge.h stable/7/sys/dev/mmc/mmc.c stable/7/sys/dev/mmc/mmcbrvar.h stable/7/sys/dev/mmc/mmcreg.h stable/7/sys/dev/mmc/mmcsd.c stable/7/sys/dev/mmc/mmcvar.h Modified: stable/7/sys/dev/mmc/bridge.h ============================================================================== --- stable/7/sys/dev/mmc/bridge.h Mon Jan 5 17:38:03 2009 (r186785) +++ stable/7/sys/dev/mmc/bridge.h Mon Jan 5 19:40:09 2009 (r186786) @@ -104,6 +104,10 @@ enum mmc_bus_width { bus_width_1 = 0, bus_width_4 = 2, bus_width_8 = 3 }; +enum mmc_bus_timing { + bus_timing_normal = 0, bus_timing_hs +}; + struct mmc_ios { uint32_t clock; /* Speed of the clock in Hz to move data */ enum mmc_vdd vdd; /* Voltage to apply to the power pins/ */ @@ -111,6 +115,7 @@ struct mmc_ios { enum mmc_chip_select chip_select; enum mmc_bus_width bus_width; enum mmc_power_mode power_mode; + enum mmc_bus_timing timing; }; enum mmc_card_mode { @@ -125,6 +130,7 @@ struct mmc_host { uint32_t caps; #define MMC_CAP_4_BIT_DATA (1 << 0) /* Can do 4-bit data transfers */ #define MMC_CAP_8_BIT_DATA (1 << 1) /* Can do 8-bit data transfers */ +#define MMC_CAP_HSPEED (1 << 2) /* Can do High Speed transfers */ enum mmc_card_mode mode; struct mmc_ios ios; /* Current state of the host */ }; Modified: stable/7/sys/dev/mmc/mmc.c ============================================================================== --- stable/7/sys/dev/mmc/mmc.c Mon Jan 5 17:38:03 2009 (r186785) +++ stable/7/sys/dev/mmc/mmc.c Mon Jan 5 19:40:09 2009 (r186786) @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -82,10 +83,23 @@ struct mmc_softc { struct mmc_ivars { uint32_t raw_cid[4]; /* Raw bits of the CID */ uint32_t raw_csd[4]; /* Raw bits of the CSD */ + uint32_t raw_scr[2]; /* Raw bits of the SCR */ + uint8_t raw_ext_csd[512]; /* Raw bits of the EXT_CSD */ + uint32_t raw_sd_status[16]; /* Raw bits of the SD_STATUS */ uint16_t rca; enum mmc_card_mode mode; struct mmc_cid cid; /* cid decoded */ struct mmc_csd csd; /* csd decoded */ + struct mmc_scr scr; /* scr decoded */ + struct mmc_sd_status sd_status; /* SD_STATUS decoded */ + u_char read_only; /* True when the device is read-only */ + u_char bus_width; /* Bus width to use */ + u_char timing; /* Bus timing support */ + u_char high_cap; /* High Capacity card (block addressed) */ + uint32_t sec_count; /* Card capacity in 512byte blocks */ + uint32_t tran_speed; /* Max speed in normal mode */ + uint32_t hs_tran_speed; /* Max speed in high speed mode */ + uint32_t erase_sector; /* Card native erase sector size */ }; #define CMD_RETRIES 3 @@ -94,21 +108,32 @@ struct mmc_ivars { static int mmc_probe(device_t dev); static int mmc_attach(device_t dev); static int mmc_detach(device_t dev); +static int mmc_suspend(device_t dev); +static int mmc_resume(device_t dev); #define MMC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define MMC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) -#define MMC_LOCK_INIT(_sc) \ - mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ +#define MMC_LOCK_INIT(_sc) \ + mtx_init(&_sc->sc_mtx, device_get_nameunit(_sc->dev), \ "mmc", MTX_DEF) #define MMC_LOCK_DESTROY(_sc) mtx_destroy(&_sc->sc_mtx); #define MMC_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED); #define MMC_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED); +static int mmc_calculate_clock(struct mmc_softc *sc); static void mmc_delayed_attach(void *); +static void mmc_power_down(struct mmc_softc *sc); static int mmc_wait_for_cmd(struct mmc_softc *sc, struct mmc_command *cmd, int retries); static int mmc_wait_for_command(struct mmc_softc *sc, uint32_t opcode, uint32_t arg, uint32_t flags, uint32_t *resp, int retries); +static int mmc_select_card(struct mmc_softc *sc, uint16_t rca); +static int mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width); +static int mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr); +static void mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr); +static int mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd); +static void mmc_scan(struct mmc_softc *sc); +static int mmc_delete_cards(struct mmc_softc *sc); static void mmc_ms_delay(int ms) @@ -120,7 +145,7 @@ static int mmc_probe(device_t dev) { - device_set_desc(dev, "mmc/sd bus"); + device_set_desc(dev, "MMC/SD bus"); return (0); } @@ -145,35 +170,47 @@ static int mmc_detach(device_t dev) { struct mmc_softc *sc = device_get_softc(dev); - device_t *kids; - int i, nkid; - - /* kill children [ph33r]. -sorbo */ - if (device_get_children(sc->dev, &kids, &nkid) != 0) - return 0; - for (i = 0; i < nkid; i++) { - device_t kid = kids[i]; - void *ivar = device_get_ivars(kid); - - device_detach(kid); - device_delete_child(sc->dev, kid); - free(ivar, M_DEVBUF); - } - free(kids, M_TEMP); + int err; + if ((err = mmc_delete_cards(sc)) != 0) + return (err); + mmc_power_down(sc); MMC_LOCK_DESTROY(sc); - return 0; + return (0); +} + +static int +mmc_suspend(device_t dev) +{ + struct mmc_softc *sc = device_get_softc(dev); + int err; + + err = bus_generic_suspend(dev); + if (err) + return (err); + mmc_power_down(sc); + return (0); +} + +static int +mmc_resume(device_t dev) +{ + struct mmc_softc *sc = device_get_softc(dev); + + mmc_scan(sc); + return (bus_generic_resume(dev)); } static int mmc_acquire_bus(device_t busdev, device_t dev) { struct mmc_softc *sc; + struct mmc_ivars *ivar; int err; int rca; - err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), dev); + err = MMCBR_ACQUIRE_HOST(device_get_parent(busdev), busdev); if (err) return (err); sc = device_get_softc(busdev); @@ -184,24 +221,36 @@ mmc_acquire_bus(device_t busdev, device_ MMC_UNLOCK(sc); if (busdev != dev) { - // Keep track of the last rca that we've selected. If - // we're asked to do it again, don't. We never unselect - // unless the bus code itself wants the mmc bus. + /* + * Keep track of the last rca that we've selected. If + * we're asked to do it again, don't. We never + * unselect unless the bus code itself wants the mmc + * bus, and constantly reselecting causes problems. + */ rca = mmc_get_rca(dev); if (sc->last_rca != rca) { - mmc_wait_for_command(sc, MMC_SELECT_CARD, rca << 16, - MMC_RSP_R1 | MMC_CMD_AC, NULL, CMD_RETRIES); + mmc_select_card(sc, rca); sc->last_rca = rca; + /* Prepare bus width for the new card. */ + ivar = device_get_ivars(dev); + if (bootverbose) { + device_printf(busdev, + "setting bus width to %d bits\n", + (ivar->bus_width == bus_width_4) ? 4 : + (ivar->bus_width == bus_width_8) ? 8 : 1); + } + mmc_set_card_bus_width(sc, rca, ivar->bus_width); + mmcbr_set_bus_width(busdev, ivar->bus_width); + mmcbr_update_ios(busdev); } - // XXX should set bus width here? } else { - // If there's a card selected, stand down. + /* + * If there's a card selected, stand down. + */ if (sc->last_rca != 0) { - mmc_wait_for_command(sc, MMC_SELECT_CARD, 0, - MMC_RSP_R1 | MMC_CMD_AC, NULL, CMD_RETRIES); + mmc_select_card(sc, 0); sc->last_rca = 0; } - // XXX should set bus width here? } return (0); @@ -221,7 +270,7 @@ mmc_release_bus(device_t busdev, device_ if (sc->owner != dev) panic("mmc: you don't own the bus. game over."); MMC_UNLOCK(sc); - err = MMCBR_RELEASE_HOST(device_get_parent(busdev), dev); + err = MMCBR_RELEASE_HOST(device_get_parent(busdev), busdev); if (err) return (err); MMC_LOCK(sc); @@ -230,17 +279,11 @@ mmc_release_bus(device_t busdev, device_ return (0); } -static void -mmc_rescan_cards(struct mmc_softc *sc) -{ - /* XXX: Look at the children and see if they respond to status */ -} - static uint32_t mmc_select_vdd(struct mmc_softc *sc, uint32_t ocr) { - // XXX - return ocr; + + return (ocr & MMC_OCR_VOLTAGE); } static int @@ -250,7 +293,7 @@ mmc_highest_voltage(uint32_t ocr) for (i = 30; i >= 0; i--) if (ocr & (1 << i)) - return i; + return (i); return (-1); } @@ -259,31 +302,25 @@ mmc_wakeup(struct mmc_request *req) { struct mmc_softc *sc; -// printf("Wakeup for req %p done_data %p\n", req, req->done_data); sc = (struct mmc_softc *)req->done_data; MMC_LOCK(sc); req->flags |= MMC_REQ_DONE; - wakeup(req); MMC_UNLOCK(sc); + wakeup(req); } static int mmc_wait_for_req(struct mmc_softc *sc, struct mmc_request *req) { - int err; req->done = mmc_wakeup; req->done_data = sc; -// printf("Submitting request %p sc %p\n", req, sc); MMCBR_REQUEST(device_get_parent(sc->dev), sc->dev, req); MMC_LOCK(sc); - do { - err = msleep(req, &sc->sc_mtx, PZERO | PCATCH, "mmcreq", - hz / 10); - } while (!(req->flags & MMC_REQ_DONE) && err == EAGAIN); -// printf("Request %p done with error %d\n", req, err); + while ((req->flags & MMC_REQ_DONE) == 0) + msleep(req, &sc->sc_mtx, 0, "mmcreq", 0); MMC_UNLOCK(sc); - return (err); + return (0); } static int @@ -291,7 +328,7 @@ mmc_wait_for_request(device_t brdev, dev { struct mmc_softc *sc = device_get_softc(brdev); - return mmc_wait_for_req(sc, req); + return (mmc_wait_for_req(sc, req)); } static int @@ -302,9 +339,8 @@ mmc_wait_for_cmd(struct mmc_softc *sc, s memset(&mreq, 0, sizeof(mreq)); memset(cmd->resp, 0, sizeof(cmd->resp)); cmd->retries = retries; - cmd->data = NULL; mreq.cmd = cmd; -// printf("CMD: %x ARG %x\n", cmd->opcode, cmd->arg); +/* printf("CMD: %x ARG %x\n", cmd->opcode, cmd->arg); */ mmc_wait_for_req(sc, &mreq); return (cmd->error); } @@ -320,6 +356,7 @@ mmc_wait_for_app_cmd(struct mmc_softc *s appcmd.opcode = MMC_APP_CMD; appcmd.arg = rca << 16; appcmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + appcmd.data = NULL; mmc_wait_for_cmd(sc, &appcmd, 0); err = appcmd.error; if (err != MMC_ERR_NONE) @@ -345,6 +382,7 @@ mmc_wait_for_command(struct mmc_softc *s cmd.opcode = opcode; cmd.arg = arg; cmd.flags = flags; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, retries); if (err) return (err); @@ -374,6 +412,7 @@ mmc_idle_cards(struct mmc_softc *sc) cmd.opcode = MMC_GO_IDLE_STATE; cmd.arg = 0; cmd.flags = MMC_RSP_NONE | MMC_CMD_BC; + cmd.data = NULL; mmc_wait_for_cmd(sc, &cmd, 0); mmc_ms_delay(1); @@ -392,19 +431,21 @@ mmc_send_app_op_cond(struct mmc_softc *s cmd.opcode = ACMD_SD_SEND_OP_COND; cmd.arg = ocr; cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; + cmd.data = NULL; for (i = 0; i < 100; i++) { err = mmc_wait_for_app_cmd(sc, 0, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; - if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || ocr == 0) + if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || + (ocr & MMC_OCR_VOLTAGE) == 0) break; err = MMC_ERR_TIMEOUT; mmc_ms_delay(10); } if (rocr && err == MMC_ERR_NONE) *rocr = cmd.resp[0]; - return err; + return (err); } static int @@ -417,19 +458,37 @@ mmc_send_op_cond(struct mmc_softc *sc, u cmd.opcode = MMC_SEND_OP_COND; cmd.arg = ocr; cmd.flags = MMC_RSP_R3 | MMC_CMD_BCR; + cmd.data = NULL; for (i = 0; i < 100; i++) { err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); if (err != MMC_ERR_NONE) break; - if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || ocr == 0) + if ((cmd.resp[0] & MMC_OCR_CARD_BUSY) || + (ocr & MMC_OCR_VOLTAGE) == 0) break; err = MMC_ERR_TIMEOUT; mmc_ms_delay(10); } if (rocr && err == MMC_ERR_NONE) *rocr = cmd.resp[0]; - return err; + return (err); +} + +static int +mmc_send_if_cond(struct mmc_softc *sc, uint8_t vhs) +{ + struct mmc_command cmd; + int err; + + memset(&cmd, 0, sizeof(cmd)); + cmd.opcode = SD_SEND_IF_COND; + cmd.arg = (vhs << 8) + 0xAA; + cmd.flags = MMC_RSP_R7 | MMC_CMD_BCR; + cmd.data = NULL; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + return (err); } static void @@ -448,43 +507,269 @@ mmc_power_up(struct mmc_softc *sc) mmc_ms_delay(1); mmcbr_set_clock(dev, mmcbr_get_f_min(sc->dev)); + mmcbr_set_timing(dev, bus_timing_normal); mmcbr_set_power_mode(dev, power_on); mmcbr_update_ios(dev); mmc_ms_delay(2); } -// I wonder if the following is endian safe. +static void +mmc_power_down(struct mmc_softc *sc) +{ + device_t dev = sc->dev; + + mmcbr_set_bus_mode(dev, opendrain); + mmcbr_set_chip_select(dev, cs_dontcare); + mmcbr_set_bus_width(dev, bus_width_1); + mmcbr_set_power_mode(dev, power_off); + mmcbr_set_clock(dev, 0); + mmcbr_set_timing(dev, bus_timing_normal); + mmcbr_update_ios(dev); +} + +static int +mmc_select_card(struct mmc_softc *sc, uint16_t rca) +{ + int flags; + + flags = (rca ? MMC_RSP_R1B : MMC_RSP_NONE) | MMC_CMD_AC; + return (mmc_wait_for_command(sc, MMC_SELECT_CARD, (uint32_t)rca << 16, + flags, NULL, CMD_RETRIES)); +} + +static int +mmc_switch(struct mmc_softc *sc, uint8_t set, uint8_t index, uint8_t value) +{ + struct mmc_command cmd; + int err; + + cmd.opcode = MMC_SWITCH_FUNC; + cmd.arg = (MMC_SWITCH_FUNC_WR << 24) | + (index << 16) | + (value << 8) | + set; + cmd.flags = MMC_RSP_R1B | MMC_CMD_AC; + cmd.data = NULL; + err = mmc_wait_for_cmd(sc, &cmd, 0); + return (err); +} + +static int +mmc_sd_switch(struct mmc_softc *sc, uint8_t mode, uint8_t grp, uint8_t value, uint8_t *res) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(res, 0, 64); + cmd.opcode = SD_SWITCH_FUNC; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = mode << 31; + cmd.arg |= 0x00FFFFFF; + cmd.arg &= ~(0xF << (grp * 4)); + cmd.arg |= value << (grp * 4); + cmd.data = &data; + + data.data = res; + data.len = 64; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + return (err); +} + +static int +mmc_set_card_bus_width(struct mmc_softc *sc, uint16_t rca, int width) +{ + int err; + + if (mmcbr_get_mode(sc->dev) == mode_sd) { + struct mmc_command cmd; + + memset(&cmd, 0, sizeof(struct mmc_command)); + cmd.opcode = ACMD_SET_BUS_WIDTH; + cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; + switch (width) { + case bus_width_1: + cmd.arg = SD_BUS_WIDTH_1; + break; + case bus_width_4: + cmd.arg = SD_BUS_WIDTH_4; + break; + default: + return (MMC_ERR_INVALID); + } + err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + } else { + uint8_t value; + + switch (width) { + case bus_width_1: + value = EXT_CSD_BUS_WIDTH_1; + break; + case bus_width_4: + value = EXT_CSD_BUS_WIDTH_4; + break; + case bus_width_8: + value = EXT_CSD_BUS_WIDTH_8; + break; + default: + return (MMC_ERR_INVALID); + } + err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_BUS_WIDTH, value); + } + return (err); +} + +static int +mmc_set_timing(struct mmc_softc *sc, int timing) +{ + int err; + uint8_t value; + + switch (timing) { + case bus_timing_normal: + value = 0; + break; + case bus_timing_hs: + value = 1; + break; + default: + return (MMC_ERR_INVALID); + } + if (mmcbr_get_mode(sc->dev) == mode_sd) { + u_char switch_res[64]; + + err = mmc_sd_switch(sc, 1, 0, value, switch_res); + } else { + err = mmc_switch(sc, EXT_CSD_CMD_SET_NORMAL, + EXT_CSD_HS_TIMING, value); + } + return (err); +} + +static int +mmc_test_bus_width(struct mmc_softc *sc) +{ + struct mmc_command cmd; + struct mmc_data data; + int err; + uint8_t buf[8]; + uint8_t p8[8] = { 0x55, 0xAA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + uint8_t p8ok[8] = { 0xAA, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + uint8_t p4[4] = { 0x5A, 0x00, 0x00, 0x00, }; + uint8_t p4ok[4] = { 0xA5, 0x00, 0x00, 0x00, }; + + if (mmcbr_get_caps(sc->dev) & MMC_CAP_8_BIT_DATA) { + mmcbr_set_bus_width(sc->dev, bus_width_8); + mmcbr_update_ios(sc->dev); + + cmd.opcode = MMC_BUSTEST_W; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = p8; + data.len = 8; + data.flags = MMC_DATA_WRITE; + mmc_wait_for_cmd(sc, &cmd, 0); + + cmd.opcode = MMC_BUSTEST_R; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = buf; + data.len = 8; + data.flags = MMC_DATA_READ; + err = mmc_wait_for_cmd(sc, &cmd, 0); + + mmcbr_set_bus_width(sc->dev, bus_width_1); + mmcbr_update_ios(sc->dev); + + if (err == MMC_ERR_NONE && memcmp(buf, p8ok, 8) == 0) + return (bus_width_8); + } + + if (mmcbr_get_caps(sc->dev) & MMC_CAP_4_BIT_DATA) { + mmcbr_set_bus_width(sc->dev, bus_width_4); + mmcbr_update_ios(sc->dev); + + cmd.opcode = MMC_BUSTEST_W; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = p4; + data.len = 4; + data.flags = MMC_DATA_WRITE; + mmc_wait_for_cmd(sc, &cmd, 0); + + cmd.opcode = MMC_BUSTEST_R; + cmd.arg = 0; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.data = &data; + + data.data = buf; + data.len = 4; + data.flags = MMC_DATA_READ; + err = mmc_wait_for_cmd(sc, &cmd, 0); + + mmcbr_set_bus_width(sc->dev, bus_width_1); + mmcbr_update_ios(sc->dev); + + if (err == MMC_ERR_NONE && memcmp(buf, p4ok, 4) == 0) + return (bus_width_4); + } + return (bus_width_1); +} + static uint32_t -mmc_get_bits(uint32_t *bits, int start, int size) +mmc_get_bits(uint32_t *bits, int bit_len, int start, int size) { - const int i = 3 - (start / 32); + const int i = (bit_len / 32) - (start / 32) - 1; const int shift = start & 31; uint32_t retval = bits[i] >> shift; if (size + shift > 32) retval |= bits[i - 1] << (32 - shift); - return retval & ((1 << size) - 1); + return (retval & ((1 << size) - 1)); } static void -mmc_decode_cid(int is_sd, uint32_t *raw_cid, struct mmc_cid *cid) +mmc_decode_cid_sd(uint32_t *raw_cid, struct mmc_cid *cid) { int i; + /* There's no version info, so we take it on faith */ memset(cid, 0, sizeof(*cid)); - if (is_sd) { - /* There's no version info, so we take it on faith */ - cid->mid = mmc_get_bits(raw_cid, 120, 8); - cid->oid = mmc_get_bits(raw_cid, 104, 16); - for (i = 0; i < 5; i++) - cid->pnm[i] = mmc_get_bits(raw_cid, 96 - i * 8, 8); - cid->prv = mmc_get_bits(raw_cid, 56, 8); - cid->psn = mmc_get_bits(raw_cid, 24, 32); - cid->mdt_year = mmc_get_bits(raw_cid, 12, 8) + 2001; - cid->mdt_month = mmc_get_bits(raw_cid, 8, 4); - } else { - // XXX write me - panic("write mmc cid decoder"); - } + cid->mid = mmc_get_bits(raw_cid, 128, 120, 8); + cid->oid = mmc_get_bits(raw_cid, 128, 104, 16); + for (i = 0; i < 5; i++) + cid->pnm[i] = mmc_get_bits(raw_cid, 128, 96 - i * 8, 8); + cid->prv = mmc_get_bits(raw_cid, 128, 56, 8); + cid->psn = mmc_get_bits(raw_cid, 128, 24, 32); + cid->mdt_year = mmc_get_bits(raw_cid, 128, 12, 8) + 2001; + cid->mdt_month = mmc_get_bits(raw_cid, 128, 8, 4); +} + +static void +mmc_decode_cid_mmc(uint32_t *raw_cid, struct mmc_cid *cid) +{ + int i; + + /* There's no version info, so we take it on faith */ + memset(cid, 0, sizeof(*cid)); + cid->mid = mmc_get_bits(raw_cid, 128, 120, 8); + cid->oid = mmc_get_bits(raw_cid, 128, 104, 8); + for (i = 0; i < 6; i++) + cid->pnm[i] = mmc_get_bits(raw_cid, 128, 96 - i * 8, 8); + cid->prv = mmc_get_bits(raw_cid, 128, 48, 8); + cid->psn = mmc_get_bits(raw_cid, 128, 16, 32); + cid->mdt_month = mmc_get_bits(raw_cid, 128, 12, 4); + cid->mdt_year = mmc_get_bits(raw_cid, 128, 8, 4) + 1997; } static const int exp[8] = { @@ -501,50 +786,142 @@ static const int cur_max[8] = { }; static void -mmc_decode_csd(int is_sd, uint32_t *raw_csd, struct mmc_csd *csd) +mmc_decode_csd_sd(uint32_t *raw_csd, struct mmc_csd *csd) { int v; int m; int e; memset(csd, 0, sizeof(*csd)); - if (is_sd) { - csd->csd_structure = v = mmc_get_bits(raw_csd, 126, 2); - if (v == 0) { - m = mmc_get_bits(raw_csd, 115, 4); - e = mmc_get_bits(raw_csd, 112, 3); - csd->tacc = exp[e] * mant[m] + 9 / 10; - csd->nsac = mmc_get_bits(raw_csd, 104, 8) * 100; - m = mmc_get_bits(raw_csd, 99, 4); - e = mmc_get_bits(raw_csd, 96, 3); - csd->tran_speed = exp[e] * 10000 * mant[m]; - csd->ccc = mmc_get_bits(raw_csd, 84, 12); - csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 80, 4); - csd->read_bl_partial = mmc_get_bits(raw_csd, 79, 1); - csd->write_blk_misalign = mmc_get_bits(raw_csd, 78, 1); - csd->read_blk_misalign = mmc_get_bits(raw_csd, 77, 1); - csd->dsr_imp = mmc_get_bits(raw_csd, 76, 1); - csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 59, 3)]; - csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 56, 3)]; - csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 53, 3)]; - csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 50, 3)]; - m = mmc_get_bits(raw_csd, 62, 12); - e = mmc_get_bits(raw_csd, 47, 3); - csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; - csd->erase_blk_en = mmc_get_bits(raw_csd, 46, 1); - csd->sector_size = mmc_get_bits(raw_csd, 39, 7); - csd->wp_grp_size = mmc_get_bits(raw_csd, 32, 7); - csd->wp_grp_enable = mmc_get_bits(raw_csd, 31, 1); - csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 26, 3); - csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 22, 4); - csd->write_bl_partial = mmc_get_bits(raw_csd, 21, 1); - } else if (v == 1) { - panic("Write SDHC CSD parser"); - } else - panic("unknown SD CSD version"); - } else { - panic("Write a MMC CSD parser"); + csd->csd_structure = v = mmc_get_bits(raw_csd, 128, 126, 2); + if (v == 0) { + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); + csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); + csd->tran_speed = exp[e] * 10000 * mant[m]; + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + m = mmc_get_bits(raw_csd, 128, 62, 12); + e = mmc_get_bits(raw_csd, 128, 47, 3); + csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; + csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); + csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); + } else if (v == 1) { + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); + csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); + csd->tran_speed = exp[e] * 10000 * mant[m]; + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->capacity = ((uint64_t)mmc_get_bits(raw_csd, 128, 48, 22) + 1) * + 512 * 1024; + csd->erase_blk_en = mmc_get_bits(raw_csd, 128, 46, 1); + csd->erase_sector = mmc_get_bits(raw_csd, 128, 39, 7) + 1; + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 7); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); + } else + panic("unknown SD CSD version"); +} + +static void +mmc_decode_csd_mmc(uint32_t *raw_csd, struct mmc_csd *csd) +{ + int m; + int e; + + memset(csd, 0, sizeof(*csd)); + csd->csd_structure = mmc_get_bits(raw_csd, 128, 126, 2); + csd->spec_vers = mmc_get_bits(raw_csd, 128, 122, 4); + m = mmc_get_bits(raw_csd, 128, 115, 4); + e = mmc_get_bits(raw_csd, 128, 112, 3); + csd->tacc = exp[e] * mant[m] + 9 / 10; + csd->nsac = mmc_get_bits(raw_csd, 128, 104, 8) * 100; + m = mmc_get_bits(raw_csd, 128, 99, 4); + e = mmc_get_bits(raw_csd, 128, 96, 3); + csd->tran_speed = exp[e] * 10000 * mant[m]; + csd->ccc = mmc_get_bits(raw_csd, 128, 84, 12); + csd->read_bl_len = 1 << mmc_get_bits(raw_csd, 128, 80, 4); + csd->read_bl_partial = mmc_get_bits(raw_csd, 128, 79, 1); + csd->write_blk_misalign = mmc_get_bits(raw_csd, 128, 78, 1); + csd->read_blk_misalign = mmc_get_bits(raw_csd, 128, 77, 1); + csd->dsr_imp = mmc_get_bits(raw_csd, 128, 76, 1); + csd->vdd_r_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 59, 3)]; + csd->vdd_r_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 56, 3)]; + csd->vdd_w_curr_min = cur_min[mmc_get_bits(raw_csd, 128, 53, 3)]; + csd->vdd_w_curr_max = cur_max[mmc_get_bits(raw_csd, 128, 50, 3)]; + m = mmc_get_bits(raw_csd, 128, 62, 12); + e = mmc_get_bits(raw_csd, 128, 47, 3); + csd->capacity = ((1 + m) << (e + 2)) * csd->read_bl_len; + csd->erase_blk_en = 0; + csd->erase_sector = (mmc_get_bits(raw_csd, 128, 42, 5) + 1) * + (mmc_get_bits(raw_csd, 128, 37, 5) + 1); + csd->wp_grp_size = mmc_get_bits(raw_csd, 128, 32, 5); + csd->wp_grp_enable = mmc_get_bits(raw_csd, 128, 31, 1); + csd->r2w_factor = 1 << mmc_get_bits(raw_csd, 128, 26, 3); + csd->write_bl_len = 1 << mmc_get_bits(raw_csd, 128, 22, 4); + csd->write_bl_partial = mmc_get_bits(raw_csd, 128, 21, 1); +} + +static void +mmc_app_decode_scr(uint32_t *raw_scr, struct mmc_scr *scr) +{ + unsigned int scr_struct; + + memset(scr, 0, sizeof(*scr)); + + scr_struct = mmc_get_bits(raw_scr, 64, 60, 4); + if (scr_struct != 0) { + printf("Unrecognised SCR structure version %d\n", + scr_struct); + return; } + scr->sda_vsn = mmc_get_bits(raw_scr, 64, 56, 4); + scr->bus_widths = mmc_get_bits(raw_scr, 64, 48, 4); +} + +static void +mmc_app_decode_sd_status(uint32_t *raw_sd_status, + struct mmc_sd_status *sd_status) +{ + + memset(sd_status, 0, sizeof(*sd_status)); + + sd_status->bus_width = mmc_get_bits(raw_sd_status, 512, 510, 2); + sd_status->secured_mode = mmc_get_bits(raw_sd_status, 512, 509, 1); + sd_status->card_type = mmc_get_bits(raw_sd_status, 512, 480, 16); + sd_status->prot_area = mmc_get_bits(raw_sd_status, 512, 448, 12); + sd_status->speed_class = mmc_get_bits(raw_sd_status, 512, 440, 8); + sd_status->perf_move = mmc_get_bits(raw_sd_status, 512, 432, 8); + sd_status->au_size = mmc_get_bits(raw_sd_status, 512, 428, 4); + sd_status->erase_size = mmc_get_bits(raw_sd_status, 512, 408, 16); + sd_status->erase_timeout = mmc_get_bits(raw_sd_status, 512, 402, 6); + sd_status->erase_offset = mmc_get_bits(raw_sd_status, 512, 400, 2); } static int @@ -556,6 +933,7 @@ mmc_all_send_cid(struct mmc_softc *sc, u cmd.opcode = MMC_ALL_SEND_CID; cmd.arg = 0; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); @@ -570,12 +948,103 @@ mmc_send_csd(struct mmc_softc *sc, uint1 cmd.opcode = MMC_SEND_CSD; cmd.arg = rca << 16; cmd.flags = MMC_RSP_R2 | MMC_CMD_BCR; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); memcpy(rawcid, cmd.resp, 4 * sizeof(uint32_t)); return (err); } static int +mmc_app_send_scr(struct mmc_softc *sc, uint16_t rca, uint32_t *rawscr) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(rawscr, 0, 8); + cmd.opcode = ACMD_SEND_SCR; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = 0; + cmd.data = &data; + + data.data = rawscr; + data.len = 8; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + rawscr[0] = be32toh(rawscr[0]); + rawscr[1] = be32toh(rawscr[1]); + return (err); +} + +static int +mmc_send_ext_csd(struct mmc_softc *sc, uint8_t *rawextcsd) +{ + int err; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(rawextcsd, 0, 512); + cmd.opcode = MMC_SEND_EXT_CSD; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = 0; + cmd.data = &data; + + data.data = rawextcsd; + data.len = 512; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_cmd(sc, &cmd, CMD_RETRIES); + return (err); +} + +static int +mmc_app_sd_status(struct mmc_softc *sc, uint16_t rca, uint32_t *rawsdstatus) +{ + int err, i; + struct mmc_command cmd; + struct mmc_data data; + + memset(&cmd, 0, sizeof(struct mmc_command)); + memset(&data, 0, sizeof(struct mmc_data)); + + memset(rawsdstatus, 0, 64); + cmd.opcode = ACMD_SD_STATUS; + cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; + cmd.arg = 0; + cmd.data = &data; + + data.data = rawsdstatus; + data.len = 64; + data.flags = MMC_DATA_READ; + + err = mmc_wait_for_app_cmd(sc, rca, &cmd, CMD_RETRIES); + for (i = 0; i < 16; i++) + rawsdstatus[i] = be32toh(rawsdstatus[i]); + return (err); +} + +static int +mmc_set_relative_addr(struct mmc_softc *sc, uint16_t resp) +{ + struct mmc_command cmd; + int err; + + cmd.opcode = MMC_SET_RELATIVE_ADDR; + cmd.arg = resp << 16; + cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; + cmd.data = NULL; + err = mmc_wait_for_cmd(sc, &cmd, 0); + return (err); +} + +static int mmc_send_relative_addr(struct mmc_softc *sc, uint32_t *resp) { struct mmc_command cmd; @@ -584,6 +1053,7 @@ mmc_send_relative_addr(struct mmc_softc cmd.opcode = SD_SEND_RELATIVE_ADDR; cmd.arg = 0; cmd.flags = MMC_RSP_R6 | MMC_CMD_BCR; + cmd.data = NULL; err = mmc_wait_for_cmd(sc, &cmd, 0); *resp = cmd.resp[0]; return (err); @@ -592,39 +1062,182 @@ mmc_send_relative_addr(struct mmc_softc static void mmc_discover_cards(struct mmc_softc *sc) { - struct mmc_ivars *ivar; - int err; - uint32_t resp; + struct mmc_ivars *ivar = NULL; + device_t *devlist; + int err, i, devcount, newcard; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 19:50:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DBC01065672; Mon, 5 Jan 2009 19:50:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id B76DA8FC16; Mon, 5 Jan 2009 19:50:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 2F56641C64C; Mon, 5 Jan 2009 20:50:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id wipuPZQovv6Q; Mon, 5 Jan 2009 20:50:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A8D6441C67B; Mon, 5 Jan 2009 20:50:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 647764448DD; Mon, 5 Jan 2009 19:45:48 +0000 (UTC) Date: Mon, 5 Jan 2009 19:45:47 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Christoph Mallon In-Reply-To: <49624DB9.8080900@gmx.de> Message-ID: <20090105194210.P45399@maildrop.int.zabbadoz.net> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:50:08 -0000 On Mon, 5 Jan 2009, Christoph Mallon wrote: Hi, > Bjoern A. Zeeb schrieb: >> I have broken it out from a larger patch; the C99 initializer is here: >> http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff >> >> I case someone can give it a quick glance I'll commit them. > > + .pr_flags = PR_ATOMIC|PR_ADDR, > > style(9) wants spaces around binary operators. I am not sure it does. In case it does I am not going to break consistency with all other 65 places that don't do for pr_flags; but it seems I should change the = to =. Thanks for making me look, and thanks for review! -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 19:53:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DDA2106566B; Mon, 5 Jan 2009 19:53:59 +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 1B6A18FC14; Mon, 5 Jan 2009 19:53:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05JrwTe009208; Mon, 5 Jan 2009 19:53:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05JrwlM009207; Mon, 5 Jan 2009 19:53:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901051953.n05JrwlM009207@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 19:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186787 - stable/7/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 19:54:00 -0000 Author: mav Date: Mon Jan 5 19:53:58 2009 New Revision: 186787 URL: http://svn.freebsd.org/changeset/base/186787 Log: MFC rev. 183479, 184452. Keep in sync with latest MMC stack: - limit transfers with single block, - properly implement read-only. Modified: stable/7/sys/arm/at91/at91_mci.c Modified: stable/7/sys/arm/at91/at91_mci.c ============================================================================== --- stable/7/sys/arm/at91/at91_mci.c Mon Jan 5 19:40:09 2009 (r186786) +++ stable/7/sys/arm/at91/at91_mci.c Mon Jan 5 19:53:58 2009 (r186787) @@ -462,7 +462,7 @@ at91_mci_request(device_t brdev, device_ static int at91_mci_get_ro(device_t brdev, device_t reqdev) { - return (-1); + return (0); } static int @@ -649,6 +649,9 @@ at91_mci_read_ivar(device_t bus, device_ case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_MAX_DATA: + *(int *)result = 1; + break; } return (0); } @@ -685,9 +688,11 @@ at91_mci_write_ivar(device_t bus, device case MMCBR_IVAR_VDD: sc->host.ios.vdd = value; break; + /* These are read-only */ case MMCBR_IVAR_HOST_OCR: case MMCBR_IVAR_F_MIN: case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_MAX_DATA: return (EINVAL); } return (0); From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:09:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBBCB106566B; Mon, 5 Jan 2009 20:09:54 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8CA08FC16; Mon, 5 Jan 2009 20:09:54 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05K9sZj009624; Mon, 5 Jan 2009 20:09:54 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05K9soF009621; Mon, 5 Jan 2009 20:09:54 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901052009.n05K9soF009621@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 5 Jan 2009 20:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186789 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:09:55 -0000 Author: luigi Date: Mon Jan 5 20:09:54 2009 New Revision: 186789 URL: http://svn.freebsd.org/changeset/base/186789 Log: This patch introduces a number of simplifications to the Forth functions used in the bootloader. The goal is to make the code more readable and smaller (especially because we have size issues in the loader's environment). High level description of the changes: + define some string manipulation functions to improve readability; + create functions to manipulate module descriptors, removing some duplicated code; + rename the error codes to ESOMETHING; + consistently use set_environment_variable (which evaluates $variables) when interpreting variable=value assignments; I have tested the code, but there might be code paths that I have not traversed so please let me know of any issues. Details of this change: --- loader.4th --- + add some module operators, to remove duplicated code while parsing module-related commands: set-module-flag enable-module disable-module toggle-module show-module --- pnp.4th --- + move here the definition related to the pnp devices list, e.g. STAILQ_* , pnpident, pnpinfo --- support.4th --- + rename error codes to capital e.g. ENOMEM EFREE ... and do obvious changes related to the renaming; + remove unused structures (those relevant to pnp are moved to pnp.4th) + various string functions - strlen removed (it is an internal function) - strchr, defined as the C function - strtype -- type a string to output - strref -- assign a reference to the string on the stack - unquote -- remove quotes from a string + remove reset_line_buffer + move up the 'set_environment_variable' function (which now uses the interpreter, so $variables are evaluated). Use the function in various places + add a 'test_file function' for debugging purposes MFC after: 4 weeks Modified: head/sys/boot/forth/loader.4th head/sys/boot/forth/pnp.4th head/sys/boot/forth/support.4th Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Mon Jan 5 20:02:12 2009 (r186788) +++ head/sys/boot/forth/loader.4th Mon Jan 5 20:09:54 2009 (r186789) @@ -93,6 +93,7 @@ only forth definitions also support-func \ \ If a password was defined, execute autoboot and ask for \ password if autoboot returns. +\ Do not exit unless the right password is given. : check-password password .addr @ if @@ -150,8 +151,7 @@ only forth definitions also support-func \ line, if interpreted, or given on the stack, if compiled in. : (read-conf) ( addr len -- ) - conf_files .addr @ ?dup if free abort" Fatal error freeing memory" then - strdup conf_files .len ! conf_files .addr ! + conf_files string= include_conf_files \ Will recurse on new loader_conf_files definitions ; @@ -165,110 +165,26 @@ only forth definitions also support-func then ; immediate -\ ***** enable-module -\ -\ Turn a module loading on. +\ show, enable, disable, toggle module loading. They all take module from +\ the next word -: enable-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - true r> module.flag ! - ." will be loaded." cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr +: set-module-flag ( module_addr val -- ) \ set and print flag + over module.flag ! + dup module.name strtype + module.flag @ if ." will be loaded" else ." will not be loaded" then cr ; -\ ***** disable-module -\ -\ Turn a module loading off. - -: disable-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - false r> module.flag ! - ." will not be loaded." cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: enable-module find-module ?dup if true set-module-flag then ; -\ ***** toggle-module -\ -\ Turn a module loading on/off. +: disable-module find-module ?dup if false set-module-flag then ; -: toggle-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - r@ module.name dup .addr @ swap .len @ type - r@ module.flag @ 0= dup r> module.flag ! - if - ." will be loaded." cr - else - ." will not be loaded." cr - then - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: toggle-module find-module ?dup if dup module.flag @ 0= set-module-flag then ; \ ***** show-module \ \ Show loading information about a module. -: show-module ( -- ) - bl parse module_options @ >r - begin - r@ - while - 2dup - r@ module.name dup .addr @ swap .len @ - compare 0= if - 2drop - ." Name: " r@ module.name dup .addr @ swap .len @ type cr - ." Path: " r@ module.loadname dup .addr @ swap .len @ type cr - ." Type: " r@ module.type dup .addr @ swap .len @ type cr - ." Flags: " r@ module.args dup .addr @ swap .len @ type cr - ." Before load: " r@ module.beforeload dup .addr @ swap .len @ type cr - ." After load: " r@ module.afterload dup .addr @ swap .len @ type cr - ." Error: " r@ module.loaderror dup .addr @ swap .len @ type cr - ." Status: " r> module.flag @ if ." Load" else ." Don't load" then cr - exit - then - r> module.next @ >r - repeat - r> drop - type ." wasn't found." cr -; +: show-module ( -- ) find-module ?dup if show-one-module then ; \ Words to be used inside configuration files Modified: head/sys/boot/forth/pnp.4th ============================================================================== --- head/sys/boot/forth/pnp.4th Mon Jan 5 20:02:12 2009 (r186788) +++ head/sys/boot/forth/pnp.4th Mon Jan 5 20:09:54 2009 (r186789) @@ -24,6 +24,39 @@ \ \ $FreeBSD$ + +\ The following pnp code is used in pnp.4th and pnp.c +structure: STAILQ_HEAD + ptr stqh_first \ type* + ptr stqh_last \ type** +;structure + +structure: STAILQ_ENTRY + ptr stqe_next \ type* +;structure + +structure: pnphandler + ptr pnph.name + ptr pnph.enumerate +;structure + +structure: pnpident + ptr pnpid.ident \ char* + sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident +;structure + +structure: pnpinfo \ sync with sys/boot/config/bootstrap.h + ptr pnpi.desc + int pnpi.revision + ptr pnpi.module \ (char*) module args + int pnpi.argc + ptr pnpi.argv + ptr pnpi.handler \ pnphandler + sizeof STAILQ_HEAD member: pnpi.ident \ pnpident + sizeof STAILQ_ENTRY member: pnpi.link \ pnpinfo +;structure +\ end of pnp support + pnpdevices drop : enumerate Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Mon Jan 5 20:02:12 2009 (r186788) +++ head/sys/boot/forth/support.4th Mon Jan 5 20:09:54 2009 (r186789) @@ -26,7 +26,6 @@ \ Loader.rc support functions: \ -\ initialize_support ( -- ) initialize global variables \ initialize ( addr len -- ) as above, plus load_conf_files \ load_conf ( addr len -- ) load conf file given \ include_conf_files ( -- ) load all conf files in load_conf_files @@ -61,24 +60,23 @@ \ value any_conf_read? indicates if a conf file was succesfully read \ \ Other exported words: -\ +\ note, strlen is internal \ strdup ( addr len -- addr' len) similar to strdup(3) \ strcat ( addr len addr' len' -- addr len+len' ) similar to strcat(3) -\ strlen ( addr -- len ) similar to strlen(3) \ s' ( | string' -- addr len | ) similar to s" \ rudimentary structure support \ Exception values -1 constant syntax_error -2 constant out_of_memory -3 constant free_error -4 constant set_error -5 constant read_error -6 constant open_error -7 constant exec_error -8 constant before_load_error -9 constant after_load_error +1 constant ESYNTAX +2 constant ENOMEM +3 constant EFREE +4 constant ESETERROR \ error setting environment variable +5 constant EREAD \ error reading +6 constant EOPEN +7 constant EEXEC \ XXX never catched +8 constant EBEFORELOAD +9 constant EAFTERLOAD \ I/O constants @@ -132,7 +130,8 @@ structure: module ptr module.next ;structure -\ Internal loader structures +\ Internal loader structures (preloaded_file, kernel_module, file_metadata) +\ must be in sync with the C struct in sys/boot/common/bootstrap.h structure: preloaded_file ptr pf.name ptr pf.type @@ -159,51 +158,7 @@ structure: file_metadata 0 member: md.data \ variable size ;structure -structure: config_resource - ptr cf.name - int cf.type -0 constant RES_INT -1 constant RES_STRING -2 constant RES_LONG - 2 cells member: u -;structure - -structure: config_device - ptr cd.name - int cd.unit - int cd.resource_count - ptr cd.resources \ config_resource -;structure - -structure: STAILQ_HEAD - ptr stqh_first \ type* - ptr stqh_last \ type** -;structure - -structure: STAILQ_ENTRY - ptr stqe_next \ type* -;structure - -structure: pnphandler - ptr pnph.name - ptr pnph.enumerate -;structure - -structure: pnpident - ptr pnpid.ident \ char* - sizeof STAILQ_ENTRY cells member: pnpid.link \ pnpident -;structure - -structure: pnpinfo - ptr pnpi.desc - int pnpi.revision - ptr pnpi.module \ (char*) module args - int pnpi.argc - ptr pnpi.argv - ptr pnpi.handler \ pnphandler - sizeof STAILQ_HEAD member: pnpi.ident \ pnpident - sizeof STAILQ_ENTRY member: pnpi.link \ pnpinfo -;structure +\ end of structures \ Global variables @@ -216,11 +171,9 @@ create last_module_option sizeof module. 0 value nextboot? \ Support string functions - -: strdup ( addr len -- addr' len ) - >r r@ allocate if out_of_memory throw then - tuck r@ move - r> +: strdup { addr len -- addr' len' } + len allocate if ENOMEM throw then + addr over len move len ; : strcat { addr len addr' len' -- addr len+len' } @@ -228,29 +181,27 @@ create last_module_option sizeof module. addr len len' + ; -: strlen ( addr -- len ) - 0 >r +: strchr { addr len c -- addr' len' } begin - dup c@ while - 1+ r> 1+ >r repeat - drop r> + len + while + addr c@ c = if addr len exit then + addr 1 + to addr + len 1 - to len + repeat + 0 0 ; -: s' +: s' \ same as s", allows " in the string [char] ' parse - state @ if - postpone sliteral - then + state @ if postpone sliteral then ; immediate : 2>r postpone >r postpone >r ; immediate : 2r> postpone r> postpone r> ; immediate : 2r@ postpone 2r> postpone 2dup postpone 2>r ; immediate -: getenv? - getenv - -1 = if false else drop true then -; +: getenv? getenv -1 = if false else drop true then ; \ Private definitions @@ -271,27 +222,27 @@ only forth also support-functions defini \ Standard suffixes -: load_module_suffix s" _load" ; -: module_loadname_suffix s" _name" ; -: module_type_suffix s" _type" ; -: module_args_suffix s" _flags" ; -: module_beforeload_suffix s" _before" ; -: module_afterload_suffix s" _after" ; -: module_loaderror_suffix s" _error" ; +: load_module_suffix s" _load" ; +: module_loadname_suffix s" _name" ; +: module_type_suffix s" _type" ; +: module_args_suffix s" _flags" ; +: module_beforeload_suffix s" _before" ; +: module_afterload_suffix s" _after" ; +: module_loaderror_suffix s" _error" ; \ Support operators : >= < 0= ; : <= > 0= ; -\ Assorted support funcitons +\ Assorted support functions -: free-memory free if free_error throw then ; +: free-memory free if EFREE throw then ; : strget { var -- addr len } var .addr @ var .len @ ; \ assign addr len to variable. -: strset { addr len var -- } addr var .addr ! len var .len ! ; +: strset { addr len var -- } addr var .addr ! len var .len ! ; \ free memory and reset fields : strfree { var -- } var .addr @ ?dup if free-memory 0 0 var strset then ; @@ -299,6 +250,18 @@ only forth also support-functions defini \ free old content, make a copy of the string and assign to variable : string= { addr len var -- } var strfree addr len strdup var strset ; +: strtype ( str -- ) strget type ; + +\ assign a reference to what is on the stack +: strref { addr len var -- addr len } + addr var .addr ! len var .len ! addr len +; + +\ unquote a string +: unquote ( addr len -- addr len ) + over c@ [char] " = if 2 chars - swap char+ swap then +; + \ Assignment data temporary storage string name_buffer @@ -366,16 +329,16 @@ line-reading definitions line_buffer .len @ if line_buffer .addr @ line_buffer .len @ r@ + - resize if out_of_memory throw then + resize if ENOMEM throw then else - r@ allocate if out_of_memory throw then + r@ allocate if ENOMEM throw then then line_buffer .addr ! r> ; : append_to_line_buffer ( addr len -- ) - line_buffer .addr @ line_buffer .len @ + line_buffer strget 2swap strcat line_buffer .len ! drop @@ -395,23 +358,15 @@ line-reading definitions : refill_buffer 0 to read_buffer_ptr read_buffer .addr @ 0= if - read_buffer_size allocate if out_of_memory throw then + read_buffer_size allocate if ENOMEM throw then read_buffer .addr ! then fd @ read_buffer .addr @ read_buffer_size fread - dup -1 = if read_error throw then + dup -1 = if EREAD throw then dup 0= if true to end_of_file? then read_buffer .len ! ; -: reset_line_buffer - line_buffer .addr @ ?dup if - free-memory - then - 0 line_buffer .addr ! - 0 line_buffer .len ! -; - support-functions definitions : reset_line_reading @@ -419,7 +374,7 @@ support-functions definitions ; : read_line - reset_line_buffer + line_buffer strfree skip_newlines begin read_from_buffer @@ -459,9 +414,9 @@ also parser definitions also 0 value parsing_function 0 value end_of_line -: end_of_line? - line_pointer end_of_line = -; +: end_of_line? line_pointer end_of_line = ; + +\ classifiers for various character classes in the input line : letter? line_pointer c@ >r @@ -480,70 +435,46 @@ also parser definitions also or ; -: quote? - line_pointer c@ [char] " = -; +: quote? line_pointer c@ [char] " = ; -: assignment_sign? - line_pointer c@ [char] = = -; +: assignment_sign? line_pointer c@ [char] = = ; -: comment? - line_pointer c@ [char] # = -; +: comment? line_pointer c@ [char] # = ; -: space? - line_pointer c@ bl = - line_pointer c@ tab = or -; +: space? line_pointer c@ bl = line_pointer c@ tab = or ; -: backslash? - line_pointer c@ [char] \ = -; +: backslash? line_pointer c@ [char] \ = ; -: underscore? - line_pointer c@ [char] _ = -; +: underscore? line_pointer c@ [char] _ = ; -: dot? - line_pointer c@ [char] . = -; +: dot? line_pointer c@ [char] . = ; -: skip_character - line_pointer char+ to line_pointer -; +\ manipulation of input line +: skip_character line_pointer char+ to line_pointer ; -: skip_to_end_of_line - end_of_line to line_pointer -; +: skip_to_end_of_line end_of_line to line_pointer ; : eat_space begin - space? + end_of_line? if 0 else space? then while skip_character - end_of_line? if exit then repeat ; : parse_name ( -- addr len ) line_pointer begin - letter? digit? underscore? dot? or or or + end_of_line? if 0 else letter? digit? underscore? dot? or or or then while skip_character - end_of_line? if - line_pointer over - - strdup - exit - then repeat line_pointer over - strdup ; : remove_backslashes { addr len | addr' len' -- addr' len' } - len allocate if out_of_memory throw then + len allocate if ENOMEM throw then to addr' addr >r begin @@ -561,16 +492,16 @@ also parser definitions also : parse_quote ( -- addr len ) line_pointer skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then begin quote? 0= while backslash? if skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then then skip_character - end_of_line? if syntax_error throw then + end_of_line? if ESYNTAX throw then repeat skip_character line_pointer over - @@ -579,8 +510,7 @@ also parser definitions also : read_name parse_name ( -- addr len ) - name_buffer .len ! - name_buffer .addr ! + name_buffer strset ; : read_value @@ -589,8 +519,7 @@ also parser definitions also else parse_name ( -- addr len ) then - value_buffer .len ! - value_buffer .addr ! + value_buffer strset ; : comment @@ -600,7 +529,7 @@ also parser definitions also : white_space_4 eat_space comment? if ['] comment to parsing_function exit then - end_of_line? 0= if syntax_error throw then + end_of_line? 0= if ESYNTAX throw then ; : variable_value @@ -613,7 +542,7 @@ also parser definitions also letter? digit? quote? or or if ['] variable_value to parsing_function exit then - syntax_error throw + ESYNTAX throw ; : assignment_sign @@ -624,7 +553,7 @@ also parser definitions also : white_space_2 eat_space assignment_sign? if ['] assignment_sign to parsing_function exit then - syntax_error throw + ESYNTAX throw ; : variable_name @@ -636,13 +565,13 @@ also parser definitions also eat_space letter? if ['] variable_name to parsing_function exit then comment? if ['] comment to parsing_function exit then - end_of_line? 0= if syntax_error throw then + end_of_line? 0= if ESYNTAX throw then ; file-processing definitions : get_assignment - line_buffer .addr @ line_buffer .len @ + to end_of_line + line_buffer strget + to end_of_line line_buffer .addr @ to line_pointer ['] white_space_1 to parsing_function begin @@ -653,7 +582,7 @@ file-processing definitions parsing_function ['] comment = parsing_function ['] white_space_1 = parsing_function ['] white_space_4 = - or or 0= if syntax_error throw then + or or 0= if ESYNTAX throw then ; only forth also support-functions also file-processing definitions also @@ -661,7 +590,7 @@ only forth also support-functions also f \ Process line : assignment_type? ( addr len -- flag ) - name_buffer .addr @ name_buffer .len @ + name_buffer strget compare 0= ; @@ -671,69 +600,56 @@ only forth also support-functions also f over compare 0= ; -: loader_conf_files? - s" loader_conf_files" assignment_type? -; +: loader_conf_files? s" loader_conf_files" assignment_type? ; -: nextboot_flag? - s" nextboot_enable" assignment_type? -; +: nextboot_flag? s" nextboot_enable" assignment_type? ; -: nextboot_conf? - s" nextboot_conf" assignment_type? -; +: nextboot_conf? s" nextboot_conf" assignment_type? ; -: verbose_flag? - s" verbose_loading" assignment_type? -; +: verbose_flag? s" verbose_loading" assignment_type? ; -: execute? - s" exec" assignment_type? -; +: execute? s" exec" assignment_type? ; -: password? - s" password" assignment_type? -; +: password? s" password" assignment_type? ; -: module_load? - load_module_suffix suffix_type? -; +: module_load? load_module_suffix suffix_type? ; -: module_loadname? - module_loadname_suffix suffix_type? -; +: module_loadname? module_loadname_suffix suffix_type? ; -: module_type? - module_type_suffix suffix_type? -; +: module_type? module_type_suffix suffix_type? ; -: module_args? - module_args_suffix suffix_type? -; +: module_args? module_args_suffix suffix_type? ; -: module_beforeload? - module_beforeload_suffix suffix_type? -; +: module_beforeload? module_beforeload_suffix suffix_type? ; -: module_afterload? - module_afterload_suffix suffix_type? -; +: module_afterload? module_afterload_suffix suffix_type? ; -: module_loaderror? - module_loaderror_suffix suffix_type? -; +: module_loaderror? module_loaderror_suffix suffix_type? ; -: set_nextboot_conf - nextboot_conf_file .addr @ ?dup if - free-memory - then - value_buffer .addr @ c@ [char] " = if - value_buffer .addr @ char+ value_buffer .len @ 2 chars - +\ build a 'set' statement and execute it +: set_environment_variable + name_buffer .len @ value_buffer .len @ + 5 chars + \ size of result string + allocate if ENOMEM throw then + dup 0 \ start with an empty string and append the pieces + s" set " strcat + name_buffer strget strcat + s" =" strcat + value_buffer strget strcat + ['] evaluate catch if + 2drop free drop + ESETERROR throw else - value_buffer .addr @ value_buffer .len @ + free-memory then - strdup - nextboot_conf_file .len ! nextboot_conf_file .addr ! +; + +: set_conf_files + set_environment_variable + s" loader_conf_files" getenv conf_files string= +; + +: set_nextboot_conf \ XXX maybe do as set_conf_files ? + value_buffer strget unquote nextboot_conf_file string= ; : append_to_module_options_list ( addr -- ) @@ -746,35 +662,32 @@ only forth also support-functions also f then ; -: set_module_name ( addr -- ) - name_buffer .addr @ name_buffer .len @ - strdup - >r over module.name .addr ! - r> swap module.name .len ! +: set_module_name { addr -- } \ check leaks + name_buffer strget addr module.name string= ; : yes_value? - value_buffer .addr @ value_buffer .len @ + value_buffer strget \ XXX could use unquote 2dup s' "YES"' compare >r 2dup s' "yes"' compare >r 2dup s" YES" compare >r s" yes" compare r> r> r> and and and 0= ; -: find_module_option ( -- addr | 0 ) +: find_module_option ( -- addr | 0 ) \ return ptr to entry matching name_buffer module_options @ begin dup while - dup module.name dup .addr @ swap .len @ - name_buffer .addr @ name_buffer .len @ + dup module.name strget + name_buffer strget compare 0= if exit then module.next @ repeat ; : new_module_option ( -- addr ) - sizeof module allocate if out_of_memory throw then + sizeof module allocate if ENOMEM throw then dup sizeof module erase dup append_to_module_options_list dup set_module_name @@ -792,103 +705,38 @@ only forth also support-functions also f : set_module_args name_buffer .len @ module_args_suffix nip - name_buffer .len ! - get_module_option module.args - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.args string= ; : set_module_loadname name_buffer .len @ module_loadname_suffix nip - name_buffer .len ! - get_module_option module.loadname - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.loadname string= ; : set_module_type name_buffer .len @ module_type_suffix nip - name_buffer .len ! - get_module_option module.type - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.type string= ; : set_module_beforeload name_buffer .len @ module_beforeload_suffix nip - name_buffer .len ! - get_module_option module.beforeload - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.beforeload string= ; : set_module_afterload name_buffer .len @ module_afterload_suffix nip - name_buffer .len ! - get_module_option module.afterload - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! + value_buffer strget unquote + get_module_option module.afterload string= ; : set_module_loaderror name_buffer .len @ module_loaderror_suffix nip - name_buffer .len ! - get_module_option module.loaderror - dup .addr @ ?dup if free-memory then - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 chars - swap char+ swap - then - strdup - >r over .addr ! - r> swap .len ! -; - -: set_environment_variable - name_buffer .len @ - value_buffer .len @ + - 5 chars + - allocate if out_of_memory throw then - dup 0 ( addr -- addr addr len ) - s" set " strcat - name_buffer .addr @ name_buffer .len @ strcat - s" =" strcat - value_buffer .addr @ value_buffer .len @ strcat - ['] evaluate catch if - 2drop free drop - set_error throw - else - free-memory - then -; - -: set_conf_files - set_environment_variable - s" loader_conf_files" getenv conf_files string= + value_buffer strget unquote + get_module_option module.loaderror string= ; : set_nextboot_flag @@ -900,23 +748,12 @@ only forth also support-functions also f ; : execute_command - value_buffer .addr @ value_buffer .len @ - over c@ [char] " = if - 2 - swap char+ swap - then - ['] evaluate catch if exec_error throw then + value_buffer strget unquote + ['] evaluate catch if EEXEC throw then ; : set_password - password .addr @ ?dup if free if free_error throw then then - value_buffer .addr @ c@ [char] " = if - value_buffer .addr @ char+ value_buffer .len @ 2 - strdup - value_buffer .addr @ free if free_error throw then - else - value_buffer .addr @ value_buffer .len @ - then - password .len ! password .addr ! - 0 value_buffer .addr ! + value_buffer strget unquote password string= ; : process_assignment @@ -944,16 +781,8 @@ only forth also support-functions also f \ not allocated, it's value (0) is used as flag. : free_buffers - name_buffer .addr @ dup if free then - value_buffer .addr @ dup if free then - or if free_error throw then -; - -: reset_assignment_buffers - 0 name_buffer .addr ! - 0 name_buffer .len ! - 0 value_buffer .addr ! - 0 value_buffer .len ! + name_buffer strfree + value_buffer strfree ; \ Higher level file processing @@ -964,7 +793,7 @@ support-functions definitions begin end_of_file? 0= while - reset_assignment_buffers + free_buffers read_line get_assignment ['] process_assignment catch @@ -977,8 +806,8 @@ support-functions definitions 0 to end_of_file? reset_line_reading O_RDONLY fopen fd ! - fd @ -1 = if open_error throw then - reset_assignment_buffers + fd @ -1 = if EOPEN throw then + free_buffers read_line get_assignment ['] process_assignment catch @@ -991,39 +820,73 @@ only forth also support-functions defini \ Interface to loading conf files : load_conf ( addr len -- ) + ." ----- Trying conf " 2dup type cr 0 to end_of_file? reset_line_reading O_RDONLY fopen fd ! - fd @ -1 = if open_error throw then + fd @ -1 = if EOPEN throw then ['] process_conf catch fd @ fclose throw *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:15:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCCB01065674 for ; Mon, 5 Jan 2009 20:15:32 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id EFC9C8FC1A for ; Mon, 5 Jan 2009 20:15:31 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jan 2009 20:15:30 -0000 Received: from p54A3E58D.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.141] by mail.gmx.net (mp001) with SMTP; 05 Jan 2009 21:15:30 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1+T8dxRKVeTwa01BXZql77v1sMZBOgB9uswM+Lsz2 2c35lbgS/TdRm6 Message-ID: <49626A60.70808@gmx.de> Date: Mon, 05 Jan 2009 21:15:28 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> In-Reply-To: <20090105194210.P45399@maildrop.int.zabbadoz.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.59 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:15:33 -0000 Bjoern A. Zeeb schrieb: > On Mon, 5 Jan 2009, Christoph Mallon wrote: >> Bjoern A. Zeeb schrieb: >>> I have broken it out from a larger patch; the C99 initializer is here: >>> http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff >>> >>> I case someone can give it a quick glance I'll commit them. >> >> + .pr_flags = PR_ATOMIC|PR_ADDR, >> >> style(9) wants spaces around binary operators. > > I am not sure it does. "Unary operators do not require spaces, binary operators do." I guess only "usual" binary operators are meant here and it does not include ",", "[]" or "->". > In case it does I am not going to break > consistency with all other 65 places that don't do for pr_flags; You have a point there. Maybe these should be fixed all at once. > but it seems I should change the = to =. /after/ =? This sounds wrong to me. (In general I think using for alignment is a bad idea and it should only be used for indentation) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:23:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93A881065670; Mon, 5 Jan 2009 20:23:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FA7B8FC1F; Mon, 5 Jan 2009 20:23:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KN118009901; Mon, 5 Jan 2009 20:23:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KN1BD009899; Mon, 5 Jan 2009 20:23:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901052023.n05KN1BD009899@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 20:23: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: r186790 - stable/7/sys/dev/sdhci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:23:02 -0000 Author: mav Date: Mon Jan 5 20:23:01 2009 New Revision: 186790 URL: http://svn.freebsd.org/changeset/base/186790 Log: MFC sdhci driver. Added: stable/7/sys/dev/sdhci/ stable/7/sys/dev/sdhci/sdhci.c (contents, props changed) stable/7/sys/dev/sdhci/sdhci.h (contents, props changed) Added: stable/7/sys/dev/sdhci/sdhci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/dev/sdhci/sdhci.c Mon Jan 5 20:23:01 2009 (r186790) @@ -0,0 +1,1566 @@ +/*- + * Copyright (c) 2008 Alexander Motin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include "mmcbr_if.h" +#include "sdhci.h" + +#define DMA_BLOCK_SIZE 4096 +#define DMA_BOUNDARY 0 /* DMA reload every 4K */ + +/* Controller doesn't honor resets unless we touch the clock register */ +#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0) +/* Controller really supports DMA */ +#define SDHCI_QUIRK_FORCE_DMA (1<<1) +/* Controller has unusable DMA engine */ +#define SDHCI_QUIRK_BROKEN_DMA (1<<2) +/* Controller doesn't like to be reset when there is no card inserted. */ +#define SDHCI_QUIRK_NO_CARD_NO_RESET (1<<3) +/* Controller has flaky internal state so reset it on each ios change */ +#define SDHCI_QUIRK_RESET_ON_IOS (1<<4) +/* Controller can only DMA chunk sizes that are a multiple of 32 bits */ +#define SDHCI_QUIRK_32BIT_DMA_SIZE (1<<5) +/* Controller needs to be reset after each request to stay stable */ +#define SDHCI_QUIRK_RESET_AFTER_REQUEST (1<<6) +/* Controller has an off-by-one issue with timeout value */ +#define SDHCI_QUIRK_INCR_TIMEOUT_CONTROL (1<<7) +/* Controller has broken read timings */ +#define SDHCI_QUIRK_BROKEN_TIMINGS (1<<8) + +static const struct sdhci_device { + uint32_t model; + uint16_t subvendor; + char *desc; + u_int quirks; +} sdhci_devices[] = { + { 0x08221180, 0xffff, "RICOH R5C822 SD", + SDHCI_QUIRK_FORCE_DMA }, + { 0x8034104c, 0xffff, "TI XX21/XX11 SD", + SDHCI_QUIRK_FORCE_DMA }, + { 0x05501524, 0xffff, "ENE CB712 SD", + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x05511524, 0xffff, "ENE CB712 SD 2", + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x07501524, 0xffff, "ENE CB714 SD", + SDHCI_QUIRK_RESET_ON_IOS | + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x07511524, 0xffff, "ENE CB714 SD 2", + SDHCI_QUIRK_RESET_ON_IOS | + SDHCI_QUIRK_BROKEN_TIMINGS }, + { 0x410111ab, 0xffff, "Marvell CaFe SD", + SDHCI_QUIRK_INCR_TIMEOUT_CONTROL }, + { 0x2381197B, 0xffff, "JMicron JMB38X SD", + SDHCI_QUIRK_32BIT_DMA_SIZE | + SDHCI_QUIRK_RESET_AFTER_REQUEST }, + { 0, 0xffff, NULL, + 0 } +}; + +struct sdhci_softc; + +struct sdhci_slot { + struct sdhci_softc *sc; + device_t dev; /* Slot device */ + u_char num; /* Slot number */ + u_char opt; /* Slot options */ +#define SDHCI_HAVE_DMA 1 + uint32_t max_clk; /* Max possible freq */ + uint32_t timeout_clk; /* Timeout freq */ + struct resource *mem_res; /* Memory resource */ + int mem_rid; + bus_dma_tag_t dmatag; + bus_dmamap_t dmamap; + u_char *dmamem; + bus_addr_t paddr; /* DMA buffer address */ + struct task card_task; /* Card presence check task */ + struct callout card_callout; /* Card insert delay callout */ + struct mmc_host host; /* Host parameters */ + struct mmc_request *req; /* Current request */ + struct mmc_command *curcmd; /* Current command of current request */ + + uint32_t intmask; /* Current interrupt mask */ + uint32_t clock; /* Current clock freq. */ + size_t offset; /* Data buffer offset */ + uint8_t hostctrl; /* Current host control register */ + u_char power; /* Current power */ + u_char bus_busy; /* Bus busy status */ + u_char cmd_done; /* CMD command part done flag */ + u_char data_done; /* DAT command part done flag */ + u_char flags; /* Request execution flags */ +#define CMD_STARTED 1 +#define STOP_STARTED 2 +#define SDHCI_USE_DMA 4 /* Use DMA for this req. */ + struct mtx mtx; /* Slot mutex */ +}; + +struct sdhci_softc { + device_t dev; /* Controller device */ + u_int quirks; /* Chip specific quirks */ + struct resource *irq_res; /* IRQ resource */ + int irq_rid; + void *intrhand; /* Interrupt handle */ + + int num_slots; /* Number of slots on this controller */ + struct sdhci_slot slots[6]; +}; + +static inline uint8_t +RD1(struct sdhci_slot *slot, bus_size_t off) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_1(slot->mem_res, off); +} + +static inline void +WR1(struct sdhci_slot *slot, bus_size_t off, uint8_t val) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_1(slot->mem_res, off, val); +} + +static inline uint16_t +RD2(struct sdhci_slot *slot, bus_size_t off) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_2(slot->mem_res, off); +} + +static inline void +WR2(struct sdhci_slot *slot, bus_size_t off, uint16_t val) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_2(slot->mem_res, off, val); +} + +static inline uint32_t +RD4(struct sdhci_slot *slot, bus_size_t off) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + return bus_read_4(slot->mem_res, off); +} + +static inline void +WR4(struct sdhci_slot *slot, bus_size_t off, uint32_t val) +{ + bus_barrier(slot->mem_res, 0, 0xFF, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + bus_write_4(slot->mem_res, off, val); +} + +/* bus entry points */ +static int sdhci_probe(device_t dev); +static int sdhci_attach(device_t dev); +static int sdhci_detach(device_t dev); +static void sdhci_intr(void *); + +static void sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock); +static void sdhci_start(struct sdhci_slot *slot); +static void sdhci_start_data(struct sdhci_slot *slot, struct mmc_data *data); + +static void sdhci_card_task(void *, int); + +/* helper routines */ +#define SDHCI_LOCK(_slot) mtx_lock(&(_slot)->mtx) +#define SDHCI_UNLOCK(_slot) mtx_unlock(&(_slot)->mtx) +#define SDHCI_LOCK_INIT(_slot) \ + mtx_init(&_slot->mtx, "SD slot mtx", "sdhci", MTX_DEF) +#define SDHCI_LOCK_DESTROY(_slot) mtx_destroy(&_slot->mtx); +#define SDHCI_ASSERT_LOCKED(_slot) mtx_assert(&_slot->mtx, MA_OWNED); +#define SDHCI_ASSERT_UNLOCKED(_slot) mtx_assert(&_slot->mtx, MA_NOTOWNED); + +static int +slot_printf(struct sdhci_slot *slot, const char * fmt, ...) +{ + va_list ap; + int retval; + + retval = printf("%s-slot%d: ", + device_get_nameunit(slot->sc->dev), slot->num); + + va_start(ap, fmt); + retval += vprintf(fmt, ap); + va_end(ap); + return (retval); +} + +static void +sdhci_getaddr(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + if (error != 0) { + printf("getaddr: error %d\n", error); + return; + } + *(bus_addr_t *)arg = segs[0].ds_addr; +} + +static void +sdhci_dumpregs(struct sdhci_slot *slot) +{ + slot_printf(slot, + "============== REGISTER DUMP ==============\n"); + + slot_printf(slot, "Sys addr: 0x%08x | Version: 0x%08x\n", + RD4(slot, SDHCI_DMA_ADDRESS), RD2(slot, SDHCI_HOST_VERSION)); + slot_printf(slot, "Blk size: 0x%08x | Blk cnt: 0x%08x\n", + RD2(slot, SDHCI_BLOCK_SIZE), RD2(slot, SDHCI_BLOCK_COUNT)); + slot_printf(slot, "Argument: 0x%08x | Trn mode: 0x%08x\n", + RD4(slot, SDHCI_ARGUMENT), RD2(slot, SDHCI_TRANSFER_MODE)); + slot_printf(slot, "Present: 0x%08x | Host ctl: 0x%08x\n", + RD4(slot, SDHCI_PRESENT_STATE), RD1(slot, SDHCI_HOST_CONTROL)); + slot_printf(slot, "Power: 0x%08x | Blk gap: 0x%08x\n", + RD1(slot, SDHCI_POWER_CONTROL), RD1(slot, SDHCI_BLOCK_GAP_CONTROL)); + slot_printf(slot, "Wake-up: 0x%08x | Clock: 0x%08x\n", + RD1(slot, SDHCI_WAKE_UP_CONTROL), RD2(slot, SDHCI_CLOCK_CONTROL)); + slot_printf(slot, "Timeout: 0x%08x | Int stat: 0x%08x\n", + RD1(slot, SDHCI_TIMEOUT_CONTROL), RD4(slot, SDHCI_INT_STATUS)); + slot_printf(slot, "Int enab: 0x%08x | Sig enab: 0x%08x\n", + RD4(slot, SDHCI_INT_ENABLE), RD4(slot, SDHCI_SIGNAL_ENABLE)); + slot_printf(slot, "AC12 err: 0x%08x | Slot int: 0x%08x\n", + RD2(slot, SDHCI_ACMD12_ERR), RD2(slot, SDHCI_SLOT_INT_STATUS)); + slot_printf(slot, "Caps: 0x%08x | Max curr: 0x%08x\n", + RD4(slot, SDHCI_CAPABILITIES), RD4(slot, SDHCI_MAX_CURRENT)); + + slot_printf(slot, + "===========================================\n"); +} + +static void +sdhci_reset(struct sdhci_slot *slot, uint8_t mask) +{ + int timeout; + uint8_t res; + + if (slot->sc->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { + if (!(RD4(slot, SDHCI_PRESENT_STATE) & + SDHCI_CARD_PRESENT)) + return; + } + + /* Some controllers need this kick or reset won't work. */ + if ((mask & SDHCI_RESET_ALL) == 0 && + (slot->sc->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET)) { + uint32_t clock; + + /* This is to force an update */ + clock = slot->clock; + slot->clock = 0; + sdhci_set_clock(slot, clock); + } + + WR1(slot, SDHCI_SOFTWARE_RESET, mask); + + if (mask & SDHCI_RESET_ALL) { + slot->clock = 0; + slot->power = 0; + } + + /* Wait max 100 ms */ + timeout = 100; + /* Controller clears the bits when it's done */ + while ((res = RD1(slot, SDHCI_SOFTWARE_RESET)) & mask) { + if (timeout == 0) { + slot_printf(slot, + "Reset 0x%x never completed - 0x%x.\n", + (int)mask, (int)res); + sdhci_dumpregs(slot); + return; + } + timeout--; + DELAY(1000); + } +} + +static void +sdhci_init(struct sdhci_slot *slot) +{ + + sdhci_reset(slot, SDHCI_RESET_ALL); + + /* Enable interrupts. */ + slot->intmask = SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT | + SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX | + SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT | + SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT | + SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | + SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE | + SDHCI_INT_ACMD12ERR; + WR4(slot, SDHCI_INT_ENABLE, slot->intmask); + WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask); +} + +static void +sdhci_set_clock(struct sdhci_slot *slot, uint32_t clock) +{ + uint32_t res; + uint16_t clk; + int timeout; + + if (clock == slot->clock) + return; + slot->clock = clock; + + /* Turn off the clock. */ + WR2(slot, SDHCI_CLOCK_CONTROL, 0); + /* If no clock requested - left it so. */ + if (clock == 0) + return; + /* Looking for highest freq <= clock. */ + res = slot->max_clk; + for (clk = 1; clk < 256; clk <<= 1) { + if (res <= clock) + break; + res >>= 1; + } + /* Divider 1:1 is 0x00, 2:1 is 0x01, 256:1 is 0x80 ... */ + clk >>= 1; + /* Now we have got divider, set it. */ + clk <<= SDHCI_DIVIDER_SHIFT; + WR2(slot, SDHCI_CLOCK_CONTROL, clk); + /* Enable clock. */ + clk |= SDHCI_CLOCK_INT_EN; + WR2(slot, SDHCI_CLOCK_CONTROL, clk); + /* Wait up to 10 ms until it stabilize. */ + timeout = 10; + while (!((clk = RD2(slot, SDHCI_CLOCK_CONTROL)) + & SDHCI_CLOCK_INT_STABLE)) { + if (timeout == 0) { + slot_printf(slot, + "Internal clock never stabilised.\n"); + sdhci_dumpregs(slot); + return; + } + timeout--; + DELAY(1000); + } + /* Pass clock signal to the bus. */ + clk |= SDHCI_CLOCK_CARD_EN; + WR2(slot, SDHCI_CLOCK_CONTROL, clk); +} + +static void +sdhci_set_power(struct sdhci_slot *slot, u_char power) +{ + uint8_t pwr; + + if (slot->power == power) + return; + slot->power = power; + + /* Turn off the power. */ + pwr = 0; + WR1(slot, SDHCI_POWER_CONTROL, pwr); + /* If power down requested - left it so. */ + if (power == 0) + return; + /* Set voltage. */ + switch (1 << power) { + case MMC_OCR_LOW_VOLTAGE: + pwr |= SDHCI_POWER_180; + break; + case MMC_OCR_290_300: + case MMC_OCR_300_310: + pwr |= SDHCI_POWER_300; + break; + case MMC_OCR_320_330: + case MMC_OCR_330_340: + pwr |= SDHCI_POWER_330; + break; + } + WR1(slot, SDHCI_POWER_CONTROL, pwr); + /* Turn on the power. */ + pwr |= SDHCI_POWER_ON; + WR1(slot, SDHCI_POWER_CONTROL, pwr); +} + +static void +sdhci_read_block_pio(struct sdhci_slot *slot) +{ + uint32_t data; + char *buffer; + size_t left; + + buffer = slot->curcmd->data->data; + buffer += slot->offset; + /* Transfer one block at a time. */ + left = min(512, slot->curcmd->data->len - slot->offset); + slot->offset += left; + + /* If we are too fast, broken controllers return zeroes. */ + if (slot->sc->quirks & SDHCI_QUIRK_BROKEN_TIMINGS) + DELAY(10); + /* Handle unalligned and alligned buffer cases. */ + if ((intptr_t)buffer & 3) { + while (left > 3) { + data = RD4(slot, SDHCI_BUFFER); + buffer[0] = data; + buffer[1] = (data >> 8); + buffer[2] = (data >> 16); + buffer[3] = (data >> 24); + buffer += 4; + left -= 4; + } + } else { + bus_read_multi_stream_4(slot->mem_res, SDHCI_BUFFER, + (uint32_t *)buffer, left >> 2); + left &= 3; + } + /* Handle uneven size case. */ + if (left > 0) { + data = RD4(slot, SDHCI_BUFFER); + while (left > 0) { + *(buffer++) = data; + data >>= 8; + left--; + } + } +} + +static void +sdhci_write_block_pio(struct sdhci_slot *slot) +{ + uint32_t data = 0; + char *buffer; + size_t left; + + buffer = slot->curcmd->data->data; + buffer += slot->offset; + /* Transfer one block at a time. */ + left = min(512, slot->curcmd->data->len - slot->offset); + slot->offset += left; + + /* Handle unalligned and alligned buffer cases. */ + if ((intptr_t)buffer & 3) { + while (left > 3) { + data = buffer[0] + + (buffer[1] << 8) + + (buffer[2] << 16) + + (buffer[3] << 24); + left -= 4; + buffer += 4; + WR4(slot, SDHCI_BUFFER, data); + } + } else { + bus_write_multi_stream_4(slot->mem_res, SDHCI_BUFFER, + (uint32_t *)buffer, left >> 2); + left &= 3; + } + /* Handle uneven size case. */ + if (left > 0) { + while (left > 0) { + data <<= 8; + data += *(buffer++); + left--; + } + WR4(slot, SDHCI_BUFFER, data); + } +} + +static void +sdhci_transfer_pio(struct sdhci_slot *slot) +{ + + /* Read as many blocks as possible. */ + if (slot->curcmd->data->flags & MMC_DATA_READ) { + while (RD4(slot, SDHCI_PRESENT_STATE) & + SDHCI_DATA_AVAILABLE) { + sdhci_read_block_pio(slot); + if (slot->offset >= slot->curcmd->data->len) + break; + } + } else { + while (RD4(slot, SDHCI_PRESENT_STATE) & + SDHCI_SPACE_AVAILABLE) { + sdhci_write_block_pio(slot); + if (slot->offset >= slot->curcmd->data->len) + break; + } + } +} + +static void +sdhci_card_delay(void *arg) +{ + struct sdhci_slot *slot = arg; + + taskqueue_enqueue(taskqueue_swi_giant, &slot->card_task); +} + +static void +sdhci_card_task(void *arg, int pending) +{ + struct sdhci_slot *slot = arg; + + SDHCI_LOCK(slot); + if (RD4(slot, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT) { + if (slot->dev == NULL) { + /* If card is present - attach mmc bus. */ + slot->dev = device_add_child(slot->sc->dev, "mmc", -1); + device_set_ivars(slot->dev, slot); + SDHCI_UNLOCK(slot); + device_probe_and_attach(slot->dev); + } else + SDHCI_UNLOCK(slot); + } else { + if (slot->dev != NULL) { + /* If no card present - detach mmc bus. */ + device_t d = slot->dev; + slot->dev = NULL; + SDHCI_UNLOCK(slot); + device_delete_child(slot->sc->dev, d); + } else + SDHCI_UNLOCK(slot); + } +} + +static int +sdhci_probe(device_t dev) +{ + uint32_t model; + uint16_t subvendor; + uint8_t class, subclass; + int i, result; + + model = (uint32_t)pci_get_device(dev) << 16; + model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; + subvendor = pci_get_subvendor(dev); + class = pci_get_class(dev); + subclass = pci_get_subclass(dev); + + result = ENXIO; + for (i = 0; sdhci_devices[i].model != 0; i++) { + if (sdhci_devices[i].model == model && + (sdhci_devices[i].subvendor == 0xffff || + sdhci_devices[i].subvendor == subvendor)) { + device_set_desc(dev, sdhci_devices[i].desc); + result = BUS_PROBE_DEFAULT; + break; + } + } + if (result == ENXIO && class == PCIC_BASEPERIPH && + subclass == PCIS_BASEPERIPH_SDHC) { + device_set_desc(dev, "Generic SD HCI"); + result = BUS_PROBE_GENERIC; + } + + return (result); +} + +static int +sdhci_attach(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + uint32_t model; + uint16_t subvendor; + uint8_t class, subclass, progif; + int err, slots, bar, i; + + sc->dev = dev; + model = (uint32_t)pci_get_device(dev) << 16; + model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; + subvendor = pci_get_subvendor(dev); + class = pci_get_class(dev); + subclass = pci_get_subclass(dev); + progif = pci_get_progif(dev); + /* Apply chip specific quirks. */ + for (i = 0; sdhci_devices[i].model != 0; i++) { + if (sdhci_devices[i].model == model && + (sdhci_devices[i].subvendor == 0xffff || + sdhci_devices[i].subvendor == subvendor)) { + sc->quirks = sdhci_devices[i].quirks; + break; + } + } + /* Read slots info from PCI registers. */ + slots = pci_read_config(dev, PCI_SLOT_INFO, 1); + bar = PCI_SLOT_INFO_FIRST_BAR(slots); + slots = PCI_SLOT_INFO_SLOTS(slots); + if (slots > 6 || bar > 5) { + device_printf(dev, "Incorrect slots information (%d, %d).\n", + slots, bar); + return (EINVAL); + } + /* Allocate IRQ. */ + sc->irq_rid = 0; + sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid, + RF_SHAREABLE | RF_ACTIVE); + if (sc->irq_res == NULL) { + device_printf(dev, "Can't allocate IRQ\n"); + return (ENOMEM); + } + /* Scan all slots. */ + for (i = 0; i < slots; i++) { + struct sdhci_slot *slot = &sc->slots[sc->num_slots]; + uint32_t caps; + + SDHCI_LOCK_INIT(slot); + slot->sc = sc; + slot->num = sc->num_slots; + /* Allocate memory. */ + slot->mem_rid = PCIR_BAR(bar + i); + slot->mem_res = bus_alloc_resource(dev, + SYS_RES_MEMORY, &slot->mem_rid, 0ul, ~0ul, 0x100, RF_ACTIVE); + if (slot->mem_res == NULL) { + device_printf(dev, "Can't allocate memory\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Allocate DMA tag. */ + err = bus_dma_tag_create(bus_get_dma_tag(dev), + DMA_BLOCK_SIZE, 0, BUS_SPACE_MAXADDR_32BIT, + BUS_SPACE_MAXADDR, NULL, NULL, + DMA_BLOCK_SIZE, 1, DMA_BLOCK_SIZE, + BUS_DMA_ALLOCNOW, NULL, NULL, + &slot->dmatag); + if (err != 0) { + device_printf(dev, "Can't create DMA tag\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Allocate DMA memory. */ + err = bus_dmamem_alloc(slot->dmatag, (void **)&slot->dmamem, + BUS_DMA_NOWAIT, &slot->dmamap); + if (err != 0) { + device_printf(dev, "Can't alloc DMA memory\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Map the memory. */ + err = bus_dmamap_load(slot->dmatag, slot->dmamap, + (void *)slot->dmamem, DMA_BLOCK_SIZE, + sdhci_getaddr, &slot->paddr, 0); + if (err != 0 || slot->paddr == 0) { + device_printf(dev, "Can't load DMA memory\n"); + SDHCI_LOCK_DESTROY(slot); + continue; + } + /* Initialize slot. */ + sdhci_init(slot); + caps = RD4(slot, SDHCI_CAPABILITIES); + /* Calculate base clock frequency. */ + slot->max_clk = + (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; + if (slot->max_clk == 0) { + device_printf(dev, "Hardware doesn't specify base clock " + "frequency.\n"); + } + slot->max_clk *= 1000000; + /* Calculate timeout clock frequency. */ + slot->timeout_clk = + (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; + if (slot->timeout_clk == 0) { + device_printf(dev, "Hardware doesn't specify timeout clock " + "frequency.\n"); + } + if (caps & SDHCI_TIMEOUT_CLK_UNIT) + slot->timeout_clk *= 1000; + + slot->host.f_min = slot->max_clk / 256; + slot->host.f_max = slot->max_clk; + slot->host.host_ocr = 0; + if (caps & SDHCI_CAN_VDD_330) + slot->host.host_ocr |= MMC_OCR_320_330 | MMC_OCR_330_340; + if (caps & SDHCI_CAN_VDD_300) + slot->host.host_ocr |= MMC_OCR_290_300 | MMC_OCR_300_310; + if (caps & SDHCI_CAN_VDD_180) + slot->host.host_ocr |= MMC_OCR_LOW_VOLTAGE; + if (slot->host.host_ocr == 0) { + device_printf(dev, "Hardware doesn't report any " + "support voltages.\n"); + } + slot->host.caps = MMC_CAP_4_BIT_DATA; + if (caps & SDHCI_CAN_DO_HISPD) + slot->host.caps |= MMC_CAP_HSPEED; + /* Decide if we have usable DMA. */ + if (caps & SDHCI_CAN_DO_DMA) + slot->opt |= SDHCI_HAVE_DMA; + if (class == PCIC_BASEPERIPH && + subclass == PCIS_BASEPERIPH_SDHC && + progif != PCI_SDHCI_IFDMA) + slot->opt &= ~SDHCI_HAVE_DMA; + if (sc->quirks & SDHCI_QUIRK_BROKEN_DMA) + slot->opt &= ~SDHCI_HAVE_DMA; + if (sc->quirks & SDHCI_QUIRK_FORCE_DMA) + slot->opt |= SDHCI_HAVE_DMA; + + if (bootverbose) { + slot_printf(slot, "%uMHz%s 4bits%s%s%s %s\n", + slot->max_clk / 1000000, + (caps & SDHCI_CAN_DO_HISPD) ? " HS" : "", + (caps & SDHCI_CAN_VDD_330) ? " 3.3V" : "", + (caps & SDHCI_CAN_VDD_300) ? " 3.0V" : "", + (caps & SDHCI_CAN_VDD_180) ? " 1.8V" : "", + (slot->opt & SDHCI_HAVE_DMA) ? "DMA" : "PIO"); + sdhci_dumpregs(slot); + } + + TASK_INIT(&slot->card_task, 0, sdhci_card_task, slot); + callout_init(&slot->card_callout, 1); + sc->num_slots++; + } + device_printf(dev, "%d slot(s) allocated\n", sc->num_slots); + /* Activate the interrupt */ + err = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_MISC | INTR_MPSAFE, + NULL, sdhci_intr, sc, &sc->intrhand); + if (err) + device_printf(dev, "Can't setup IRQ\n"); + pci_enable_busmaster(dev); + /* Process cards detection. */ + for (i = 0; i < sc->num_slots; i++) { + struct sdhci_slot *slot = &sc->slots[i]; + + sdhci_card_task(slot, 0); + } + + return (0); +} + +static int +sdhci_detach(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + int i; + + bus_teardown_intr(dev, sc->irq_res, sc->intrhand); + bus_release_resource(dev, SYS_RES_IRQ, + sc->irq_rid, sc->irq_res); + + for (i = 0; i < sc->num_slots; i++) { + struct sdhci_slot *slot = &sc->slots[i]; + device_t d; + + callout_drain(&slot->card_callout); + taskqueue_drain(taskqueue_swi_giant, &slot->card_task); + + SDHCI_LOCK(slot); + d = slot->dev; + slot->dev = NULL; + SDHCI_UNLOCK(slot); + if (d != NULL) + device_delete_child(dev, d); + + SDHCI_LOCK(slot); + sdhci_reset(slot, SDHCI_RESET_ALL); + SDHCI_UNLOCK(slot); + bus_dmamap_unload(slot->dmatag, slot->dmamap); + bus_dmamem_free(slot->dmatag, slot->dmamem, slot->dmamap); + bus_dma_tag_destroy(slot->dmatag); + bus_release_resource(dev, SYS_RES_MEMORY, + slot->mem_rid, slot->mem_res); + SDHCI_LOCK_DESTROY(slot); + } + return (0); +} + +static int +sdhci_suspend(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + int i, err; + + err = bus_generic_suspend(dev); + if (err) + return (err); + for (i = 0; i < sc->num_slots; i++) + sdhci_reset(&sc->slots[i], SDHCI_RESET_ALL); + return (0); +} + +static int +sdhci_resume(device_t dev) +{ + struct sdhci_softc *sc = device_get_softc(dev); + int i; + + for (i = 0; i < sc->num_slots; i++) + sdhci_init(&sc->slots[i]); + return (bus_generic_resume(dev)); +} + +static int +sdhci_update_ios(device_t brdev, device_t reqdev) +{ + struct sdhci_slot *slot = device_get_ivars(reqdev); + struct mmc_ios *ios = &slot->host.ios; + + SDHCI_LOCK(slot); + /* Do full reset on bus power down to clear from any state. */ + if (ios->power_mode == power_off) { + WR4(slot, SDHCI_SIGNAL_ENABLE, 0); + sdhci_init(slot); + } + /* Configure the bus. */ + sdhci_set_clock(slot, ios->clock); + sdhci_set_power(slot, (ios->power_mode == power_off)?0:ios->vdd); + if (ios->bus_width == bus_width_4) + slot->hostctrl |= SDHCI_CTRL_4BITBUS; + else + slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; + if (ios->timing == bus_timing_hs) + slot->hostctrl |= SDHCI_CTRL_HISPD; + else + slot->hostctrl &= ~SDHCI_CTRL_HISPD; + WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl); + /* Some controllers like reset after bus changes. */ + if(slot->sc->quirks & SDHCI_QUIRK_RESET_ON_IOS) + sdhci_reset(slot, SDHCI_RESET_CMD | SDHCI_RESET_DATA); + + SDHCI_UNLOCK(slot); + return (0); +} + +static void +sdhci_set_transfer_mode(struct sdhci_slot *slot, + struct mmc_data *data) +{ + uint16_t mode; + + if (data == NULL) + return; + + mode = SDHCI_TRNS_BLK_CNT_EN; + if (data->len > 512) + mode |= SDHCI_TRNS_MULTI; + if (data->flags & MMC_DATA_READ) + mode |= SDHCI_TRNS_READ; + if (slot->req->stop) + mode |= SDHCI_TRNS_ACMD12; + if (slot->flags & SDHCI_USE_DMA) + mode |= SDHCI_TRNS_DMA; + + WR2(slot, SDHCI_TRANSFER_MODE, mode); +} + +static void +sdhci_start_command(struct sdhci_slot *slot, struct mmc_command *cmd) +{ + struct mmc_request *req = slot->req; + int flags, timeout; + uint32_t mask, state; + + slot->curcmd = cmd; + slot->cmd_done = 0; + + cmd->error = MMC_ERR_NONE; + + /* This flags combination is not supported by controller. */ + if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { + slot_printf(slot, "Unsupported response type!\n"); + cmd->error = MMC_ERR_FAILED; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + return; + } + + /* Read controller present state. */ + state = RD4(slot, SDHCI_PRESENT_STATE); + /* Do not issue command if there is no card, clock or power. + * Controller will not detect timeout without clock active. */ + if ((state & SDHCI_CARD_PRESENT) == 0 || + slot->power == 0 || + slot->clock == 0) { + cmd->error = MMC_ERR_FAILED; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + return; + } + /* Always wait for free CMD bus. */ + mask = SDHCI_CMD_INHIBIT; + /* Wait for free DAT if we have data or busy signal. */ + if (cmd->data || (cmd->flags & MMC_RSP_BUSY)) + mask |= SDHCI_DAT_INHIBIT; + /* We shouldn't wait for DAT for stop commands. */ + if (cmd == slot->req->stop) + mask &= ~SDHCI_DAT_INHIBIT; + /* Wait for bus no more then 10 ms. */ + timeout = 10; + while (state & mask) { + if (timeout == 0) { + slot_printf(slot, "Controller never released " + "inhibit bit(s).\n"); + sdhci_dumpregs(slot); + cmd->error = MMC_ERR_FAILED; + slot->req = NULL; + slot->curcmd = NULL; + req->done(req); + return; + } + timeout--; + DELAY(1000); + state = RD4(slot, SDHCI_PRESENT_STATE); + } + + /* Prepare command flags. */ + if (!(cmd->flags & MMC_RSP_PRESENT)) + flags = SDHCI_CMD_RESP_NONE; + else if (cmd->flags & MMC_RSP_136) + flags = SDHCI_CMD_RESP_LONG; + else if (cmd->flags & MMC_RSP_BUSY) + flags = SDHCI_CMD_RESP_SHORT_BUSY; + else + flags = SDHCI_CMD_RESP_SHORT; + if (cmd->flags & MMC_RSP_CRC) + flags |= SDHCI_CMD_CRC; + if (cmd->flags & MMC_RSP_OPCODE) + flags |= SDHCI_CMD_INDEX; + if (cmd->data) + flags |= SDHCI_CMD_DATA; + if (cmd->opcode == MMC_STOP_TRANSMISSION) + flags |= SDHCI_CMD_TYPE_ABORT; + /* Prepare data. */ + sdhci_start_data(slot, cmd->data); + /* + * Interrupt aggregation: To reduce total number of interrupts + * group response interrupt with data interrupt when possible. + * If there going to be data interrupt, mask response one. + */ + if (slot->data_done == 0) { + WR4(slot, SDHCI_SIGNAL_ENABLE, + slot->intmask &= ~SDHCI_INT_RESPONSE); + } + /* Set command argument. */ + WR4(slot, SDHCI_ARGUMENT, cmd->arg); + /* Set data transfer mode. */ + sdhci_set_transfer_mode(slot, cmd->data); + /* Set command flags. */ + WR1(slot, SDHCI_COMMAND_FLAGS, flags); + /* Start command. */ + WR1(slot, SDHCI_COMMAND, cmd->opcode); +} + +static void +sdhci_finish_command(struct sdhci_slot *slot) +{ + int i; + + slot->cmd_done = 1; + /* Interrupt aggregation: Restore command interrupt. + * Main restore point for the case when command interrupt + * happened first. */ + WR4(slot, SDHCI_SIGNAL_ENABLE, slot->intmask |= SDHCI_INT_RESPONSE); + /* In case of error - reset host and return. */ + if (slot->curcmd->error) { + sdhci_reset(slot, SDHCI_RESET_CMD); + sdhci_reset(slot, SDHCI_RESET_DATA); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:29:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 765791065675; Mon, 5 Jan 2009 20:29:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 648198FC08; Mon, 5 Jan 2009 20:29:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KT1n4010056; Mon, 5 Jan 2009 20:29:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KT1OL010054; Mon, 5 Jan 2009 20:29:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901052029.n05KT1OL010054@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 5 Jan 2009 20:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186791 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:29:02 -0000 Author: bz Date: Mon Jan 5 20:29:01 2009 New Revision: 186791 URL: http://svn.freebsd.org/changeset/base/186791 Log: Switch the last protosw* structs to C99 initializers. Reviewed by: ed, julian, Christoph Mallon MFC after: 2 weeks Modified: head/sys/netinet6/in6_gif.c head/sys/netipsec/xform_ipip.c Modified: head/sys/netinet6/in6_gif.c ============================================================================== --- head/sys/netinet6/in6_gif.c Mon Jan 5 20:23:01 2009 (r186790) +++ head/sys/netinet6/in6_gif.c Mon Jan 5 20:29:01 2009 (r186791) @@ -75,11 +75,15 @@ static int gif_validate6(const struct ip struct ifnet *); extern struct domain inet6domain; -struct ip6protosw in6_gif_protosw = -{ SOCK_RAW, &inet6domain, 0/* IPPROTO_IPV[46] */, PR_ATOMIC|PR_ADDR, - in6_gif_input, rip6_output, 0, rip6_ctloutput, - 0, 0, 0, 0, - &rip6_usrreqs +struct ip6protosw in6_gif_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inet6domain, + .pr_protocol = 0, /* IPPROTO_IPV[46] */ + .pr_flags = PR_ATOMIC|PR_ADDR, + .pr_input = in6_gif_input, + .pr_output = rip6_output, + .pr_ctloutput = rip6_ctloutput, + .pr_usrreqs = &rip6_usrreqs }; int Modified: head/sys/netipsec/xform_ipip.c ============================================================================== --- head/sys/netipsec/xform_ipip.c Mon Jan 5 20:23:01 2009 (r186790) +++ head/sys/netipsec/xform_ipip.c Mon Jan 5 20:29:01 2009 (r186791) @@ -660,20 +660,24 @@ static struct xformsw ipe4_xformsw = { }; extern struct domain inetdomain; -static struct protosw ipe4_protosw = -{ SOCK_RAW, &inetdomain, IPPROTO_IPV4, PR_ATOMIC|PR_ADDR|PR_LASTHDR, - ip4_input, - 0, 0, rip_ctloutput, - 0, 0, 0, 0, - &rip_usrreqs +static struct protosw ipe4_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_IPV4, + .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, + .pr_input = ip4_input, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; #ifdef INET6 -static struct ip6protosw ipe6_protosw = -{ SOCK_RAW, &inetdomain, IPPROTO_IPV6, PR_ATOMIC|PR_ADDR|PR_LASTHDR, - ip4_input6, - 0, 0, rip_ctloutput, - 0, 0, 0, 0, - &rip_usrreqs +static struct ip6protosw ipe6_protosw = { + .pr_type = SOCK_RAW, + .pr_domain = &inetdomain, + .pr_protocol = IPPROTO_IPV6, + .pr_flags = PR_ATOMIC|PR_ADDR|PR_LASTHDR, + .pr_input = ip4_input6, + .pr_ctloutput = rip_ctloutput, + .pr_usrreqs = &rip_usrreqs }; #endif From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:37:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFE8106566C; Mon, 5 Jan 2009 20:37:07 +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 6C8148FC21; Mon, 5 Jan 2009 20:37:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Kb7ac010254; Mon, 5 Jan 2009 20:37:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05Kb7pC010250; Mon, 5 Jan 2009 20:37:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901052037.n05Kb7pC010250@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 20:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186792 - in stable/7/sys: conf modules modules/sdhci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:37:08 -0000 Author: mav Date: Mon Jan 5 20:37:07 2009 New Revision: 186792 URL: http://svn.freebsd.org/changeset/base/186792 Log: MFC rev. 184138. Add mmc, mmcsd and sdhci modules to the build. Added: stable/7/sys/modules/sdhci/ stable/7/sys/modules/sdhci/Makefile (contents, props changed) Modified: stable/7/sys/conf/NOTES stable/7/sys/conf/files stable/7/sys/modules/Makefile Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Mon Jan 5 20:29:01 2009 (r186791) +++ stable/7/sys/conf/NOTES Mon Jan 5 20:37:07 2009 (r186792) @@ -2238,10 +2238,13 @@ device cardbus # # MMC/SD # -# mmc: mmc bus -# mmcsd: mmc memory and sd cards. -#device mmc -#device mmcsd +# mmc MMC/SD bus +# mmcsd MMC/SD memory card +# sdhci Generic PCI SD Host Controller +# +device mmc +device mmcsd +device sdhci # # SMB bus Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Mon Jan 5 20:29:01 2009 (r186791) +++ stable/7/sys/conf/files Mon Jan 5 20:37:07 2009 (r186792) @@ -935,6 +935,7 @@ dev/scc/scc_dev_sab82532.c optional scc dev/scc/scc_dev_z8530.c optional scc dev/scd/scd.c optional scd isa dev/scd/scd_isa.c optional scd isa +dev/sdhci/sdhci.c optional sdhci pci dev/sf/if_sf.c optional sf pci dev/si/si.c optional si dev/si/si2_z280.c optional si Modified: stable/7/sys/modules/Makefile ============================================================================== --- stable/7/sys/modules/Makefile Mon Jan 5 20:29:01 2009 (r186791) +++ stable/7/sys/modules/Makefile Mon Jan 5 20:37:07 2009 (r186792) @@ -180,6 +180,8 @@ SUBDIR= ${_3dfx} \ mii \ mlx \ ${_mly} \ + mmc \ + mmcsd \ mpt \ mqueue \ msdosfs \ @@ -246,6 +248,7 @@ SUBDIR= ${_3dfx} \ scc \ scd \ ${_scsi_low} \ + sdhci \ sem \ sf \ ${_sio} \ Added: stable/7/sys/modules/sdhci/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/sys/modules/sdhci/Makefile Mon Jan 5 20:37:07 2009 (r186792) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/sdhci + +KMOD= sdhci +SRCS= sdhci.c sdhci.h device_if.h bus_if.h pci_if.h mmcbr_if.h + +.include From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:43:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4E60106566B; Mon, 5 Jan 2009 20:43:57 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 777A68FC20; Mon, 5 Jan 2009 20:43:57 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id n05Khv5o084924; Mon, 5 Jan 2009 12:43:57 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id n05KhvZe084918; Mon, 5 Jan 2009 12:43:57 -0800 (PST) (envelope-from sgk) Date: Mon, 5 Jan 2009 12:43:56 -0800 From: Steve Kargl To: "Bjoern A. Zeeb" Message-ID: <20090105204356.GA52934@troutmask.apl.washington.edu> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090105194210.P45399@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Christoph Mallon , src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:43:58 -0000 On Mon, Jan 05, 2009 at 07:45:47PM +0000, Bjoern A. Zeeb wrote: > On Mon, 5 Jan 2009, Christoph Mallon wrote: > > Hi, > > >Bjoern A. Zeeb schrieb: > >>I have broken it out from a larger patch; the C99 initializer is here: > >>http://people.freebsd.org/~bz/20090105-02-c99-initializers.diff > >> > >>I case someone can give it a quick glance I'll commit them. > > > >+ .pr_flags = PR_ATOMIC|PR_ADDR, > > > >style(9) wants spaces around binary operators. > > I am not sure it does. In case it does I am not going to break > consistency with all other 65 places that don't do for pr_flags; > but it seems I should change the = to =. > Thanks for making me look, and thanks for review! > >From style(9): Unary operators do not require spaces, binary operators do. and Stylistic changes (including whitespace changes) are hard on the source repository and are to be avoided without good reason. So, it appears your change conforms to the prevailing style of the file, and is acceptable. -- Steve From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:46:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 601A610656C5; Mon, 5 Jan 2009 20:46:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D51B8FC0C; Mon, 5 Jan 2009 20:46:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KkkCo010604; Mon, 5 Jan 2009 20:46:46 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KkkAh010603; Mon, 5 Jan 2009 20:46:46 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901052046.n05KkkAh010603@svn.freebsd.org> From: Christian Brueffer Date: Mon, 5 Jan 2009 20:46:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186793 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:46:47 -0000 Author: brueffer Date: Mon Jan 5 20:46:46 2009 New Revision: 186793 URL: http://svn.freebsd.org/changeset/base/186793 Log: More wording improvements. Discussed with: stas Modified: head/share/man/man4/cpuctl.4 Modified: head/share/man/man4/cpuctl.4 ============================================================================== --- head/share/man/man4/cpuctl.4 Mon Jan 5 20:37:07 2009 (r186792) +++ head/share/man/man4/cpuctl.4 Mon Jan 5 20:46:46 2009 (r186793) @@ -45,18 +45,18 @@ at boot time, place the following in cpuctl_load="YES" .Ed .Sh DESCRIPTION -The special file +The special device .Pa /dev/cpuctl presents interface to the system CPU. It provides functionality to retrieve CPUID information, read/write machine specific registers (MSR) and perform CPU firmware updates. .Pp -For each CPU present in the system, the special file +For each CPU present in the system, the special device .Pa /dev/cpuctl%d with the appropriate index will be created. -For multicore CPUs such -special file will be created for each core. +For multicore CPUs such a +special device will be created for each core. .Pp Currently, only i386 and amd64 processors are supported. From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:55:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B034D10656BF; Mon, 5 Jan 2009 20:55:56 +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 9CE988FC13; Mon, 5 Jan 2009 20:55:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Ktu6M010925; Mon, 5 Jan 2009 20:55:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KtumJ010922; Mon, 5 Jan 2009 20:55:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901052055.n05KtumJ010922@svn.freebsd.org> From: Alexander Motin Date: Mon, 5 Jan 2009 20:55: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: r186794 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:55:57 -0000 Author: mav Date: Mon Jan 5 20:55:56 2009 New Revision: 186794 URL: http://svn.freebsd.org/changeset/base/186794 Log: MFC mmc, mmcsd and sdhci man pages. Added: stable/7/share/man/man4/sdhci.4 - copied unchanged from r184156, head/share/man/man4/sdhci.4 Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/mmc.4 stable/7/share/man/man4/mmcsd.4 Modified: stable/7/share/man/man4/mmc.4 ============================================================================== --- stable/7/share/man/man4/mmc.4 Mon Jan 5 20:46:46 2009 (r186793) +++ stable/7/share/man/man4/mmc.4 Mon Jan 5 20:55:56 2009 (r186794) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2007 +.Dd October 8, 2008 .Dt MMC 4 .Os .Sh NAME @@ -48,7 +48,8 @@ MultiMediaCards exist only in memory. SD Cards exist as memory, I/O, or combination cards. .Sh SEE ALSO .Xr mmcsd 4 , -.Xr at91_mci 4 +.Xr at91_mci 4 , +.Xr sdhci 4 .Rs .%T "SD Specifications, Part 1, Physical Layer, Simplified Specification" .Re @@ -56,6 +57,4 @@ SD Cards exist as memory, I/O, or combin .%T "The MultiMediaCard System Specification" .Re .Sh BUGS -Memory MultMediaCards do not currently work. SDIO cards currently do not work. -SDHC cards currently do not work. Modified: stable/7/share/man/man4/mmcsd.4 ============================================================================== --- stable/7/share/man/man4/mmcsd.4 Mon Jan 5 20:46:46 2009 (r186793) +++ stable/7/share/man/man4/mmcsd.4 Mon Jan 5 20:55:56 2009 (r186794) @@ -24,28 +24,25 @@ .\" .\" $FreeBSD$ .\" -.Dd May 26, 2007 +.Dd October 22, 2008 .Dt MMCSD 4 .Os .Sh NAME .Nm mmcsd -.Nd MMC and SD card driver. +.Nd MMC and SD memory card driver. .Sh SYNOPSIS .Cd device mmcsd .Sh DESCRIPTION The .Nm -driver implements the MMC and SD memory cards. +driver implements direct access block device for MMC and SD memory cards. .Sh SEE ALSO .Xr mmc 4 , -.Xr at91_mci 4 +.Xr at91_mci 4 , +.Xr sdhci 4 .Rs .%T "SD Specifications, Part 1, Physical Layer, Simplified Specification" .Re .Rs .%T "The MultiMediaCard System Specification" .Re -.Sh BUGS -Memory MultMediaCards do not currently work. -SDIO cards currently do not work. -SDHC cards currently do not work. Copied: stable/7/share/man/man4/sdhci.4 (from r184156, head/share/man/man4/sdhci.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/share/man/man4/sdhci.4 Mon Jan 5 20:55:56 2009 (r186794, copy of r184156, head/share/man/man4/sdhci.4) @@ -0,0 +1,52 @@ +.\" +.\" Copyright (c) 2008 Alexander Motin +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 22, 2008 +.Dt SDHCI 4 +.Os +.Sh NAME +.Nm sdhci +.Nd PCI SD Host Controller bridge driver +.Sh SYNOPSIS +.Cd device mmc +.Cd device mmcsd +.Cd device sdhci +.Sh DESCRIPTION +The +.Nm +driver supports PCI devices with class 8 and subclass 5 according to +SD Host Controller Specification. +Driver supports up to six high speed 4bit MMC/SD slots per controller. +Driver attaches mmc bus to the respective slot on card insertion and +detaches it on card removing. +.Sh SEE ALSO +.Xr mmc 4 , +.Xr mmcsd 4 +.Rs +.%T "SD Specifications, Part 2, SD Host Controller, Simplified Specification" +.Re +.Sh AUTHORS +.An Alexander Motin Aq mav@FreeBSD.org . From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:57:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA83106568E; Mon, 5 Jan 2009 20:57:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 665368FC13; Mon, 5 Jan 2009 20:57:21 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 50EE31A3C3B; Mon, 5 Jan 2009 12:57:21 -0800 (PST) Date: Mon, 5 Jan 2009 12:57:21 -0800 From: Alfred Perlstein To: "M. Warner Losh" Message-ID: <20090105205721.GH60686@elvis.mu.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090104.101121.2139791946.imp@bsdimp.com> <20090105050415.GY60686@elvis.mu.org> <20090105.090449.-1253035084.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090105.090449.-1253035084.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:57:22 -0000 * M. Warner Losh [090105 08:05] wrote: > In message: <20090105050415.GY60686@elvis.mu.org> > Alfred Perlstein writes: > : * M. Warner Losh [090104 09:11] wrote: > : > In message: <200901040012.n040C2gH040928@svn.freebsd.org> > : > Alfred Perlstein writes: > : > : Sync with usb4bsd: > : > > : > Alfred, > : > > : > thanks for trudging these fixes into the tree. It is a thankless job > : > that people will complain about... > : > > : > Speaking of complaining, is there a review process that can be joined > : > for them that's more formal than "diff against hps' p4 tree and > : > complain?" > : > : We're trying to figure out a way to do this. We haven't had much > : luck exploring svk/hg/git as they're just about as much work as > : shipping patches back and forth. > : > : I asked core for a restricted "users/hps" area under svn for Hans > : to put code, but that was denied, perhaps now it's time to reconsider > : that? > > And also: > > In my part of the world we give credit or, at the very least, say "thank > > you" to the sender, when we apply patches sent to us. > > One of the things that works well in Linux is the patch queues that > they have. You submit a patch, people talk about it, and various tags > get added to it. They break things down into a series of mostly > independent patches. > > Maybe we should try to initiate something like this so that we can > comment on changes more easily, as well as track submitters and the > like as things pass through Hans. > > Consider it an experiment to see if we can do things to help improve > our world? I guess so, but this can all be implemented via a sandbox in our VCS for Hans/me to use... or GNATS, but that just adds overhead. I sort of feel this would be reinventing something that we already have. -- - Alfred Perlstein From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 20:58:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E4D106566B; Mon, 5 Jan 2009 20:58:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0DAD8FC0C; Mon, 5 Jan 2009 20:58:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05KwfrN011026; Mon, 5 Jan 2009 20:58:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05KwfoM011025; Mon, 5 Jan 2009 20:58:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901052058.n05KwfoM011025@svn.freebsd.org> From: Warner Losh Date: Mon, 5 Jan 2009 20:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186795 - head/sys/dev/pccard X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 20:58:42 -0000 Author: imp Date: Mon Jan 5 20:58:41 2009 New Revision: 186795 URL: http://svn.freebsd.org/changeset/base/186795 Log: Define bits for memory mapping house keeping by bridges. Modified: head/sys/dev/pccard/pccardvar.h Modified: head/sys/dev/pccard/pccardvar.h ============================================================================== --- head/sys/dev/pccard/pccardvar.h Mon Jan 5 20:55:56 2009 (r186794) +++ head/sys/dev/pccard/pccardvar.h Mon Jan 5 20:58:41 2009 (r186795) @@ -69,6 +69,10 @@ struct pccard_mem_handle { int kind; }; +/* Bits for kind */ +#define PCCARD_MEM_16BIT 1 /* 1 -> 16bit 0 -> 8bit */ +#define PCCARD_MEM_ATTR 2 /* 1 -> attribute mem 0 -> common */ + #define PCCARD_WIDTH_AUTO 0 #define PCCARD_WIDTH_IO8 1 #define PCCARD_WIDTH_IO16 2 From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 21:00:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 855E1106566C; Mon, 5 Jan 2009 21:00:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 741F68FC17; Mon, 5 Jan 2009 21:00:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05L0MUH011138; Mon, 5 Jan 2009 21:00:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05L0McF011137; Mon, 5 Jan 2009 21:00:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901052100.n05L0McF011137@svn.freebsd.org> From: Warner Losh Date: Mon, 5 Jan 2009 21:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186796 - head/sys/dev/exca X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:00:23 -0000 Author: imp Date: Mon Jan 5 21:00:22 2009 New Revision: 186796 URL: http://svn.freebsd.org/changeset/base/186796 Log: First cut at fixing memory mapping botch. Nobody must use the ray(4) driver since it couldn't have worked with NEWCARD w/o these fixes. This should allow selecting 16-bit memory width as well (which was what was broken). Modified: head/sys/dev/exca/exca.c Modified: head/sys/dev/exca/exca.c ============================================================================== --- head/sys/dev/exca/exca.c Mon Jan 5 20:58:41 2009 (r186795) +++ head/sys/dev/exca/exca.c Mon Jan 5 21:00:22 2009 (r186796) @@ -179,39 +179,38 @@ exca_do_mem_map(struct exca_softc *sc, i struct mem_map_index_st *map; struct pccard_mem_handle *mem; uint32_t offset; - int mem8 = 1 /* mem->kind == PCCARD_A_MEM_ATTR */; + uint32_t mem16; + uint32_t attrmem; map = &mem_map_index[win]; mem = &sc->mem[win]; + mem16 = (mem->kind & PCCARD_MEM_16BIT) ? + EXCA_SYSMEM_ADDRX_START_MSB_DATASIZE_16BIT : 0; + attrmem = (mem->kind & PCCARD_MEM_ATTR) ? + EXCA_CARDMEM_ADDRX_MSB_REGACTIVE_ATTR : 0; offset = ((mem->cardaddr >> EXCA_CARDMEM_ADDRX_SHIFT) - (mem->addr >> EXCA_SYSMEM_ADDRX_SHIFT)) & 0x3fff; exca_putb(sc, map->sysmem_start_lsb, - (mem->addr >> EXCA_SYSMEM_ADDRX_SHIFT) & 0xff); + mem->addr >> EXCA_SYSMEM_ADDRX_SHIFT); exca_putb(sc, map->sysmem_start_msb, ((mem->addr >> (EXCA_SYSMEM_ADDRX_SHIFT + 8)) & - EXCA_SYSMEM_ADDRX_START_MSB_ADDR_MASK) | - (mem8 ? 0 : EXCA_SYSMEM_ADDRX_START_MSB_DATASIZE_16BIT)); + EXCA_SYSMEM_ADDRX_START_MSB_ADDR_MASK) | mem16); exca_putb(sc, map->sysmem_stop_lsb, - ((mem->addr + mem->realsize - 1) >> - EXCA_SYSMEM_ADDRX_SHIFT) & 0xff); + (mem->addr + mem->realsize - 1) >> EXCA_SYSMEM_ADDRX_SHIFT); exca_putb(sc, map->sysmem_stop_msb, (((mem->addr + mem->realsize - 1) >> (EXCA_SYSMEM_ADDRX_SHIFT + 8)) & EXCA_SYSMEM_ADDRX_STOP_MSB_ADDR_MASK) | EXCA_SYSMEM_ADDRX_STOP_MSB_WAIT2); - - exca_putb(sc, map->sysmem_win, - (mem->addr >> EXCA_MEMREG_WIN_SHIFT) & 0xff); + exca_putb(sc, map->sysmem_win, mem->addr >> EXCA_MEMREG_WIN_SHIFT); exca_putb(sc, map->cardmem_lsb, offset & 0xff); - exca_putb(sc, map->cardmem_msb, (((offset >> 8) & 0xff) & - EXCA_CARDMEM_ADDRX_MSB_ADDR_MASK) | - ((mem->kind == PCCARD_A_MEM_ATTR) ? - EXCA_CARDMEM_ADDRX_MSB_REGACTIVE_ATTR : 0)); + exca_putb(sc, map->cardmem_msb, ((offset >> 8) & + EXCA_CARDMEM_ADDRX_MSB_ADDR_MASK) | attrmem); #ifdef EXCA_DEBUG - if (mem->kind == PCCARD_A_MEM_ATTR) + if (mem->kind & PCCARD_MEM_ATTR) printf("attribtue memory\n"); else printf("common memory\n"); @@ -342,7 +341,21 @@ exca_mem_set_flags(struct exca_softc *sc return (ENOENT); } - sc->mem[win].kind = flags; + switch (flags) + { + case PCCARD_A_MEM_ATTR: + sc->mem[win].kind |= PCCARD_MEM_ATTR; + break; + case PCCARD_A_MEM_COM: + sc->mem[win].kind &= ~PCCARD_MEM_ATTR; + break; + case PCCARD_A_MEM_16BIT: + sc->mem[win].kind |= PCCARD_MEM_16BIT; + break; + case PCCARD_A_MEM_8BIT: + sc->mem[win].kind &= ~PCCARD_MEM_16BIT; + break; + } exca_do_mem_map(sc, win); return (0); } @@ -801,7 +814,7 @@ exca_activate_resource(struct exca_softc err = exca_io_map(exca, PCCARD_WIDTH_AUTO, res); break; case SYS_RES_MEMORY: - err = exca_mem_map(exca, PCCARD_A_MEM_COM, res); + err = exca_mem_map(exca, 0, res); break; } if (err) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 21:03:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2DD9106571A for ; Mon, 5 Jan 2009 21:03:17 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id CC1168FC16 for ; Mon, 5 Jan 2009 21:03:16 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jan 2009 21:03:15 -0000 Received: from p54A3E58D.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.229.141] by mail.gmx.net (mp064) with SMTP; 05 Jan 2009 22:03:15 +0100 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/A+BMXzjzAwPU6VatTS/oJDzINilTmj5HPshUbfd 4p7gwS5Css/fv2 Message-ID: <49627592.60208@gmx.de> Date: Mon, 05 Jan 2009 22:03:14 +0100 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Steve Kargl References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> In-Reply-To: <20090105204356.GA52934@troutmask.apl.washington.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:03:18 -0000 Steve Kargl schrieb: > Stylistic changes (including whitespace changes) are hard on > the source repository and are to be avoided without good reason. Yet another anachronism in style(9). (Does that sentence even mean what I think it means? Somehow it sounds like "there is no good reason, but avoid them anyway" instead of "avoid them if you have no good reason".) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 21:05:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25DC51065673 for ; Mon, 5 Jan 2009 21:05:35 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id B3BEE8FC1C for ; Mon, 5 Jan 2009 21:05:34 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id BE6328FC5B for ; Tue, 6 Jan 2009 00:05:33 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 58F9D8FC57; Tue, 6 Jan 2009 00:05:31 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 8BCF9398F3; Tue, 6 Jan 2009 00:07:57 +0300 (MSK) Date: Tue, 6 Jan 2009 00:07:57 +0300 From: Stanislav Sedov To: Alfred Perlstein Message-Id: <20090106000757.9c92d93d.stas@FreeBSD.org> In-Reply-To: <200901040012.n040C2gH040928@svn.freebsd.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 00:05:33 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 4962761d967001591710962 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Hans Petter Selasky Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:05:35 -0000 On Sun, 4 Jan 2009 00:12:02 +0000 (UTC) Alfred Perlstein mentioned: > Author: alfred > Date: Sun Jan 4 00:12:01 2009 > New Revision: 186730 > URL: http://svn.freebsd.org/changeset/base/186730 > > Log: > Sync with usb4bsd: > > src/lib/libusb20/libusb20_desc.c > > Make "libusb20_desc_foreach()" more readable. > > src/sys/dev/usb2/controller/*.[ch] > src/sys/dev/usb2/core/*.[ch] > > Implement support for USB power save for all HC's. > > Implement support for Big-endian EHCI. > > Move Huawei quirks back into "u3g" driver. > > Improve device enumeration. > > src/sys/dev/usb2/ethernet/*[ch] > > Patches for supporting new AXE Gigabit chipset. > > src/sys/dev/usb2/serial/*[ch] > > Fix IOCTL return code. > > src/sys/dev/usb2/wlan/*[ch] > > Sync with old USB stack. > > Submitted by: hps ... > +#if (USB_DEBUG != 0) > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > + /* > + * This check verifies that the physical address is correct: > + */ > + DPRINTFN(0, "Page offset was not preserved!\n"); > + error = 1; > + goto done; > + } > +#endif > while (nseg > 0) { > nseg--; > segs++; > @@ -788,7 +800,16 @@ > ext_seg = 0; > } > nseg--; > - > +#if (USB_DEBUG != 0) > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > + /* > + * This check verifies that the physical address is correct: > + */ > + DPRINTFN(0, "Page offset was not preserved!\n"); > + error = 1; > + goto done; > + } > +#endif This bits prevent usb2 from working on my desktop with the following messages: usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1423: set address 2 failed (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1423: set address 2 failed (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! Starting Network: lo0 em0. Waiting 30s for an interface to come up: usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! ugen3.2: <> at usbus3 (disconnected) uhub_reattach_port:417: could not allocate new device! usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_pc_common_mem_cb:429: Page offset was not preserved! usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! ugen1.2: <> at usbus1 (disconnected) uhub_reattach_port:417: could not allocate new device! Can you take a look at this? Thanks! -- Stanislav Sedov ST4096-RIPE !DSPAM:4962761d967001591710962! From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 21:09:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2614D106566B; Mon, 5 Jan 2009 21:09:25 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C6F548FC19; Mon, 5 Jan 2009 21:09:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n05L6bO8017451; Mon, 5 Jan 2009 14:06:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 05 Jan 2009 14:06:54 -0700 (MST) Message-Id: <20090105.140654.796891882.imp@bsdimp.com> To: alfred@freebsd.org From: "M. Warner Losh" In-Reply-To: <20090105205721.GH60686@elvis.mu.org> References: <20090105050415.GY60686@elvis.mu.org> <20090105.090449.-1253035084.imp@bsdimp.com> <20090105205721.GH60686@elvis.mu.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:09:25 -0000 In message: <20090105205721.GH60686@elvis.mu.org> Alfred Perlstein writes: : * M. Warner Losh [090105 08:05] wrote: : > In message: <20090105050415.GY60686@elvis.mu.org> : > Alfred Perlstein writes: : > : * M. Warner Losh [090104 09:11] wrote: : > : > In message: <200901040012.n040C2gH040928@svn.freebsd.org> : > : > Alfred Perlstein writes: : > : > : Sync with usb4bsd: : > : > : > : > Alfred, : > : > : > : > thanks for trudging these fixes into the tree. It is a thankless job : > : > that people will complain about... : > : > : > : > Speaking of complaining, is there a review process that can be joined : > : > for them that's more formal than "diff against hps' p4 tree and : > : > complain?" : > : : > : We're trying to figure out a way to do this. We haven't had much : > : luck exploring svk/hg/git as they're just about as much work as : > : shipping patches back and forth. : > : : > : I asked core for a restricted "users/hps" area under svn for Hans : > : to put code, but that was denied, perhaps now it's time to reconsider : > : that? : > : > And also: : > > In my part of the world we give credit or, at the very least, say "thank : > > you" to the sender, when we apply patches sent to us. : > : > One of the things that works well in Linux is the patch queues that : > they have. You submit a patch, people talk about it, and various tags : > get added to it. They break things down into a series of mostly : > independent patches. : > : > Maybe we should try to initiate something like this so that we can : > comment on changes more easily, as well as track submitters and the : > like as things pass through Hans. : > : > Consider it an experiment to see if we can do things to help improve : > our world? : : I guess so, but this can all be implemented via a sandbox in : our VCS for Hans/me to use... or GNATS, but that just adds overhead. : : I sort of feel this would be reinventing something that we already : have. We don't already have this. The patch streams that are implemented elsewhere serve the purpose of review and tracking. Patches are posted to a mailing list, people review them, they get committed upstream. See, for example, the qemu developer mailing list for one way this is done. If we were to follow that model, individual patches would be generated, posted there, and then committed as patches if there were no objections. While many of these features would be there in, say, an svn project tree, the review before merge isn't. Also, by forcing the patches to be reviewed and committed individually, we retain more history than we have now. And we have fewer chances to undo changes that are committed between big honkin' code drops into the tree. We need to draw more developers into this process. It can't just be Hans feeding you patches forever. There has to be uptake by the greater FreeBSD community of developers, or this usb stack will fail like the last one did. We need a bus-factor greater than 1. It is my contention that having a more public review process would help facilitate drawing more people in... Warner From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 21:51:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FAEC1065672; Mon, 5 Jan 2009 21:51:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6E48FC21; Mon, 5 Jan 2009 21:51:50 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Lpoeb012280; Mon, 5 Jan 2009 21:51:50 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05LpnTJ012276; Mon, 5 Jan 2009 21:51:49 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200901052151.n05LpnTJ012276@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 5 Jan 2009 21:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186797 - in head/sys: amd64/amd64 amd64/include i386/cpufreq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 21:51:51 -0000 Author: jkim Date: Mon Jan 5 21:51:49 2009 New Revision: 186797 URL: http://svn.freebsd.org/changeset/base/186797 Log: Add Centaur/IDT/VIA vendor ID for Nano family, which has long mode support. Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/include/cputypes.h head/sys/amd64/include/specialreg.h head/sys/i386/cpufreq/est.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/amd64/amd64/identcpu.c Mon Jan 5 21:51:49 2009 (r186797) @@ -102,6 +102,7 @@ static struct { } cpu_vendors[] = { { INTEL_VENDOR_ID, CPU_VENDOR_INTEL }, /* GenuineIntel */ { AMD_VENDOR_ID, CPU_VENDOR_AMD }, /* AuthenticAMD */ + { CENTAUR_VENDOR_ID, CPU_VENDOR_CENTAUR }, /* CentaurHauls */ }; int cpu_cores; Modified: head/sys/amd64/include/cputypes.h ============================================================================== --- head/sys/amd64/include/cputypes.h Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/amd64/include/cputypes.h Mon Jan 5 21:51:49 2009 (r186797) @@ -47,7 +47,9 @@ * Vendors of processor. */ #define CPU_VENDOR_AMD 0x1022 /* AMD */ +#define CPU_VENDOR_IDT 0x111d /* Centaur/IDT/VIA */ #define CPU_VENDOR_INTEL 0x8086 /* Intel */ +#define CPU_VENDOR_CENTAUR CPU_VENDOR_IDT #ifndef LOCORE extern int cpu; Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/amd64/include/specialreg.h Mon Jan 5 21:51:49 2009 (r186797) @@ -205,6 +205,7 @@ * CPUID manufacturers identifiers */ #define AMD_VENDOR_ID "AuthenticAMD" +#define CENTAUR_VENDOR_ID "CentaurHauls" #define INTEL_VENDOR_ID "GenuineIntel" /* Modified: head/sys/i386/cpufreq/est.c ============================================================================== --- head/sys/i386/cpufreq/est.c Mon Jan 5 21:00:22 2009 (r186796) +++ head/sys/i386/cpufreq/est.c Mon Jan 5 21:51:49 2009 (r186797) @@ -55,10 +55,6 @@ __FBSDID("$FreeBSD$"); #define MSR_MISC_ENABLE 0x1a0 #define MSR_SS_ENABLE (1<<16) -#ifndef CPU_VENDOR_CENTAUR -#define CPU_VENDOR_CENTAUR 0x111d -#endif - /* Frequency and MSR control values. */ typedef struct { uint16_t freq; From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 22:09:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C908210656BB; Mon, 5 Jan 2009 22:09:33 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8E28FC18; Mon, 5 Jan 2009 22:09:32 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=TFc2zGvHZnoA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=6I5d2MoRAAAA:8 a=QgLjfRn7plP4TwmgLsgA:9 a=3zHzqPp2frb5drdnqTsA:7 a=l7Pb6bEAkraB9rQVZIdEkA_qwYMA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1073003297; Mon, 05 Jan 2009 22:09:27 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Mon, 5 Jan 2009 22:11:49 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106000757.9c92d93d.stas@FreeBSD.org> In-Reply-To: <20090106000757.9c92d93d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901052211.50514.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:09:34 -0000 On Monday 05 January 2009, Stanislav Sedov wrote: > On Sun, 4 Jan 2009 00:12:02 +0000 (UTC) > > Alfred Perlstein mentioned: > > Author: alfred > > Date: Sun Jan 4 00:12:01 2009 > > New Revision: 186730 > > URL: http://svn.freebsd.org/changeset/base/186730 > > > > Log: > > Sync with usb4bsd: > > > > src/lib/libusb20/libusb20_desc.c > > > > Make "libusb20_desc_foreach()" more readable. > > > > src/sys/dev/usb2/controller/*.[ch] > > src/sys/dev/usb2/core/*.[ch] > > > > Implement support for USB power save for all HC's. > > > > Implement support for Big-endian EHCI. > > > > Move Huawei quirks back into "u3g" driver. > > > > Improve device enumeration. > > > > src/sys/dev/usb2/ethernet/*[ch] > > > > Patches for supporting new AXE Gigabit chipset. > > > > src/sys/dev/usb2/serial/*[ch] > > > > Fix IOCTL return code. > > > > src/sys/dev/usb2/wlan/*[ch] > > > > Sync with old USB stack. > > > > Submitted by: hps > > ... > > > +#if (USB_DEBUG != 0) > > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > > + /* > > + * This check verifies that the physical address is correct: > > + */ > > + DPRINTFN(0, "Page offset was not preserved!\n"); > > + error = 1; > > + goto done; > > + } > > +#endif > > while (nseg > 0) { > > nseg--; > > segs++; > > @@ -788,7 +800,16 @@ > > ext_seg = 0; > > } > > nseg--; > > - > > +#if (USB_DEBUG != 0) > > + if (rem != (USB_P2U(pc->buffer) & (USB_PAGE_SIZE - 1))) { > > + /* > > + * This check verifies that the physical address is correct: > > + */ > > + DPRINTFN(0, "Page offset was not preserved!\n"); > > + error = 1; > > + goto done; > > + } > > +#endif > > This bits prevent usb2 from working on my desktop with the following > messages: usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1423: set address 2 failed (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1423: set address 2 failed (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > Starting Network: lo0 em0. > Waiting 30s for an interface to come up: > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > ugen3.2: <> at usbus3 (disconnected) > uhub_reattach_port:417: could not allocate new device! > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_pc_common_mem_cb:429: Page offset was not preserved! > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > ugen1.2: <> at usbus1 (disconnected) > uhub_reattach_port:417: could not allocate new device! > > Can you take a look at this? > > Thanks! Try this patch and let me know the result! I see exactly why things are not working! http://perforce.freebsd.org/chv.cgi?CH=154181 It's not a USB problem! --HPS From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 22:09:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CCF11065716; Mon, 5 Jan 2009 22:09:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A7C28FC17; Mon, 5 Jan 2009 22:09:47 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05M9lBG012760; Mon, 5 Jan 2009 22:09:47 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05M9liJ012756; Mon, 5 Jan 2009 22:09:47 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901052209.n05M9liJ012756@svn.freebsd.org> From: Ed Schouten Date: Mon, 5 Jan 2009 22:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186798 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:09:48 -0000 Author: ed Date: Mon Jan 5 22:09:46 2009 New Revision: 186798 URL: http://svn.freebsd.org/changeset/base/186798 Log: Import yet some more small fixes to libteken sources: - Implement NP (ASCII 12, Form Feed). When used with cons25, it should clear the screen and place the cursor at the top of the screen. When used with xterm, it should just simulate a newline. - When we want to use xterm emulation, make teken_demo set TERM to xterm. Spotted by: Paul B. Mahol Modified: head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken_demo.c head/sys/dev/syscons/teken/teken_subr.h Modified: head/sys/dev/syscons/teken/teken.c ============================================================================== --- head/sys/dev/syscons/teken/teken.c Mon Jan 5 21:51:49 2009 (r186797) +++ head/sys/dev/syscons/teken/teken.c Mon Jan 5 22:09:46 2009 (r186798) @@ -226,6 +226,9 @@ teken_input_char(teken_t *t, teken_char_ case '\x0B': teken_subr_newline(t); break; + case '\x0C': + teken_subr_newpage(t); + break; case '\r': teken_subr_carriage_return(t); break; Modified: head/sys/dev/syscons/teken/teken_demo.c ============================================================================== --- head/sys/dev/syscons/teken/teken_demo.c Mon Jan 5 21:51:49 2009 (r186797) +++ head/sys/dev/syscons/teken/teken_demo.c Mon Jan 5 22:09:46 2009 (r186798) @@ -279,7 +279,11 @@ main(int argc __unused, char *argv[] __u perror("forkpty"); exit(1); case 0: +#ifdef TEKEN_CONS25 setenv("TERM", "cons25", 1); +#else /* !TEKEN_CONS25 */ + setenv("TERM", "xterm", 1); +#endif /* TEKEN_CONS25 */ #ifdef TEKEN_UTF8 setenv("LC_CTYPE", "UTF-8", 0); #endif /* TEKEN_UTF8 */ Modified: head/sys/dev/syscons/teken/teken_subr.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr.h Mon Jan 5 21:51:49 2009 (r186797) +++ head/sys/dev/syscons/teken/teken_subr.h Mon Jan 5 22:09:46 2009 (r186798) @@ -662,6 +662,24 @@ teken_subr_newline(teken_t *t) } static void +teken_subr_newpage(teken_t *t) +{ +#ifdef TEKEN_CONS25 + teken_rect_t tr; + + tr.tr_begin.tp_row = tr.tr_begin.tp_col = 0; + tr.tr_end = t->t_winsize; + teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); + + t->t_cursor.tp_row = t->t_cursor.tp_col = 0; + teken_funcs_cursor(t); +#else /* !TEKEN_CONS25 */ + + teken_subr_newline(t); +#endif /* TEKEN_CONS25 */ +} + +static void teken_subr_next_line(teken_t *t) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 22:18:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09CE31065672; Mon, 5 Jan 2009 22:18:24 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id DD1D18FC18; Mon, 5 Jan 2009 22:18:23 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n05MHxBQ058196; Mon, 5 Jan 2009 14:17:59 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n05MHxHK058195; Mon, 5 Jan 2009 14:17:59 -0800 (PST) (envelope-from obrien) Date: Mon, 5 Jan 2009 14:17:59 -0800 From: "David O'Brien" To: Ed Schouten Message-ID: <20090105221759.GA57949@dragon.NUXI.org> References: <200901040020.n040KIcc041121@svn.freebsd.org> <20090104120434.GF93900@deviant.kiev.zoral.com.ua> <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090105172243.GO14235@hoeg.nl> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:18:24 -0000 On Mon, Jan 05, 2009 at 06:22:43PM +0100, Ed Schouten wrote: > Hello David, > * David O'Brien wrote: > > Why xterm and not vt100? > > The reason I'm proposing xterm, is because it is the best supported > terminal type out there. Example: if we would use TERM=vt100, we would > only get black & white. If we use TERM=vt100-color, we do get the There's always vt340. :-) But I see your point that color is desired. > I hope that answers your question? Yes - thank you for the good explanation. I thought it might be UTF-8 related, but really don't know too much about UTF-8. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 22:46:54 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A43231065672 for ; Mon, 5 Jan 2009 22:46:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 4DAE08FC1E for ; Mon, 5 Jan 2009 22:46:54 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 1183 invoked by uid 399); 5 Jan 2009 22:46:54 -0000 Received: from localhost (HELO ?192.168.0.4?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 5 Jan 2009 22:46:54 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <49628DD3.8020901@FreeBSD.org> Date: Mon, 05 Jan 2009 14:46:43 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: src-committers@FreeBSD.org References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> In-Reply-To: <18782.40912.247441.716938@hergotha.csail.mit.edu> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:46:55 -0000 Garrett Wollman wrote: >> Garrett Wollman wrote: >>> It would be much better if the options that *nearly every user will >>> want to use* are set correctly by default. Taking a step back from the specifics for a minute, I completely fail to understand why so many people believe that this should be true for this one program. I have been using Unix systems for 15 years now, and I have extensive tweaks to nearly every command I use on a regular basis. I have a .nexrc file for vi I have a .inputrc file for readline (esp. bash) I have a .cvsrc I have a .profile for sh, an aliases file that is common to sh and bash, a .bash_profile, .bashrc, etc. I have a .portmasterrc, and of course a .mergemasterrc That's not counting all of the aliases for things like ls, df, etc.; and it's totally ignoring all of the programs that dump their own config files (like Alpine, Openbox, WindowMaker, etc.). On my most basic system I have no less than 12 config files in /etc (and nothing particularly exotic) that I have to copy when I do a clean upgrade, so I have no sympathy for the argument that copying /etc/mergemaster.rc is an overwhelming burden. It's Ok with me if you don't like the defaults for mergemaster. I have provided extensive capabilities for customizing it for your preferences. I note with interest that several of the people who have complained the loudest have either never read the man page, or haven't read it all the way through. And yes, I do believe that users continue to have the "nothing done to your system by default" expectation. But given that the default has been what it is for over 10 years, and given that it's always a bad idea to change default behavior in an application, I don't see myself agreeing to change it any time soon. A few more specifics in no particular order: You can save yourself a lot of time hitting 'i' with the -U option. You don't have to page through the whole diff if you use less as your PAGER. Matt Dillon's change to the PAGER was the single thing I got the most user complaints about. Sometimes, particularly between major version upgrades, default behavior for something in /etc/ changes. I personally think it's useful for users to see those changes by default. Others may disagree, that's why there are options to avoid that. I will not be supportive of anything with "mergemaster" in the name set to modify the base by default. I have always said however that I would be pleased as punch if someone wanted to make a new etc/config file updating thingy, in which case you should feel free to have whatever defaults you want. If mergemaster falls out of favor and is no longer needed in the base because the new thing is much better, I have no problems with that. There are even a few candidates in ports that are worth a look. hope this helps, Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 22:47:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D053106566C for ; Mon, 5 Jan 2009 22:47:56 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 49B608FC1A for ; Mon, 5 Jan 2009 22:47:56 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 5387F8FC52 for ; Tue, 6 Jan 2009 01:47:55 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 3E3958FC18; Tue, 6 Jan 2009 01:47:52 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 2D1D9398F3; Tue, 6 Jan 2009 01:50:18 +0300 (MSK) Date: Tue, 6 Jan 2009 01:50:12 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106015012.548aaa9d.stas@FreeBSD.org> In-Reply-To: <200901052211.50514.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106000757.9c92d93d.stas@FreeBSD.org> <200901052211.50514.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 01:47:55 2009 X-DSPAM-Confidence: 1.0000 X-DSPAM-Improbability: 1 in 98689409 chance of being spam X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 49628e1b967001751415746 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:47:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, 5 Jan 2009 22:11:49 +0100 Hans Petter Selasky mentioned: > > Try this patch and let me know the result! I see exactly why things are not > working! > > http://perforce.freebsd.org/chv.cgi?CH=154181 > > > It's not a USB problem! > These patches help. Now everything works. Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAklijqoACgkQK/VZk+smlYE+swCeOitw67RJbRYabQTgz2DTnEvs C+QAn0DIvn3tak96oJkAtt1qvkjq1aW4 =0yaH -----END PGP SIGNATURE----- !DSPAM:49628e1b967001751415746! From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 22:52:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E54D41065670; Mon, 5 Jan 2009 22:52:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id B15438FC23; Mon, 5 Jan 2009 22:52:37 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n05MqXSJ049188 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Jan 2009 14:52:34 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <49628F31.5040606@freebsd.org> Date: Mon, 05 Jan 2009 14:52:33 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Christoph Mallon References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> <49627592.60208@gmx.de> In-Reply-To: <49627592.60208@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org, Steve Kargl Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 22:52:38 -0000 Christoph Mallon wrote: > Steve Kargl schrieb: >> Stylistic changes (including whitespace changes) are hard on >> the source repository and are to be avoided without good reason. > > Yet another anachronism in style(9). > (Does that sentence even mean what I think it means? Somehow it sounds > like "there is no good reason, but avoid them anyway" instead of > "avoid them if you have no good reason".) > > And for the N'th time I will say: style is guideline and not a contract. The day people arbitrarily change code simply because some cabal decided where spaces should go is the day people will stop contributing. It's all fine and well to make style consistent when you're working in an area of the code (and can verify your changes) but knob polishing is just code churn and in my experience is counter-productive. Spend your time and effort on fixing real problems; god knows we've got enough of 'em... Sam From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 23:12:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E45BA106564A for ; Mon, 5 Jan 2009 23:12:07 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id 9BCB68FC12 for ; Mon, 5 Jan 2009 23:12:07 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=VBWXqiNljtYA:10 a=4sCiAi32jZgA:10 a=LkYvsgB9u1MH7Ao0BLhsLg==:17 a=1y3wLVyHvuV-DGakN5kA:9 a=Mgz1k1vZPO8QfofpCsSDIzABEKEA:4 a=LY0hPdMaydYA:10 a=ApawOiLNbh1uXRHR0lcA:9 a=9CU_ybZ4FjlN7utNSoDZDu1c_0EA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Received: from [74.215.227.9] ([74.215.227.9:50020] helo=discordia) by mail-out2.fuse.net (ecelerity 2.1.1.22 r(17669)) with ESMTP id 1D/01-17809-32092694 for ; Mon, 05 Jan 2009 17:56:35 -0500 Received: by discordia (Postfix, from userid 103) id 36E041DB2FA; Mon, 5 Jan 2009 17:56:35 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id A51AD1DB2F9; Mon, 5 Jan 2009 17:56:28 -0500 (EST) From: Coleman Kane To: Sam Leffler In-Reply-To: <49628F31.5040606@freebsd.org> References: <200901042153.n04LrgkD075147@svn.freebsd.org> <20090104220716.GL14235@hoeg.nl> <20090105172400.T45399@maildrop.int.zabbadoz.net> <49624DB9.8080900@gmx.de> <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> <49627592.60208@gmx.de> <49628F31.5040606@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TFryUuFZ4ZKFyM/OjpCd" Organization: FreeBSD Project Date: Mon, 05 Jan 2009 17:56:29 -0500 Message-Id: <1231196189.9129.1.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , Steve Kargl , svn-src-head@freebsd.org, Christoph Mallon Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:12:08 -0000 --=-TFryUuFZ4ZKFyM/OjpCd Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2009-01-05 at 14:52 -0800, Sam Leffler wrote: > Christoph Mallon wrote: > > Steve Kargl schrieb: > >> Stylistic changes (including whitespace changes) are hard on > >> the source repository and are to be avoided without good reason.=20 > > > > Yet another anachronism in style(9). > > (Does that sentence even mean what I think it means? Somehow it sounds=20 > > like "there is no good reason, but avoid them anyway" instead of=20 > > "avoid them if you have no good reason".) > > > > > And for the N'th time I will say: style is guideline and not a=20 > contract. The day people arbitrarily change code simply because some=20 > cabal decided where spaces should go is the day people will stop=20 > contributing. It's all fine and well to make style consistent when=20 > you're working in an area of the code (and can verify your changes) but=20 > knob polishing is just code churn and in my experience is=20 > counter-productive. Spend your time and effort on fixing real problems;=20 > god knows we've got enough of 'em... >=20 > Sam >=20 Maybe prepend 'Mere' to the beginning of that sentence in style(9)? I am amused by the thread on stylistic changes to style(9). /me ducks! --=20 Coleman Kane --=-TFryUuFZ4ZKFyM/OjpCd Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklikBkACgkQcMSxQcXat5eoqgCePtCa+VdbtDF3G3sOs2LitE7R Mm0An0NncYOpsVVavM6uicQe8d+hiQWe =LEXy -----END PGP SIGNATURE----- --=-TFryUuFZ4ZKFyM/OjpCd-- From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 23:24:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13CD0106568A; Mon, 5 Jan 2009 23:24:58 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id 8394C8FC16; Mon, 5 Jan 2009 23:24:57 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n05NDOvo021582; Tue, 6 Jan 2009 02:13:25 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 6 Jan 2009 02:13:24 +0300 (MSK) From: Dmitry Morozovsky To: Ulf Lilleengen In-Reply-To: <200901051518.n05FIGli099929@svn.freebsd.org> Message-ID: References: <200901051518.n05FIGli099929@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (woozle.rinet.ru [0.0.0.0]); Tue, 06 Jan 2009 02:13:25 +0300 (MSK) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:24:58 -0000 On Mon, 5 Jan 2009, Ulf Lilleengen wrote: UL> Author: lulf UL> Date: Mon Jan 5 15:18:16 2009 UL> New Revision: 186781 UL> URL: http://svn.freebsd.org/changeset/base/186781 UL> UL> Log: UL> Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now UL> fetch a complete CVS repository. Support for rsync update of regular files are UL> also included, but are not yet enabled. The change should not have an impact on UL> existing csup usage, as little of the existing code has changed. Any plans to MFC this to stable/7 aka RELENG_7? BTW, are these changed comparing november patch? With this, I occasionally have "protocol error"s which are fixed by invoking cvsup -s... Thanks! Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 23:24:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 497401065680; Mon, 5 Jan 2009 23:24:59 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) by mx1.freebsd.org (Postfix) with ESMTP id B84268FC17; Mon, 5 Jan 2009 23:24:58 +0000 (UTC) (envelope-from marck@rinet.ru) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.3/8.14.3) with ESMTP id n05NG4Yo023071; Tue, 6 Jan 2009 02:16:04 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Tue, 6 Jan 2009 02:16:04 +0300 (MSK) From: Dmitry Morozovsky To: Ulf Lilleengen In-Reply-To: <20090105160025.GA22123@carrot.lan> Message-ID: References: <200901051518.n05FIGli099929@svn.freebsd.org> <20090105160025.GA22123@carrot.lan> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (woozle.rinet.ru [0.0.0.0]); Tue, 06 Jan 2009 02:16:04 +0300 (MSK) Cc: svn-src-head@freebsd.org, naddy@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, kris@freebsd.org Subject: Re: svn commit: r186781 - in head: contrib/csup usr.bin/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:25:00 -0000 On Mon, 5 Jan 2009, Ulf Lilleengen wrote: UL> > Merge support for CVSMode (aka. mirror mode) into csup. This means csup can now UL> > fetch a complete CVS repository. Support for rsync update of regular files are UL> > also included, but are not yet enabled. The change should not have an impact on UL> > existing csup usage, as little of the existing code has changed. UL> > UL> A big thanks to naddy@ and kris@ for help with testing and reproducing UL> problems. BTW, it seems now the only thing csup is missing is server mode (and authentication, but this is another story...) ;-) Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 23:25:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D0CD10656C1; Mon, 5 Jan 2009 23:25:35 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B0248FC17; Mon, 5 Jan 2009 23:25:35 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05NPZFX015110; Mon, 5 Jan 2009 23:25:35 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n05NPZ3x015109; Mon, 5 Jan 2009 23:25:35 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901052325.n05NPZ3x015109@svn.freebsd.org> From: Luigi Rizzo Date: Mon, 5 Jan 2009 23:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186799 - head/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:25:35 -0000 Author: luigi Date: Mon Jan 5 23:25:35 2009 New Revision: 186799 URL: http://svn.freebsd.org/changeset/base/186799 Log: put a prefix on dhcp options to avoid clobbering, even by mistake, existing environment variables. MFC after: 2 weeks Modified: head/lib/libstand/bootp.c Modified: head/lib/libstand/bootp.c ============================================================================== --- head/lib/libstand/bootp.c Mon Jan 5 22:09:46 2009 (r186798) +++ head/lib/libstand/bootp.c Mon Jan 5 23:25:35 2009 (r186799) @@ -496,7 +496,7 @@ static struct dhcp_opt vndr_opt[] = { /* {94, __BYTES, "network-interface"}, {97, __BYTES, "machine-identifier"}, #else /* default (empty) table */ - {0, 0, ""}, /* prefix */ + {0, 0, "dhcp.vendor."}, /* prefix */ #endif {0, __TXT, "%soption-%d"} }; From owner-svn-src-all@FreeBSD.ORG Mon Jan 5 23:57:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C5CB1065672; Mon, 5 Jan 2009 23:57:07 +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 59E268FC1A; Mon, 5 Jan 2009 23:57:07 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n05Nv70F015728; Mon, 5 Jan 2009 23: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 n05Nv7A4015727; Mon, 5 Jan 2009 23:57:07 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200901052357.n05Nv7A4015727@svn.freebsd.org> From: Ken Smith Date: Mon, 5 Jan 2009 23:57:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186800 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jan 2009 23:57:07 -0000 Author: kensmith Date: Mon Jan 5 23:57:06 2009 New Revision: 186800 URL: http://svn.freebsd.org/changeset/base/186800 Log: Turn releng/7.1 over to so@. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Mon Jan 5 23:25:35 2009 (r186799) +++ svnadmin/conf/approvers Mon Jan 5 23:57:06 2009 (r186800) @@ -19,7 +19,7 @@ #^head/ re #^stable/7/ re #^stable/6/ re -^releng/7.1/ re +^releng/7.1/ so ^releng/7.0/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 00:11:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D36C106566B; Tue, 6 Jan 2009 00:11:20 +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 5AD4C8FC13; Tue, 6 Jan 2009 00:11:20 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n060BK36016074; Tue, 6 Jan 2009 00:11:20 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n060BKug016073; Tue, 6 Jan 2009 00:11:20 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200901060011.n060BKug016073@svn.freebsd.org> From: Ken Smith Date: Tue, 6 Jan 2009 00:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186801 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:11:21 -0000 Author: kensmith Date: Tue Jan 6 00:11:18 2009 New Revision: 186801 URL: http://svn.freebsd.org/changeset/base/186801 Log: Sigh. Be a bit more consistent with the other branches. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Mon Jan 5 23:57:06 2009 (r186800) +++ svnadmin/conf/approvers Tue Jan 6 00:11:18 2009 (r186801) @@ -19,7 +19,7 @@ #^head/ re #^stable/7/ re #^stable/6/ re -^releng/7.1/ so +^releng/7.1/ (security-officer|so) ^releng/7.0/ (security-officer|so) ^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 00:20:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A19731065678; Tue, 6 Jan 2009 00:20:11 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E50E8FC1B; Tue, 6 Jan 2009 00:20:11 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n060KBLC016318; Tue, 6 Jan 2009 00:20:11 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n060KBUe016317; Tue, 6 Jan 2009 00:20:11 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901060020.n060KBUe016317@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 00:20:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186802 - in stable/7/usr.sbin/ntp: . doc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:20:12 -0000 Author: danger (doc committer) Date: Tue Jan 6 00:20:11 2009 New Revision: 186802 URL: http://svn.freebsd.org/changeset/base/186802 Log: MFC r185072: - fix typo PR: docs/128973 Submitted by: tabthorpe Approved by: roberto Modified: stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/ntp/doc/ntp-keygen.8 Modified: stable/7/usr.sbin/ntp/doc/ntp-keygen.8 ============================================================================== --- stable/7/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:11:18 2009 (r186801) +++ stable/7/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:20:11 2009 (r186802) @@ -126,7 +126,7 @@ The safest way to run the program is logged in directly as root. The recommended procedure is change to the keys directory, usually -.Pa /ust/local/etc , +.Pa /usr/local/etc , then run the program. When run for the first time, or if all From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 00:30:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE3A9106564A; Tue, 6 Jan 2009 00:30:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CFE08FC1E; Tue, 6 Jan 2009 00:30:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n060UO9x016566; Tue, 6 Jan 2009 00:30:24 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n060UOCe016565; Tue, 6 Jan 2009 00:30:24 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901060030.n060UOCe016565@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 00:30:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186803 - in stable/6/usr.sbin/ntp: . doc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:30:25 -0000 Author: danger (doc committer) Date: Tue Jan 6 00:30:24 2009 New Revision: 186803 URL: http://svn.freebsd.org/changeset/base/186803 Log: MFC r185072: - fix typo PR: docs/128973 Submitted by: tabthorpe Approved by: roberto Modified: stable/6/usr.sbin/ntp/ (props changed) stable/6/usr.sbin/ntp/doc/ (props changed) stable/6/usr.sbin/ntp/doc/ntp-keygen.8 Modified: stable/6/usr.sbin/ntp/doc/ntp-keygen.8 ============================================================================== --- stable/6/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:20:11 2009 (r186802) +++ stable/6/usr.sbin/ntp/doc/ntp-keygen.8 Tue Jan 6 00:30:24 2009 (r186803) @@ -123,7 +123,7 @@ The safest way to run the program is logged in directly as root. The recommended procedure is change to the keys directory, usually -.Pa /ust/local/etc , +.Pa /usr/local/etc , then run the program. When run for the first time, or if all .Cm ntpkey From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 00:44:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 720B51065673; Tue, 6 Jan 2009 00:44:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0E78FC2A; Tue, 6 Jan 2009 00:44:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n060hZXZ020093; Mon, 5 Jan 2009 17:43:35 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 05 Jan 2009 17:43:51 -0700 (MST) Message-Id: <20090105.174351.1172770788.imp@bsdimp.com> To: ed@80386.nl From: "M. Warner Losh" In-Reply-To: <20090105172243.GO14235@hoeg.nl> References: <20090104121331.GC14235@hoeg.nl> <20090105171523.GC50568@dragon.NUXI.org> <20090105172243.GO14235@hoeg.nl> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kostikbel@gmail.com, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, obrien@freebsd.org Subject: Re: svn commit: r186731 - head/sys/dev/syscons/teken X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 00:44:48 -0000 In message: <20090105172243.GO14235@hoeg.nl> Ed Schouten writes: : Hello David, : : * David O'Brien wrote: : > Why xterm and not vt100? : : The reason I'm proposing xterm, is because it is the best supported : terminal type out there. Example: if we would use TERM=vt100, we would : only get black & white. If we use TERM=vt100-color, we do get the : colors, but unfortunately we won't be compatible with other operating : systems. Solaris, for example, has no termtype called vt100-color. This : means the user has to change TERM by hand. : : TERM=xterm has proven to be very portable across different operating : systems and there are a lot of other pieces of software that try to : mimic it. At least the Terminal application in OS X, GNOME's : gnome-terminal, maybe KDE's Konsole as well. : : I hope that answers your question? Also, xterm is a superset of vt100. Most vt100-only programs will just work inside an xterm. Warner From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 01:36:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99A4D106564A; Tue, 6 Jan 2009 01:36:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86D3B8FC0C; Tue, 6 Jan 2009 01:36:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061absH017944; Tue, 6 Jan 2009 01:36:37 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061ab37017941; Tue, 6 Jan 2009 01:36:37 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901060136.n061ab37017941@svn.freebsd.org> From: Sam Leffler Date: Tue, 6 Jan 2009 01:36:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186804 - in head/sys/dev/ath/ath_rate: amrr onoe sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 01:36:38 -0000 Author: sam Date: Tue Jan 6 01:36:36 2009 New Revision: 186804 URL: http://svn.freebsd.org/changeset/base/186804 Log: remove module glue, it's not used any more Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- head/sys/dev/ath/ath_rate/amrr/amrr.c Tue Jan 6 00:30:24 2009 (r186803) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Tue Jan 6 01:36:36 2009 (r186804) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -434,29 +433,3 @@ ath_rate_detach(struct ath_ratectrl *arc free(asc, M_DEVBUF); } - -/* - * Module glue. - */ -static int -amrr_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - if (bootverbose) - printf("ath_rate: version 0.1\n"); - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t amrr_mod = { - "ath_rate", - amrr_modevent, - 0 -}; -DECLARE_MODULE(ath_rate, amrr_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(ath_rate, 1); -MODULE_DEPEND(ath_rate, wlan, 1, 1, 1); Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- head/sys/dev/ath/ath_rate/onoe/onoe.c Tue Jan 6 00:30:24 2009 (r186803) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Tue Jan 6 01:36:36 2009 (r186804) @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -403,29 +402,3 @@ ath_rate_detach(struct ath_ratectrl *arc free(osc, M_DEVBUF); } - -/* - * Module glue. - */ -static int -onoe_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - if (bootverbose) - printf("ath_rate: \n"); - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t onoe_mod = { - "ath_rate", - onoe_modevent, - 0 -}; -DECLARE_MODULE(ath_rate, onoe_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(ath_rate, 1); -MODULE_DEPEND(ath_rate, wlan, 1, 1, 1); Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Tue Jan 6 00:30:24 2009 (r186803) +++ head/sys/dev/ath/ath_rate/sample/sample.c Tue Jan 6 01:36:36 2009 (r186804) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -993,29 +992,3 @@ ath_rate_detach(struct ath_ratectrl *arc free(ssc, M_DEVBUF); } - -/* - * Module glue. - */ -static int -sample_modevent(module_t mod, int type, void *unused) -{ - switch (type) { - case MOD_LOAD: - if (bootverbose) - printf("ath_rate: version 1.9 \n"); - return 0; - case MOD_UNLOAD: - return 0; - } - return EINVAL; -} - -static moduledata_t sample_mod = { - "ath_rate", - sample_modevent, - 0 -}; -DECLARE_MODULE(ath_rate, sample_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); -MODULE_VERSION(ath_rate, 1); -MODULE_DEPEND(ath_rate, wlan, 1, 1, 1); From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 01:54:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0E77106566B; Tue, 6 Jan 2009 01:54: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 DDF788FC0C; Tue, 6 Jan 2009 01:54:57 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061svxj018268; Tue, 6 Jan 2009 01:54:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061svIc018267; Tue, 6 Jan 2009 01:54:57 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901060154.n061svIc018267@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 6 Jan 2009 01:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186805 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 01:54:58 -0000 Author: nwhitehorn Date: Tue Jan 6 01:54:57 2009 New Revision: 186805 URL: http://svn.freebsd.org/changeset/base/186805 Log: Add a new quirk type so that the MacIO driver will assign memory resources belonging to a devices children, in analogy to the way we handle interrupts for SCC serial devices. This is required to counteract overly deep nesting on onboard audio devices. Submitted by: Marco Trillo Modified: head/sys/powerpc/powermac/macio.c Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Tue Jan 6 01:36:36 2009 (r186804) +++ head/sys/powerpc/powermac/macio.c Tue Jan 6 01:54:57 2009 (r186805) @@ -152,6 +152,7 @@ static struct macio_pci_dev { */ #define MACIO_QUIRK_IGNORE 0x00000001 #define MACIO_QUIRK_CHILD_HAS_INTR 0x00000002 +#define MACIO_QUIRK_USE_CHILD_REG 0x00000004 struct macio_quirk_entry { const char *mq_name; @@ -162,7 +163,9 @@ static struct macio_quirk_entry macio_qu { "escc-legacy", MACIO_QUIRK_IGNORE }, { "timer", MACIO_QUIRK_IGNORE }, { "escc", MACIO_QUIRK_CHILD_HAS_INTR }, - { NULL, 0 } + { "i2s", MACIO_QUIRK_CHILD_HAS_INTR | + MACIO_QUIRK_USE_CHILD_REG }, + { NULL, 0 } }; static int @@ -318,7 +321,10 @@ macio_attach(device_t dev) resource_list_init(&dinfo->mdi_resources); dinfo->mdi_ninterrupts = 0; macio_add_intr(child, dinfo); - macio_add_reg(child, dinfo); + if ((quirks & MACIO_QUIRK_USE_CHILD_REG) != 0) + macio_add_reg(OF_child(child), dinfo); + else + macio_add_reg(child, dinfo); if ((quirks & MACIO_QUIRK_CHILD_HAS_INTR) != 0) for (subchild = OF_child(child); subchild != 0; subchild = OF_peer(subchild)) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 01:58:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1447C106566C; Tue, 6 Jan 2009 01:58:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02ECA8FC13; Tue, 6 Jan 2009 01:58:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n061wja6018384; Tue, 6 Jan 2009 01:58:45 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n061wjuY018383; Tue, 6 Jan 2009 01:58:45 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901060158.n061wjuY018383@svn.freebsd.org> From: Sam Leffler Date: Tue, 6 Jan 2009 01:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186806 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 01:58:46 -0000 Author: sam Date: Tue Jan 6 01:58:45 2009 New Revision: 186806 URL: http://svn.freebsd.org/changeset/base/186806 Log: remove the ath_rate module dependency; it's all bundled Modified: head/sys/dev/ath/if_ath_pci.c Modified: head/sys/dev/ath/if_ath_pci.c ============================================================================== --- head/sys/dev/ath/if_ath_pci.c Tue Jan 6 01:54:57 2009 (r186805) +++ head/sys/dev/ath/if_ath_pci.c Tue Jan 6 01:58:45 2009 (r186806) @@ -254,4 +254,3 @@ DRIVER_MODULE(if_ath, pci, ath_pci_drive DRIVER_MODULE(if_ath, cardbus, ath_pci_driver, ath_devclass, 0, 0); MODULE_VERSION(if_ath, 1); MODULE_DEPEND(if_ath, wlan, 1, 1, 1); /* 802.11 media layer */ -MODULE_DEPEND(if_ath, ath_rate, 1, 1, 1); /* rate control algorithm */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 06:47:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23770106564A; Tue, 6 Jan 2009 06:47:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 12A8E8FC0C; Tue, 6 Jan 2009 06:47:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n066lrgC023851; Tue, 6 Jan 2009 06:47:53 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n066lrYg023850; Tue, 6 Jan 2009 06:47:53 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200901060647.n066lrYg023850@svn.freebsd.org> From: Marcel Moolenaar Date: Tue, 6 Jan 2009 06:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186807 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 06:47:54 -0000 Author: marcel Date: Tue Jan 6 06:47:53 2009 New Revision: 186807 URL: http://svn.freebsd.org/changeset/base/186807 Log: Don't enforce an upper-bound to the number of sectors or heads that that the provider has. The limits we imposed were PC BIOS specific and not always applicable. Modified: head/sys/geom/part/g_part.c Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Tue Jan 6 01:58:45 2009 (r186806) +++ head/sys/geom/part/g_part.c Tue Jan 6 06:47:53 2009 (r186807) @@ -182,10 +182,8 @@ g_part_geometry(struct g_part_table *tab u_int heads, sectors; int idx; - if (g_getattr("GEOM::fwsectors", cp, §ors) != 0 || - sectors < 1 || sectors > 63 || - g_getattr("GEOM::fwheads", cp, &heads) != 0 || - heads < 1 || heads > 255) { + if (g_getattr("GEOM::fwsectors", cp, §ors) != 0 || sectors == 0 || + g_getattr("GEOM::fwheads", cp, &heads) != 0 || heads == 0) { table->gpt_fixgeom = 0; table->gpt_heads = 0; table->gpt_sectors = 0; From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 09:03:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A46F71065686; Tue, 6 Jan 2009 09:03:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 936828FC32; Tue, 6 Jan 2009 09:03:02 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06932bH026407; Tue, 6 Jan 2009 09:03:02 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06932hZ026405; Tue, 6 Jan 2009 09:03:02 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901060903.n06932hZ026405@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 6 Jan 2009 09:03:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186808 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 09:03:03 -0000 Author: trasz Date: Tue Jan 6 09:03:02 2009 New Revision: 186808 URL: http://svn.freebsd.org/changeset/base/186808 Log: Add workaround for Parallels 4.0. Without it, ehci and uhci drivers would fail to attach due to unsupported USB revision. It should have no effect when running on a real hardware. Reviewed by: imp Approved by: rwatson (mentor) Modified: head/sys/dev/usb/ehci_pci.c head/sys/dev/usb/uhci_pci.c Modified: head/sys/dev/usb/ehci_pci.c ============================================================================== --- head/sys/dev/usb/ehci_pci.c Tue Jan 6 06:47:53 2009 (r186807) +++ head/sys/dev/usb/ehci_pci.c Tue Jan 6 09:03:02 2009 (r186808) @@ -315,6 +315,14 @@ ehci_pci_attach(device_t self) device_printf(self, "Quirk for CS5536 USB 2.0 enabled\n"); break; } + + /* + * Quirk for Parallels Desktop 4.0. + */ + if (pci_get_devid(self) == PCI_EHCI_DEVICEID_ICH6) { + sc->sc_bus.usbrev = USBREV_2_0; + break; + } sc->sc_bus.usbrev = USBREV_UNKNOWN; return ENXIO; case PCI_USBREV_2_0: Modified: head/sys/dev/usb/uhci_pci.c ============================================================================== --- head/sys/dev/usb/uhci_pci.c Tue Jan 6 06:47:53 2009 (r186807) +++ head/sys/dev/usb/uhci_pci.c Tue Jan 6 09:03:02 2009 (r186808) @@ -389,6 +389,12 @@ uhci_pci_attach(device_t self) break; } + /* + * Quirk for Parallels Desktop 4.0. + */ + if (pci_get_devid(self) == PCI_UHCI_DEVICEID_ICH6_A) + sc->sc_bus.usbrev = USBREV_2_0; + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, NULL, (driver_intr_t *) uhci_intr, sc, &sc->ih); if (err) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 09:34:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2EDD106566B; Tue, 6 Jan 2009 09:34:32 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.tele2.se [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id D4D2E8FC13; Tue, 6 Jan 2009 09:34:31 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=oi64sMs8YxQA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=6I5d2MoRAAAA:8 a=z3945OJnm37Y0V4CdtMA:9 a=fWFc_S1jSKY4U62sQtZ75JA31tEA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 433302276; Tue, 06 Jan 2009 09:34:27 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 09:36:49 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901052211.50514.hselasky@c2i.net> <20090106015012.548aaa9d.stas@FreeBSD.org> In-Reply-To: <20090106015012.548aaa9d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901060936.50984.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 09:34:33 -0000 On Monday 05 January 2009, Stanislav Sedov wrote: > On Mon, 5 Jan 2009 22:11:49 +0100 > > Hans Petter Selasky mentioned: > > Try this patch and let me know the result! I see exactly why things are > > not working! > > > > http://perforce.freebsd.org/chv.cgi?CH=154181 > > > > > > It's not a USB problem! > > These patches help. Now everything works. > Thanks! Hi, I'm trying to push these patches into -current. Can you tell us what CPU architecture you are using? And how much RAM? --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 09:53:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997A4106566C for ; Tue, 6 Jan 2009 09:53:25 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 473078FC19 for ; Tue, 6 Jan 2009 09:53:25 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 6CB108FC52 for ; Tue, 6 Jan 2009 12:40:44 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 71A7F8FC18; Tue, 6 Jan 2009 12:40:41 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 24E1D3996C; Tue, 6 Jan 2009 12:43:08 +0300 (MSK) Date: Tue, 6 Jan 2009 12:43:03 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106124303.d8bab0de.stas@FreeBSD.org> In-Reply-To: <200901060936.50984.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901052211.50514.hselasky@c2i.net> <20090106015012.548aaa9d.stas@FreeBSD.org> <200901060936.50984.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 12:40:44 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963271c967009764991370 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 09:53:25 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 09:36:49 +0100 Hans Petter Selasky mentioned: > Hi, > > I'm trying to push these patches into -current. Can you tell us what CPU > architecture you are using? And how much RAM? > That will be nice to have these fixes in tree. I'm using Core2Quad Q9400 w/ 4Gb RAM running amd64. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljJ6wACgkQK/VZk+smlYHntQCfVb6i+INc1nLX1jskUCyu95kc VnYAn3k5j3M+abZZNVkLB8aOR5CE/1FX =aG86 -----END PGP SIGNATURE----- !DSPAM:4963271c967009764991370! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 10:32:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E921065677 for ; Tue, 6 Jan 2009 10:32:48 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 715A58FC20 for ; Tue, 6 Jan 2009 10:32:48 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 7BD408FC52 for ; Tue, 6 Jan 2009 13:32:47 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 84A748FC18; Tue, 6 Jan 2009 13:32:44 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 21A223996C; Tue, 6 Jan 2009 13:35:11 +0300 (MSK) Date: Tue, 6 Jan 2009 13:35:07 +0300 From: Stanislav Sedov To: Stanislav Sedov Message-Id: <20090106133507.1e2bc2d2.stas@FreeBSD.org> In-Reply-To: <20090106124303.d8bab0de.stas@FreeBSD.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901052211.50514.hselasky@c2i.net> <20090106015012.548aaa9d.stas@FreeBSD.org> <200901060936.50984.hselasky@c2i.net> <20090106124303.d8bab0de.stas@FreeBSD.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 13:32:47 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963334f967001783411812 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Hans Petter Selasky , Stanislav Sedov , svn-src-head@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 10:32:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 12:43:03 +0300 Stanislav Sedov mentioned: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tue, 6 Jan 2009 09:36:49 +0100 > Hans Petter Selasky mentioned: > > > Hi, > > > > I'm trying to push these patches into -current. Can you tell us what CPU > > architecture you are using? And how much RAM? > > > > That will be nice to have these fixes in tree. > I'm using Core2Quad Q9400 w/ 4Gb RAM running amd64. > BTW, I'm still experiencing problems with some kinds of devices. E.g. Anydata E100X modem (ubsa) fails to select configuration and attach both on amd64 and arm with following messages in the log. usb2_alloc_device:1423: set address 2 failed (ignored) usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! ugen0.2: at usbus0 Do you by a chance know what is going on? Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljM98ACgkQK/VZk+smlYHV2QCdE2EM+yyrL+nRmefZL2vxuZxs vy0AoIKxAngfT+cBQzgpiIMYE9cZJ6rc =wZYj -----END PGP SIGNATURE----- !DSPAM:4963334f967001783411812! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 11:02:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 553DD106566C; Tue, 6 Jan 2009 11:02:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 443268FC16; Tue, 6 Jan 2009 11:02:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06B2HRA028841; Tue, 6 Jan 2009 11:02:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06B2HST028840; Tue, 6 Jan 2009 11:02:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901061102.n06B2HST028840@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 11:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186809 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 11:02:17 -0000 Author: bz Date: Tue Jan 6 11:02:17 2009 New Revision: 186809 URL: http://svn.freebsd.org/changeset/base/186809 Log: Further cleanup protosw.h: - Remove unused typedefs to avoid confusion and ease in merging ip6protosw with protosw. - Correct a few comments. - Remove most of a comment about usrreq. [1] - Use tabs instead of spaces for consistency. Submitted by: rwatson [1] Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/sys/protosw.h Modified: head/sys/sys/protosw.h ============================================================================== --- head/sys/sys/protosw.h Tue Jan 6 09:03:02 2009 (r186808) +++ head/sys/sys/protosw.h Tue Jan 6 11:02:17 2009 (r186809) @@ -66,9 +66,7 @@ struct sockopt; /* USE THESE FOR YOUR PROTOTYPES ! */ typedef void pr_input_t (struct mbuf *, int); typedef int pr_input6_t (struct mbuf **, int*, int); /* XXX FIX THIS */ -typedef void pr_in_input_t (struct mbuf *, int, int); /* XXX FIX THIS */ typedef int pr_output_t (struct mbuf *, struct socket *); -typedef int pr_in_output_t (struct mbuf *, struct socket *, struct sockaddr *); typedef void pr_ctlinput_t (int, struct sockaddr *, void *); typedef int pr_ctloutput_t (struct socket *, struct sockopt *); typedef void pr_init_t (void); @@ -76,9 +74,6 @@ typedef void pr_fasttimo_t (void); typedef void pr_slowtimo_t (void); typedef void pr_drain_t (void); -typedef int pr_usrreq_t(struct socket *, int, struct mbuf *, - struct mbuf *, struct mbuf *, struct thread *); - struct protosw { short pr_type; /* socket type used for */ struct domain *pr_domain; /* domain protocol a member of */ @@ -95,7 +90,7 @@ struct protosw { pr_slowtimo_t *pr_slowtimo; /* slow timeout (500ms) */ pr_drain_t *pr_drain; /* flush any excess space possible */ - struct pr_usrreqs *pr_usrreqs; /* supersedes pr_usrreq() */ + struct pr_usrreqs *pr_usrreqs; /* user-protocol hook */ }; /*#endif*/ @@ -131,17 +126,6 @@ struct protosw { * We now provide individual function pointers which protocols can implement, * which offers a number of benefits (such as type checking for arguments). * These older constants are still present in order to support TCP debugging. - * - * The arguments to usrreq were: - * (*protosw[].pr_usrreq)(up, req, m, nam, opt); - * where up is a (struct socket *), req is one of these requests, - * m is an optional mbuf chain containing a message, - * nam is an optional mbuf chain containing an address, - * and opt is a pointer to a socketopt structure or nil. - * The protocol is responsible for disposal of the mbuf chain m, - * the caller is responsible for any space held by nam and opt. - * A non-zero return from usrreq gives an - * UNIX error number which should be passed to higher level software. */ #define PRU_ATTACH 0 /* attach protocol to up */ #define PRU_DETACH 1 /* detach protocol from up */ @@ -170,8 +154,8 @@ struct protosw { #define PRU_SEND_EOF 22 /* send and close */ #define PRU_SOSETLABEL 23 /* MAC label change */ #define PRU_CLOSE 24 /* socket close */ -#define PRU_FLUSH 25 /* flush the socket */ -#define PRU_NREQ 25 +#define PRU_FLUSH 25 /* flush the socket */ +#define PRU_NREQ 25 #ifdef PRUREQUESTS const char *prurequests[] = { @@ -181,7 +165,7 @@ const char *prurequests[] = { "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", - "CLOSE", "FLUSH", + "CLOSE", "FLUSH", }; #endif @@ -327,7 +311,7 @@ char *prcrequests[] = { * The protocol is responsible for disposal of the mbuf chain *optval * if supplied, * the caller is responsible for any space held by *optval, when returned. - * A non-zero return from usrreq gives an + * A non-zero return from ctloutput gives an * UNIX error number which should be passed to higher level software. */ #define PRCO_GETOPT 0 From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 11:11:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EC091065672; Tue, 6 Jan 2009 11:11:58 +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 5DCA88FC1B; Tue, 6 Jan 2009 11:11:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06BBwW7029072; Tue, 6 Jan 2009 11:11:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06BBwA0029070; Tue, 6 Jan 2009 11:11:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901061111.n06BBwA0029070@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 Jan 2009 11:11:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186810 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 11:11:58 -0000 Author: mav Date: Tue Jan 6 11:11:58 2009 New Revision: 186810 URL: http://svn.freebsd.org/changeset/base/186810 Log: Cross-reference snd_ich and snd_hda man pages. Some hardware require different drivers depending on implementation, that may confuse users. Modified: head/share/man/man4/snd_hda.4 head/share/man/man4/snd_ich.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Tue Jan 6 11:02:17 2009 (r186809) +++ head/share/man/man4/snd_hda.4 Tue Jan 6 11:11:58 2009 (r186810) @@ -578,6 +578,7 @@ VIA VT1709 .El .Sh SEE ALSO .Xr sound 4 , +.Xr snd_ich 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr sysctl 8 Modified: head/share/man/man4/snd_ich.4 ============================================================================== --- head/share/man/man4/snd_ich.4 Tue Jan 6 11:02:17 2009 (r186809) +++ head/share/man/man4/snd_ich.4 Tue Jan 6 11:11:58 2009 (r186810) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2005 +.Dd January 6, 2009 .Dt SND_ICH 4 .Os .Sh NAME .Nm snd_ich -.Nd "Intel ICH PCI and compatible bridge device driver" +.Nd "Intel ICH AC'97 and compatible bridge device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -49,7 +49,12 @@ The .Nm bridge driver allows the generic audio driver .Xr sound 4 -to attach to Intel ICH and compatible audio devices. +to attach to Intel ICH AC'97 and compatible audio devices. +.Pp +Some later chips, like ICH6/ICH7, depending on wiring can instead implement +newer Intel HD Audio specification, which is supported by +.Xr snd_hda 4 +driver. .Sh HARDWARE The .Nm @@ -94,7 +99,8 @@ NVIDIA nForce4 SiS 7012 .El .Sh SEE ALSO -.Xr sound 4 +.Xr sound 4 , +.Xr snd_hda 4 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 11:13:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9F5B1065674; Tue, 6 Jan 2009 11:13:56 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id 8CF028FC1E; Tue, 6 Jan 2009 11:13:55 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Ay6owWMc1CgA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=Zo1utoyLX5JlXuvC6oQA:9 a=FcHCRB79suTTbTiChUVNcnwtclgA:4 a=SV7veod9ZcQA:10 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1175326276; Tue, 06 Jan 2009 12:13:53 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 12:15:37 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106124303.d8bab0de.stas@FreeBSD.org> <20090106133507.1e2bc2d2.stas@FreeBSD.org> In-Reply-To: <20090106133507.1e2bc2d2.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061215.37947.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 11:13:57 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 12:43:03 +0300 > > Stanislav Sedov mentioned: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On Tue, 6 Jan 2009 09:36:49 +0100 > > > > Hans Petter Selasky mentioned: > > > Hi, > > > > > > I'm trying to push these patches into -current. Can you tell us what > > > CPU architecture you are using? And how much RAM? > > > > That will be nice to have these fixes in tree. > > I'm using Core2Quad Q9400 w/ 4Gb RAM running amd64. > > BTW, I'm still experiencing problems with some kinds of devices. > E.g. Anydata E100X modem (ubsa) fails to select configuration and > attach both on amd64 and arm with following messages in the log. > > usb2_alloc_device:1423: set address 2 failed (ignored) > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > ugen0.2: at usbus0 > > Do you by a chance know what is going on? Hi, As long as your device shows up like "ugen0.2" it is detected properly and will function. Check with "usbconfig". Suggestions: usbconfig -u 0 -a 2 reset usbconfig -u 0 -a 2 dump_device_desc The failures indicate that the firmware on your USB device is not reponding correctly at the time the set address command is being sent to the device. As you can see the new USB stack will try to re-enumerate the device one time. Have you loaded the correct driver for your serial device? kldload usb2_serial_bsa or kldload usb2_serial_u3g or kldload usb2_serial_gensa --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 12:10:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8A1C106588E; Tue, 6 Jan 2009 12:10:23 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBECB8FC18; Tue, 6 Jan 2009 12:10:23 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CANiK030155; Tue, 6 Jan 2009 12:10:23 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CANMM030154; Tue, 6 Jan 2009 12:10:23 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061210.n06CANMM030154@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 12:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186811 - in stable/7/lib/libc: . string sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:10:26 -0000 Author: danger (doc committer) Date: Tue Jan 6 12:10:23 2009 New Revision: 186811 URL: http://svn.freebsd.org/changeset/base/186811 Log: MFC r180534: - Update the definition of modspecific structure PR: docs/125630 Submitted by: Mateusz Guzik Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) stable/7/lib/libc/sys/modstat.2 Modified: stable/7/lib/libc/sys/modstat.2 ============================================================================== --- stable/7/lib/libc/sys/modstat.2 Tue Jan 6 11:11:58 2009 (r186810) +++ stable/7/lib/libc/sys/modstat.2 Tue Jan 6 12:10:23 2009 (r186811) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2007 +.Dd July 15, 2008 .Dt MODSTAT 2 .Os .Sh NAME @@ -55,9 +55,9 @@ struct module_stat { }; typedef union modspecific { int intval; - u_int u_intval; + u_int uintval; long longval; - u_long u_longval; + u_long ulongval; } modspecific_t; .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 12:12:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6511065672; Tue, 6 Jan 2009 12:12:39 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CA108FC12; Tue, 6 Jan 2009 12:12:39 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CCdRa030278; Tue, 6 Jan 2009 12:12:39 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CCdYg030277; Tue, 6 Jan 2009 12:12:39 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061212.n06CCdYg030277@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 12:12:39 +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: r186812 - in stable/6/lib/libc: . inet sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:12:40 -0000 Author: danger (doc committer) Date: Tue Jan 6 12:12:39 2009 New Revision: 186812 URL: http://svn.freebsd.org/changeset/base/186812 Log: MFC r180534: - Update the definition of modspecific structure PR: docs/125630 Submitted by: Mateusz Guzik Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/inet/inet_net_pton.c (props changed) stable/6/lib/libc/sys/ (props changed) stable/6/lib/libc/sys/modstat.2 Modified: stable/6/lib/libc/sys/modstat.2 ============================================================================== --- stable/6/lib/libc/sys/modstat.2 Tue Jan 6 12:10:23 2009 (r186811) +++ stable/6/lib/libc/sys/modstat.2 Tue Jan 6 12:12:39 2009 (r186812) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2007 +.Dd July 15, 2008 .Dt MODSTAT 2 .Os .Sh NAME @@ -55,9 +55,9 @@ struct module_stat { }; typedef union modspecific { int intval; - u_int u_intval; + u_int uintval; long longval; - u_long u_longval; + u_long ulongval; } modspecific_t; .Ed .Pp From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 12:13:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BCC3106564A; Tue, 6 Jan 2009 12:13:41 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 39A468FC16; Tue, 6 Jan 2009 12:13:41 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CDfNO030336; Tue, 6 Jan 2009 12:13:41 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CDfuv030333; Tue, 6 Jan 2009 12:13:41 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901061213.n06CDfuv030333@svn.freebsd.org> From: Randall Stewart Date: Tue, 6 Jan 2009 12:13:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186813 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:13:42 -0000 Author: rrs Date: Tue Jan 6 12:13:40 2009 New Revision: 186813 URL: http://svn.freebsd.org/changeset/base/186813 Log: Add the ability of an alternate transport protocol to easily tunnel over udp by providing a hook function that will be called instead of appending to the socket buffer. Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Jan 6 12:12:39 2009 (r186812) +++ head/sys/netinet/udp_usrreq.c Tue Jan 6 12:13:40 2009 (r186813) @@ -488,10 +488,33 @@ udp_input(struct mbuf *m, int off) struct mbuf *n; n = m_copy(m, 0, M_COPYALL); - if (n != NULL) - udp_append(last, ip, n, iphlen + - sizeof(struct udphdr), &udp_in); - INP_RUNLOCK(last); + if (last->inp_ppcb == NULL) { + if (n != NULL) + udp_append(last, + ip, n, + iphlen + + sizeof(struct udphdr), + &udp_in); + INP_RUNLOCK(last); + } else { + /* + * Engage the tunneling protocol we + * will have to leave the info_lock + * up, since we are hunting through + * multiple UDP inp's hope we don't + * break. + * + * XXXML: Maybe add a flag to the + * prototype so that the tunneling + * can defer work that can't be done + * under the info lock? + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)last->inp_ppcb; + tunnel_func(n, iphlen, last); + INP_RUNLOCK(last); + } } last = inp; /* @@ -516,10 +539,24 @@ udp_input(struct mbuf *m, int off) V_udpstat.udps_noportbcast++; goto badheadlocked; } - udp_append(last, ip, m, iphlen + sizeof(struct udphdr), - &udp_in); - INP_RUNLOCK(last); - INP_INFO_RUNLOCK(&V_udbinfo); + if (last->inp_ppcb == NULL) { + udp_append(last, ip, m, iphlen + sizeof(struct udphdr), + &udp_in); + INP_RUNLOCK(last); + INP_INFO_RUNLOCK(&V_udbinfo); + } else { + /* + * Engage the tunneling protocol we must make sure + * all locks are released when we call the tunneling + * protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)last->inp_ppcb; + tunnel_func(m, iphlen, last); + INP_RUNLOCK(last); + INP_INFO_RUNLOCK(&V_udbinfo); + } return; } @@ -563,6 +600,18 @@ udp_input(struct mbuf *m, int off) INP_RUNLOCK(inp); goto badunlocked; } + if (inp->inp_ppcb != NULL) { + /* + * Engage the tunneling protocol we must make sure all locks + * are released when we call the tunneling protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; + tunnel_func(m, iphlen, inp); + INP_RUNLOCK(inp); + return; + } udp_append(inp, ip, m, iphlen + sizeof(struct udphdr), &udp_in); INP_RUNLOCK(inp); return; @@ -1138,6 +1187,34 @@ udp_attach(struct socket *so, int proto, INP_INFO_WUNLOCK(&V_udbinfo); inp->inp_vflag |= INP_IPV4; inp->inp_ip_ttl = V_ip_defttl; + /* + * UDP does not have a per-protocol pcb (inp->inp_ppcb). + * We use this pointer for kernel tunneling pointer. + * If we ever need to have a protocol block we will + * need to move this function pointer there. Null + * in this pointer means "do the normal thing". + */ + inp->inp_ppcb = NULL; + INP_WUNLOCK(inp); + return (0); +} + +int +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) +{ + struct inpcb *inp; + + inp = (struct inpcb *)so->so_pcb; + if (so->so_type != SOCK_DGRAM) { + /* Not UDP socket... sorry! */ + return (ENOTSUP); + } + if (inp == NULL) { + /* NULL INP? */ + return (EINVAL); + } + INP_WLOCK(inp); + inp->inp_ppcb = f; INP_WUNLOCK(inp); return (0); } Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Tue Jan 6 12:12:39 2009 (r186812) +++ head/sys/netinet/udp_var.h Tue Jan 6 12:13:40 2009 (r186813) @@ -110,6 +110,10 @@ void udp_init(void); void udp_input(struct mbuf *, int); struct inpcb *udp_notify(struct inpcb *inp, int errno); int udp_shutdown(struct socket *so); + + +typedef void(*udp_tun_func_t)(struct mbuf *, int off, struct inpcb *); +int udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f); #endif #endif Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Jan 6 12:12:39 2009 (r186812) +++ head/sys/netinet6/udp6_usrreq.c Tue Jan 6 12:13:40 2009 (r186813) @@ -287,8 +287,25 @@ udp6_input(struct mbuf **mp, int *offp, if ((n = m_copy(m, 0, M_COPYALL)) != NULL) { INP_RLOCK(last); - udp6_append(last, n, off, &fromsa); - INP_RUNLOCK(last); + if (last->inp_ppcb != NULL) { + /* + * Engage the tunneling + * protocol we will have to + * leave the info_lock up, + * since we are hunting + * through multiple UDP + * inp's hope we don't break. + * + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)last->inp_ppcb; + tunnel_func(n, off, last); + INP_RUNLOCK(last); + } else { + udp6_append(last, n, off, &fromsa); + INP_RUNLOCK(last); + } } } last = inp; @@ -317,6 +334,19 @@ udp6_input(struct mbuf **mp, int *offp, } INP_RLOCK(last); INP_INFO_RUNLOCK(&V_udbinfo); + if (last->inp_ppcb != NULL) { + /* + * Engage the tunneling protocol we must make sure + * all locks are released when we call the tunneling + * protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; + tunnel_func(m, off, last); + INP_RUNLOCK(last); + return (IPPROTO_DONE); + } udp6_append(last, m, off, &fromsa); INP_RUNLOCK(last); return (IPPROTO_DONE); @@ -354,6 +384,18 @@ udp6_input(struct mbuf **mp, int *offp, } INP_RLOCK(inp); INP_INFO_RUNLOCK(&V_udbinfo); + if (inp->inp_ppcb != NULL) { + /* + * Engage the tunneling protocol we must make sure all locks + * are released when we call the tunneling protocol. + */ + udp_tun_func_t tunnel_func; + + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; + tunnel_func(m, off, inp); + INP_RUNLOCK(inp); + return (IPPROTO_DONE); + } udp6_append(inp, m, off, &fromsa); INP_RUNLOCK(inp); return (IPPROTO_DONE); From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 12:23:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68128106564A; Tue, 6 Jan 2009 12:23:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5730D8FC16; Tue, 6 Jan 2009 12:23:19 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CNJh8030646; Tue, 6 Jan 2009 12:23:19 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CNJTw030645; Tue, 6 Jan 2009 12:23:19 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901061223.n06CNJTw030645@svn.freebsd.org> From: Randall Stewart Date: Tue, 6 Jan 2009 12:23:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186815 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:23:19 -0000 Author: rrs Date: Tue Jan 6 12:23:19 2009 New Revision: 186815 URL: http://svn.freebsd.org/changeset/base/186815 Log: Adds flags for SCTP checksum offload. Prep for support for new Intel NIC's that have this feature. Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Tue Jan 6 12:17:43 2009 (r186814) +++ head/sys/sys/mbuf.h Tue Jan 6 12:23:19 2009 (r186815) @@ -241,11 +241,13 @@ struct mbuf { #define CSUM_IP_FRAGS 0x0008 /* will csum IP fragments */ #define CSUM_FRAGMENT 0x0010 /* will do IP fragmentation */ #define CSUM_TSO 0x0020 /* will do TSO */ +#define CSUM_SCTP 0x0040 /* will csum SCTP */ #define CSUM_IP_CHECKED 0x0100 /* did csum IP */ #define CSUM_IP_VALID 0x0200 /* ... the csum is valid */ #define CSUM_DATA_VALID 0x0400 /* csum_data field is valid */ #define CSUM_PSEUDO_HDR 0x0800 /* csum_data has pseudo hdr */ +#define CSUM_SCTP_VALID 0x1000 /* SCTP checksum is valid */ #define CSUM_DELAY_DATA (CSUM_TCP | CSUM_UDP) #define CSUM_DELAY_IP (CSUM_IP) /* XXX add ipv6 here too? */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 12:39:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751FE1065676; Tue, 6 Jan 2009 12:39:28 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6201B8FC12; Tue, 6 Jan 2009 12:39:28 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06CdS1O031071; Tue, 6 Jan 2009 12:39:28 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06CdSJC031069; Tue, 6 Jan 2009 12:39:28 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061239.n06CdSJC031069@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 12:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186816 - in stable/6/usr.sbin/wpa: . wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:39:29 -0000 Author: danger (doc committer) Date: Tue Jan 6 12:39:28 2009 New Revision: 186816 URL: http://svn.freebsd.org/changeset/base/186816 Log: MFC r180158: - install the example wpa_supplicant.conf file to the share/examples/etc directory [1] - add the FILES section to the wpa_supplicant.conf.5 file, so that people will be able to detect the example configuration file easier. [2] PR: docs/121821 [2] Submitted by: edwin [2] Approved by: brooks [1] Modified: stable/6/usr.sbin/wpa/ (props changed) stable/6/usr.sbin/wpa/wpa_supplicant/Makefile stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Modified: stable/6/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 12:23:19 2009 (r186815) +++ stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 12:39:28 2009 (r186816) @@ -11,6 +11,11 @@ SRCS= config.c eloop.c common.c md5.c rc MAN= wpa_supplicant.8 wpa_supplicant.conf.5 +.if ${MK_EXAMPLES} != "no" +FILESDIR= ${SHAREDIR}/examples/etc +FILES= wpa_supplicant.conf +.endif + CFLAGS+= -I${.CURDIR} -I${WPA_SUPPLICANT_DISTDIR} CFLAGS+= -DCONFIG_DRIVER_BSD CFLAGS+= -DCONFIG_DRIVER_NDIS Modified: stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Tue Jan 6 12:23:19 2009 (r186815) +++ stable/6/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Tue Jan 6 12:39:28 2009 (r186816) @@ -514,6 +514,11 @@ network={ wep_key0=42FEEDDEAFBABEDEAFBEEFAA55 } .Ed +.Sh FILES +.Bl -tag -width ".Pa /usr/share/examples/etc/wpa_supplicant.conf" -compact +.It Pa /etc/wpa_supplicant.conf +.It Pa /usr/share/examples/etc/wpa_supplicant.conf +.El .Sh SEE ALSO .Xr wpa_cli 8 , .Xr wpa_passphrase 8 , From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 12:43:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C507106566B; Tue, 6 Jan 2009 12:43:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3B1638FC14; Tue, 6 Jan 2009 12:43:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id D508A46B3C; Tue, 6 Jan 2009 07:43:41 -0500 (EST) Date: Tue, 6 Jan 2009 12:43:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Randall Stewart In-Reply-To: <200901061213.n06CDfuv030333@svn.freebsd.org> Message-ID: References: <200901061213.n06CDfuv030333@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186813 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 12:43:42 -0000 On Tue, 6 Jan 2009, Randall Stewart wrote: > + /* > + * Engage the tunneling protocol we > + * will have to leave the info_lock > + * up, since we are hunting through > + * multiple UDP inp's hope we don't > + * break. > + * > + * XXXML: Maybe add a flag to the > + * prototype so that the tunneling > + * can defer work that can't be done > + * under the info lock? > + */ > + udp_tun_func_t tunnel_func; > + > + tunnel_func = (udp_tun_func_t)last->inp_ppcb; > + tunnel_func(n, iphlen, last); > + INP_RUNLOCK(last); There's a basic working assumption throughout most protocol input paths that the inpcb (and hence things it points to) will remain valid only if appropriate locks are held, so I think we won't ever be in a position where we can safely call tunnel_func() without at least the inpcb, and possibly the pcbinfo, lock. As such, I think we can lose the comments about locking here and elsewhere. > - udp_append(last, ip, m, iphlen + sizeof(struct udphdr), > - &udp_in); > - INP_RUNLOCK(last); > - INP_INFO_RUNLOCK(&V_udbinfo); > + if (last->inp_ppcb == NULL) { > + udp_append(last, ip, m, iphlen + sizeof(struct udphdr), > + &udp_in); > + INP_RUNLOCK(last); > + INP_INFO_RUNLOCK(&V_udbinfo); > + } else { > + /* > + * Engage the tunneling protocol we must make sure > + * all locks are released when we call the tunneling > + * protocol. This comment appears to be stale -- the locks are held, and must be. > + /* > + * Engage the tunneling protocol we must make sure all locks > + * are released when we call the tunneling protocol. > + */ > + udp_tun_func_t tunnel_func; Ditto here -- locks are held, and must be. > +int > +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) > +{ > + struct inpcb *inp; > + Hmm. Perhaps the sanity tests here should be KASSERT's: KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: !dgram")); KASSERT(so->so_ppcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); Otherwise these if's are really just error handling for violated invariants. > + INP_WLOCK(inp); > + inp->inp_ppcb = f; > INP_WUNLOCK(inp); However, I could see having some error-handling here, perhaps something like: INP_WLOCK(inp); if (inp->inp_ppcb != NULL) { INP_WUNLOCK(inp); return (EBUSY); } inp->inp_ppcb = f; INP_WUNLOCK(inp); > - udp6_append(last, n, off, &fromsa); > - INP_RUNLOCK(last); > + if (last->inp_ppcb != NULL) { > + /* > + * Engage the tunneling > + * protocol we will have to > + * leave the info_lock up, > + * since we are hunting > + * through multiple UDP > + * inp's hope we don't break. I think we can omit the comment here -- the locks are necessary and unavoidable, so any functions called here need to deal with it by definition. > + if (last->inp_ppcb != NULL) { > + /* > + * Engage the tunneling protocol we must make sure > + * all locks are released when we call the tunneling > + * protocol. Ditto as above -- stale, and probably unnecessary. > @@ -354,6 +384,18 @@ udp6_input(struct mbuf **mp, int *offp, > } > INP_RLOCK(inp); > INP_INFO_RUNLOCK(&V_udbinfo); > + if (inp->inp_ppcb != NULL) { > + /* > + * Engage the tunneling protocol we must make sure all locks > + * are released when we call the tunneling protocol. > + */ Ditto. BTW, have you thought about trying to use so_upcall for these things rather than something specific to the UDP layer, or do you really need the full IP/UDP header? Robert N M Watson Computer Laboratory University of Cambridge > + udp_tun_func_t tunnel_func; > + > + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; > + tunnel_func(m, off, inp); > + INP_RUNLOCK(inp); > + return (IPPROTO_DONE); > + } > udp6_append(inp, m, off, &fromsa); > INP_RUNLOCK(inp); > return (IPPROTO_DONE); > From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:05:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDBB71065673; Tue, 6 Jan 2009 13:05:58 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBA5C8FC1A; Tue, 6 Jan 2009 13:05:58 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06D5ws5031675; Tue, 6 Jan 2009 13:05:58 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06D5w82031674; Tue, 6 Jan 2009 13:05:58 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061305.n06D5w82031674@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186817 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:05:59 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:05:58 2009 New Revision: 186817 URL: http://svn.freebsd.org/changeset/base/186817 Log: catch up wtih r175955 by ume: - the support of AI_ALL and AI_V4MAPPED has been completely removed. Modified: head/lib/libc/net/getaddrinfo.3 Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Tue Jan 6 12:39:28 2009 (r186816) +++ head/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:05:58 2009 (r186817) @@ -126,13 +126,11 @@ field to which the parameter points shall be set to zero or be the bitwise-inclusive OR of one or more of the values .Dv AI_ADDRCONFIG , -.Dv AI_ALL , .Dv AI_CANONNAME , .Dv AI_NUMERICHOST , -.Dv AI_NUMERICSERV , -.Dv AI_PASSIVE , +.Dv AI_NUMERICSERV and -.Dv AI_V4MAPPED . +.Dv AI_PASSIVE . .Bl -tag -width "AI_CANONNAMEXX" .It Dv AI_ADDRCONFIG If the @@ -141,19 +139,6 @@ bit is set, IPv4 addresses shall be retu an IPv4 address is configured on the local system, and IPv6 addresses shall be returned only if an IPv6 address is configured on the local system. -.It Dv AI_ALL -If the -.Dv AI_ALL -bit is set with the -.Dv AI_V4MAPPED -bit, then -.Fn getaddrinfo -shall return all matching IPv6 and IPv4 addresses. -The -.Dv AI_ALL -bit without the -.Dv AI_V4MAPPED -bit is ignored. .It Dv AI_CANONNAME If the .Dv AI_CANONNAME @@ -218,30 +203,6 @@ loopback address if is the null pointer and .Dv AI_PASSIVE is not set. -.It Dv AI_V4MAPPED -If the -.Dv AI_V4MAPPED -flag is specified along with an -.Fa ai_family -of -.Dv AF_INET6 , -then -.Fn getaddrinfo -shall return IPv4-mapped IPv6 addresses -on finding no matching IPv6 addresses ( -.Fa ai_addrlen -shall be 16). -The -.Dv AI_V4MAPPED -flag shall be ignored unless -.Fa ai_family -equals -.Dv AF_INET6 . -Note: this flag is currently -.Em not -supported, see the -.Sx BUGS -section. .El .El .Pp @@ -490,18 +451,6 @@ freeaddrinfo(res0); .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re -.Sh BUGS -The -.Nm -function as implemented in -.Fx -currently does not support -.Dv AI_ALL -and -.Dv AI_V4MAPPED -flags and returns -.Dv EAI_BADFLAGS -if one of them is specified. .Sh STANDARDS The .Fn getaddrinfo From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:09:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAE211065670; Tue, 6 Jan 2009 13:09:19 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C85678FC08; Tue, 6 Jan 2009 13:09:19 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06D9JU8031796; Tue, 6 Jan 2009 13:09:19 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06D9J0D031795; Tue, 6 Jan 2009 13:09:19 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061309.n06D9J0D031795@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:09:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186818 - in stable/7/lib/libc: . net string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:09:20 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:09:19 2009 New Revision: 186818 URL: http://svn.freebsd.org/changeset/base/186818 Log: MFC r180162: - AI_ALL and AI_V4MAPPED flags are currently not supported PR: docs/120248 Submitted by: Heiko Wundram Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/net/getaddrinfo.3 stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) Modified: stable/7/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/7/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:05:58 2009 (r186817) +++ stable/7/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:09:19 2009 (r186818) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2007 +.Dd July 1, 2008 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -237,6 +237,11 @@ flag shall be ignored unless .Fa ai_family equals .Dv AF_INET6 . +Note: this flag is currently +.Em not +supported, see the +.Sx BUGS +section. .El .El .Pp @@ -485,6 +490,18 @@ freeaddrinfo(res0); .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re +.Sh BUGS +The +.Nm +function as implemented in +.Fx +currently does not support +.Dv AI_ALL +and +.Dv AI_V4MAPPED +flags and returns +.Dv EAI_BADFLAGS +if one of them is specified. .Sh STANDARDS The .Fn getaddrinfo From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:10:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10D3C1065672; Tue, 6 Jan 2009 13:10:16 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9CB68FC18; Tue, 6 Jan 2009 13:10:15 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DAFoT031853; Tue, 6 Jan 2009 13:10:15 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DAFnR031852; Tue, 6 Jan 2009 13:10:15 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061310.n06DAFnR031852@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:10:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186819 - head/lib/libc/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:10:17 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:10:15 2009 New Revision: 186819 URL: http://svn.freebsd.org/changeset/base/186819 Log: - forgot to bump a date Modified: head/lib/libc/net/getaddrinfo.3 Modified: head/lib/libc/net/getaddrinfo.3 ============================================================================== --- head/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:09:19 2009 (r186818) +++ head/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:10:15 2009 (r186819) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 1, 2008 +.Dd January 6, 2009 .Dt GETADDRINFO 3 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:12:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE84C106566C; Tue, 6 Jan 2009 13:12:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBCA08FC13; Tue, 6 Jan 2009 13:12:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DCQGZ031965; Tue, 6 Jan 2009 13:12:26 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DCQuj031964; Tue, 6 Jan 2009 13:12:26 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901061312.n06DCQuj031964@svn.freebsd.org> From: Daniel Gerzo Date: Tue, 6 Jan 2009 13:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186820 - in stable/6/lib/libc: . inet net sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:12:27 -0000 Author: danger (doc committer) Date: Tue Jan 6 13:12:26 2009 New Revision: 186820 URL: http://svn.freebsd.org/changeset/base/186820 Log: MFC r180162: - AI_ALL and AI_V4MAPPED flags are currently not supported PR: docs/120248 Submitted by: Heiko Wundram Modified: stable/6/lib/libc/ (props changed) stable/6/lib/libc/inet/inet_net_pton.c (props changed) stable/6/lib/libc/net/getaddrinfo.3 stable/6/lib/libc/sys/ (props changed) Modified: stable/6/lib/libc/net/getaddrinfo.3 ============================================================================== --- stable/6/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:10:15 2009 (r186819) +++ stable/6/lib/libc/net/getaddrinfo.3 Tue Jan 6 13:12:26 2009 (r186820) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 6, 2007 +.Dd July 1, 2008 .Dt GETADDRINFO 3 .Os .Sh NAME @@ -237,6 +237,11 @@ flag shall be ignored unless .Fa ai_family equals .Dv AF_INET6 . +Note: this flag is currently +.Em not +supported, see the +.Sx BUGS +section. .El .El .Pp @@ -485,6 +490,18 @@ freeaddrinfo(res0); .%B "Proceedings of the freenix track: 2000 USENIX annual technical conference" .%D June 2000 .Re +.Sh BUGS +The +.Nm +function as implemented in +.Fx +currently does not support +.Dv AI_ALL +and +.Dv AI_V4MAPPED +flags and returns +.Dv EAI_BADFLAGS +if one of them is specified. .Sh STANDARDS The .Fn getaddrinfo From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:19:27 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BCEF106564A; Tue, 6 Jan 2009 13:19:27 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:203:6dff:fe1a:4ddc]) by mx1.freebsd.org (Postfix) with ESMTP id AAC678FC0C; Tue, 6 Jan 2009 13:19:26 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from [10.1.1.54] ([10.1.1.54]) (authenticated bits=0) by lakerest.net (8.14.1/8.14.1) with ESMTP id n06DJOI4059166 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 6 Jan 2009 08:19:25 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: <13F887DB-F42B-4283-B19A-02CCCB8CDB27@lakerest.net> From: Randall Stewart To: Robert Watson In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 6 Jan 2009 08:19:24 -0500 References: <200901061213.n06CDfuv030333@svn.freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@FreeBSD.org, Randall Stewart , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186813 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:19:27 -0000 On Jan 6, 2009, at 7:43 AM, Robert Watson wrote: > On Tue, 6 Jan 2009, Randall Stewart wrote: > >> + /* >> + * Engage the tunneling protocol we >> + * will have to leave the info_lock >> + * up, since we are hunting through >> + * multiple UDP inp's hope we don't >> + * break. >> + * >> + * XXXML: Maybe add a flag to the >> + * prototype so that the tunneling >> + * can defer work that can't be done >> + * under the info lock? >> + */ >> + udp_tun_func_t tunnel_func; >> + >> + tunnel_func = (udp_tun_func_t)last->inp_ppcb; >> + tunnel_func(n, iphlen, last); >> + INP_RUNLOCK(last); > > There's a basic working assumption throughout most protocol input > paths that the inpcb (and hence things it points to) will remain > valid only if appropriate locks are held, so I think we won't ever > be in a position where we can safely call tunnel_func() without at > least the inpcb, and possibly the pcbinfo, lock. As such, I think > we can lose the comments about locking here and elsewhere. Right.. Ok I will scrub out all the stale comments.. > > >> - udp_append(last, ip, m, iphlen + sizeof(struct udphdr), >> - &udp_in); >> - INP_RUNLOCK(last); >> - INP_INFO_RUNLOCK(&V_udbinfo); >> + if (last->inp_ppcb == NULL) { >> + udp_append(last, ip, m, iphlen + sizeof(struct udphdr), >> + &udp_in); >> + INP_RUNLOCK(last); >> + INP_INFO_RUNLOCK(&V_udbinfo); >> + } else { >> + /* >> + * Engage the tunneling protocol we must make sure >> + * all locks are released when we call the tunneling >> + * protocol. > > This comment appears to be stale -- the locks are held, and must be. > >> + /* >> + * Engage the tunneling protocol we must make sure all locks >> + * are released when we call the tunneling protocol. >> + */ >> + udp_tun_func_t tunnel_func; > > Ditto here -- locks are held, and must be. > >> +int >> +udp_set_kernel_tunneling(struct socket *so, udp_tun_func_t f) >> +{ >> + struct inpcb *inp; >> + > > Hmm. Perhaps the sanity tests here should be KASSERT's: > > KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: ! > dgram")); > KASSERT(so->so_ppcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); > > Otherwise these if's are really just error handling for violated > invariants. > >> + INP_WLOCK(inp); >> + inp->inp_ppcb = f; >> INP_WUNLOCK(inp); > > However, I could see having some error-handling here, perhaps > something like: > > INP_WLOCK(inp); > if (inp->inp_ppcb != NULL) { > INP_WUNLOCK(inp); > return (EBUSY); > } > inp->inp_ppcb = f; > INP_WUNLOCK(inp); > Hmm yeah a KASSERT would be better. And I like your error check.. I will add these with the commit. >> - udp6_append(last, n, off, &fromsa); >> - INP_RUNLOCK(last); >> + if (last->inp_ppcb != NULL) { >> + /* >> + * Engage the tunneling >> + * protocol we will have to >> + * leave the info_lock up, >> + * since we are hunting >> + * through multiple UDP >> + * inp's hope we don't break. > > I think we can omit the comment here -- the locks are necessary and > unavoidable, so any functions called here need to deal with it by > definition. > >> + if (last->inp_ppcb != NULL) { >> + /* >> + * Engage the tunneling protocol we must make sure >> + * all locks are released when we call the tunneling >> + * protocol. > > Ditto as above -- stale, and probably unnecessary. > >> @@ -354,6 +384,18 @@ udp6_input(struct mbuf **mp, int *offp, >> } >> INP_RLOCK(inp); >> INP_INFO_RUNLOCK(&V_udbinfo); >> + if (inp->inp_ppcb != NULL) { >> + /* >> + * Engage the tunneling protocol we must make sure all locks >> + * are released when we call the tunneling protocol. >> + */ > > Ditto. BTW, have you thought about trying to use so_upcall for > these things rather than something specific to the UDP layer, or do > you really need the full IP/UDP header? > I think the answer is yes, we definitely need the full IP header and UDP header. Consider that the transport protocol you are tunneling to will do (in general) the following: 1) Pull out the UDP port number of the sender and stash this (or make sure it is stashed) in its internal PCB. 2) Strip out the udp header. 3) Present the IP+Real Transport header AND the udp Port used (to act as a flag that it came via udp) to the real transports NNN_input() function. Without the full IP/UDP headers you would not be able to do this. R > Robert N M Watson > Computer Laboratory > University of Cambridge > >> + udp_tun_func_t tunnel_func; >> + >> + tunnel_func = (udp_tun_func_t)inp->inp_ppcb; >> + tunnel_func(m, off, inp); >> + INP_RUNLOCK(inp); >> + return (IPPROTO_DONE); >> + } >> udp6_append(inp, m, off, &fromsa); >> INP_RUNLOCK(inp); >> return (IPPROTO_DONE); >> > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:27:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 206AB106566B; Tue, 6 Jan 2009 13:27:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4298FC1A; Tue, 6 Jan 2009 13:27:57 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06DRugx032334; Tue, 6 Jan 2009 13:27:56 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DRuLo032332; Tue, 6 Jan 2009 13:27:56 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200901061327.n06DRuLo032332@svn.freebsd.org> From: Randall Stewart Date: Tue, 6 Jan 2009 13:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186821 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 13:27:57 -0000 Author: rrs Date: Tue Jan 6 13:27:56 2009 New Revision: 186821 URL: http://svn.freebsd.org/changeset/base/186821 Log: Addresses Roberts comments on comments. Also adds the KASSERT and checks suggested. Reviewed by: The udp tunneling was discussed on net@ under the thread entitled "Heads up -- Thinking about UDP and tunneling" Modified: head/sys/netinet/udp_usrreq.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Tue Jan 6 13:12:26 2009 (r186820) +++ head/sys/netinet/udp_usrreq.c Tue Jan 6 13:27:56 2009 (r186821) @@ -501,13 +501,8 @@ udp_input(struct mbuf *m, int off) * Engage the tunneling protocol we * will have to leave the info_lock * up, since we are hunting through - * multiple UDP inp's hope we don't - * break. + * multiple UDP's. * - * XXXML: Maybe add a flag to the - * prototype so that the tunneling - * can defer work that can't be done - * under the info lock? */ udp_tun_func_t tunnel_func; @@ -546,9 +541,7 @@ udp_input(struct mbuf *m, int off) INP_INFO_RUNLOCK(&V_udbinfo); } else { /* - * Engage the tunneling protocol we must make sure - * all locks are released when we call the tunneling - * protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; @@ -602,8 +595,7 @@ udp_input(struct mbuf *m, int off) } if (inp->inp_ppcb != NULL) { /* - * Engage the tunneling protocol we must make sure all locks - * are released when we call the tunneling protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; @@ -1205,6 +1197,8 @@ udp_set_kernel_tunneling(struct socket * struct inpcb *inp; inp = (struct inpcb *)so->so_pcb; + KASSERT(so->so_type == SOCK_DGRAM, ("udp_set_kernel_tunneling: !dgram")); + KASSERT(so->so_pcb != NULL, ("udp_set_kernel_tunneling: NULL inp")); if (so->so_type != SOCK_DGRAM) { /* Not UDP socket... sorry! */ return (ENOTSUP); @@ -1214,6 +1208,10 @@ udp_set_kernel_tunneling(struct socket * return (EINVAL); } INP_WLOCK(inp); + if (inp->inp_ppcb != NULL) { + INP_WUNLOCK(inp); + return (EBUSY); + } inp->inp_ppcb = f; INP_WUNLOCK(inp); return (0); Modified: head/sys/netinet6/udp6_usrreq.c ============================================================================== --- head/sys/netinet6/udp6_usrreq.c Tue Jan 6 13:12:26 2009 (r186820) +++ head/sys/netinet6/udp6_usrreq.c Tue Jan 6 13:27:56 2009 (r186821) @@ -293,8 +293,7 @@ udp6_input(struct mbuf **mp, int *offp, * protocol we will have to * leave the info_lock up, * since we are hunting - * through multiple UDP - * inp's hope we don't break. + * through multiple UDP's. * */ udp_tun_func_t tunnel_func; @@ -336,9 +335,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_INFO_RUNLOCK(&V_udbinfo); if (last->inp_ppcb != NULL) { /* - * Engage the tunneling protocol we must make sure - * all locks are released when we call the tunneling - * protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; @@ -386,8 +383,7 @@ udp6_input(struct mbuf **mp, int *offp, INP_INFO_RUNLOCK(&V_udbinfo); if (inp->inp_ppcb != NULL) { /* - * Engage the tunneling protocol we must make sure all locks - * are released when we call the tunneling protocol. + * Engage the tunneling protocol. */ udp_tun_func_t tunnel_func; From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 13:59:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D851E106566B; Tue, 6 Jan 2009 13:59:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C62038FC08; Tue, 6 Jan 2009 13:59:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06Dxxgh032916; Tue, 6 Jan 2009 13:59:59 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06DxxFj032915; Tue, 6 Jan 2009 13:59:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901061359.n06DxxFj032915@svn.freebsd.org> From: Robert Watson Date: Tue, 6 Jan 2009 13:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186822 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:00:00 -0000 Author: rwatson Date: Tue Jan 6 13:59:59 2009 New Revision: 186822 URL: http://svn.freebsd.org/changeset/base/186822 Log: In AUDIT_SYSCALL_EXIT(), invoke audit_syscall_exit() only if an audit record is active on the current thread--historically we may always have wanted to enter the audit code if auditing was enabled, but now we just commit the audit record so don't need to enter if there isn't one. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit.h Modified: head/sys/security/audit/audit.h ============================================================================== --- head/sys/security/audit/audit.h Tue Jan 6 13:27:56 2009 (r186821) +++ head/sys/security/audit/audit.h Tue Jan 6 13:59:59 2009 (r186822) @@ -198,11 +198,11 @@ void audit_thread_free(struct thread *t /* * Wrap the audit_syscall_exit() function so that it is called only when - * auditing is enabled, or we have a audit record on the thread. It is - * possible that an audit record was begun before auditing was turned off. + * we have a audit record on the thread. Audit records can persist after + * auditing is disabled, so we don't just check audit_enabled here. */ #define AUDIT_SYSCALL_EXIT(error, td) do { \ - if (audit_enabled || (td->td_ar != NULL)) \ + if (td->td_ar != NULL) \ audit_syscall_exit(error, td); \ } while (0) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:10:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D88C1065672; Tue, 6 Jan 2009 14:10:11 +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 2B2EF8FC0C; Tue, 6 Jan 2009 14:10:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EABtp033160; Tue, 6 Jan 2009 14:10:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EABW2033159; Tue, 6 Jan 2009 14:10:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901061410.n06EABW2033159@svn.freebsd.org> From: Marius Strobl Date: Tue, 6 Jan 2009 14:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186823 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:10:12 -0000 Author: marius Date: Tue Jan 6 14:10:10 2009 New Revision: 186823 URL: http://svn.freebsd.org/changeset/base/186823 Log: - Don't enforce an upper-bound to the number of sectors or heads, allowing the full 16-bit width of the corresponding fields in the VTOC8 label to be used. The removed limits basically only held true for providers labeled using the synthetic geometry provided by cam_calc_geometry(9) but neither SCSI disks labeled with Solaris nor sufficiently large ATA disks. - Given that providers (originally) labeled with Solaris typically use the native geometry as reported by the target while FreeBSD typically uses a synthetic one put the message complaining about mismatching geometries between what the label indicates and what GEOM thinks the provider has, which we generally can't help, under bootverbose in order to not unnecessarily scare users. - For informational purposes add the non-matching values to the message complaining about them, similar to what r186501 did for g_part_bsd_read() except also indicating the origin of the values. - Make it clear that the messages emitted by this code refer to the VTOC8 support rather than to another existing scheme or to VTOC32. Modified: head/sys/geom/part/g_part_vtoc8.c Modified: head/sys/geom/part/g_part_vtoc8.c ============================================================================== --- head/sys/geom/part/g_part_vtoc8.c Tue Jan 6 13:59:59 2009 (r186822) +++ head/sys/geom/part/g_part_vtoc8.c Tue Jan 6 14:10:10 2009 (r186823) @@ -371,7 +371,7 @@ g_part_vtoc8_read(struct g_part_table *b msize = pp->mediasize / pp->sectorsize; sectors = be16dec(&table->vtoc.nsecs); - if (sectors < 1 || sectors > 63) + if (sectors < 1) goto invalid_label; if (sectors != basetable->gpt_sectors && !basetable->gpt_fixgeom) { g_part_geometry_heads(msize, sectors, &chs, &heads); @@ -382,13 +382,21 @@ g_part_vtoc8_read(struct g_part_table *b } heads = be16dec(&table->vtoc.nheads); - if (heads < 1 || heads > 255) + if (heads < 1) goto invalid_label; if (heads != basetable->gpt_heads && !basetable->gpt_fixgeom) basetable->gpt_heads = heads; - if (sectors != basetable->gpt_sectors || - heads != basetable->gpt_heads) - printf("GEOM: %s: geometry does not match label.\n", pp->name); + /* + * Except for ATA disks > 32GB, Solaris uses the native geometry + * as reported by the target for the labels while da(4) typically + * uses a synthetic one so we don't complain too loudly if these + * geometries don't match. + */ + if (bootverbose && (sectors != basetable->gpt_sectors || + heads != basetable->gpt_heads)) + printf("GEOM: %s: geometry does not match VTOC8 label " + "(label: %uh,%us GEOM: %uh,%us).\n", pp->name, heads, + sectors, basetable->gpt_heads, basetable->gpt_sectors); table->secpercyl = heads * sectors; cyls = be16dec(&table->vtoc.ncyls); @@ -402,7 +410,7 @@ g_part_vtoc8_read(struct g_part_table *b withtags = (be32dec(&table->vtoc.sanity) == VTOC_SANITY) ? 1 : 0; if (!withtags) { - printf("GEOM: %s: adding VTOC information.\n", pp->name); + printf("GEOM: %s: adding VTOC8 information.\n", pp->name); be32enc(&table->vtoc.version, VTOC_VERSION); bzero(&table->vtoc.volume, VTOC_VOLUME_LEN); be16enc(&table->vtoc.nparts, VTOC8_NPARTS); @@ -444,7 +452,7 @@ g_part_vtoc8_read(struct g_part_table *b return (0); invalid_label: - printf("GEOM: %s: invalid disklabel.\n", pp->name); + printf("GEOM: %s: invalid VTOC8 label.\n", pp->name); return (EINVAL); } From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:10:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F0C1065678; Tue, 6 Jan 2009 14:10:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73F958FC16; Tue, 6 Jan 2009 14:10:30 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EAUDG033201; Tue, 6 Jan 2009 14:10:30 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EAUTa033200; Tue, 6 Jan 2009 14:10:30 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061410.n06EAUTa033200@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186824 - head/usr.sbin/kldxref X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:10:31 -0000 Author: luigi Date: Tue Jan 6 14:10:30 2009 New Revision: 186824 URL: http://svn.freebsd.org/changeset/base/186824 Log: correct description of how a string is stored, fix a few typos and reference the kernel file which processes this info. All in all, the content of this file should be moved to kldxref.c or to the kld(4) manpage. MFC after: 3 days Modified: head/usr.sbin/kldxref/fileformat Modified: head/usr.sbin/kldxref/fileformat ============================================================================== --- head/usr.sbin/kldxref/fileformat Tue Jan 6 14:10:10 2009 (r186823) +++ head/usr.sbin/kldxref/fileformat Tue Jan 6 14:10:30 2009 (r186824) @@ -1,7 +1,9 @@ $FreeBSD$ - linker.hints file consists from the one or more records. First record of -file is special and determines its version: +linker.hints file consists from the one or more records, +and is processed by sys/kern/kern_linker.c::linker_hints_lookup() + +First record of file is special and determines its version: int version; @@ -16,25 +18,28 @@ struct record { 'data' determines its type: struct data { - int type; /* type of data. currently MTD_* values */ + int type; /* type of data. currently MDT_* values */ }; The rest of record depends on the type. struct string { - int length; /* length of string */ + uint8_t length; /* length of string */ char val[]; /* string itself (no terminating zero) */ }; struct data_mdt_version { int type = MDT_VERSION; struct string modname; + /* padding */ int version; struct string kldname; + /* padding */ }; struct data_mdt_module { - int type = MDT_VERSION; + int type = MDT_MODULE; struct string modname; struct string kldname; + /* padding */ }; From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:15:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5620E1065672; Tue, 6 Jan 2009 14:15:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440808FC08; Tue, 6 Jan 2009 14:15:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06EFcNL033355; Tue, 6 Jan 2009 14:15:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EFc91033354; Tue, 6 Jan 2009 14:15:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901061415.n06EFc91033354@svn.freebsd.org> From: Robert Watson Date: Tue, 6 Jan 2009 14:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186825 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:15:39 -0000 Author: rwatson Date: Tue Jan 6 14:15:38 2009 New Revision: 186825 URL: http://svn.freebsd.org/changeset/base/186825 Log: Do a lockless read of the audit pipe list before grabbing the audit pipe lock in order to avoid the lock acquire hit if the pipe list is very likely empty. Obtained from: TrustedBSD Project MFC after: 3 weeks Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Tue Jan 6 14:10:30 2009 (r186824) +++ head/sys/security/audit/audit_pipe.c Tue Jan 6 14:15:38 2009 (r186825) @@ -436,6 +436,10 @@ audit_pipe_preselect(au_id_t auid, au_ev { struct audit_pipe *ap; + /* Lockless read to avoid acquiring the global lock if not needed. */ + if (TAILQ_EMPTY(&audit_pipe_list)) + return (0); + AUDIT_PIPE_LIST_RLOCK(); TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) { AUDIT_PIPE_LOCK(ap); From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:21:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 310F7106566B; Tue, 6 Jan 2009 14:21:18 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4A48FC1D; Tue, 6 Jan 2009 14:21:18 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06ELIqx033485; Tue, 6 Jan 2009 14:21:18 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06ELH2t033483; Tue, 6 Jan 2009 14:21:17 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061421.n06ELH2t033483@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186826 - head/usr.sbin/kldxref X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:21:18 -0000 Author: luigi Date: Tue Jan 6 14:21:17 2009 New Revision: 186826 URL: http://svn.freebsd.org/changeset/base/186826 Log: fix a couple of innocuous compiler warnings MFC after: 3 days Modified: head/usr.sbin/kldxref/ef_i386.c head/usr.sbin/kldxref/ef_obj.c Modified: head/usr.sbin/kldxref/ef_i386.c ============================================================================== --- head/usr.sbin/kldxref/ef_i386.c Tue Jan 6 14:15:38 2009 (r186825) +++ head/usr.sbin/kldxref/ef_i386.c Tue Jan 6 14:21:17 2009 (r186826) @@ -43,12 +43,13 @@ */ int ef_reloc(struct elf_file *ef, const void *reldata, int reltype, Elf_Off relbase, - Elf_Off dataoff, size_t len, void *dest) + Elf_Off dataoff, size_t len, void *_dest) { Elf_Addr *where, addr, addend; Elf_Size rtype, symidx; const Elf_Rel *rel; const Elf_Rela *rela; + char *dest = _dest; switch (reltype) { case EF_RELOC_REL: Modified: head/usr.sbin/kldxref/ef_obj.c ============================================================================== --- head/usr.sbin/kldxref/ef_obj.c Tue Jan 6 14:15:38 2009 (r186825) +++ head/usr.sbin/kldxref/ef_obj.c Tue Jan 6 14:21:17 2009 (r186826) @@ -133,7 +133,7 @@ static struct elf_file_ops ef_obj_file_o }; static int -ef_obj_get_type(elf_file_t ef) +ef_obj_get_type(elf_file_t __unused ef) { return (EFT_KLD); @@ -180,7 +180,7 @@ ef_obj_symaddr(elf_file_t ef, Elf_Size s { const Elf_Sym *sym; - if (symidx >= ef->ddbsymcnt) + if (symidx >= (size_t) ef->ddbsymcnt) return (0); sym = ef->ddbsymtab + symidx; From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:23:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0CA6106566C; Tue, 6 Jan 2009 14:23:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDF9D8FC08; Tue, 6 Jan 2009 14:23:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06ENcSn033582; Tue, 6 Jan 2009 14:23:38 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06ENc5s033581; Tue, 6 Jan 2009 14:23:38 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061423.n06ENc5s033581@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 14:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186827 - head/usr.sbin/kldxref X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:23:39 -0000 Author: luigi Date: Tue Jan 6 14:23:38 2009 New Revision: 186827 URL: http://svn.freebsd.org/changeset/base/186827 Log: various cleanups including: + check a possible buffer overflow when creating a temp file, submitted by Christoph Mallon + remove stale struct definitions + clarify the use of dflag and remove useless checks MFC after: 3 days Modified: head/usr.sbin/kldxref/kldxref.c Modified: head/usr.sbin/kldxref/kldxref.c ============================================================================== --- head/usr.sbin/kldxref/kldxref.c Tue Jan 6 14:21:17 2009 (r186826) +++ head/usr.sbin/kldxref/kldxref.c Tue Jan 6 14:23:38 2009 (r186827) @@ -57,37 +57,19 @@ #define MAXRECSIZE 1024 #define check(val) if ((error = (val)) != 0) break -#ifndef min -#define min(a,b) (((a)<(b)) ? (a) : (b)) -#endif - -struct mod_info { - char* mi_name; - int mi_ver; - SLIST_ENTRY(mod_info) mi_next; -}; - -#ifdef notnow -struct kld_info { - char* k_filename; - SLIST_HEAD(mod_list_head, mod_info) k_modules; - SLIST_ENTRY(kld_info) k_next; -}; +static int dflag; /* do not create a hint file, only write on stdout */ +static int verbose; -SLIST_HEAD(kld_list_head, kld_info) kldlist; -#endif - -static int dflag, verbose; - -FILE *fxref; +static FILE *fxref; /* current hints file */ static const char *xref_file = "linker.hints"; +/* + * A record is stored in the static buffer recbuf before going to disk. + */ static char recbuf[MAXRECSIZE]; -static int recpos, reccnt; - -FILE *maketempfile(char *, const char *); -static void usage(void); +static int recpos; /* current write position */ +static int reccnt; /* total record written to this file so far */ static void intalign(void) @@ -105,7 +87,7 @@ record_start(void) static int record_end(void) { - if (dflag || recpos == 0) + if (recpos == 0) return 0; reccnt++; intalign(); @@ -123,6 +105,9 @@ record_buf(const void *buf, int size) return 0; } +/* + * An int is stored in host order and aligned + */ static int record_int(int val) { @@ -130,21 +115,21 @@ record_int(int val) return record_buf(&val, sizeof(val)); } -static int -record_byte(u_char val) -{ - return record_buf(&val, sizeof(val)); -} - +/* + * A string is stored as 1-byte length plus data, no padding + */ static int record_string(const char *str) { - int len = strlen(str); - int error; - + int len, error; + u_char val; + if (dflag) return 0; - error = record_byte(len); + val = len = strlen(str); + if (len > 255) + errx(1, "string %s too long", str); + error = record_buf(&val, sizeof(val)); if (error) return error; return record_buf(str, len); @@ -170,21 +155,23 @@ parse_entry(struct mod_metadata *md, con break; case MDT_VERSION: check(EF_SEG_READ(ef, data, sizeof(mdv), &mdv)); - record_int(MDT_VERSION); - record_string(cval); - record_int(mdv.mv_version); - record_string(kldname); - if (!dflag) - break; - printf(" interface %s.%d\n", cval, mdv.mv_version); + if (dflag) { + printf(" interface %s.%d\n", cval, mdv.mv_version); + } else { + record_int(MDT_VERSION); + record_string(cval); + record_int(mdv.mv_version); + record_string(kldname); + } break; case MDT_MODULE: - record_int(MDT_MODULE); - record_string(cval); - record_string(kldname); - if (!dflag) - break; - printf(" module %s\n", cval); + if (dflag) { + printf(" module %s\n", cval); + } else { + record_int(MDT_MODULE); + record_string(cval); + record_string(kldname); + } break; default: warnx("unknown metadata record %d in file %s", md->md_type, kldname); @@ -199,8 +186,6 @@ read_kld(char *filename, char *kldname) { struct mod_metadata md; struct elf_file ef; -/* struct kld_info *kip; - struct mod_info *mip;*/ void **p, **orgp; int error, eftype, nmlen; long start, finish, entries; @@ -224,8 +209,9 @@ read_kld(char *filename, char *kldname) } if (!dflag) { cp = strrchr(kldname, '.'); - nmlen = cp ? min(MAXMODNAME, cp - kldname) : - min(MAXMODNAME, strlen(kldname)); + nmlen = (cp != NULL) ? cp - kldname : (int)strlen(kldname); + if (nmlen > MAXMODNAME) + nmlen = MAXMODNAME; strlcpy(kldmodname, kldname, nmlen); /* fprintf(fxref, "%s:%s:%d\n", kldmodname, kldname, 0);*/ } @@ -252,27 +238,43 @@ read_kld(char *filename, char *kldname) return error; } -FILE * +/* + * Create a temp file in directory root, make sure we don't + * overflow the buffer for the destination name + */ +static FILE * maketempfile(char *dest, const char *root) { char *p; - int fd; + int n, fd; - strlcpy(dest, root, MAXPATHLEN); + p = strrchr(root, '/'); + n = p != NULL ? p - root + 1 : 0; + if (snprintf(dest, MAXPATHLEN, "%.*slhint.XXXXXX", n, root) >= + MAXPATHLEN) { + errno = ENAMETOOLONG; + return NULL; + } - if ((p = strrchr(dest, '/')) != 0) - p++; - else - p = dest; - strcpy(p, "lhint.XXXXXX"); fd = mkstemp(dest); - if (fd >= 0) - fchmod(fd, 0644); /* nothing secret in the file */ - return ((fd == -1) ? NULL : fdopen(fd, "w+")); + if (fd < 0) + return NULL; + fchmod(fd, 0644); /* nothing secret in the file */ + return fdopen(fd, "w+"); } static char xrefname[MAXPATHLEN], tempname[MAXPATHLEN]; +static void +usage(void) +{ + + fprintf(stderr, "%s\n", + "usage: kldxref [-Rdv] [-f hintsfile] path ..." + ); + exit(1); +} + int main(int argc, char *argv[]) { @@ -282,20 +284,19 @@ main(int argc, char *argv[]) struct stat sb; fts_options = FTS_PHYSICAL; -/* SLIST_INIT(&kldlist);*/ while ((opt = getopt(argc, argv, "Rdf:v")) != -1) { switch (opt) { - case 'd': + case 'd': /* no hint file, only print on stdout */ dflag = 1; break; - case 'f': + case 'f': /* use this name instead of linker.hints */ xref_file = optarg; break; case 'v': verbose++; break; - case 'R': + case 'R': /* recurse on directories */ fts_options |= FTS_COMFOLLOW; break; default: @@ -321,19 +322,22 @@ main(int argc, char *argv[]) for (;;) { p = fts_read(ftsp); - if ((p == NULL || p->fts_info == FTS_D) && !dflag && fxref) { + if ((p == NULL || p->fts_info == FTS_D) && fxref) { + /* close and rename the current hint file */ fclose(fxref); fxref = NULL; if (reccnt) { rename(tempname, xrefname); } else { + /* didn't find any entry, ignore this file */ unlink(tempname); unlink(xrefname); } } if (p == NULL) break; - if (p && p->fts_info == FTS_D && !dflag) { + if (p->fts_info == FTS_D && !dflag) { + /* visiting a new directory, create a new hint file */ snprintf(xrefname, sizeof(xrefname), "%s/%s", ftsp->fts_path, xref_file); fxref = maketempfile(tempname, ftsp->fts_path); @@ -343,6 +347,7 @@ main(int argc, char *argv[]) fwrite(&ival, sizeof(ival), 1, fxref); reccnt = 0; } + /* skip non-files or .symbols entries */ if (p->fts_info != FTS_F) continue; if (p->fts_namelen >= 8 && @@ -353,13 +358,3 @@ main(int argc, char *argv[]) fts_close(ftsp); return 0; } - -static void -usage(void) -{ - - fprintf(stderr, "%s\n", - "usage: kldxref [-Rdv] [-f hintsfile] path ..." - ); - exit(1); -} From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:57:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54134106566C; Tue, 6 Jan 2009 14:57:39 +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 41E9A8FC16; Tue, 6 Jan 2009 14:57:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06Evd9S034318; Tue, 6 Jan 2009 14:57:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06EvdnH034317; Tue, 6 Jan 2009 14:57:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901061457.n06EvdnH034317@svn.freebsd.org> From: Alexander Motin Date: Tue, 6 Jan 2009 14:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186828 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:57:40 -0000 Author: mav Date: Tue Jan 6 14:57:39 2009 New Revision: 186828 URL: http://svn.freebsd.org/changeset/base/186828 Log: Add small hint that snd_ich is the AC'97 controller driver. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Jan 6 14:23:38 2009 (r186827) +++ head/sys/conf/NOTES Tue Jan 6 14:57:39 2009 (r186828) @@ -2004,7 +2004,7 @@ device sound # snd_gusc: Gravis UltraSound ISA PnP/non-PnP. # snd_hda: Intel High Definition Audio (Controller) and # compatible. -# snd_ich: Intel ICH PCI and some more audio controllers +# snd_ich: Intel ICH AC'97 and some more audio controllers # embedded in a chipset, for example nVidia # nForce controllers. # snd_maestro: ESS Technology Maestro-1/2x PCI. From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 14:59:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3C2A1065670 for ; Tue, 6 Jan 2009 14:59:06 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 7F8D88FC24 for ; Tue, 6 Jan 2009 14:59:06 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 8A7CE8FC52 for ; Tue, 6 Jan 2009 17:59:05 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id A612C8FC18; Tue, 6 Jan 2009 17:59:02 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id B36DC398F3; Tue, 6 Jan 2009 18:01:29 +0300 (MSK) Date: Tue, 6 Jan 2009 18:01:23 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106180123.d032657d.stas@FreeBSD.org> In-Reply-To: <200901061215.37947.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106124303.d8bab0de.stas@FreeBSD.org> <20090106133507.1e2bc2d2.stas@FreeBSD.org> <200901061215.37947.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 17:59:05 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 496371b9967007708318776 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 14:59:07 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 12:15:37 +0100 Hans Petter Selasky mentioned: > As long as your device shows up like "ugen0.2" it is detected properly and > will function. Check with "usbconfig". > > Suggestions: > > usbconfig -u 0 -a 2 reset > usbconfig -u 0 -a 2 dump_device_desc > This doesn't change anything, the device fails to attach. > The failures indicate that the firmware on your USB device is not reponding > correctly at the time the set address command is being sent to the device. > Do you have some ideas how this situation could be handled in the new stack? > As you can see the new USB stack will try to re-enumerate the device one time. > > Have you loaded the correct driver for your serial device? > > kldload usb2_serial_bsa > Yes, this module is loaded and I can see it enters the probe routine. But as the configuration index doesn't match what the driver expects it fails to probe. Driver checks for configuration idx 1, but I see this device on idx 0. ugen0.2: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON The old stack didn't checked for specific configuration index, but tryed to select the appropriate one in the attach routine. /* Move the device into the configured state. */ err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1); What is the reason you have reworked this? Should this be changed to be handled like in the old driver? Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljckkACgkQK/VZk+smlYER6ACfSI3SQ9FwEr/6vXEe/4G0CKDw 4SEAnR3FsMBGxyDLnYpnVVigbvFbX6tj =dW5S -----END PGP SIGNATURE----- !DSPAM:496371b9967007708318776! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 15:10:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C3DF106566B; Tue, 6 Jan 2009 15:10:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4338FC0C; Tue, 6 Jan 2009 15:10:26 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06FAQu6034586; Tue, 6 Jan 2009 15:10:26 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06FAQ0g034585; Tue, 6 Jan 2009 15:10:26 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200901061510.n06FAQ0g034585@svn.freebsd.org> From: Luigi Rizzo Date: Tue, 6 Jan 2009 15:10:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186829 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:10:26 -0000 Author: luigi Date: Tue Jan 6 15:10:26 2009 New Revision: 186829 URL: http://svn.freebsd.org/changeset/base/186829 Log: Add a reference to the "env" kernel config option in the GENERIC file, as this is very useful e.g. in diskless configurations and barely documented anywhere else. MFC after: 3 days Modified: head/sys/i386/conf/GENERIC Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Tue Jan 6 14:57:39 2009 (r186828) +++ head/sys/i386/conf/GENERIC Tue Jan 6 15:10:26 2009 (r186829) @@ -26,6 +26,12 @@ ident GENERIC # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. +# Use the following to compile in values accessible to the kernel +# through getenv() (or kenv(1) in userland). The format of the file +# is 'variable=value' , same as for hints files. +# +# env "my_kenv_variables" + makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_ULE # ULE scheduler From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 15:11:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26383106566C; Tue, 6 Jan 2009 15:11:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe04.swip.net [212.247.154.97]) by mx1.freebsd.org (Postfix) with ESMTP id C0A578FC25; Tue, 6 Jan 2009 15:11:17 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=K7R4C4L6l2QA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=OrbuaqbLBcVSlk_17agA:9 a=VVhOyabtMYaBlzekCKXHqET_pOgA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe04.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1175435757; Tue, 06 Jan 2009 16:11:15 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 16:13:32 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061215.37947.hselasky@c2i.net> <20090106180123.d032657d.stas@FreeBSD.org> In-Reply-To: <20090106180123.d032657d.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061613.33687.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:11:19 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 12:15:37 +0100 > > Hans Petter Selasky mentioned: > > As long as your device shows up like "ugen0.2" it is detected properly > > and will function. Check with "usbconfig". > > > > Suggestions: > > > > usbconfig -u 0 -a 2 reset > > usbconfig -u 0 -a 2 dump_device_desc > > This doesn't change anything, the device fails to attach. > > > The failures indicate that the firmware on your USB device is not > > reponding correctly at the time the set address command is being sent to > > the device. > > Do you have some ideas how this situation could be handled in the new > stack? > > > As you can see the new USB stack will try to re-enumerate the device one > > time. > > > > Have you loaded the correct driver for your serial device? > > > > kldload usb2_serial_bsa > > Yes, this module is loaded and I can see it enters the probe routine. But > as the configuration index doesn't match what the driver expects it fails > to probe. Driver checks for configuration idx 1, but I see this device on > idx 0. ugen0.2: at usbus0, > cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON > > The old stack didn't checked for specific configuration index, but tryed to > select the appropriate one in the attach routine. > /* Move the device into the configured state. */ > err = usbd_set_config_index(dev, UBSA_CONFIG_INDEX, 1); > > What is the reason you have reworked this? Should this be changed to be > handled like in the old driver? The new is that the driver is not allowed to set the config index by itself. Try: usbconfig -u 0 -a 2 set_config 1 You can for example add a quirk for this, see "usbconfig -h | grep -i quirk". I know this is not so easy, but if you can make a general rule for when selecting another configuration, I will add it. Could you dump me the descriptors of your USB device? usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 15:12:49 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33E9A106568B; Tue, 6 Jan 2009 15:12:49 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 017248FC13; Tue, 6 Jan 2009 15:12:48 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id DB3E91FD044; Tue, 6 Jan 2009 10:12:47 -0500 (EST) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Tue, 06 Jan 2009 10:12:47 -0500 X-Sasl-enc: rFM3qNLrXEEg+654gDi6K0Fdx+yBNMRCuG/FhoLB0Tb4 1231254767 Received: from empiric.lon.incunabulum.net (unknown [81.168.51.182]) by mail.messagingengine.com (Postfix) with ESMTPSA id EB417320CA; Tue, 6 Jan 2009 10:12:46 -0500 (EST) Message-ID: <496374ED.9010505@incunabulum.net> Date: Tue, 06 Jan 2009 15:12:45 +0000 From: Bruce Simpson User-Agent: Thunderbird 2.0.0.19 (X11/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> In-Reply-To: <200901061510.n06FAQ0g034585@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186829 - head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:12:50 -0000 Luigi Rizzo wrote: > Log: > Add a reference to the "env" kernel config option in the GENERIC file, > as this is very useful e.g. in diskless configurations and barely documented > anywhere else. > > Thanks! This pointer is a big help for folk who don't already know of it. cheers BMS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 15:18:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FA931065670; Tue, 6 Jan 2009 15:18:14 +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 8CA218FC14; Tue, 6 Jan 2009 15:18:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06FIEZs034756; Tue, 6 Jan 2009 15:18:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06FIE6S034755; Tue, 6 Jan 2009 15:18:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901061518.n06FIE6S034755@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 6 Jan 2009 15:18:14 +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: r186830 - in stable/7/sys: . contrib/pf dev/cxgb pci sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 15:18:15 -0000 Author: kib Date: Tue Jan 6 15:18:14 2009 New Revision: 186830 URL: http://svn.freebsd.org/changeset/base/186830 Log: MFC r186433: Clear busy state on the pages which are after the one that failed the bind attempt. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/pci/agp.c stable/7/sys/sys/copyright.h (props changed) Modified: stable/7/sys/pci/agp.c ============================================================================== --- stable/7/sys/pci/agp.c Tue Jan 6 15:10:26 2009 (r186829) +++ stable/7/sys/pci/agp.c Tue Jan 6 15:18:14 2009 (r186830) @@ -563,6 +563,7 @@ agp_generic_bind_memory(device_t dev, st device_printf(dev, "memory already bound\n"); error = EINVAL; VM_OBJECT_LOCK(mem->am_obj); + i = 0; goto bad; } @@ -591,7 +592,6 @@ agp_generic_bind_memory(device_t dev, st * Bail out. Reverse all the mappings * and unwire the pages. */ - vm_page_wakeup(m); for (k = 0; k < i + j; k += AGP_PAGE_SIZE) AGP_UNBIND_PAGE(dev, offset + k); goto bad; @@ -621,8 +621,10 @@ agp_generic_bind_memory(device_t dev, st bad: mtx_unlock(&sc->as_lock); VM_OBJECT_LOCK_ASSERT(mem->am_obj, MA_OWNED); - for (i = 0; i < mem->am_size; i += PAGE_SIZE) { - m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(i)); + for (k = 0; k < mem->am_size; k += PAGE_SIZE) { + m = vm_page_lookup(mem->am_obj, OFF_TO_IDX(k)); + if (k >= i) + vm_page_wakeup(m); vm_page_lock_queues(); vm_page_unwire(m, 0); vm_page_unlock_queues(); From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 16:24:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50451106566C; Tue, 6 Jan 2009 16:24:23 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E79F8FC1F; Tue, 6 Jan 2009 16:24:23 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06GONJR036134; Tue, 6 Jan 2009 16:24:23 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06GONlG036133; Tue, 6 Jan 2009 16:24:23 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901061624.n06GONlG036133@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 6 Jan 2009 16:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186831 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:24:23 -0000 Author: obrien Date: Tue Jan 6 16:24:22 2009 New Revision: 186831 URL: http://svn.freebsd.org/changeset/base/186831 Log: Note that r186713 also contained a change to VarAdd where we propagate the newly created 'Var' back to the caller. Also, back out an accidentally commented WIP comment. Modified: head/usr.bin/make/var.c Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Tue Jan 6 15:18:14 2009 (r186830) +++ head/usr.bin/make/var.c Tue Jan 6 16:24:22 2009 (r186831) @@ -2319,8 +2319,7 @@ match_var(const char str[], const char v * None. The old string must be freed by the caller */ Buffer * -//Var_Subst(const char *var, const char *str, GNode *ctxt, Boolean undefErr) -Var_Subst( const char *str, GNode *ctxt, Boolean err) +Var_Subst(const char *str, GNode *ctxt, Boolean err) { Boolean errorReported; Buffer *buf; /* Buffer for forming things */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 16:27:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B450106564A; Tue, 6 Jan 2009 16:27:09 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2C1AA8FC16; Tue, 6 Jan 2009 16:27:09 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n06GR28n075345; Tue, 6 Jan 2009 08:27:02 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n06GR1Ds075344; Tue, 6 Jan 2009 08:27:01 -0800 (PST) (envelope-from obrien) Date: Tue, 6 Jan 2009 08:27:01 -0800 From: "David O'Brien" To: "M. Warner Losh" Message-ID: <20090106162701.GA75326@dragon.NUXI.org> References: <200901031014.n03AE1lA022458@svn.freebsd.org> <20090104.100755.686402162.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090104.100755.686402162.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186713 - head/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:27:09 -0000 On Sun, Jan 04, 2009 at 10:07:55AM -0700, M. Warner Losh wrote: > In message: <200901031014.n03AE1lA022458@svn.freebsd.org> > "David E. O'Brien" writes: > : Author: obrien > : Date: Sat Jan 3 10:14:01 2009 > : New Revision: 186713 > : URL: http://svn.freebsd.org/changeset/base/186713 > : > : Log: > : + Add the -Q be-quiet flag for parallel jobs. > : - Enable -Q by default for the moment - there is something weird > : going on in the rescue build. > > This seems to also include other things not related to -Q, is that > intentional: Thanks for catching that. From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 16:36:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC327106564A for ; Tue, 6 Jan 2009 16:36:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 566468FC1E for ; Tue, 6 Jan 2009 16:36:26 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 5D1988FC52 for ; Tue, 6 Jan 2009 19:36:25 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id DE8468FC18; Tue, 6 Jan 2009 19:36:21 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 31424398F3; Tue, 6 Jan 2009 19:38:49 +0300 (MSK) Date: Tue, 6 Jan 2009 19:38:44 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106193844.c727cfb7.stas@FreeBSD.org> In-Reply-To: <200901061613.33687.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061215.37947.hselasky@c2i.net> <20090106180123.d032657d.stas@FreeBSD.org> <200901061613.33687.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 19:36:25 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49638889967002203034572 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:36:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 16:13:32 +0100 Hans Petter Selasky mentioned: > Try: > > usbconfig -u 0 -a 2 set_config 1 > This helps. Now ubsa attaches to the device. But I can't communicate with it (no echo even). I see the following messages in the log: ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > You can for example add a quirk for this, see "usbconfig -h | grep -i quirk". > I know this is not so easy, but if you can make a general rule for when > selecting another configuration, I will add it. Why not let the driver to set the config? > > Could you dump me the descriptors of your USB device? > > usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc > Sure: ugen0.2: at usbus0, cfg=1 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x16d5 idProduct = 0x6501 bcdDevice = 0x0000 iManufacturer = 0x0001 iProduct = 0x0002 iSerialNumber = 0x0000 bNumConfigurations = 0x0001 Configuration index 1 bLength = 0x0009 bDescriptorType = 0x0002 wTotalLength = 0x003e bNumInterfaces = 0x0002 bConfigurationValue = 0x0001 iConfiguration = 0x0000 bmAttributes = 0x00a0 bMaxPower = 0x00fa Interface 0 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0000 bAlternateSetting = 0x0000 bNumEndpoints = 0x0003 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0003 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0081 bmAttributes = 0x0003 wMaxPacketSize = 0x0040 bInterval = 0x0080 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0082 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 2 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0002 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Interface 1 bLength = 0x0009 bDescriptorType = 0x0004 bInterfaceNumber = 0x0001 bAlternateSetting = 0x0000 bNumEndpoints = 0x0002 bInterfaceClass = 0x00ff bInterfaceSubClass = 0x00ff bInterfaceProtocol = 0x00ff iInterface = 0x0003 Endpoint 0 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0084 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Endpoint 1 bLength = 0x0007 bDescriptorType = 0x0005 bEndpointAddress = 0x0004 bmAttributes = 0x0002 wMaxPacketSize = 0x0040 bInterval = 0x0000 bRefresh = 0x0000 bSynchAddress = 0x0000 Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljiRkACgkQK/VZk+smlYFvKQCdF1sYtowfXCOrJk11YstQXn7M /asAnjunPYxAHA14khAc7PIkwK0jzyg2 =oYfO -----END PGP SIGNATURE----- !DSPAM:49638889967002203034572! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 16:40:53 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DC65106566B; Tue, 6 Jan 2009 16:40:53 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1A7ED8FC0C; Tue, 6 Jan 2009 16:40:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n06GeqZ4075719; Tue, 6 Jan 2009 08:40:52 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n06GeqWF075718; Tue, 6 Jan 2009 08:40:52 -0800 (PST) (envelope-from obrien) Date: Tue, 6 Jan 2009 08:40:52 -0800 From: "David O'Brien" To: Doug Barton Message-ID: <20090106164052.GC75326@dragon.NUXI.org> References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> <49628DD3.8020901@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49628DD3.8020901@FreeBSD.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:40:53 -0000 On Mon, Jan 05, 2009 at 02:46:43PM -0800, Doug Barton wrote: > A few more specifics in no particular order: .. > You don't have to page through the whole diff if you use less as your PAGER. You do thought have to hit 'q' don't you? > Matt Dillon's change to the PAGER was the single thing I got the most > user complaints about. :-( I know I saw others say in email they liked it better... a ~/.mergemasterrc knob would be nice. :-) -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 16:49:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA3A91065680; Tue, 6 Jan 2009 16:49:12 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id 51A618FC14; Tue, 6 Jan 2009 16:49:11 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=7_Zea3ffw2MA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=AzN79KX1Kj8eupxTqHsA:9 a=JCYPLtasg-RiWE6rUfEA:7 a=Dsjo9SA-XqrzBf6lB1XOTWryhd4A:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1073393546; Tue, 06 Jan 2009 17:49:09 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 17:51:26 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061613.33687.hselasky@c2i.net> <20090106193844.c727cfb7.stas@FreeBSD.org> In-Reply-To: <20090106193844.c727cfb7.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061751.27394.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:49:13 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 16:13:32 +0100 > > Hans Petter Selasky mentioned: > > Try: > > > > usbconfig -u 0 -a 2 set_config 1 > > This helps. Now ubsa attaches to the device. But I can't communicate > with it (no echo even). I see the following messages in the log: > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > > You can for example add a quirk for this, see "usbconfig -h | grep -i > > quirk". I know this is not so easy, but if you can make a general rule > > for when selecting another configuration, I will add it. > > Why not let the driver to set the config? Because: 1) it clashes with USB device side mode, where the config index is received from Host 2) Different device drivers might want different configurations. 3) The driver for the active configuration might not be loaded. > > > Could you dump me the descriptors of your USB device? > > > > usbconfig -u 0 -a 2 dump_curr_config_desc dump_device_desc > > Sure: > > ugen0.2: at usbus0, cfg=1 > md=HOST spd=FULL (12Mbps) pwr=ON > > bLength = 0x0012 > bDescriptorType = 0x0001 > bcdUSB = 0x0110 > bDeviceClass = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x16d5 > idProduct = 0x6501 > bcdDevice = 0x0000 > iManufacturer = 0x0001 > iProduct = 0x0002 > iSerialNumber = 0x0000 This is interesting: > bNumConfigurations = 0x0001 The device says it only has one configuration! So setting index 1 should not be allowed. Could you try to change the check in the ubsa2.c probe routine to check for config index 0 instead? Mostly config index 0 is used in USB devices. %cat *[ch] | grep -i "config.*Index" #define U3G_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != U3G_CONFIG_INDEX) { #define UARK_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != 0) { #define UBSA_CONFIG_INDEX 1 if (uaa->info.bConfigIndex != UBSA_CONFIG_INDEX) { #define UCHCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UCHCOM_CONFIG_INDEX) { if (uaa->info.bConfigIndex != 0) { #define UFTDI_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UFTDI_CONFIG_INDEX) { #define UGENSA_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UGENSA_CONFIG_INDEX) { #define UIPAQ_CONFIG_INDEX 0 /* config number 1 */ if (uaa->info.bConfigIndex != UIPAQ_CONFIG_INDEX) { "config number: %d\n", alt_index); #define UMCT_CONFIG_INDEX 1 if (uaa->info.bConfigIndex != UMCT_CONFIG_INDEX) { #define UMOSCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UMOSCOM_CONFIG_INDEX) { #define UPLCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UPLCOM_CONFIG_INDEX) { #define UVISOR_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UVISOR_CONFIG_INDEX) { #define UVSCOM_CONFIG_INDEX 0 if (uaa->info.bConfigIndex != UVSCOM_CONFIG_INDEX) { Try changing "UBSA_CONFIG_INDEX" to zero. If it works I will commit a patch for this. > > Configuration index 1 > > bLength = 0x0009 > bDescriptorType = 0x0002 > wTotalLength = 0x003e > bNumInterfaces = 0x0002 > bConfigurationValue = 0x0001 > iConfiguration = 0x0000 > bmAttributes = 0x00a0 > bMaxPower = 0x00fa > > Interface 0 > bLength = 0x0009 > bDescriptorType = 0x0004 > bInterfaceNumber = 0x0000 > bAlternateSetting = 0x0000 > bNumEndpoints = 0x0003 > bInterfaceClass = 0x00ff > bInterfaceSubClass = 0x00ff > bInterfaceProtocol = 0x00ff > iInterface = 0x0003 When you cannot retrive the strings, I think your device is gone! (Crashed) --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 16:58:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39DD4106566B for ; Tue, 6 Jan 2009 16:58:42 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id ADB638FC27 for ; Tue, 6 Jan 2009 16:58:41 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 2FF458FC52 for ; Tue, 6 Jan 2009 19:58:40 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 2DFB18FC18; Tue, 6 Jan 2009 19:58:36 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id CDB90398F3; Tue, 6 Jan 2009 20:01:03 +0300 (MSK) Date: Tue, 6 Jan 2009 20:01:03 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106200103.26f2b5a9.stas@FreeBSD.org> In-Reply-To: <200901061751.27394.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061613.33687.hselasky@c2i.net> <20090106193844.c727cfb7.stas@FreeBSD.org> <200901061751.27394.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 19:58:39 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49638dbf967001186615895 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 16:58:42 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 17:51:26 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 16:13:32 +0100 > > > > Hans Petter Selasky mentioned: > > > Try: > > > > > > usbconfig -u 0 -a 2 set_config 1 > > > > This helps. Now ubsa attaches to the device. But I can't communicate > > with it (no echo even). I see the following messages in the log: > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED (ignored) > > > > > You can for example add a quirk for this, see "usbconfig -h | grep -i > > > quirk". I know this is not so easy, but if you can make a general rule > > > for when selecting another configuration, I will add it. > > > > Why not let the driver to set the config? > > Because: > > 1) it clashes with USB device side mode, where the config index is received > from Host > > 2) Different device drivers might want different configurations. > > 3) The driver for the active configuration might not be loaded. > I see. > This is interesting: > > bNumConfigurations = 0x0001 > > The device says it only has one configuration! So setting index 1 should not > be allowed. > > Could you try to change the check in the ubsa2.c probe routine to check for > config index 0 instead? > It attaches but doesn't work with the same error message as listed above. > > iInterface = 0x0003 > > When you cannot retrive the strings, I think your device is gone! (Crashed) So at this point the device is effectively detached? Do you have ideas why that might happen. I don't also understand how it may work with config index 1 on old stack if the maximum number of configurations is 1 too... Looks weird. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljjk8ACgkQK/VZk+smlYHhagCdFvM/p9fLTQL5A3manV/wq72h 2hQAniOi0FidMBaVHkcFZybsT832ivtz =HPtC -----END PGP SIGNATURE----- !DSPAM:49638dbf967001186615895! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 17:05:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4FED106566B; Tue, 6 Jan 2009 17:05:44 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85578FC14; Tue, 6 Jan 2009 17:05:44 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06H5ioN036936; Tue, 6 Jan 2009 17:05:44 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06H5i3F036935; Tue, 6 Jan 2009 17:05:44 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200901061705.n06H5i3F036935@svn.freebsd.org> From: Robert Noland Date: Tue, 6 Jan 2009 17:05:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186832 - in stable/7/sys: . contrib/pf dev/cxgb pci sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:05:46 -0000 Author: rnoland Date: Tue Jan 6 17:05:44 2009 New Revision: 186832 URL: http://svn.freebsd.org/changeset/base/186832 Log: MFC r186434 Fix up handling of Intel G4X chips some more. Note that you need at least xf86-video-intel 2.4.3 for this to work. The G4X doesn't put the GATT into the same area of stolen memory as all the other chips and older versions of the driver didn't handle that properly. Approved by: kib Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/pci/agp_i810.c stable/7/sys/sys/copyright.h (props changed) Modified: stable/7/sys/pci/agp_i810.c ============================================================================== --- stable/7/sys/pci/agp_i810.c Tue Jan 6 16:24:22 2009 (r186831) +++ stable/7/sys/pci/agp_i810.c Tue Jan 6 17:05:44 2009 (r186832) @@ -167,7 +167,7 @@ static const struct agp_i810_match { "Intel GM965 SVGA controller"}, {0x2A128086, CHIP_I965, 0x00020000, "Intel GME965 SVGA controller"}, - {0x2A428086, CHIP_I965, 0x00020000, + {0x2A428086, CHIP_G4X, 0x00020000, "Intel GM45 SVGA controller"}, {0x2E028086, CHIP_G4X, 0x00020000, "Intel 4 Series SVGA controller"}, @@ -284,6 +284,7 @@ agp_i810_probe(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: deven = pci_read_config(bdev, AGP_I915_DEVEN, 4); if ((deven & AGP_I915_DEVEN_D2F0) == AGP_I915_DEVEN_D2F0_DISABLED) { @@ -348,6 +349,7 @@ agp_i810_dump_regs(device_t dev) case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: device_printf(dev, "AGP_I855_GCC1: 0x%02x\n", pci_read_config(sc->bdev, AGP_I855_GCC1, 1)); device_printf(dev, "AGP_I915_MSAC: 0x%02x\n", @@ -397,7 +399,7 @@ agp_i810_attach(device_t dev) return error; if (sc->chiptype != CHIP_I965 && sc->chiptype != CHIP_G33 && - ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) + sc->chiptype != CHIP_G4X && ptoa((vm_paddr_t)Maxmem) > 0xfffffffful) { device_printf(dev, "agp_i810.c does not support physical " "memory above 4GB.\n"); @@ -659,8 +661,7 @@ agp_i810_attach(device_t dev) return EINVAL; } - if (sc->chiptype != CHIP_G4X) - gtt_size += 4; + gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; if (sc->stolen > 0) @@ -780,6 +781,7 @@ agp_i810_set_aperture(device_t dev, u_in case CHIP_I915: case CHIP_I965: case CHIP_G33: + case CHIP_G4X: return agp_generic_set_aperture(dev, aperture); } @@ -798,7 +800,8 @@ agp_i810_write_gtt_entry(device_t dev, i u_int32_t pte; pte = (u_int32_t)physical | 1; - if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33) { + if (sc->chiptype == CHIP_I965 || sc->chiptype == CHIP_G33 || + sc->chiptype == CHIP_G4X) { pte |= (physical & 0x0000000f00000000ull) >> 28; } else { /* If we do actually have memory above 4GB on an older system, @@ -825,6 +828,10 @@ agp_i810_write_gtt_entry(device_t dev, i bus_write_4(sc->sc_res[0], (offset >> AGP_PAGE_SHIFT) * 4 + (512 * 1024), pte); break; + case CHIP_G4X: + bus_write_4(sc->sc_res[0], + (offset >> AGP_PAGE_SHIFT) * 4 + (2 * 1024 * 1024), pte); + break; } } From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 17:21:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489FB106566B; Tue, 6 Jan 2009 17:21:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.tele2.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id EDFBC8FC1A; Tue, 6 Jan 2009 17:21:12 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Lcuq5n9lQ50A:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=BgEwljOxvJJA3K97OGEA:9 a=wtgyqGEEd_kUbc-JDdMA:7 a=OAKkXXBgVJ-EBx0yoi5eOTq0s1cA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1003439231; Tue, 06 Jan 2009 18:21:11 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 18:23:33 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061751.27394.hselasky@c2i.net> <20090106200103.26f2b5a9.stas@FreeBSD.org> In-Reply-To: <20090106200103.26f2b5a9.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061823.34415.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:21:14 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 17:51:26 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > On Tue, 6 Jan 2009 16:13:32 +0100 > > > > > > Hans Petter Selasky mentioned: > > > > Try: > > > > > > > > usbconfig -u 0 -a 2 set_config 1 > > > > > > This helps. Now ubsa attaches to the device. But I can't communicate > > > with it (no echo even). I see the following messages in the log: > > > ubsa_cfg_request:395: device request failed, err=USB_ERR_STALLED > > > (ignored) ubsa_cfg_request:395: device request failed, > > > err=USB_ERR_STALLED (ignored) ubsa_cfg_request:395: device request > > > failed, err=USB_ERR_STALLED (ignored) > > > > > > > You can for example add a quirk for this, see "usbconfig -h | grep -i > > > > quirk". I know this is not so easy, but if you can make a general > > > > rule for when selecting another configuration, I will add it. > > > > > > Why not let the driver to set the config? > > > > Because: > > > > 1) it clashes with USB device side mode, where the config index is > > received from Host > > > > 2) Different device drivers might want different configurations. > > > > 3) The driver for the active configuration might not be loaded. > > I see. > > > This is interesting: > > > bNumConfigurations = 0x0001 > > > > The device says it only has one configuration! So setting index 1 should > > not be allowed. > > > > Could you try to change the check in the ubsa2.c probe routine to check > > for config index 0 instead? > > It attaches but doesn't work with the same error message as listed above. > > > > iInterface = 0x0003 > > > > When you cannot retrive the strings, I think your device is gone! > > (Crashed) > > So at this point the device is effectively detached? Do you have ideas why > that might happen. I don't also understand how it may work with config > index 1 on old stack if the maximum number of configurations is 1 too... > Looks weird. Hi, Some checkpoints: 1) You removed the config index 1 quirk? 2) You re-plugged the module and let it stay disconnected for some seconds? You can reach the endpoints through ugen when config index 0 is set. cat /dev/ugen0.2.0.1 echo "at" > /dev/ugen0.2.0.2 If you are lucky you will get something back. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 17:23:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D01011065673; Tue, 6 Jan 2009 17:23:37 +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 BDEC68FC14; Tue, 6 Jan 2009 17:23:37 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06HNbLV037295; Tue, 6 Jan 2009 17:23:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06HNbgY037287; Tue, 6 Jan 2009 17:23:37 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901061723.n06HNbgY037287@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 6 Jan 2009 17:23:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186833 - head/sys/dev/iicbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:23:38 -0000 Author: nwhitehorn Date: Tue Jan 6 17:23:37 2009 New Revision: 186833 URL: http://svn.freebsd.org/changeset/base/186833 Log: Change the way I2C bus attachment works to allow firmware-assisted bus subclasses as are available with PCI. Changes I2C device drivers without real probe logic to return BUS_PROBE_NOWILDWARD to avoid interference with firmware bus enumeration, and reduces the probe priority of the iicbus base driver to allow subclass attachment at higher priority. Discussed on: freebsd-arch Modified: head/sys/dev/iicbus/ad7418.c head/sys/dev/iicbus/ds1672.c head/sys/dev/iicbus/icee.c head/sys/dev/iicbus/if_ic.c head/sys/dev/iicbus/iic.c head/sys/dev/iicbus/iicbus.c head/sys/dev/iicbus/iicsmb.c Modified: head/sys/dev/iicbus/ad7418.c ============================================================================== --- head/sys/dev/iicbus/ad7418.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/ad7418.c Tue Jan 6 17:23:37 2009 (r186833) @@ -82,7 +82,7 @@ ad7418_probe(device_t dev) { /* XXX really probe? */ device_set_desc(dev, "Analog Devices AD7418 ADC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/ds1672.c ============================================================================== --- head/sys/dev/iicbus/ds1672.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/ds1672.c Tue Jan 6 17:23:37 2009 (r186833) @@ -61,7 +61,7 @@ ds1672_probe(device_t dev) { /* XXX really probe? */ device_set_desc(dev, "Dallas Semiconductor DS1672 RTC"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/icee.c ============================================================================== --- head/sys/dev/iicbus/icee.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/icee.c Tue Jan 6 17:23:37 2009 (r186833) @@ -86,7 +86,7 @@ icee_probe(device_t dev) { /* XXX really probe? -- not until we know the size... */ device_set_desc(dev, "I2C EEPROM"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/if_ic.c ============================================================================== --- head/sys/dev/iicbus/if_ic.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/if_ic.c Tue Jan 6 17:23:37 2009 (r186833) @@ -153,7 +153,7 @@ ic_alloc_buffers(struct ic_softc *sc, in static int icprobe(device_t dev) { - return (0); + return (BUS_PROBE_NOWILDCARD); } /* Modified: head/sys/dev/iicbus/iic.c ============================================================================== --- head/sys/dev/iicbus/iic.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/iic.c Tue Jan 6 17:23:37 2009 (r186833) @@ -110,14 +110,14 @@ iic_identify(driver_t *driver, device_t { if (device_find_child(parent, "iic", -1) == NULL) - BUS_ADD_CHILD(parent, 0, "iic", -1); + BUS_ADD_CHILD(parent, 0, "iic", 0); } static int iic_probe(device_t dev) { device_set_desc(dev, "I2C generic I/O"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int Modified: head/sys/dev/iicbus/iicbus.c ============================================================================== --- head/sys/dev/iicbus/iicbus.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/iicbus.c Tue Jan 6 17:23:37 2009 (r186833) @@ -53,7 +53,9 @@ iicbus_probe(device_t dev) { device_set_desc(dev, "Philips I2C bus"); - return (0); + + /* Allow other subclasses to override this driver. */ + return (-1000); } #if SCAN_IICBUS Modified: head/sys/dev/iicbus/iicsmb.c ============================================================================== --- head/sys/dev/iicbus/iicsmb.c Tue Jan 6 17:05:44 2009 (r186832) +++ head/sys/dev/iicbus/iicsmb.c Tue Jan 6 17:23:37 2009 (r186833) @@ -149,7 +149,7 @@ static int iicsmb_probe(device_t dev) { device_set_desc(dev, "SMBus over I2C bridge"); - return (0); + return (BUS_PROBE_NOWILDCARD); } static int From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 17:58:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A329B1065677 for ; Tue, 6 Jan 2009 17:58:04 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 4F1688FC1B for ; Tue, 6 Jan 2009 17:58:04 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 5853D8FC54 for ; Tue, 6 Jan 2009 20:58:03 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 576238FC4E; Tue, 6 Jan 2009 20:58:00 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id D33BF398F3; Tue, 6 Jan 2009 21:00:23 +0300 (MSK) Date: Tue, 6 Jan 2009 21:00:19 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106210019.a517ff3f.stas@FreeBSD.org> In-Reply-To: <200901061823.34415.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061751.27394.hselasky@c2i.net> <20090106200103.26f2b5a9.stas@FreeBSD.org> <200901061823.34415.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 20:58:03 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49639bab967007282411625 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 17:58:05 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 18:23:33 +0100 Hans Petter Selasky mentioned: > > So at this point the device is effectively detached? Do you have ideas why > > that might happen. I don't also understand how it may work with config > > index 1 on old stack if the maximum number of configurations is 1 too... > > Looks weird. > BTW, it seems that device really uses the config index 0. I checked with the old stack and it seems that setting cfg index to 1 effectively does nothing, though doesn't fail. Old ubsa continues to work even with configuration index 0, so I think it worth to change it to 0. At least, for my device - cfg index=1 is incorrect, though works. > 1) You removed the config index 1 quirk? Which quirk are you talking about? I changed default index to 0 in ubsa2.c. > 2) You re-plugged the module and let it stay disconnected for some seconds? > Yes. > You can reach the endpoints through ugen when config index 0 is set. > > cat /dev/ugen0.2.0.1 > > echo "at" > /dev/ugen0.2.0.2 > I don't receive anything back... Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljnDcACgkQK/VZk+smlYEX8gCbBxiPkJb+lPRud28J06A9JP3N ogkAoIKGUY06LirvAlaJNRZs2tfyyvZW =YlnA -----END PGP SIGNATURE----- !DSPAM:49639bab967007282411625! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 18:10:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915AB1065773; Tue, 6 Jan 2009 18:10:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7FC328FC22; Tue, 6 Jan 2009 18:10:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06IAHfP038207; Tue, 6 Jan 2009 18:10:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06IAH3c038206; Tue, 6 Jan 2009 18:10:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901061810.n06IAH3c038206@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 18:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186834 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:10:18 -0000 Author: bz Date: Tue Jan 6 18:10:17 2009 New Revision: 186834 URL: http://svn.freebsd.org/changeset/base/186834 Log: Document the special loopback address behaviour of jails. PR: kern/103464 Submitted by: brueffer (correct markup) Reviewed by: brueffer MFC after: 2 weeks Modified: head/lib/libc/sys/jail.2 Modified: head/lib/libc/sys/jail.2 ============================================================================== --- head/lib/libc/sys/jail.2 Tue Jan 6 17:23:37 2009 (r186833) +++ head/lib/libc/sys/jail.2 Tue Jan 6 18:10:17 2009 (r186834) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 29, 2008 +.Dd January 6, 2009 .Dt JAIL 2 .Os .Sh NAME @@ -118,6 +118,12 @@ or, if present, the per-jail .Pp All IP activity will be forced to happen to/from the IP number specified, which should be an alias on one of the network interfaces. +All connections to/from the loopback address +.Pf ( Li 127.0.0.1 +for IPv4, +.Li ::1 +for IPv6) will be changed to be to/from the primary address +of the jail for the given address family. .Pp It is possible to identify a process as jailed by examining .Dq Li /proc//status : From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 18:12:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E68610656DD for ; Tue, 6 Jan 2009 18:12:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id AE6D48FC1F for ; Tue, 6 Jan 2009 18:12:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id B902D8FC52 for ; Tue, 6 Jan 2009 21:12:56 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 6382F8FC18; Tue, 6 Jan 2009 21:12:53 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 48D52398F3; Tue, 6 Jan 2009 21:15:20 +0300 (MSK) Date: Tue, 6 Jan 2009 21:15:20 +0300 From: Stanislav Sedov To: Stanislav Sedov Message-Id: <20090106211520.27e695c6.stas@FreeBSD.org> In-Reply-To: <20090106210019.a517ff3f.stas@FreeBSD.org> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061751.27394.hselasky@c2i.net> <20090106200103.26f2b5a9.stas@FreeBSD.org> <200901061823.34415.hselasky@c2i.net> <20090106210019.a517ff3f.stas@FreeBSD.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 21:12:56 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 49639f28967001972212592 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , Hans Petter Selasky , Stanislav Sedov , svn-src-head@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:12:58 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 21:00:19 +0300 Stanislav Sedov mentioned: > > You can reach the endpoints through ugen when config index 0 is set. > > > > cat /dev/ugen0.2.0.1 > > > > echo "at" > /dev/ugen0.2.0.2 > > > > I don't receive anything back... > Hmm, it seems that I have the same problem with plain uplcom. It attaches but doesn't work. Log shows: uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) uplcom_cfg_do_request:934: device request failed, err=USB_ERR_STALLED (ignored) Have you seen this before? Any ideas? Usbconfig reset doesn't help. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljn7gACgkQK/VZk+smlYHSygCeOnjuAh4Q0xfqzj3IivW4GM2P imEAnjM3kUl732l3Ri7IWsIClHPuLAkw =g3YO -----END PGP SIGNATURE----- !DSPAM:49639f28967001972212592! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 18:21:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36554106566B for ; Tue, 6 Jan 2009 18:21:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id D7A1C8FC17 for ; Tue, 6 Jan 2009 18:21:56 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id E32F38FC52 for ; Tue, 6 Jan 2009 21:21:55 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id DB9CA8FC18; Tue, 6 Jan 2009 21:21:52 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 77ECA398F3; Tue, 6 Jan 2009 21:24:20 +0300 (MSK) Date: Tue, 6 Jan 2009 21:24:20 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106212420.b59adb99.stas@FreeBSD.org> In-Reply-To: <200901061917.29305.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106210019.a517ff3f.stas@FreeBSD.org> <20090106211520.27e695c6.stas@FreeBSD.org> <200901061917.29305.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Tue Jan 6 21:21:55 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963a143967001813813896 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:21:57 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 19:17:28 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 21:00:19 +0300 > > > > Stanislav Sedov mentioned: > > > > You can reach the endpoints through ugen when config index 0 is set. > > > > > > > > cat /dev/ugen0.2.0.1 > > > > > > > > echo "at" > /dev/ugen0.2.0.2 > > > > > > I don't receive anything back... > > > > What platform are you using, what Host Controller, amount of memory? > amd64, Intel ICH9, 2x2G You can see full dmesg here: http://www.SpringDaemons.com/stas/dmesg - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljodQACgkQK/VZk+smlYF/XgCeNmm7TVENyiv/Tc5EZOdTS3uS JAIAn2xPZMvxUMyRguUi+/kafSVvwB1P =c3ko -----END PGP SIGNATURE----- !DSPAM:4963a143967001813813896! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 18:25:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7836F106566C; Tue, 6 Jan 2009 18:25:46 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.tele2.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 479678FC1F; Tue, 6 Jan 2009 18:25:44 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=reCBf_VVjwMA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=Hi8v3RRKxCrs62WSawAA:9 a=TgBnTuWs9GMYdguBnB3_WdqctmUA:4 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1006659344; Tue, 06 Jan 2009 19:25:40 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 19:28:02 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061917.29305.hselasky@c2i.net> <20090106212420.b59adb99.stas@FreeBSD.org> In-Reply-To: <20090106212420.b59adb99.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061928.03420.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:25:47 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > http://www.SpringDaemons.com/stas/dmesg Dmesg looks fine. Do you have the same for USB2? Are any other USB devices working at the same USB speed like the ones that fail ? --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 18:32:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A566F106566B; Tue, 6 Jan 2009 18:32:03 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 782018FC1B; Tue, 6 Jan 2009 18:32:02 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=TIVv8n4V54cA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=6I5d2MoRAAAA:8 a=I6hRJrGC8jS7Moei41wA:9 a=8PqTdrXmHC9HdEaaXrsA:7 a=r_a9kZzfaPVQKl8JrGDj8c0uif8A:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 433583212; Tue, 06 Jan 2009 19:32:00 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 19:34:23 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061823.34415.hselasky@c2i.net> <20090106210019.a517ff3f.stas@FreeBSD.org> In-Reply-To: <20090106210019.a517ff3f.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061934.23915.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:32:04 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 18:23:33 +0100 > > Hans Petter Selasky mentioned: > > > So at this point the device is effectively detached? Do you have ideas > > > why that might happen. I don't also understand how it may work with > > > config index 1 on old stack if the maximum number of configurations is > > > 1 too... Looks weird. > I've changed ubsa to use config index 0. Will be committed to -current early next week, hence I am accumulating patches. http://perforce.freebsd.org/chv.cgi?CH=155730 --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 18:49:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20D7A106564A for ; Tue, 6 Jan 2009 18:49:22 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id B73938FC17 for ; Tue, 6 Jan 2009 18:49:21 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 9C3128FC52 for ; Tue, 6 Jan 2009 21:49:20 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 6AE4E8FC18; Tue, 6 Jan 2009 21:49:17 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 89B683996C; Tue, 6 Jan 2009 21:51:44 +0300 (MSK) Date: Tue, 6 Jan 2009 21:51:39 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106215139.3bde5a63.stas@FreeBSD.org> In-Reply-To: <200901061928.03420.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061917.29305.hselasky@c2i.net> <20090106212420.b59adb99.stas@FreeBSD.org> <200901061928.03420.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 21:49:20 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963a7b0967008214419693 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 18:49:22 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 19:28:02 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > http://www.SpringDaemons.com/stas/dmesg > > Dmesg looks fine. Do you have the same for USB2? > Sure. Take it there: http://www.SpringDaemons.com/stas/dmesg It also contains some uplcom and ubsa debug messages from the previous run. Ignore E0/E1/etc - these is my debug output from ubsa. > Are any other USB devices working at the same USB speed like the ones that > fail ? > It seems that all high-speed and low-speed devices I have work fine. Both uplcom and ubsa are working at the full-speed, and both fail. I also have the Morotola cell phone operating as a full-speed umodem(4) controlled modem - it works just fine with the new stack. All ports on my motherboard behaves the same way, so it seems it is not a port problem. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljqEAACgkQK/VZk+smlYEfzQCfYPELIwl+dxdvTFU0Wj5DRwBn BVcAn0p/DgjZFKplcQJRhtzPumKJkCII =9dcG -----END PGP SIGNATURE----- !DSPAM:4963a7b0967008214419693! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:00:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB44B1065672; Tue, 6 Jan 2009 19:00:12 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B88858FC1D; Tue, 6 Jan 2009 19:00:12 +0000 (UTC) (envelope-from flz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06J0CTh039200; Tue, 6 Jan 2009 19:00:12 GMT (envelope-from flz@svn.freebsd.org) Received: (from flz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06J0CGZ039198; Tue, 6 Jan 2009 19:00:12 GMT (envelope-from flz@svn.freebsd.org) Message-Id: <200901061900.n06J0CGZ039198@svn.freebsd.org> From: Florent Thoumie Date: Tue, 6 Jan 2009 19:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186835 - head/usr.sbin/pkg_install/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:00:13 -0000 Author: flz Date: Tue Jan 6 19:00:12 2009 New Revision: 186835 URL: http://svn.freebsd.org/changeset/base/186835 Log: - Backout latest changes (follow symlinks: r186496, r186518). - Bump PKG_INSTALL_VER to 20090106. Modified: head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/plist.c Modified: head/usr.sbin/pkg_install/lib/lib.h ============================================================================== --- head/usr.sbin/pkg_install/lib/lib.h Tue Jan 6 18:10:17 2009 (r186834) +++ head/usr.sbin/pkg_install/lib/lib.h Tue Jan 6 19:00:12 2009 (r186835) @@ -105,7 +105,7 @@ * Version of the package tools - increase only when some * functionality used by bsd.port.mk is changed, added or removed */ -#define PKG_INSTALL_VERSION 20081227 +#define PKG_INSTALL_VERSION 20090106 #define PKG_WRAPCONF_FNAME "/var/db/pkg_install.conf" #define main(argc, argv) real_main(argc, argv) Modified: head/usr.sbin/pkg_install/lib/plist.c ============================================================================== --- head/usr.sbin/pkg_install/lib/plist.c Tue Jan 6 18:10:17 2009 (r186834) +++ head/usr.sbin/pkg_install/lib/plist.c Tue Jan 6 19:00:12 2009 (r186835) @@ -544,82 +544,45 @@ delete_package(Boolean ign_err, Boolean int delete_hierarchy(const char *dir, Boolean ign_err, Boolean nukedirs) { - char *cp1, *cp2, realdir[FILENAME_MAX]; + char *cp1, *cp2; - if (realdir == NULL) { - warnx("Couldn't allocate enough memory\n"); - return (ign_err ? SUCCESS : FAIL); - } - - if (issymlink(dir) && readlink(dir, realdir, FILENAME_MAX-1) == -1) - return (ign_err ? SUCCESS : FAIL); - - strlcpy(realdir, dir, FILENAME_MAX-1); - - cp1 = cp2 = strdup(realdir); - if (cp1 == NULL) { - warnx("Couldn't allocate enough memory\n"); - return (ign_err ? SUCCESS : FAIL); - } - - if (!fexists(realdir)) { + cp1 = cp2 = strdup(dir); + if (!fexists(dir)) { if (!ign_err) warnx("%s '%s' doesn't exist", - isdir(realdir) ? "directory" : "file", realdir); - free(cp1); - return (ign_err ? SUCCESS : FAIL); + isdir(dir) ? "directory" : "file", dir); + return !ign_err; } else if (nukedirs) { - if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), realdir)) { - free(cp1); - return (ign_err ? SUCCESS : FAIL); - } + if (vsystem("%s -r%s %s", REMOVE_CMD, (ign_err ? "f" : ""), dir)) + return 1; } - else if (isdir(realdir)) { - if (RMDIR(realdir)) { - free(cp1); - return (ign_err ? SUCCESS : FAIL); - } + else if (isdir(dir) && !issymlink(dir)) { + if (RMDIR(dir) && !ign_err) + return 1; } else { - if (REMOVE(realdir, ign_err)) { - free(cp1); - return (ign_err ? SUCCESS : FAIL); - } + if (REMOVE(dir, ign_err)) + return 1; } - if (!nukedirs) { - free(cp1); - return (SUCCESS); - } + if (!nukedirs) + return 0; while (cp2) { if ((cp2 = strrchr(cp1, '/')) != NULL) *cp2 = '\0'; - if (!isemptydir(realdir)) { - free(cp1); - return (SUCCESS); - } - if (RMDIR(realdir) && !ign_err) { - if (!fexists(realdir)) { - warnx("directory '%s' doesn't exist", realdir); - free(cp1); - return (SUCCESS); - } else { - free(cp1); - return (FAIL); - } + if (!isemptydir(dir)) + return 0; + if (RMDIR(dir) && !ign_err) { + if (!fexists(dir)) + warnx("directory '%s' doesn't exist", dir); + else + return 1; } /* back up the pathname one component */ if (cp2) { - free(cp1); - cp1 = strdup(realdir); - if (cp1 == NULL) { - warnx("Couldn't allocate enough memory\n"); - return (ign_err ? SUCCESS : FAIL); - } + cp1 = strdup(dir); } } - free(cp1); - return (SUCCESS); + return 0; } - From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:02:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD0FF106566B; Tue, 6 Jan 2009 19:02:31 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe12.swipnet.se [212.247.155.97]) by mx1.freebsd.org (Postfix) with ESMTP id B80E08FC1E; Tue, 6 Jan 2009 19:02:30 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=qFwKWeLwAD0A:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=qS_koVNbs58QD22P39sA:9 a=qgdECkjNfmwmnTlbn2sA:7 a=CE2tia_AjStc4I2-656_pCMRke8A:4 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe12.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1003484237; Tue, 06 Jan 2009 20:02:29 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 20:04:51 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061928.03420.hselasky@c2i.net> <20090106215139.3bde5a63.stas@FreeBSD.org> In-Reply-To: <20090106215139.3bde5a63.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200901062004.51961.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:02:32 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > http://www.SpringDaemons.com/stas/dmesg =46rom the debug messages it might look like your device has a problem with= =20 clearing the stall. Try commenting out the following lines in "ubsa2.c": /* clear stall at first run */ sc->sc_flag |=3D (UBSA_FLAG_WRITE_STALL | UBSA_FLAG_READ_STALL); =2D-HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:05:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44F0710657C0; Tue, 6 Jan 2009 19:05:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id EF3C18FC19; Tue, 6 Jan 2009 19:05:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 3022041C711; Tue, 6 Jan 2009 20:05:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id e2k9dxa3S3C3; Tue, 6 Jan 2009 20:05:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id D317D41C710; Tue, 6 Jan 2009 20:05:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 421874448DD; Tue, 6 Jan 2009 19:04:26 +0000 (UTC) Date: Tue, 6 Jan 2009 19:04:25 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Luigi Rizzo In-Reply-To: <200901052009.n05K9soF009621@svn.freebsd.org> Message-ID: <20090106190220.I45399@maildrop.int.zabbadoz.net> References: <200901052009.n05K9soF009621@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186789 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:05:07 -0000 On Mon, 5 Jan 2009, Luigi Rizzo wrote: > Author: luigi > Date: Mon Jan 5 20:09:54 2009 > New Revision: 186789 > URL: http://svn.freebsd.org/changeset/base/186789 > > Log: > This patch introduces a number of simplifications to the Forth > functions used in the bootloader. The goal is to make the code more > readable and smaller (especially because we have size issues > in the loader's environment). ... It's waay to chatty now... I guess some debug stuff slipped in? -- starting on get_file_name has /boot/defaults/loader.conf ----- Trying conf /boot/defaults/loader.conf Loading /boot/defaults/loader.conf -- starting on get_file_name has /boot/device.hints ----- Trying conf /boot/device.hints get_file_name has /boot/loader.conf ----- Trying conf /boot/loader.conf ;get_file_name has /boot/loader.conf.local ----- Trying conf /boot/loader.conf.local -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:15:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C12A106564A; Tue, 6 Jan 2009 19:15:11 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 88E518FC18; Tue, 6 Jan 2009 19:15:10 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=zU2_IFj2hz0A:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=0kqcLAFk_B0cgyMVJFMA:9 a=sDgvBcLyHOYrhHA-oZGKouCR2yMA:4 a=SV7veod9ZcQA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 430273762; Tue, 06 Jan 2009 19:15:06 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 19:17:28 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <20090106210019.a517ff3f.stas@FreeBSD.org> <20090106211520.27e695c6.stas@FreeBSD.org> In-Reply-To: <20090106211520.27e695c6.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901061917.29305.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:15:11 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 21:00:19 +0300 > > Stanislav Sedov mentioned: > > > You can reach the endpoints through ugen when config index 0 is set. > > > > > > cat /dev/ugen0.2.0.1 > > > > > > echo "at" > /dev/ugen0.2.0.2 > > > > I don't receive anything back... > What platform are you using, what Host Controller, amount of memory? --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:17:51 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 768251065677 for ; Tue, 6 Jan 2009 19:17:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 08D2A8FC23 for ; Tue, 6 Jan 2009 19:17:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 21105 invoked by uid 399); 6 Jan 2009 19:17:50 -0000 Received: from localhost (HELO ?192.168.0.4?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 6 Jan 2009 19:17:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4963AE5B.8040002@FreeBSD.org> Date: Tue, 06 Jan 2009 11:17:47 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: obrien@FreeBSD.org References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> <49628DD3.8020901@FreeBSD.org> <20090106164052.GC75326@dragon.NUXI.org> In-Reply-To: <20090106164052.GC75326@dragon.NUXI.org> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:17:52 -0000 David O'Brien wrote: > On Mon, Jan 05, 2009 at 02:46:43PM -0800, Doug Barton wrote: >> A few more specifics in no particular order: > .. >> You don't have to page through the whole diff if you use less as your PAGER. > > You do thought have to hit 'q' don't you? Only if you are not using the -U option (or if there are differences in a file where you have local edits). >> Matt Dillon's change to the PAGER was the single thing I got the most >> user complaints about. > > :-( I know I saw others say in email they liked it better... a > ~/.mergemasterrc knob would be nice. :-) /me waves his magic wand ..... voila! Put PAGER in your mergemaster rc file and it will work for you. (I'm guessing you haven't actually tried it ...) Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:25:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 572F4106566B; Tue, 6 Jan 2009 19:25:24 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 45B378FC20; Tue, 6 Jan 2009 19:25:24 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06JPObI039879; Tue, 6 Jan 2009 19:25:24 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06JPO2D039878; Tue, 6 Jan 2009 19:25:24 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200901061925.n06JPO2D039878@svn.freebsd.org> From: Colin Percival Date: Tue, 6 Jan 2009 19:25:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186836 - head/sbin/md5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:25:24 -0000 Author: cperciva Date: Tue Jan 6 19:25:24 2009 New Revision: 186836 URL: http://svn.freebsd.org/changeset/base/186836 Log: Strengthen some of the language concerning attacks on MD5, in light of the recent demonstration of a forged SSL certificate. Add text pointing out that SHA-1 is at least theoretically broken. Add a recommendation that new applications use SHA-256. MFC after: 1 month Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Tue Jan 6 19:00:12 2009 (r186835) +++ head/sbin/md5/md5.1 Tue Jan 6 19:25:24 2009 (r186836) @@ -49,15 +49,23 @@ key under a public-key cryptosystem such .Tn RSA . .Pp .Tn MD5 -has not yet (2007-03-05) been broken, but sufficient attacks have been -made that its security is in some doubt. -The attacks on +has been completely broken as far as finding collisions is +concerned, and should not be relied upon to produce unique outputs. +This also means that .Tn MD5 -are in the nature of finding -.Dq collisions -\(em that is, multiple -inputs which hash to the same value; it is still unlikely for an attacker -to be able to determine the exact original input given a hash value. +should not be used as part of a cryptographic signature scheme. +At the current time (2009-01-06) there is no publicly known method to +"reverse" MD5, i.e., to find an input given a hash value. +.Pp +.Tn SHA-1 +currently (2009-01-06) has no known collisions, but an attack has been +found which is faster than a brute-force search, placing the security of +.Tn SHA-1 +in doubt. +.Pp +It is recommended that all new applications use +.Tn SHA-256 +instead of one of the other hash functions. .Pp The following options may be used in any combination and must precede any files named on the command line. From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:33:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F065106568C for ; Tue, 6 Jan 2009 19:33:47 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id E34068FC19 for ; Tue, 6 Jan 2009 19:33:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id A1B7A8FC52 for ; Tue, 6 Jan 2009 22:33:45 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 2C0CA8FC18; Tue, 6 Jan 2009 22:33:42 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id 51CC43996C; Tue, 6 Jan 2009 22:36:09 +0300 (MSK) Date: Tue, 6 Jan 2009 22:36:04 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106223604.ad706b69.stas@FreeBSD.org> In-Reply-To: <200901062004.51961.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901061928.03420.hselasky@c2i.net> <20090106215139.3bde5a63.stas@FreeBSD.org> <200901062004.51961.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 22:33:45 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963b219967001367450391 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:33:47 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 20:04:51 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > http://www.SpringDaemons.com/stas/dmesg > > From the debug messages it might look like your device has a problem with > clearing the stall. Try commenting out the following lines in "ubsa2.c": > > /* clear stall at first run */ > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > UBSA_FLAG_READ_STALL); This doesn't affect anything. :-( BTW, sometime I see the following after plugging in the module: usb2_alloc_device:1458: getting device descriptor at addr 2 failed! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! uhub_reattach_port:417: could not allocate new device! and the device doesn't attach. - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljsqkACgkQK/VZk+smlYFiPQCfXA056TdBXufM73tpozglxoHM 5u0An01cctctO5srXoo//dxeBqa4pAOM =+xve -----END PGP SIGNATURE----- !DSPAM:4963b219967001367450391! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:41:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A1171065675; Tue, 6 Jan 2009 19:41:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 2402E8FC29; Tue, 6 Jan 2009 19:41:03 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=f5Rk4X9yzsQA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=9x5dnzHiO3eVplxSM60A:9 a=v7yQg19w3QerdMeJbyAA:7 a=sq_I_DTHMld0pAaR46Ge8UC3H2EA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1179024635; Tue, 06 Jan 2009 20:41:02 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 20:43:19 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062004.51961.hselasky@c2i.net> <20090106223604.ad706b69.stas@FreeBSD.org> In-Reply-To: <20090106223604.ad706b69.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901062043.20696.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:41:06 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 20:04:51 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > http://www.SpringDaemons.com/stas/dmesg > > > > From the debug messages it might look like your device has a problem with > > clearing the stall. Try commenting out the following lines in "ubsa2.c": > > > > /* clear stall at first run */ > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > UBSA_FLAG_READ_STALL); > > This doesn't affect anything. :-( > > BTW, sometime I see the following after plugging in the module: In the function "ubsa_cfg_request": Try: 1) Always return - no requests: Do you get AT+OK back on the modem channel? 2) Add pause("DLY", hz / 10); in that function. --HPS > > usb2_alloc_device:1458: getting device descriptor at addr 2 failed! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > usb2_req_re_enumerate:1362: addr=2, set address failed! (ignored) > usb2_req_re_enumerate:1375: getting device descriptor at addr 2 failed! > uhub_reattach_port:417: could not allocate new device! > > and the device doesn't attach. From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 19:54:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 131EA10656D6 for ; Tue, 6 Jan 2009 19:54:09 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id A2C048FC23 for ; Tue, 6 Jan 2009 19:54:08 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 7E2178FC52 for ; Tue, 6 Jan 2009 22:54:07 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 6A6DF8FC27; Tue, 6 Jan 2009 22:54:04 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id DD4E23996C; Tue, 6 Jan 2009 22:56:28 +0300 (MSK) Date: Tue, 6 Jan 2009 22:56:28 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106225628.2c8fdc28.stas@FreeBSD.org> In-Reply-To: <200901062043.20696.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062004.51961.hselasky@c2i.net> <20090106223604.ad706b69.stas@FreeBSD.org> <200901062043.20696.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 22:54:07 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963b6df967002025419989 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 19:54:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 20:43:19 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > Hans Petter Selasky mentioned: > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > From the debug messages it might look like your device has a problem with > > > clearing the stall. Try commenting out the following lines in "ubsa2.c": > > > > > > /* clear stall at first run */ > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > UBSA_FLAG_READ_STALL); > > > > This doesn't affect anything. :-( > > > > BTW, sometime I see the following after plugging in the module: > > In the function "ubsa_cfg_request": > > Try: > > 1) Always return - no requests: Do you get AT+OK back on the modem channel? This doesn't change anything. > 2) Add pause("DLY", hz / 10); in that function. > After this change the device began to work (that is I'm receiving replies for AT commands). However I can connect to it only once, after disconnecting "cu" I can communicate with it again only after device reset (or reattach). - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljt2wACgkQK/VZk+smlYFC9gCfQVlIWWSmmTW9Ji9rIBjPZDgM hOcAn15p0gTdm5zGXwbU4jdhBhsicXmD =MBND -----END PGP SIGNATURE----- !DSPAM:4963b6df967002025419989! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:01:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAF00106566C; Tue, 6 Jan 2009 20:01:54 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 7C4938FC1B; Tue, 6 Jan 2009 20:01:53 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=QwWaQ7pgnxYA:10 a=tgiRRak4JjAA:10 a=rREUrScshOl7G2h6aTFPgw==:17 a=F-Y6h51ZAAAA:8 a=62FAX-sNFUz4PeZK3J0A:9 a=RgWdw775qXAWmPfdS5MA:7 a=Jz0rIYrg1Y3LTUe37p9Hn5vqjRAA:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.73.248.227] (account mc467741@c2i.net [62.73.248.227] verified) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1179032114; Tue, 06 Jan 2009 21:01:51 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 21:04:14 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062043.20696.hselasky@c2i.net> <20090106225628.2c8fdc28.stas@FreeBSD.org> In-Reply-To: <20090106225628.2c8fdc28.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901062104.14919.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:01:55 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 20:43:19 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > > > Hans Petter Selasky mentioned: > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > > > From the debug messages it might look like your device has a problem > > > > with clearing the stall. Try commenting out the following lines in > > > > "ubsa2.c": > > > > > > > > /* clear stall at first run */ > > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > > UBSA_FLAG_READ_STALL); > > > > > > This doesn't affect anything. :-( > > > > > > BTW, sometime I see the following after plugging in the module: > > > > In the function "ubsa_cfg_request": > > > > Try: > > > > 1) Always return - no requests: Do you get AT+OK back on the modem > > channel? > > This doesn't change anything. > > > 2) Add pause("DLY", hz / 10); in that function. > > After this change the device began to work (that is I'm receiving > replies for AT commands). However I can connect to it only once, > after disconnecting "cu" I can communicate with it again only after > device reset (or reattach). Can you send me change 2) with debugging output? --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:19:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9789D1065673; Tue, 6 Jan 2009 20:19:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84E108FC0C; Tue, 6 Jan 2009 20:19:51 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06KJo70041003; Tue, 6 Jan 2009 20:19:50 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06KJoDL041002; Tue, 6 Jan 2009 20:19:50 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901062019.n06KJoDL041002@svn.freebsd.org> From: Christian Brueffer Date: Tue, 6 Jan 2009 20:19:50 +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: r186838 - stable/6/usr.sbin/wpa/wpa_supplicant X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:19:52 -0000 Author: brueffer Date: Tue Jan 6 20:19:49 2009 New Revision: 186838 URL: http://svn.freebsd.org/changeset/base/186838 Log: Unbreak build by fixing the conditional. Approved by: bz Pointy Hat To: danger Modified: stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Modified: stable/6/usr.sbin/wpa/wpa_supplicant/Makefile ============================================================================== --- stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 19:52:40 2009 (r186837) +++ stable/6/usr.sbin/wpa/wpa_supplicant/Makefile Tue Jan 6 20:19:49 2009 (r186838) @@ -11,7 +11,7 @@ SRCS= config.c eloop.c common.c md5.c rc MAN= wpa_supplicant.8 wpa_supplicant.conf.5 -.if ${MK_EXAMPLES} != "no" +.if !defined(NO_SHARE) FILESDIR= ${SHAREDIR}/examples/etc FILES= wpa_supplicant.conf .endif From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:20:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E51B91065677 for ; Tue, 6 Jan 2009 20:20:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 5E7048FC13 for ; Tue, 6 Jan 2009 20:20:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id 35C098FC52 for ; Tue, 6 Jan 2009 23:20:57 +0300 (MSK) Received: from orion.SpringDaemons.com (drsun1.dialup.corbina.ru [85.21.245.235]) by mx0.deglitch.com (Postfix) with ESMTPA id 1202A8FC18; Tue, 6 Jan 2009 23:20:54 +0300 (MSK) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id B9DDC3996C; Tue, 6 Jan 2009 23:23:20 +0300 (MSK) Date: Tue, 6 Jan 2009 23:23:20 +0300 From: Stanislav Sedov To: Hans Petter Selasky Message-Id: <20090106232320.a1492098.stas@FreeBSD.org> In-Reply-To: <200901062104.14919.hselasky@c2i.net> References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062043.20696.hselasky@c2i.net> <20090106225628.2c8fdc28.stas@FreeBSD.org> <200901062104.14919.hselasky@c2i.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Whitelisted X-DSPAM-Processed: Tue Jan 6 23:20:56 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4963bd28967001808595361 Cc: Stanislav Sedov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:20:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 6 Jan 2009 21:04:14 +0100 Hans Petter Selasky mentioned: > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > On Tue, 6 Jan 2009 20:43:19 +0100 > > > > Hans Petter Selasky mentioned: > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > > > > > Hans Petter Selasky mentioned: > > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > > > > > From the debug messages it might look like your device has a problem > > > > > with clearing the stall. Try commenting out the following lines in > > > > > "ubsa2.c": > > > > > > > > > > /* clear stall at first run */ > > > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > > > UBSA_FLAG_READ_STALL); > > > > > > > > This doesn't affect anything. :-( > > > > > > > > BTW, sometime I see the following after plugging in the module: > > > > > > In the function "ubsa_cfg_request": > > > > > > Try: > > > > > > 1) Always return - no requests: Do you get AT+OK back on the modem > > > channel? > > > > This doesn't change anything. > > > > > 2) Add pause("DLY", hz / 10); in that function. > > > > After this change the device began to work (that is I'm receiving > > replies for AT commands). However I can connect to it only once, > > after disconnecting "cu" I can communicate with it again only after > > device reset (or reattach). > > Can you send me change 2) with debugging output? Unfortunately, it stopped working for some reason. :-( Probably, I need to reboot. Anyway the change was like this: @@ -384,6 +390,8 @@ req.wIndex[1] = 0; USETW(req.wLength, 0); + pause("DLY", hz / 10); + err = usb2_do_request_flags (sc->sc_udev, &Giant, &req, NULL, 0, NULL, 1000); What kind of debugging info are you interested in? Should I enable hw.usb2.ubsa.debug? Thanks! - -- Stanislav Sedov ST4096-RIPE -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAkljvbgACgkQK/VZk+smlYHlGwCfWWaEjRyjT7D8eqGNPA+MrqMG yl0An3IgQwJ696yAvDxOjMFEY9ezenCn =ohdD -----END PGP SIGNATURE----- !DSPAM:4963bd28967001808595361! From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:21:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A6C31065686; Tue, 6 Jan 2009 20:21:56 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout013.mac.com (asmtpout013.mac.com [17.148.16.88]) by mx1.freebsd.org (Postfix) with ESMTP id E8DB38FC1D; Tue, 6 Jan 2009 20:21:55 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from lynx.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp013.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KD200ITUGKFPT20@asmtp013.mac.com>; Tue, 06 Jan 2009 12:21:52 -0800 (PST) Message-id: From: Marcel Moolenaar To: Marius Strobl In-reply-to: <200901061410.n06EABW2033159@svn.freebsd.org> Date: Tue, 06 Jan 2009 12:21:50 -0800 References: <200901061410.n06EABW2033159@svn.freebsd.org> X-Mailer: Apple Mail (2.930.3) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186823 - head/sys/geom/part X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:21:56 -0000 On Jan 6, 2009, at 6:10 AM, Marius Strobl wrote: > Author: marius > Date: Tue Jan 6 14:10:10 2009 > New Revision: 186823 > URL: http://svn.freebsd.org/changeset/base/186823 > > Log: > - Don't enforce an upper-bound to the number of sectors or heads, > allowing the full 16-bit width of the corresponding fields in the > VTOC8 label to be used. The removed limits basically only held > true for providers labeled using the synthetic geometry provided > by cam_calc_geometry(9) but neither SCSI disks labeled with Solaris > nor sufficiently large ATA disks. > - Given that providers (originally) labeled with Solaris typically > use the native geometry as reported by the target while FreeBSD > typically uses a synthetic one put the message complaining about > mismatching geometries between what the label indicates and what > GEOM thinks the provider has, which we generally can't help, > under bootverbose in order to not unnecessarily scare users. > - For informational purposes add the non-matching values to the > message complaining about them, similar to what r186501 did for > g_part_bsd_read() except also indicating the origin of the > values. > - Make it clear that the messages emitted by this code refer to > the VTOC8 support rather than to another existing scheme or to > VTOC32. Thanks! -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:23:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D993C1065670; Tue, 6 Jan 2009 20:23:17 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id 7B5868FC08; Tue, 6 Jan 2009 20:23:16 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=GDlzLHxCoWoA:10 a=tgiRRak4JjAA:10 a=nklthdr5v5AUSfVrlghuJA==:17 a=F-Y6h51ZAAAA:8 a=RNqYidxoasWGO47mH-IA:9 a=fuaRsuBzg8i7HqludkUA:7 a=BZ2XMUk8AI9YOKFhnPo7SxCN8-4A:4 a=9aOQ2cSd83gA:10 a=LY0hPdMaydYA:10 Received: from [62.113.132.62] (account mc467741@c2i.net [62.113.132.62] verified) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 1176617209; Tue, 06 Jan 2009 21:23:14 +0100 From: Hans Petter Selasky To: Stanislav Sedov Date: Tue, 6 Jan 2009 21:25:25 +0100 User-Agent: KMail/1.9.7 References: <200901040012.n040C2gH040928@svn.freebsd.org> <200901062104.14919.hselasky@c2i.net> <20090106232320.a1492098.stas@FreeBSD.org> In-Reply-To: <20090106232320.a1492098.stas@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901062125.27685.hselasky@c2i.net> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org Subject: Re: svn commit: r186730 - in head: lib/libusb20 sys/dev/usb2/controller sys/dev/usb2/core sys/dev/usb2/ethernet sys/dev/usb2/image sys/dev/usb2/include sys/dev/usb2/serial sys/dev/usb2/sound sys/dev/us... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:23:18 -0000 On Tuesday 06 January 2009, Stanislav Sedov wrote: > On Tue, 6 Jan 2009 21:04:14 +0100 > > Hans Petter Selasky mentioned: > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > On Tue, 6 Jan 2009 20:43:19 +0100 > > > > > > Hans Petter Selasky mentioned: > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > On Tue, 6 Jan 2009 20:04:51 +0100 > > > > > > > > > > Hans Petter Selasky mentioned: > > > > > > On Tuesday 06 January 2009, Stanislav Sedov wrote: > > > > > > > http://www.SpringDaemons.com/stas/dmesg > > > > > > > > > > > > From the debug messages it might look like your device has a > > > > > > problem with clearing the stall. Try commenting out the following > > > > > > lines in "ubsa2.c": > > > > > > > > > > > > /* clear stall at first run */ > > > > > > sc->sc_flag |= (UBSA_FLAG_WRITE_STALL | > > > > > > UBSA_FLAG_READ_STALL); > > > > > > > > > > This doesn't affect anything. :-( > > > > > > > > > > BTW, sometime I see the following after plugging in the module: > > > > > > > > In the function "ubsa_cfg_request": > > > > > > > > Try: > > > > > > > > 1) Always return - no requests: Do you get AT+OK back on the modem > > > > channel? > > > > > > This doesn't change anything. > > > > > > > 2) Add pause("DLY", hz / 10); in that function. > > > > > > After this change the device began to work (that is I'm receiving > > > replies for AT commands). However I can connect to it only once, > > > after disconnecting "cu" I can communicate with it again only after > > > device reset (or reattach). > > > > Can you send me change 2) with debugging output? > > Unfortunately, it stopped working for some reason. :-( Probably, I need > to reboot. Anyway the change was like this: > @@ -384,6 +390,8 @@ > req.wIndex[1] = 0; > USETW(req.wLength, 0); > > + pause("DLY", hz / 10); > + > err = usb2_do_request_flags > (sc->sc_udev, &Giant, &req, NULL, 0, NULL, 1000); > > What kind of debugging info are you interested in? Should I enable > hw.usb2.ubsa.debug? Yes, only ubsa debugging. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 20:57:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB099106566B; Tue, 6 Jan 2009 20:57:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id A8EA48FC1F; Tue, 6 Jan 2009 20:57:01 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n06KtLlF039586; Tue, 6 Jan 2009 13:55:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 06 Jan 2009 13:55:34 -0700 (MST) Message-Id: <20090106.135534.742957024.imp@bsdimp.com> To: christoph.mallon@gmx.de From: "M. Warner Losh" In-Reply-To: <49627592.60208@gmx.de> References: <20090105194210.P45399@maildrop.int.zabbadoz.net> <20090105204356.GA52934@troutmask.apl.washington.edu> <49627592.60208@gmx.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, bz@freebsd.org, src-committers@freebsd.org, sgk@troutmask.apl.washington.edu Subject: Re: svn commit: r186751 - in head/sys: netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 20:57:02 -0000 In message: <49627592.60208@gmx.de> Christoph Mallon writes: : Steve Kargl schrieb: : > Stylistic changes (including whitespace changes) are hard on : > the source repository and are to be avoided without good reason. : : Yet another anachronism in style(9). : (Does that sentence even mean what I think it means? Somehow it sounds : like "there is no good reason, but avoid them anyway" instead of "avoid : them if you have no good reason".) It means "Don't make white space changes because you can, make them because you have some other reason for changing the code." If you are just reading something and notice a space out of whack, don't bother. If you are debugging the code, fixing a bug, adding a feature, go ahead and fix that too: but make two commits. Warner From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 21:16:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C77571065678; Tue, 6 Jan 2009 21:16:42 +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 B55DC8FC13; Tue, 6 Jan 2009 21:16:42 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06LGg6H042137; Tue, 6 Jan 2009 21:16:42 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06LGgE8042136; Tue, 6 Jan 2009 21:16:42 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901062116.n06LGgE8042136@svn.freebsd.org> From: "Simon L. Nielsen" Date: Tue, 6 Jan 2009 21:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186839 - head/sbin/md5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 21:16:43 -0000 Author: simon Date: Tue Jan 6 21:16:42 2009 New Revision: 186839 URL: http://svn.freebsd.org/changeset/base/186839 Log: Minor markup fix for the r186836 update. Modified: head/sbin/md5/md5.1 Modified: head/sbin/md5/md5.1 ============================================================================== --- head/sbin/md5/md5.1 Tue Jan 6 20:19:49 2009 (r186838) +++ head/sbin/md5/md5.1 Tue Jan 6 21:16:42 2009 (r186839) @@ -55,7 +55,8 @@ This also means that .Tn MD5 should not be used as part of a cryptographic signature scheme. At the current time (2009-01-06) there is no publicly known method to -"reverse" MD5, i.e., to find an input given a hash value. +.Dq reverse +MD5, i.e., to find an input given a hash value. .Pp .Tn SHA-1 currently (2009-01-06) has no known collisions, but an attack has been From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 21:34:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41385106566B; Tue, 6 Jan 2009 21:34:54 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1CD8FC16; Tue, 6 Jan 2009 21:34:54 +0000 (UTC) (envelope-from rodrigc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06LYrom042501; Tue, 6 Jan 2009 21:34:53 GMT (envelope-from rodrigc@svn.freebsd.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06LYrKW042499; Tue, 6 Jan 2009 21:34:53 GMT (envelope-from rodrigc@svn.freebsd.org) Message-Id: <200901062134.n06LYrKW042499@svn.freebsd.org> From: Craig Rodrigues Date: Tue, 6 Jan 2009 21:34:53 +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: r186840 - in stable/7/sys: . contrib/pf dev/cxgb kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 21:34:55 -0000 Author: rodrigc Date: Tue Jan 6 21:34:53 2009 New Revision: 186840 URL: http://svn.freebsd.org/changeset/base/186840 Log: MFC 184700: Add DTrace probes for process execution. This covers cases tested by the DTrace test suite. Approved by: jb Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_exec.c stable/7/sys/kern/vfs_syscalls.c stable/7/sys/sys/copyright.h (props changed) Modified: stable/7/sys/kern/kern_exec.c ============================================================================== --- stable/7/sys/kern/kern_exec.c Tue Jan 6 21:16:42 2009 (r186839) +++ stable/7/sys/kern/kern_exec.c Tue Jan 6 21:34:53 2009 (r186840) @@ -363,8 +363,6 @@ do_execve(td, args, mac_p) imgp->image_header = NULL; - SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 ); - /* * Translate the file name. namei() returns a vnode pointer * in ni_vp amoung other things. @@ -376,6 +374,8 @@ do_execve(td, args, mac_p) NDINIT(ndp, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME | MPSAFE | AUDITVNODE1, UIO_SYSSPACE, args->fname, td); + SDT_PROBE(proc, kernel, , exec, args->fname, 0, 0, 0, 0 ); + interpret: error = namei(ndp); if (error) @@ -749,6 +749,7 @@ interpret: vfs_mark_atime(imgp->vp, td); + SDT_PROBE(proc, kernel, , exec_success, args->fname, 0, 0, 0, 0); done1: /* * Free any resources malloc'd earlier that we didn't use. @@ -760,8 +761,6 @@ done1: crfree(newcred); VOP_UNLOCK(imgp->vp, 0, td); - SDT_PROBE(proc, kernel, , exec_success, args->fname, 0, 0, 0, 0); - /* * Handle deferred decrement of ref counts. */ Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Tue Jan 6 21:16:42 2009 (r186839) +++ stable/7/sys/kern/vfs_syscalls.c Tue Jan 6 21:34:53 2009 (r186840) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_kdtrace.h" #include "opt_ktrace.h" #include "opt_mac.h" @@ -58,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -82,6 +84,14 @@ __FBSDID("$FreeBSD$"); #include #include +SDT_PROVIDER_DEFINE(vfs); +SDT_PROBE_DEFINE(vfs, , stat, mode); +SDT_PROBE_ARGTYPE(vfs, , stat, mode, 0, "char *"); +SDT_PROBE_ARGTYPE(vfs, , stat, mode, 1, "int"); +SDT_PROBE_DEFINE(vfs, , stat, reg); +SDT_PROBE_ARGTYPE(vfs, , stat, reg, 0, "char *"); +SDT_PROBE_ARGTYPE(vfs, , stat, reg, 1, "int"); + static int chroot_refuse_vdir_fds(struct filedesc *fdp); static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); static int setfown(struct thread *td, struct vnode *, uid_t, gid_t); @@ -2114,6 +2124,11 @@ kern_stat(struct thread *td, char *path, return (error); vfslocked = NDHASGIANT(&nd); error = vn_stat(nd.ni_vp, &sb, td->td_ucred, NOCRED, td); + if (!error) { + SDT_PROBE(vfs, , stat, mode, path, sb.st_mode, 0, 0, 0); + if (S_ISREG(sb.st_mode)) + SDT_PROBE(vfs, , stat, reg, path, pathseg, 0, 0, 0); + } NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_vp); VFS_UNLOCK_GIANT(vfslocked); From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 21:53:01 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDE57106564A; Tue, 6 Jan 2009 21:53:01 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 896A28FC1A; Tue, 6 Jan 2009 21:53:01 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.3/8.14.2) with ESMTP id n06LjbGZ016412; Tue, 6 Jan 2009 16:45:37 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.3/8.14.2/Submit) id n06LjbvO016411; Tue, 6 Jan 2009 16:45:37 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Tue, 6 Jan 2009 16:45:37 -0500 From: David Schultz To: Marcel Moolenaar Message-ID: <20090106214537.GA16219@zim.MIT.EDU> Mail-Followup-To: Marcel Moolenaar , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG References: <200812232220.mBNMKx62015133@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812232220.mBNMKx62015133@svn.freebsd.org> Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, src-committers@FreeBSD.ORG Subject: Re: svn commit: r186461 - in head: lib/libc/arm lib/libc/include lib/msun/src sys/arm/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 21:53:02 -0000 On Tue, Dec 23, 2008, Marcel Moolenaar wrote: > Author: marcel > Date: Tue Dec 23 22:20:59 2008 > New Revision: 186461 > URL: http://svn.freebsd.org/changeset/base/186461 > > Log: > Add support for the FPA floating-point format on ARM. The > FPA floating-point format is identical to the VFP format, > but is always stored in big-endian. > Introduce _IEEE_WORD_ORDER to describe the byte-order of > the FP representation. There may be a few other files that assume that the word order and the byte order are the same, e.g., lib/libc/arm/gen/infinity.c lib/libc/gen/ldexp.c lib/msun/src/s_cbrt.c lib/msun/src/s_nan.c The last three ideally shouldn't... From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 22:02:32 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E07C10656E0; Tue, 6 Jan 2009 22:02:32 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id EC7318FC19; Tue, 6 Jan 2009 22:02:30 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n06M2T8T051834 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 14:02:30 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963D4E9.707@FreeBSD.org> Date: Tue, 06 Jan 2009 14:02:17 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> In-Reply-To: <200901061510.n06FAQ0g034585@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:02:35 -0000 Luigi Rizzo wrote: > +# through getenv() (or kenv(1) in userland). The format of the file > +# is 'variable=value' , same as for hints files. What do you think about extending comment with the following: "hints files" -> "hints or loader.conf(5) files". -Maxim From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 22:18:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B083A106564A; Tue, 6 Jan 2009 22:18:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2A38FC0C; Tue, 6 Jan 2009 22:18:24 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06MIOOx043409; Tue, 6 Jan 2009 22:18:24 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06MIOvp043408; Tue, 6 Jan 2009 22:18:24 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901062218.n06MIOvp043408@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 22:18:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186841 - head/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:18:25 -0000 Author: bz Date: Tue Jan 6 22:18:24 2009 New Revision: 186841 URL: http://svn.freebsd.org/changeset/base/186841 Log: Put the devfs ruleset next to devfs enable, add a comment about the suggested ruleset[1]. While here use an IP from the 'test-net' prefix for docs. PR: kern/130102 ([1] different problem in the end) Reviewed by: simon MFC after: 2 weeks Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Tue Jan 6 21:34:53 2009 (r186840) +++ head/etc/defaults/rc.conf Tue Jan 6 22:18:24 2009 (r186841) @@ -622,7 +622,7 @@ jail_sysvipc_allow="NO" # Allow SystemV # #jail_example_rootdir="/usr/jail/default" # Jail's root directory #jail_example_hostname="default.domain.com" # Jail's hostname -#jail_example_ip="192.168.0.10" # Jail's IP number +#jail_example_ip="192.0.2.10" # Jail's IP number #jail_example_interface="" # Interface to create the IP alias on #jail_example_fib="0" # routing table for setfib(1) #jail_example_exec_start="/bin/sh /etc/rc" # command to execute in jail for starting @@ -631,10 +631,11 @@ jail_sysvipc_allow="NO" # Allow SystemV # specified using a trailing number #jail_example_exec_stop="/bin/sh /etc/rc.shutdown" # command to execute in jail for stopping #jail_example_devfs_enable="NO" # mount devfs in the jail +#jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail - + # usually you want "devfsrules_jail". #jail_example_fdescfs_enable="NO" # mount fdescfs in the jail #jail_example_procfs_enable="NO" # mount procfs in jail #jail_example_mount_enable="NO" # mount/umount jail's fs -#jail_example_devfs_ruleset="ruleset_name" # devfs ruleset to apply to jail #jail_example_fstab="" # fstab(5) for mount/umount #jail_example_flags="-l -U root" # flags for jail(8) From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 22:42:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D57A2106566C; Tue, 6 Jan 2009 22:42:01 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 9313E8FC25; Tue, 6 Jan 2009 22:42:01 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 0324173098; Tue, 6 Jan 2009 23:46:59 +0100 (CET) Date: Tue, 6 Jan 2009 23:46:58 +0100 From: Luigi Rizzo To: Maxim Sobolev Message-ID: <20090106224658.GB3130@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963D4E9.707@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:42:02 -0000 On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: > Luigi Rizzo wrote: > >+# through getenv() (or kenv(1) in userland). The format of the file > >+# is 'variable=value' , same as for hints files. > > What do you think about extending comment with the following: > > "hints files" -> "hints or loader.conf(5) files". i don't know -- in fact, I have a curiosity here: loader.conf is processed by some code in loader.4th which in turn is interpreted by loader.conf, and this chain does some magic on certain variable names (and can also do $variable expansion). Instead, I believe that 'hints' (and presumably 'env' values) are passed directly to the kernel, so there are no special manipulation of variable names or values. Is that correct ? cheers luigi From owner-svn-src-all@FreeBSD.ORG Tue Jan 6 23:05:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C89F51065686; Tue, 6 Jan 2009 23:05:28 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98E068FC13; Tue, 6 Jan 2009 23:05:28 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n06N5SaT044357; Tue, 6 Jan 2009 23:05:28 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n06N5SuT044356; Tue, 6 Jan 2009 23:05:28 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901062305.n06N5SuT044356@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 6 Jan 2009 23:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186842 - in stable/7/sys: . contrib/pf dev/cxgb sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 23:05:31 -0000 Author: bz Date: Tue Jan 6 23:05:28 2009 New Revision: 186842 URL: http://svn.freebsd.org/changeset/base/186842 Log: Move mergeinfo for r186587 from sys/sys/copyright.h to sys/. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/sys/copyright.h (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:09:15 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31C28106566C; Wed, 7 Jan 2009 00:09:15 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id EA8888FC12; Wed, 7 Jan 2009 00:09:14 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n0709CdA058242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 16:09:13 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963F29B.4070001@FreeBSD.org> Date: Tue, 06 Jan 2009 16:08:59 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> In-Reply-To: <20090106224658.GB3130@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:09:16 -0000 Luigi Rizzo wrote: > On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: >> Luigi Rizzo wrote: >>> +# through getenv() (or kenv(1) in userland). The format of the file >>> +# is 'variable=value' , same as for hints files. >> What do you think about extending comment with the following: >> >> "hints files" -> "hints or loader.conf(5) files". > > i don't know -- in fact, I have a curiosity here: > loader.conf is processed by some code in loader.4th which in turn > is interpreted by loader.conf, and this chain does some magic > on certain variable names (and can also do $variable expansion). > > Instead, I believe that 'hints' (and presumably 'env' values) are > passed directly to the kernel, so there are no special manipulation > of variable names or values. Is that correct ? That's true, however if loader doesn't have any handling logic for a certain valuable it simply sets kenv (aka kernel tunable). Take a look at the loader.conf(5) for example. -Maxim From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:25:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E679106566B; Wed, 7 Jan 2009 00:25:35 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 2A0F98FC14; Wed, 7 Jan 2009 00:25:34 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 3335A73098; Wed, 7 Jan 2009 01:30:33 +0100 (CET) Date: Wed, 7 Jan 2009 01:30:33 +0100 From: Luigi Rizzo To: Maxim Sobolev Message-ID: <20090107003033.GA5795@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963F29B.4070001@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:25:36 -0000 On Tue, Jan 06, 2009 at 04:08:59PM -0800, Maxim Sobolev wrote: > Luigi Rizzo wrote: > >On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: > >>Luigi Rizzo wrote: > >>>+# through getenv() (or kenv(1) in userland). The format of the file > >>>+# is 'variable=value' , same as for hints files. > >>What do you think about extending comment with the following: > >> > >>"hints files" -> "hints or loader.conf(5) files". > > > >i don't know -- in fact, I have a curiosity here: > >loader.conf is processed by some code in loader.4th which in turn > >is interpreted by loader.conf, and this chain does some magic > >on certain variable names (and can also do $variable expansion). > > > >Instead, I believe that 'hints' (and presumably 'env' values) are > >passed directly to the kernel, so there are no special manipulation > >of variable names or values. Is that correct ? > > That's true, however if loader doesn't have any handling logic for a > certain valuable it simply sets kenv (aka kernel tunable). Take a look > at the loader.conf(5) for example. ok, but all we need to say is the following: The file can contain lines of the form name = "value" # this is a coment where whitespace around name and '=' is ignored, and so is everything after a '#' character. Almost any printable character except '=' is acceptable as part of a name. Quotes are optional and necessary only if the value contains whitespace. so why don't we just say that in the kenv(1) manpage (and refer to that) instead of referring to loader.conf which contains a lot of stuff that does not apply in this case ? cheers luigi From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:34:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FC76106566B; Wed, 7 Jan 2009 00:34:59 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 5AF018FC12; Wed, 7 Jan 2009 00:34:59 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id B6C0473098; Wed, 7 Jan 2009 01:39:57 +0100 (CET) Date: Wed, 7 Jan 2009 01:39:57 +0100 From: Luigi Rizzo To: "Bjoern A. Zeeb" Message-ID: <20090107003957.GA6307@onelab2.iet.unipi.it> References: <200901052009.n05K9soF009621@svn.freebsd.org> <20090106190220.I45399@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090106190220.I45399@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186789 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:35:00 -0000 On Tue, Jan 06, 2009 at 07:04:25PM +0000, Bjoern A. Zeeb wrote: > On Mon, 5 Jan 2009, Luigi Rizzo wrote: > > >Author: luigi > >Date: Mon Jan 5 20:09:54 2009 > >New Revision: 186789 > >URL: http://svn.freebsd.org/changeset/base/186789 > > > >Log: > > This patch introduces a number of simplifications to the Forth > > functions used in the bootloader. The goal is to make the code more > > readable and smaller (especially because we have size issues > > in the loader's environment). > > ... > > > It's waay to chatty now... I guess some debug stuff slipped in? > > -- starting on > get_file_name has /boot/defaults/loader.conf > ----- Trying conf /boot/defaults/loader.conf > Loading /boot/defaults/loader.conf > -- starting on /boot/loader.conf.local> > get_file_name has /boot/device.hints > ----- Trying conf /boot/device.hints > get_file_name has /boot/loader.conf > ----- Trying conf /boot/loader.conf > ;get_file_name has /boot/loader.conf.local > ----- Trying conf /boot/loader.conf.local whoops... sorry! try the following patch, i will commit it tomorrow after testing (you can actually kill the lines altogether if you like) cheers luigi Index: support.4th =================================================================== --- support.4th (revision 186797) +++ support.4th (working copy) @@ -820,7 +820,7 @@ \ Interface to loading conf files : load_conf ( addr len -- ) - ." ----- Trying conf " 2dup type cr + \ ." ----- Trying conf " 2dup type cr \ debugging 0 to end_of_file? reset_line_reading O_RDONLY fopen fd ! @@ -912,7 +912,7 @@ \ loader_conf_files processing support functions : get_conf_files ( -- addr len ) \ put addr/len on stack, reset var - ." -- starting on <" conf_files strtype ." >" cr + \ ." -- starting on <" conf_files strtype ." >" cr \ debugging conf_files strget 0 0 conf_files strset ; @@ -939,8 +939,7 @@ pos char+ to pos repeat addr len pos addr r@ + pos r> - - 2dup - ." get_file_name has " type cr + \ 2dup ." get_file_name has " type cr \ debugging ; : get_next_file ( addr len ptr -- addr len ptr' addr' len' | 0 ) From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:37:16 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2E33106566C; Wed, 7 Jan 2009 00:37:16 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7B08FC12; Wed, 7 Jan 2009 00:37:16 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n070bE38059626 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 16:37:15 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963F92E.1040708@FreeBSD.org> Date: Tue, 06 Jan 2009 16:37:02 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Luigi Rizzo References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> <20090107003033.GA5795@onelab2.iet.unipi.it> In-Reply-To: <20090107003033.GA5795@onelab2.iet.unipi.it> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:37:17 -0000 Luigi Rizzo wrote: > On Tue, Jan 06, 2009 at 04:08:59PM -0800, Maxim Sobolev wrote: >> Luigi Rizzo wrote: >>> On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: >>>> Luigi Rizzo wrote: >>>>> +# through getenv() (or kenv(1) in userland). The format of the file >>>>> +# is 'variable=value' , same as for hints files. >>>> What do you think about extending comment with the following: >>>> >>>> "hints files" -> "hints or loader.conf(5) files". >>> i don't know -- in fact, I have a curiosity here: >>> loader.conf is processed by some code in loader.4th which in turn >>> is interpreted by loader.conf, and this chain does some magic >>> on certain variable names (and can also do $variable expansion). >>> >>> Instead, I believe that 'hints' (and presumably 'env' values) are >>> passed directly to the kernel, so there are no special manipulation >>> of variable names or values. Is that correct ? >> That's true, however if loader doesn't have any handling logic for a >> certain valuable it simply sets kenv (aka kernel tunable). Take a look >> at the loader.conf(5) for example. > > ok, but all we need to say is the following: > > The file can contain lines of the form > > name = "value" # this is a coment > > where whitespace around name and '=' is ignored, and so is > everything after a '#' character. Almost any printable > character except '=' is acceptable as part of a name. Quotes > are optional and necessary only if the value contains > whitespace. > > so why don't we just say that in the kenv(1) manpage (and refer to > that) instead of referring to loader.conf which contains a lot of > stuff that does not apply in this case ? My main point is that usually people set those tunables not in "hints files" but in loader.conf, so that if you refer to hints you should also need to mention loader.conf. In fact I guess that many people may not even know about what "hints files" are. -Maxim From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:43:20 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E921106566B; Wed, 7 Jan 2009 00:43:20 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 4743C8FC08; Wed, 7 Jan 2009 00:43:20 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.38] (S0106001372fd1e07.vs.shawcable.net [70.71.171.106]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n070hIxM059920 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Jan 2009 16:43:19 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <4963FA9A.8030208@FreeBSD.org> Date: Tue, 06 Jan 2009 16:43:06 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> <20090107003033.GA5795@onelab2.iet.unipi.it> <4963F92E.1040708@FreeBSD.org> In-Reply-To: <4963F92E.1040708@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Luigi Rizzo , src-committers@FreeBSD.org, Luigi Rizzo , svn-src-all@FreeBSD.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:43:21 -0000 Maxim Sobolev wrote: > Luigi Rizzo wrote: >> On Tue, Jan 06, 2009 at 04:08:59PM -0800, Maxim Sobolev wrote: >>> Luigi Rizzo wrote: >>>> On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: >>>>> Luigi Rizzo wrote: >>>>>> +# through getenv() (or kenv(1) in userland). The format of the file >>>>>> +# is 'variable=value' , same as for hints files. >>>>> What do you think about extending comment with the following: >>>>> >>>>> "hints files" -> "hints or loader.conf(5) files". >>>> i don't know -- in fact, I have a curiosity here: >>>> loader.conf is processed by some code in loader.4th which in turn >>>> is interpreted by loader.conf, and this chain does some magic >>>> on certain variable names (and can also do $variable expansion). >>>> >>>> Instead, I believe that 'hints' (and presumably 'env' values) are >>>> passed directly to the kernel, so there are no special manipulation >>>> of variable names or values. Is that correct ? >>> That's true, however if loader doesn't have any handling logic for a >>> certain valuable it simply sets kenv (aka kernel tunable). Take a >>> look at the loader.conf(5) for example. >> >> ok, but all we need to say is the following: >> >> The file can contain lines of the form >> >> name = "value" # this is a coment >> >> where whitespace around name and '=' is ignored, and so is >> everything after a '#' character. Almost any printable >> character except '=' is acceptable as part of a name. Quotes >> are optional and necessary only if the value contains >> whitespace. >> >> so why don't we just say that in the kenv(1) manpage (and refer to >> that) instead of referring to loader.conf which contains a lot of >> stuff that does not apply in this case ? > > My main point is that usually people set those tunables not in "hints > files" but in loader.conf, so that if you refer to hints you should also > need to mention loader.conf. In fact I guess that many people may not > even know about what "hints files" are. Forgot to mention that IMHO another reason why loader.conf(5) is a good reference is that it describes purpose of many of the commonly used tunables. -Maxim From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:51:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB5D71065672; Wed, 7 Jan 2009 00:51:41 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 985E28FC0C; Wed, 7 Jan 2009 00:51:41 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070pf4G046279; Wed, 7 Jan 2009 00:51:41 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070pf7g046278; Wed, 7 Jan 2009 00:51:41 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070051.n070pf7g046278@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186843 - head/sbin/ping X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:51:42 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:51:41 2009 New Revision: 186843 URL: http://svn.freebsd.org/changeset/base/186843 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/sbin/ping/ping.8 Modified: head/sbin/ping/ping.8 ============================================================================== --- head/sbin/ping/ping.8 Tue Jan 6 23:05:28 2009 (r186842) +++ head/sbin/ping/ping.8 Wed Jan 7 00:51:41 2009 (r186843) @@ -503,7 +503,7 @@ packets that they use for packets, for example either 30 or 60. Others may use completely wild values. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility returns an exit status of zero if at least one response was From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:54:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91C811065670; Wed, 7 Jan 2009 00:54:30 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F0C78FC1A; Wed, 7 Jan 2009 00:54:30 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070sUYF046360; Wed, 7 Jan 2009 00:54:30 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070sUMg046359; Wed, 7 Jan 2009 00:54:30 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070054.n070sUMg046359@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186844 - head/usr.sbin/rtsold X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:54:31 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:54:30 2009 New Revision: 186844 URL: http://svn.freebsd.org/changeset/base/186844 Log: - rename the RETURN VALUES section to EXIT STATUS [1] - convert to .Ex macro - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/rtsold/rtsold.8 Modified: head/usr.sbin/rtsold/rtsold.8 ============================================================================== --- head/usr.sbin/rtsold/rtsold.8 Wed Jan 7 00:51:41 2009 (r186843) +++ head/usr.sbin/rtsold/rtsold.8 Wed Jan 7 00:54:30 2009 (r186844) @@ -220,10 +220,8 @@ must be the absolute path from root to t file, and be created by the same owner who runs .Nm . .El -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .\" .Sh FILES .Bl -tag -width /var/run/rtsold.dump -compact From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:54:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BB81106564A; Wed, 7 Jan 2009 00:54:56 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 35F8A8FC0C; Wed, 7 Jan 2009 00:54:56 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 9D1BE7309E; Wed, 7 Jan 2009 01:59:54 +0100 (CET) Date: Wed, 7 Jan 2009 01:59:54 +0100 From: Luigi Rizzo To: Maxim Sobolev Message-ID: <20090107005954.GA6567@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> <4963F29B.4070001@FreeBSD.org> <20090107003033.GA5795@onelab2.iet.unipi.it> <4963F92E.1040708@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4963F92E.1040708@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:54:57 -0000 On Tue, Jan 06, 2009 at 04:37:02PM -0800, Maxim Sobolev wrote: > Luigi Rizzo wrote: ... > >ok, but all we need to say is the following: > > > > The file can contain lines of the form > > > > name = "value" # this is a coment > > > > where whitespace around name and '=' is ignored, and so is > > everything after a '#' character. Almost any printable > > character except '=' is acceptable as part of a name. Quotes > > are optional and necessary only if the value contains > > whitespace. > > > >so why don't we just say that in the kenv(1) manpage (and refer to > >that) instead of referring to loader.conf which contains a lot of > >stuff that does not apply in this case ? > > My main point is that usually people set those tunables not in "hints > files" but in loader.conf, so that if you refer to hints you should also > need to mention loader.conf. In fact I guess that many people may not > even know about what "hints files" are. Point taken. "hints file" is definitely a wrong name and I will rephrase the comment. But I'd like to document things in a way that reduces confusion: /boot/loader and loader.conf are completely out of the loop in processing this config directive (and so they are when processing the "hints" directive), so I don't think they are a good first reference. I think the proper place is one of the kenv([12]) pages, which in turn should mention or refer loader.conf in the same way as it is done in device.hints(5) cheers luigi From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:57:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69FB71065670; Wed, 7 Jan 2009 00:57:27 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 575CC8FC25; Wed, 7 Jan 2009 00:57:27 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070vRsn046467; Wed, 7 Jan 2009 00:57:27 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070vRTp046466; Wed, 7 Jan 2009 00:57:27 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070057.n070vRTp046466@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:57:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186845 - head/usr.sbin/traceroute6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:57:28 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:57:27 2009 New Revision: 186845 URL: http://svn.freebsd.org/changeset/base/186845 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/traceroute6/traceroute6.8 Modified: head/usr.sbin/traceroute6/traceroute6.8 ============================================================================== --- head/usr.sbin/traceroute6/traceroute6.8 Wed Jan 7 00:54:30 2009 (r186844) +++ head/usr.sbin/traceroute6/traceroute6.8 Wed Jan 7 00:57:27 2009 (r186845) @@ -162,7 +162,7 @@ This was more interesting in the IPv4 ca where some IP stack bugs could be identified by this behaviour. .El .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility will exit with 0 on success, and non-zero on errors. From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:58:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 775B01065675; Wed, 7 Jan 2009 00:58:25 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6450E8FC1C; Wed, 7 Jan 2009 00:58:25 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070wPXH046520; Wed, 7 Jan 2009 00:58:25 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070wPDn046519; Wed, 7 Jan 2009 00:58:25 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070058.n070wPDn046519@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186846 - head/usr.sbin/rrenumd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:58:26 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:58:25 2009 New Revision: 186846 URL: http://svn.freebsd.org/changeset/base/186846 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/rrenumd/rrenumd.8 Modified: head/usr.sbin/rrenumd/rrenumd.8 ============================================================================== --- head/usr.sbin/rrenumd/rrenumd.8 Wed Jan 7 00:57:27 2009 (r186845) +++ head/usr.sbin/rrenumd/rrenumd.8 Wed Jan 7 00:58:25 2009 (r186846) @@ -82,7 +82,7 @@ Configuration information is obtained fr .It Fl c Ar conf_file Specify a configuration file where configuration information is kept. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, and non-zero on failures. .Sh SEE ALSO .Xr rrenumd.conf 5 , From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 00:59:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B52061065678; Wed, 7 Jan 2009 00:59:34 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A17108FC27; Wed, 7 Jan 2009 00:59:34 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n070xYZe046579; Wed, 7 Jan 2009 00:59:34 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n070xYV0046578; Wed, 7 Jan 2009 00:59:34 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070059.n070xYV0046578@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 00:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186847 - head/usr.sbin/mld6query X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 00:59:36 -0000 Author: danger (doc committer) Date: Wed Jan 7 00:59:34 2009 New Revision: 186847 URL: http://svn.freebsd.org/changeset/base/186847 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/usr.sbin/mld6query/mld6query.8 Modified: head/usr.sbin/mld6query/mld6query.8 ============================================================================== --- head/usr.sbin/mld6query/mld6query.8 Wed Jan 7 00:58:25 2009 (r186846) +++ head/usr.sbin/mld6query/mld6query.8 Wed Jan 7 00:59:34 2009 (r186847) @@ -75,7 +75,7 @@ similarly, MLD report packet will be tra .Fl dr options are for debugging purposes only. .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, non-zero on failures. .\" .\" .Sh SEE ALSO From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 01:01:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEB3C1065691; Wed, 7 Jan 2009 01:01:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB83E8FC16; Wed, 7 Jan 2009 01:01:26 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0711QYk046676; Wed, 7 Jan 2009 01:01:26 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0711QsN046675; Wed, 7 Jan 2009 01:01:26 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070101.n0711QsN046675@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 01:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186848 - head/usr.sbin/rtadvd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 01:01:27 -0000 Author: danger (doc committer) Date: Wed Jan 7 01:01:26 2009 New Revision: 186848 URL: http://svn.freebsd.org/changeset/base/186848 Log: - rename the RETURN VALUES section to EXIT STATUS [1] - convert to .Ex macro - not bumping a date as this is not a real content change Approved by: ru [1] MFC after: 3 days Modified: head/usr.sbin/rtadvd/rtadvd.8 Modified: head/usr.sbin/rtadvd/rtadvd.8 ============================================================================== --- head/usr.sbin/rtadvd/rtadvd.8 Wed Jan 7 00:59:34 2009 (r186847) +++ head/usr.sbin/rtadvd/rtadvd.8 Wed Jan 7 01:01:26 2009 (r186848) @@ -162,10 +162,8 @@ In this case, will transmit router advertisement with router lifetime 0 to all the interfaces .Pq in accordance with RFC2461 6.2.5 . -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .Sh FILES .Bl -tag -width Pa -compact .It Pa /etc/rtadvd.conf From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 01:03:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26AF91065672; Wed, 7 Jan 2009 01:03:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13F738FC13; Wed, 7 Jan 2009 01:03:24 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0713N3P046748; Wed, 7 Jan 2009 01:03:24 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0713NSW046747; Wed, 7 Jan 2009 01:03:23 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070103.n0713NSW046747@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 01:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186849 - head/bin/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 01:03:24 -0000 Author: danger (doc committer) Date: Wed Jan 7 01:03:23 2009 New Revision: 186849 URL: http://svn.freebsd.org/changeset/base/186849 Log: - rename the RETURN VALUES section to EXIT STATUS - not bumping a date as this is not a real content change Approved by: ru MFC after: 3 days Modified: head/bin/test/test.1 Modified: head/bin/test/test.1 ============================================================================== --- head/bin/test/test.1 Wed Jan 7 01:01:26 2009 (r186848) +++ head/bin/test/test.1 Wed Jan 7 01:03:23 2009 (r186849) @@ -310,7 +310,7 @@ are evaluated consistently according to standards document. All other cases are subject to the ambiguity in the command semantics. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility exits with one of the following values: From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 01:31:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8658B106564A; Wed, 7 Jan 2009 01:31:09 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 738148FC17; Wed, 7 Jan 2009 01:31:09 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n071V9C1047262; Wed, 7 Jan 2009 01:31:09 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n071V9ks047261; Wed, 7 Jan 2009 01:31:09 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901070131.n071V9ks047261@svn.freebsd.org> From: Daniel Gerzo Date: Wed, 7 Jan 2009 01:31:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186850 - head/usr.sbin/cpucontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 01:31:10 -0000 Author: danger (doc committer) Date: Wed Jan 7 01:31:09 2009 New Revision: 186850 URL: http://svn.freebsd.org/changeset/base/186850 Log: - use .Ex macro in EXIT STATUS section Modified: head/usr.sbin/cpucontrol/cpucontrol.8 Modified: head/usr.sbin/cpucontrol/cpucontrol.8 ============================================================================== --- head/usr.sbin/cpucontrol/cpucontrol.8 Wed Jan 7 01:03:23 2009 (r186849) +++ head/usr.sbin/cpucontrol/cpucontrol.8 Wed Jan 7 01:31:09 2009 (r186850) @@ -84,9 +84,7 @@ Increase the verbosity level. Show help message. .El .Sh EXIT STATUS -The -.Nm -utility exits 0 on success, and >0 if an error occurs. +.Ex -std .Sh EXAMPLES The command .Pp From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 03:15:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE607106566B; Wed, 7 Jan 2009 03:15:22 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC41F8FC1B; Wed, 7 Jan 2009 03:15:22 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n073FMea049674; Wed, 7 Jan 2009 03:15:22 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n073FM6E049672; Wed, 7 Jan 2009 03:15:22 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200901070315.n073FM6E049672@svn.freebsd.org> From: Rong-En Fan Date: Wed, 7 Jan 2009 03:15:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186851 - in head/sys: conf dev/sound/pci modules/sound/driver/au88x0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 03:15:23 -0000 Author: rafan Date: Wed Jan 7 03:15:22 2009 New Revision: 186851 URL: http://svn.freebsd.org/changeset/base/186851 Log: - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel module. These files cause manual interaction when building ports/audio/aureal-kmod which provides a usable i386-only driver (it requires linking against some linux object files distributed by vendor which bankrupted back in 2000). MFC after: 1 week Deleted: head/sys/dev/sound/pci/au88x0.c head/sys/dev/sound/pci/au88x0.h head/sys/modules/sound/driver/au88x0/ Modified: head/sys/conf/NOTES head/sys/conf/files Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jan 7 01:31:09 2009 (r186850) +++ head/sys/conf/NOTES Wed Jan 7 03:15:22 2009 (r186851) @@ -1984,8 +1984,6 @@ device sound # snd_ad1816: Analog Devices AD1816 ISA PnP/non-PnP. # snd_als4000: Avance Logic ALS4000 PCI. # snd_atiixp: ATI IXP 200/300/400 PCI. -# snd_au88x0 Aureal Vortex 1/2/Advantage PCI. This driver -# lacks support for playback and recording. # snd_audiocs: Crystal Semiconductor CS4231 SBus/EBus. Only # for sparc64. # snd_cmi: CMedia CMI8338/CMI8738 PCI. @@ -2029,7 +2027,6 @@ device sound device snd_ad1816 device snd_als4000 device snd_atiixp -#device snd_au88x0 #device snd_audiocs device snd_cmi device snd_cs4281 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jan 7 01:31:09 2009 (r186850) +++ head/sys/conf/files Wed Jan 7 03:15:22 2009 (r186851) @@ -1337,7 +1337,6 @@ dev/sound/isa/sbc.c optional snd_sbc is dev/sound/isa/sndbuf_dma.c optional sound isa dev/sound/pci/als4000.c optional snd_als4000 pci dev/sound/pci/atiixp.c optional snd_atiixp pci -#dev/sound/pci/au88x0.c optional snd_au88x0 pci dev/sound/pci/cmi.c optional snd_cmi pci dev/sound/pci/cs4281.c optional snd_cs4281 pci dev/sound/pci/csa.c optional snd_csa pci \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 09:50:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 524BC106566B; Wed, 7 Jan 2009 09:50:58 +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 26FDA8FC0C; Wed, 7 Jan 2009 09:50:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n079owVP057894; Wed, 7 Jan 2009 09:50:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n079owcb057893; Wed, 7 Jan 2009 09:50:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901070950.n079owcb057893@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 09:50:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186853 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 09:50:59 -0000 Author: mav Date: Wed Jan 7 09:50:57 2009 New Revision: 186853 URL: http://svn.freebsd.org/changeset/base/186853 Log: Hook up sdhci man page to the build. Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Jan 7 09:17:25 2009 (r186852) +++ head/share/man/man4/Makefile Wed Jan 7 09:50:57 2009 (r186853) @@ -316,6 +316,7 @@ MAN= aac.4 \ screen.4 \ scsi.4 \ sctp.4 \ + sdhci.4 \ sem.4 \ ses.4 \ sf.4 \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 09:56:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C92106564A; Wed, 7 Jan 2009 09:56:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EBC18FC17; Wed, 7 Jan 2009 09:56:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n079us3v058082; Wed, 7 Jan 2009 09:56:54 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n079ushE058081; Wed, 7 Jan 2009 09:56:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901070956.n079ushE058081@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 7 Jan 2009 09:56:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186854 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 09:56:55 -0000 Author: bz Date: Wed Jan 7 09:56:54 2009 New Revision: 186854 URL: http://svn.freebsd.org/changeset/base/186854 Log: Using KMODOWN/KMODGRP rather than hard coding root/wheel for installing the kernel allows one, like with modules, to override the default user/group and install as non-su to a temporary directory to test, create images or seed a tftp dir. Reviewed by: Andrzej Tobola MFC after: 4 weeks Modified: head/sys/conf/kern.post.mk Modified: head/sys/conf/kern.post.mk ============================================================================== --- head/sys/conf/kern.post.mk Wed Jan 7 09:50:57 2009 (r186853) +++ head/sys/conf/kern.post.mk Wed Jan 7 09:56:54 2009 (r186854) @@ -217,21 +217,21 @@ kernel-install: fi .endif mkdir -p ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR} .endif kernel-reinstall: @-chflags -R noschg ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR} .if defined(DEBUG) && !defined(INSTALL_NODEBUG) - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR} .endif config.o env.o hints.o vers.o vnode_if.o: From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 10:15:23 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C96A1065670; Wed, 7 Jan 2009 10:15:23 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw1.york.ac.uk (mail-gw1.york.ac.uk [144.32.128.246]) by mx1.freebsd.org (Postfix) with ESMTP id 1ABF88FC14; Wed, 7 Jan 2009 10:15:22 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw7.york.ac.uk (mail-gw7.york.ac.uk [144.32.129.30]) by mail-gw1.york.ac.uk (8.13.6/8.13.6) with ESMTP id n07AFHtg008854; Wed, 7 Jan 2009 10:15:17 GMT Received: from buffy-128.york.ac.uk ([144.32.128.160] helo=buffy.york.ac.uk) by mail-gw7.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LKVRV-0006md-Iu; Wed, 07 Jan 2009 10:15:17 +0000 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.2/8.14.2) with ESMTP id n07AFH5m084899; Wed, 7 Jan 2009 10:15:17 GMT (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.2/8.14.2/Submit) id n07AFGPa084888; Wed, 7 Jan 2009 10:15:16 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Rong-En Fan In-Reply-To: <200901070315.n073FM6E049672@svn.freebsd.org> References: <200901070315.n073FM6E049672@svn.freebsd.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 07 Jan 2009 10:15:06 +0000 Message-Id: <1231323316.84852.0.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.22.2 FreeBSD GNOME Team Port X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186851 - in head/sys: conf dev/sound/pci modules/sound/driver/au88x0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 10:15:26 -0000 On Wed, 2009-01-07 at 03:15 +0000, Rong-En Fan wrote: > Author: rafan > Date: Wed Jan 7 03:15:22 2009 > New Revision: 186851 > URL: http://svn.freebsd.org/changeset/base/186851 > > Log: > - Remove snd_au88x0 which seems never got compiled into kernel nor as a kernel > module. These files cause manual interaction when building > ports/audio/aureal-kmod which provides a usable i386-only driver (it requires > linking against some linux object files distributed by vendor which bankrupted > back in 2000). PR: 124343 Gavin From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 11:04:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 564E71065670; Wed, 7 Jan 2009 11:04:58 +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 43D098FC17; Wed, 7 Jan 2009 11:04:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07B4vk6083827; Wed, 7 Jan 2009 11:04:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07B4vk7083826; Wed, 7 Jan 2009 11:04:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071104.n07B4vk7083826@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 11:04:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186855 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:04:59 -0000 Author: mav Date: Wed Jan 7 11:04:57 2009 New Revision: 186855 URL: http://svn.freebsd.org/changeset/base/186855 Log: Partially MFC rev. 172658 to reduce diff. Sort. Modified: stable/7/share/man/man4/Makefile Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Wed Jan 7 09:56:54 2009 (r186854) +++ stable/7/share/man/man4/Makefile Wed Jan 7 11:04:57 2009 (r186855) @@ -299,8 +299,8 @@ MAN= aac.4 \ sched_4bsd.4 \ sched_ule.4 \ screen.4 \ - sctp.4 \ scsi.4 \ + sctp.4 \ sem.4 \ ses.4 \ sf.4 \ @@ -330,8 +330,8 @@ MAN= aac.4 \ snd_gusc.4 \ snd_hda.4 \ snd_ich.4 \ - snd_maestro.4 \ snd_maestro3.4 \ + snd_maestro.4 \ snd_mss.4 \ snd_neomagic.4 \ snd_sbc.4 \ @@ -542,12 +542,12 @@ MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 MLINKS+=vr.4 if_vr.4 +MLINKS+=watchdog.4 SW_WATCHDOG.4 MLINKS+=wb.4 if_wb.4 MLINKS+=wi.4 if_wi.4 MLINKS+=${_wpi.4} ${_if_wpi.4} MLINKS+=xe.4 if_xe.4 MLINKS+=xl.4 if_xl.4 -MLINKS+=watchdog.4 SW_WATCHDOG.4 .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" _acpi_dock.4= acpi_dock.4 @@ -563,13 +563,13 @@ _if_nxge.4= if_nxge.4 _if_wpi.4= if_wpi.4 _ipmi.4= ipmi.4 _k8temp.4= k8temp.4 -_nfsmb.4= nfsmb.4 _nfe.4= nfe.4 +_nfsmb.4= nfsmb.4 _nve.4= nve.4 _nxge.4= nxge.4 _rr232x.4= rr232x.4 -_spkr.4= spkr.4 _speaker.4= speaker.4 +_spkr.4= spkr.4 _wpi.4= wpi.4 .endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 11:19:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1EF8106564A; Wed, 7 Jan 2009 11:19:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5F78FC13; Wed, 7 Jan 2009 11:19:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07BJIxH084240; Wed, 7 Jan 2009 11:19:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07BJIPk084239; Wed, 7 Jan 2009 11:19:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071119.n07BJIPk084239@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 11:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186856 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:19:19 -0000 Author: mav Date: Wed Jan 7 11:19:18 2009 New Revision: 186856 URL: http://svn.freebsd.org/changeset/base/186856 Log: MFC rev. 186855 Hook up sdhci man page to the build. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/Makefile stable/7/share/man/man4/igb.4 (props changed) Modified: stable/7/share/man/man4/Makefile ============================================================================== --- stable/7/share/man/man4/Makefile Wed Jan 7 11:04:57 2009 (r186855) +++ stable/7/share/man/man4/Makefile Wed Jan 7 11:19:18 2009 (r186856) @@ -301,6 +301,7 @@ MAN= aac.4 \ screen.4 \ scsi.4 \ sctp.4 \ + sdhci.4 \ sem.4 \ ses.4 \ sf.4 \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 11:44:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B962510656F5; Wed, 7 Jan 2009 11:44:03 +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 A5B9E8FC18; Wed, 7 Jan 2009 11:44:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Bi382084744; Wed, 7 Jan 2009 11:44:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Bi3A3084743; Wed, 7 Jan 2009 11:44:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071144.n07Bi3A3084743@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 11:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186857 - in stable/7/sys: . contrib/pf crypto/rc4 dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 11:44:04 -0000 Author: mav Date: Wed Jan 7 11:44:03 2009 New Revision: 186857 URL: http://svn.freebsd.org/changeset/base/186857 Log: MFC rev. 186179: Avoid 256 integer divisions per rc4_init() call. Replace it with using separate index variable. It gives more then double rc4_init() performance increase on tested i386 P4. It also gives about 15% speedup to PPTP VPN with stateless MPPE encryption (by ng_mppc) which calls rc4_init() for every packet. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/crypto/rc4/rc4.c stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/crypto/rc4/rc4.c ============================================================================== --- stable/7/sys/crypto/rc4/rc4.c Wed Jan 7 11:19:18 2009 (r186856) +++ stable/7/sys/crypto/rc4/rc4.c Wed Jan 7 11:44:03 2009 (r186857) @@ -61,7 +61,7 @@ void rc4_init(struct rc4_state *const state, const u_char *key, int keylen) { u_char j; - int i; + int i, k; /* Initialize state with identity permutation */ for (i = 0; i < 256; i++) @@ -70,9 +70,11 @@ rc4_init(struct rc4_state *const state, state->index2 = 0; /* Randomize the permutation using key data */ - for (j = i = 0; i < 256; i++) { - j += state->perm[i] + key[i % keylen]; + for (j = i = k = 0; i < 256; i++) { + j += state->perm[i] + key[k]; swap_bytes(&state->perm[i], &state->perm[j]); + if (++k >= keylen) + k = 0; } } From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 12:38:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CBEA1065678; Wed, 7 Jan 2009 12:38:31 +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 797698FC1A; Wed, 7 Jan 2009 12:38:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07CcV4a085920; Wed, 7 Jan 2009 12:38:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07CcVke085919; Wed, 7 Jan 2009 12:38:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071238.n07CcVke085919@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 12:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186859 - in stable/7/sys: . contrib/pf dev/cxgb netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:38:32 -0000 Author: mav Date: Wed Jan 7 12:38:31 2009 New Revision: 186859 URL: http://svn.freebsd.org/changeset/base/186859 Log: MFC rev. 185723, 186189: Carefully handle memory errors to keep peers compression/encryption state consistent. There are some cases reported where peers fatally getting out of sync without any visible reason. I hope this solve the problem. Unroll two loops of SHA1Update(). 60 bytes of static memory is not a price. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_mppc.c Modified: stable/7/sys/netgraph/ng_mppc.c ============================================================================== --- stable/7/sys/netgraph/ng_mppc.c Wed Jan 7 11:54:00 2009 (r186858) +++ stable/7/sys/netgraph/ng_mppc.c Wed Jan 7 12:38:31 2009 (r186859) @@ -492,17 +492,18 @@ ng_mppc_compress(node_p node, struct mbu /* Work with contiguous regions of memory. */ inlen = m->m_pkthdr.len; inbuf = malloc(inlen, M_NETGRAPH_MPPC, M_NOWAIT); - if (inbuf == NULL) { - m_freem(m); - return (ENOMEM); - } + if (inbuf == NULL) + goto err1; m_copydata(m, 0, inlen, (caddr_t)inbuf); outlen = MPPC_MAX_BLOWUP(inlen); outbuf = malloc(outlen, M_NETGRAPH_MPPC, M_NOWAIT); if (outbuf == NULL) { - m_freem(m); free(inbuf, M_NETGRAPH_MPPC); +err1: + m_freem(m); + MPPC_InitCompressionHistory(d->history); + d->flushed = 1; return (ENOMEM); } @@ -538,8 +539,13 @@ ng_mppc_compress(node_p node, struct mbu free(outbuf, M_NETGRAPH_MPPC); /* Check m_devget() result. */ - if (m == NULL) + if (m == NULL) { + if (!d->flushed) { + MPPC_InitCompressionHistory(d->history); + d->flushed = 1; + } return (ENOMEM); + } } #endif @@ -551,6 +557,18 @@ ng_mppc_compress(node_p node, struct mbu /* Set header bits */ header |= MPPC_FLAG_ENCRYPTED; + /* We must own the mbuf chain exclusively to modify it. */ + m = m_unshare(m, M_DONTWAIT); + if (m == NULL) { + if (!d->flushed) { +#ifdef NETGRAPH_MPPC_COMPRESSION + MPPC_InitCompressionHistory(d->history); +#endif + d->flushed = 1; + } + return (ENOMEM); + } + /* Update key if it's time */ if ((d->cfg.bits & MPPE_STATELESS) != 0 || (d->cc & MPPE_UPDATE_MASK) == MPPE_UPDATE_FLAG) { @@ -562,11 +580,6 @@ ng_mppc_compress(node_p node, struct mbu rc4_init(&d->rc4, d->key, KEYLEN(d->cfg.bits)); } - /* We must own the mbuf chain exclusively to modify it. */ - m = m_unshare(m, M_DONTWAIT); - if (m == NULL) - return (ENOMEM); - /* Encrypt packet */ m1 = m; while (m1) { @@ -811,21 +824,24 @@ ng_mppc_reset_req(node_p node) static void ng_mppc_getkey(const u_char *h, u_char *h2, int len) { - static const u_char pad1[10] = - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; - static const u_char pad2[10] = - { 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, }; + static const u_char pad1[40] = + { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + static const u_char pad2[40] = + { 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, + 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2, 0xF2 }; u_char hash[20]; SHA1_CTX c; - int k; SHA1Init(&c); SHA1Update(&c, h, len); - for (k = 0; k < 4; k++) - SHA1Update(&c, pad1, sizeof(pad1)); + SHA1Update(&c, pad1, sizeof(pad1)); SHA1Update(&c, h2, len); - for (k = 0; k < 4; k++) - SHA1Update(&c, pad2, sizeof(pad2)); + SHA1Update(&c, pad2, sizeof(pad2)); SHA1Final(hash, &c); bcopy(hash, h2, len); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 12:44:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7643A1065675; Wed, 7 Jan 2009 12:44:03 +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 62DE68FC16; Wed, 7 Jan 2009 12:44:03 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Ci3iH086091; Wed, 7 Jan 2009 12:44:03 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Ci3RI086090; Wed, 7 Jan 2009 12:44:03 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901071244.n07Ci3RI086090@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Jan 2009 12:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186860 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 12:44:04 -0000 Author: kib Date: Wed Jan 7 12:44:03 2009 New Revision: 186860 URL: http://svn.freebsd.org/changeset/base/186860 Log: MFC r186600: In r185557, the check for existing negative entry for the given name did not compared nc_dvp with supplied parent directory vnode pointer. Add the check and note that now branches for vp != NULL and vp == NULL are the same, thus can be merged. Tested by: kensmith Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Wed Jan 7 12:38:31 2009 (r186859) +++ stable/7/sys/kern/vfs_cache.c Wed Jan 7 12:44:03 2009 (r186860) @@ -511,28 +511,18 @@ cache_enter(dvp, vp, cnp) CACHE_LOCK(); /* - * See if this vnode is already in the cache with this name. - * This can happen with concurrent lookups of the same path - * name. + * See if this vnode or negative entry is already in the cache + * with this name. This can happen with concurrent lookups of + * the same path name. */ - if (vp) { - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { - if (n2->nc_dvp == dvp && - n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } - } - } else { - TAILQ_FOREACH(n2, &ncneg, nc_dst) { - if (n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } + ncpp = NCHHASH(hash); + LIST_FOREACH(n2, ncpp, nc_hash) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; } } @@ -550,7 +540,6 @@ cache_enter(dvp, vp, cnp) * Insert the new namecache entry into the appropriate chain * within the cache entries table. */ - ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { hold = 1; From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 14:00:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22B2B1065672; Wed, 7 Jan 2009 14:00:45 +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 0FA288FC36; Wed, 7 Jan 2009 14:00:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07E0iTO087773; Wed, 7 Jan 2009 14:00:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07E0ikM087772; Wed, 7 Jan 2009 14:00:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901071400.n07E0ikM087772@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 7 Jan 2009 14:00: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: r186861 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 14:00:47 -0000 Author: kib Date: Wed Jan 7 14:00:44 2009 New Revision: 186861 URL: http://svn.freebsd.org/changeset/base/186861 Log: MFC r186600: In r185557, the check for existing negative entry for the given name did not compared nc_dvp with supplied parent directory vnode pointer. Add the check and note that now branches for vp != NULL and vp == NULL are the same, thus can be merged. Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_cache.c Modified: stable/6/sys/kern/vfs_cache.c ============================================================================== --- stable/6/sys/kern/vfs_cache.c Wed Jan 7 12:44:03 2009 (r186860) +++ stable/6/sys/kern/vfs_cache.c Wed Jan 7 14:00:44 2009 (r186861) @@ -526,28 +526,18 @@ cache_enter(dvp, vp, cnp) CACHE_LOCK(); /* - * See if this vnode is already in the cache with this name. - * This can happen with concurrent lookups of the same path - * name. + * See if this vnode or negative entry is already in the cache + * with this name. This can happen with concurrent lookups of + * the same path name. */ - if (vp) { - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { - if (n2->nc_dvp == dvp && - n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } - } - } else { - TAILQ_FOREACH(n2, &ncneg, nc_dst) { - if (n2->nc_nlen == cnp->cn_namelen && - !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { - CACHE_UNLOCK(); - cache_free(ncp); - return; - } + ncpp = NCHHASH(hash); + LIST_FOREACH(n2, ncpp, nc_hash) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; } } @@ -565,7 +555,6 @@ cache_enter(dvp, vp, cnp) * Insert the new namecache entry into the appropriate chain * within the cache entries table. */ - ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { hold = 1; From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 15:28:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 815EF1065670; Wed, 7 Jan 2009 15:28:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D2B08FC1F; Wed, 7 Jan 2009 15:28:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07FSlk2090714; Wed, 7 Jan 2009 15:28:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07FSlXM090711; Wed, 7 Jan 2009 15:28:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071528.n07FSlXM090711@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 15:28:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186862 - stable/7/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 15:28:48 -0000 Author: mav Date: Wed Jan 7 15:28:47 2009 New Revision: 186862 URL: http://svn.freebsd.org/changeset/base/186862 Log: Merge updated snd_hda driver version 20081226_0122 from CURRENT. This update gives: - multiple codec per HDA bus support; - multiple functional groups per codec support; - multiple audio devices per functional group support; - digital (SPDIF/HDMI) audio input/output support; - better UAA specification compliance with wide configureability; - headphones redirection controlled by UAA configuration instead of quirks; - improved codec parser, that gives working playback and recording with all of the long list of tested codecs and systems; - suspend/resume support; - part of multichannel audio support (requires OSS improvement to be used); Note, that due to added HDMI audio and logical audio devices support, updated driver often provides several PCM devices. In some cases it can make system default audio device no longer corresponding to the users's habbitual audio connectors. In such cases wanted device can be specified in audio application setup or defined globally via hw.snd.default_unit sysctl according to sound(4) man page. Additional information information about driver operation can be obtained from the updated man page and verbose boot messages. PR: kern/119181, kern/120144, kern/117599, kern/117729, kern/119671, kern/124645, kern/125822, kern/126217, kern/127105 Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h stable/7/sys/dev/sound/pci/hda/hdac.c stable/7/sys/dev/sound/pci/hda/hdac_private.h Modified: stable/7/sys/dev/sound/pci/hda/hda_reg.h ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hda_reg.h Wed Jan 7 14:00:44 2009 (r186861) +++ stable/7/sys/dev/sound/pci/hda/hda_reg.h Wed Jan 7 15:28:47 2009 (r186862) @@ -180,13 +180,14 @@ HDA_CMD_VERB_SET_CONV_FMT, (payload))) /* Digital Converter Control */ -#define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT 0xf0d +#define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT1 0xf0d +#define HDA_CMD_VERB_GET_DIGITAL_CONV_FMT2 0xf0e #define HDA_CMD_VERB_SET_DIGITAL_CONV_FMT1 0x70d #define HDA_CMD_VERB_SET_DIGITAL_CONV_FMT2 0x70e #define HDA_CMD_GET_DIGITAL_CONV_FMT(cad, nid) \ (HDA_CMD_12BIT((cad), (nid), \ - HDA_CMD_VERB_GET_DIGITAL_CONV_FMTT, 0x0)) + HDA_CMD_VERB_GET_DIGITAL_CONV_FMT1, 0x0)) #define HDA_CMD_SET_DIGITAL_CONV_FMT1(cad, nid, payload) \ (HDA_CMD_12BIT((cad), (nid), \ HDA_CMD_VERB_SET_DIGITAL_CONV_FMT1, (payload))) @@ -1034,7 +1035,7 @@ HDA_PARAM_PIN_CAP_HEADPHONE_CAP_SHIFT) #define HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP(param) \ (((param) & HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_MASK) >> \ - HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_MASK) + HDA_PARAM_PIN_CAP_PRESENCE_DETECT_CAP_SHIFT) #define HDA_PARAM_PIN_CAP_TRIGGER_REQD(param) \ (((param) & HDA_PARAM_PIN_CAP_TRIGGER_REQD_MASK) >> \ HDA_PARAM_PIN_CAP_TRIGGER_REQD_SHIFT) @@ -1193,14 +1194,47 @@ HDA_PARAM_VOLUME_KNOB_CAP_NUM_STEPS_SHIFT) -#define HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK 0x00000000f -#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK 0x0000000f0 -#define HDA_CONFIG_DEFAULTCONF_MISC_MASK 0x000000f00 -#define HDA_CONFIG_DEFAULTCONF_COLOR_MASK 0x00000f000 -#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK 0x000f00000 -#define HDA_CONFIG_DEFAULTCONF_DEVICE_MASK 0x000f00000 -#define HDA_CONFIG_DEFAULTCONF_LOCATION_MASK 0x03f000000 -#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK 0x0c0000000 +#define HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK 0x0000000f +#define HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT 0 +#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK 0x000000f0 +#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT 4 +#define HDA_CONFIG_DEFAULTCONF_MISC_MASK 0x00000f00 +#define HDA_CONFIG_DEFAULTCONF_MISC_SHIFT 8 +#define HDA_CONFIG_DEFAULTCONF_COLOR_MASK 0x0000f000 +#define HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT 12 +#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK 0x000f0000 +#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT 16 +#define HDA_CONFIG_DEFAULTCONF_DEVICE_MASK 0x00f00000 +#define HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT 20 +#define HDA_CONFIG_DEFAULTCONF_LOCATION_MASK 0x3f000000 +#define HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT 24 +#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK 0xc0000000 +#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT 30 + +#define HDA_CONFIG_DEFAULTCONF_SEQUENCE(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_SEQUENCE_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_SEQUENCE_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_ASSOCIATION(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_ASSOCIATION_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_ASSOCIATION_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_MISC(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_MISC_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_MISC_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_COLOR(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_CONNECTION_TYPE_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_DEVICE(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_LOCATION(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_LOCATION_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_LOCATION_SHIFT) +#define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY(conf) \ + (((conf) & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> \ + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT) #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK (0<<30) #define HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE (1<<30) Modified: stable/7/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- stable/7/sys/dev/sound/pci/hda/hdac.c Wed Jan 7 14:00:44 2009 (r186861) +++ stable/7/sys/dev/sound/pci/hda/hdac.c Wed Jan 7 15:28:47 2009 (r186862) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2006 Stephane E. Potvin * Copyright (c) 2006 Ariff Abdullah + * Copyright (c) 2008 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -61,6 +62,7 @@ * * Daniel Eischen * * * Maxime Guillaud * * * Ariff Abdullah * + * * Alexander Motin * * * * * * ....and various people from freebsd-multimedia@FreeBSD.org * * * * @@ -81,8 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20080420_0052" -#define HDA_WIDGET_PARSER_REV 1 +#define HDA_DRV_TEST_REV "20081226_0122" SND_DECLARE_FILE("$FreeBSD$"); @@ -92,6 +93,12 @@ SND_DECLARE_FILE("$FreeBSD$"); } \ } while(0) +#define HDA_BOOTHVERBOSE(stmt) do { \ + if (snd_verbose > 3) { \ + stmt \ + } \ +} while(0) + #if 1 #undef HDAC_INTR_EXTRA #define HDAC_INTR_EXTRA 1 @@ -141,6 +148,8 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) +#define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ @@ -153,6 +162,16 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_NVIDIA_MCP65_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x044b) #define HDA_NVIDIA_MCP67_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055c) #define HDA_NVIDIA_MCP67_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x055d) +#define HDA_NVIDIA_MCP78_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0774) +#define HDA_NVIDIA_MCP78_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0775) +#define HDA_NVIDIA_MCP78_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0776) +#define HDA_NVIDIA_MCP78_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0777) +#define HDA_NVIDIA_MCP73_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fc) +#define HDA_NVIDIA_MCP73_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x07fd) +#define HDA_NVIDIA_MCP79_1 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac0) +#define HDA_NVIDIA_MCP79_2 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac1) +#define HDA_NVIDIA_MCP79_3 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac2) +#define HDA_NVIDIA_MCP79_4 HDA_MODEL_CONSTRUCT(NVIDIA, 0x0ac3) #define HDA_NVIDIA_ALL HDA_MODEL_CONSTRUCT(NVIDIA, 0xffff) /* ATI */ @@ -171,6 +190,11 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_SIS_966 HDA_MODEL_CONSTRUCT(SIS, 0x7502) #define HDA_SIS_ALL HDA_MODEL_CONSTRUCT(SIS, 0xffff) +/* ULI */ +#define ULI_VENDORID 0x10b9 +#define HDA_ULI_M5461 HDA_MODEL_CONSTRUCT(ULI, 0x5461) +#define HDA_ULI_ALL HDA_MODEL_CONSTRUCT(ULI, 0xffff) + /* OEM/subvendors */ /* Intel */ @@ -195,6 +219,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define DELL_VENDORID 0x1028 #define DELL_D630_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01f9) #define DELL_D820_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01cc) +#define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227) #define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228) #define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) @@ -213,6 +238,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) +#define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) /* Asus */ @@ -260,6 +286,11 @@ SND_DECLARE_FILE("$FreeBSD$"); #define APPLE_VENDORID 0x106b #define APPLE_MB3_SUBVENDOR HDA_MODEL_CONSTRUCT(APPLE, 0x00a1) +/* Sony */ +#define SONY_VENDORID 0x104d +#define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) +#define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) + /* * Apple Intel MacXXXX seems using Sigmatel codec/vendor id * instead of their own, which is beyond my comprehension @@ -308,6 +339,7 @@ SND_DECLARE_FILE("$FreeBSD$"); /* Misc constants.. */ +#define HDA_AMP_VOL_DEFAULT (-1) #define HDA_AMP_MUTE_DEFAULT (0xffffffff) #define HDA_AMP_MUTE_NONE (0) #define HDA_AMP_MUTE_LEFT (1 << 0) @@ -317,16 +349,10 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_AMP_LEFT_MUTED(v) ((v) & (HDA_AMP_MUTE_LEFT)) #define HDA_AMP_RIGHT_MUTED(v) (((v) & HDA_AMP_MUTE_RIGHT) >> 1) -#define HDA_DAC_PATH (1 << 0) -#define HDA_ADC_PATH (1 << 1) -#define HDA_ADC_RECSEL (1 << 2) - -#define HDA_DAC_LOCKED (1 << 3) -#define HDA_ADC_LOCKED (1 << 4) - -#define HDA_CTL_OUT (1 << 0) -#define HDA_CTL_IN (1 << 1) -#define HDA_CTL_BOTH (HDA_CTL_IN | HDA_CTL_OUT) +#define HDA_ADC_MONITOR (1 << 0) + +#define HDA_CTL_OUT 1 +#define HDA_CTL_IN 2 #define HDA_GPIO_MAX 8 /* 0 - 7 = GPIO , 8 = Flush */ @@ -346,6 +372,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_QUIRK_FORCESTEREO (1 << 11) #define HDA_QUIRK_EAPDINV (1 << 12) #define HDA_QUIRK_DMAPOS (1 << 13) +#define HDA_QUIRK_SENSEINV (1 << 14) /* 26 - 31 = vrefs */ #define HDA_QUIRK_IVREF50 (1 << 26) @@ -361,9 +388,6 @@ SND_DECLARE_FILE("$FreeBSD$"); HDA_QUIRK_OVREF100) #define HDA_QUIRK_VREF (HDA_QUIRK_IVREF | HDA_QUIRK_OVREF) -#define SOUND_MASK_SKIP (1 << 30) -#define SOUND_MASK_DISABLE (1 << 31) - #if __FreeBSD_version < 600000 #define taskqueue_drain(...) #endif @@ -386,6 +410,7 @@ static const struct { { "forcestereo", HDA_QUIRK_FORCESTEREO }, { "eapdinv", HDA_QUIRK_EAPDINV }, { "dmapos", HDA_QUIRK_DMAPOS }, + { "senseinv", HDA_QUIRK_SENSEINV }, { "ivref50", HDA_QUIRK_IVREF50 }, { "ivref80", HDA_QUIRK_IVREF80 }, { "ivref100", HDA_QUIRK_IVREF100 }, @@ -413,14 +438,18 @@ static const struct { #define HDA_PARSE_MAXDEPTH 10 #define HDAC_UNSOLTAG_EVENT_HP 0x00 -#define HDAC_UNSOLTAG_EVENT_TEST 0x01 MALLOC_DEFINE(M_HDAC, "hdac", "High Definition Audio Controller"); -enum { - HDA_PARSE_MIXER, - HDA_PARSE_DIRECT -}; +const char *HDA_COLORS[16] = {"Unknown", "Black", "Grey", "Blue", "Green", "Red", + "Orange", "Yellow", "Purple", "Pink", "Res.A", "Res.B", "Res.C", "Res.D", + "White", "Other"}; + +const char *HDA_DEVS[16] = {"Line-out", "Speaker", "Headphones", "CD", + "SPDIF-out", "Digital-out", "Modem-line", "Modem-handset", "Line-in", + "AUX", "Mic", "Telephony", "SPDIF-in", "Digital-in", "Res.E", "Other"}; + +const char *HDA_CONNS[4] = {"Jack", "None", "Fixed", "Both"}; /* Default */ static uint32_t hdac_fmt[] = { @@ -439,6 +468,8 @@ static const struct { { HDA_INTEL_82801G, "Intel 82801G" }, { HDA_INTEL_82801H, "Intel 82801H" }, { HDA_INTEL_82801I, "Intel 82801I" }, + { HDA_INTEL_82801J, "Intel 82801J" }, + { HDA_INTEL_SCH, "Intel SCH" }, { HDA_NVIDIA_MCP51, "NVidia MCP51" }, { HDA_NVIDIA_MCP55, "NVidia MCP55" }, { HDA_NVIDIA_MCP61_1, "NVidia MCP61" }, @@ -447,16 +478,28 @@ static const struct { { HDA_NVIDIA_MCP65_2, "NVidia MCP65" }, { HDA_NVIDIA_MCP67_1, "NVidia MCP67" }, { HDA_NVIDIA_MCP67_2, "NVidia MCP67" }, + { HDA_NVIDIA_MCP73_1, "NVidia MCP73" }, + { HDA_NVIDIA_MCP73_2, "NVidia MCP73" }, + { HDA_NVIDIA_MCP78_1, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_2, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_3, "NVidia MCP78" }, + { HDA_NVIDIA_MCP78_4, "NVidia MCP78" }, + { HDA_NVIDIA_MCP79_1, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_2, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_3, "NVidia MCP79" }, + { HDA_NVIDIA_MCP79_4, "NVidia MCP79" }, { HDA_ATI_SB450, "ATI SB450" }, { HDA_ATI_SB600, "ATI SB600" }, { HDA_VIA_VT82XX, "VIA VT8251/8237A" }, { HDA_SIS_966, "SiS 966" }, + { HDA_ULI_M5461, "ULI M5461" }, /* Unknown */ { HDA_INTEL_ALL, "Intel (Unknown)" }, { HDA_NVIDIA_ALL, "NVidia (Unknown)" }, { HDA_ATI_ALL, "ATI (Unknown)" }, { HDA_VIA_ALL, "VIA (Unknown)" }, { HDA_SIS_ALL, "SiS (Unknown)" }, + { HDA_ULI_ALL, "ULI (Unknown)" }, }; #define HDAC_DEVICES_LEN (sizeof(hdac_devices) / sizeof(hdac_devices[0])) @@ -526,8 +569,13 @@ static const struct { #define REALTEK_VENDORID 0x10ec #define HDA_CODEC_ALC260 HDA_CODEC_CONSTRUCT(REALTEK, 0x0260) #define HDA_CODEC_ALC262 HDA_CODEC_CONSTRUCT(REALTEK, 0x0262) +#define HDA_CODEC_ALC267 HDA_CODEC_CONSTRUCT(REALTEK, 0x0267) #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) +#define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) +#define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) #define HDA_CODEC_ALC660 HDA_CODEC_CONSTRUCT(REALTEK, 0x0660) +#define HDA_CODEC_ALC662 HDA_CODEC_CONSTRUCT(REALTEK, 0x0662) +#define HDA_CODEC_ALC663 HDA_CODEC_CONSTRUCT(REALTEK, 0x0663) #define HDA_CODEC_ALC861 HDA_CODEC_CONSTRUCT(REALTEK, 0x0861) #define HDA_CODEC_ALC861VD HDA_CODEC_CONSTRUCT(REALTEK, 0x0862) #define HDA_CODEC_ALC880 HDA_CODEC_CONSTRUCT(REALTEK, 0x0880) @@ -535,16 +583,26 @@ static const struct { #define HDA_CODEC_ALC883 HDA_CODEC_CONSTRUCT(REALTEK, 0x0883) #define HDA_CODEC_ALC885 HDA_CODEC_CONSTRUCT(REALTEK, 0x0885) #define HDA_CODEC_ALC888 HDA_CODEC_CONSTRUCT(REALTEK, 0x0888) +#define HDA_CODEC_ALC889 HDA_CODEC_CONSTRUCT(REALTEK, 0x0889) #define HDA_CODEC_ALCXXXX HDA_CODEC_CONSTRUCT(REALTEK, 0xffff) /* Analog Devices */ #define ANALOGDEVICES_VENDORID 0x11d4 +#define HDA_CODEC_AD1884A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x184a) +#define HDA_CODEC_AD1882 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1882) +#define HDA_CODEC_AD1883 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1883) +#define HDA_CODEC_AD1884 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1884) +#define HDA_CODEC_AD1984A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194a) +#define HDA_CODEC_AD1984B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x194b) #define HDA_CODEC_AD1981HD HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1981) #define HDA_CODEC_AD1983 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1983) #define HDA_CODEC_AD1984 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1984) #define HDA_CODEC_AD1986A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1986) +#define HDA_CODEC_AD1987 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1987) #define HDA_CODEC_AD1988 HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x1988) #define HDA_CODEC_AD1988B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x198b) +#define HDA_CODEC_AD1882A HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x882a) +#define HDA_CODEC_AD1989B HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0x989b) #define HDA_CODEC_ADXXXX HDA_CODEC_CONSTRUCT(ANALOGDEVICES, 0xffff) /* CMedia */ @@ -554,29 +612,77 @@ static const struct { /* Sigmatel */ #define SIGMATEL_VENDORID 0x8384 +#define HDA_CODEC_STAC9230X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7612) +#define HDA_CODEC_STAC9230D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7613) +#define HDA_CODEC_STAC9229X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7614) +#define HDA_CODEC_STAC9229D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7615) +#define HDA_CODEC_STAC9228X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7616) +#define HDA_CODEC_STAC9228D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7617) +#define HDA_CODEC_STAC9227X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618) +#define HDA_CODEC_STAC9227D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7619) +#define HDA_CODEC_STAC9274 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7620) +#define HDA_CODEC_STAC9274D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7621) +#define HDA_CODEC_STAC9273X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7622) +#define HDA_CODEC_STAC9273D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7623) +#define HDA_CODEC_STAC9272X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7624) +#define HDA_CODEC_STAC9272D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7625) +#define HDA_CODEC_STAC9271X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7626) +#define HDA_CODEC_STAC9271D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627) +#define HDA_CODEC_STAC9274X5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7628) +#define HDA_CODEC_STAC9274D5NH HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7629) +#define HDA_CODEC_STAC9250 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7634) +#define HDA_CODEC_STAC9251 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7636) +#define HDA_CODEC_IDT92HD700X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7638) +#define HDA_CODEC_IDT92HD700D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7639) +#define HDA_CODEC_IDT92HD206X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7645) +#define HDA_CODEC_IDT92HD206D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7646) +#define HDA_CODEC_STAC9872AK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662) #define HDA_CODEC_STAC9221 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7680) +#define HDA_CODEC_STAC922XD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681) +#define HDA_CODEC_STAC9221_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7682) #define HDA_CODEC_STAC9221D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7683) #define HDA_CODEC_STAC9220 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7690) -#define HDA_CODEC_STAC922XD HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7681) -#define HDA_CODEC_STAC9227 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7618) -#define HDA_CODEC_STAC9271D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7627) -#define HDA_CODEC_STAC9205 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0) -#define HDA_CODEC_STAC9872AK HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7662) +#define HDA_CODEC_STAC9200D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7691) +#define HDA_CODEC_IDT92HD005 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7698) +#define HDA_CODEC_IDT92HD005D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7699) +#define HDA_CODEC_STAC9205X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a0) +#define HDA_CODEC_STAC9205D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a1) +#define HDA_CODEC_STAC9204X HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a2) +#define HDA_CODEC_STAC9204D HDA_CODEC_CONSTRUCT(SIGMATEL, 0x76a3) +#define HDA_CODEC_STAC9220_A2 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7880) +#define HDA_CODEC_STAC9220_A1 HDA_CODEC_CONSTRUCT(SIGMATEL, 0x7882) #define HDA_CODEC_STACXXXX HDA_CODEC_CONSTRUCT(SIGMATEL, 0xffff) -/* - * Conexant - * - * Ok, the truth is, I don't have any idea at all whether - * it is "Venice" or "Waikiki" or other unnamed CXyadayada. The only - * place that tell me it is "Venice" is from its Windows driver INF. - * - * Venice - CX????? - * Waikiki - CX20551-22 - */ +/* IDT */ +#define IDT_VENDORID 0x111d +#define HDA_CODEC_IDT92HD75BX HDA_CODEC_CONSTRUCT(IDT, 0x7603) +#define HDA_CODEC_IDT92HD83C1X HDA_CODEC_CONSTRUCT(IDT, 0x7604) +#define HDA_CODEC_IDT92HD81B1X HDA_CODEC_CONSTRUCT(IDT, 0x7605) +#define HDA_CODEC_IDT92HD75B3 HDA_CODEC_CONSTRUCT(IDT, 0x7608) +#define HDA_CODEC_IDT92HD73D1 HDA_CODEC_CONSTRUCT(IDT, 0x7674) +#define HDA_CODEC_IDT92HD73C1 HDA_CODEC_CONSTRUCT(IDT, 0x7675) +#define HDA_CODEC_IDT92HD73E1 HDA_CODEC_CONSTRUCT(IDT, 0x7676) +#define HDA_CODEC_IDT92HD71B8 HDA_CODEC_CONSTRUCT(IDT, 0x76b0) +#define HDA_CODEC_IDT92HD71B7 HDA_CODEC_CONSTRUCT(IDT, 0x76b2) +#define HDA_CODEC_IDT92HD71B5 HDA_CODEC_CONSTRUCT(IDT, 0x76b6) +#define HDA_CODEC_IDT92HD83C1C HDA_CODEC_CONSTRUCT(IDT, 0x76d4) +#define HDA_CODEC_IDT92HD81B1C HDA_CODEC_CONSTRUCT(IDT, 0x76d5) +#define HDA_CODEC_IDTXXXX HDA_CODEC_CONSTRUCT(IDT, 0xffff) + +/* Silicon Image */ +#define SII_VENDORID 0x1095 +#define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392) +#define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff) + +/* Lucent/Agere */ +#define AGERE_VENDORID 0x11c1 +#define HDA_CODEC_AGEREXXXX HDA_CODEC_CONSTRUCT(AGERE, 0xffff) + +/* Conexant */ #define CONEXANT_VENDORID 0x14f1 -#define HDA_CODEC_CXVENICE HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045) -#define HDA_CODEC_CXWAIKIKI HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) +#define HDA_CODEC_CX20549 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5045) +#define HDA_CODEC_CX20551 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5047) +#define HDA_CODEC_CX20561 HDA_CODEC_CONSTRUCT(CONEXANT, 0x5051) #define HDA_CODEC_CXXXXX HDA_CODEC_CONSTRUCT(CONEXANT, 0xffff) /* VIA */ @@ -592,8 +698,28 @@ static const struct { #define HDA_CODEC_VT1709_5 HDA_CODEC_CONSTRUCT(VIA, 0xe715) #define HDA_CODEC_VT1709_6 HDA_CODEC_CONSTRUCT(VIA, 0xe716) #define HDA_CODEC_VT1709_7 HDA_CODEC_CONSTRUCT(VIA, 0xe717) +#define HDA_CODEC_VT1708B_0 HDA_CODEC_CONSTRUCT(VIA, 0xe720) +#define HDA_CODEC_VT1708B_1 HDA_CODEC_CONSTRUCT(VIA, 0xe721) +#define HDA_CODEC_VT1708B_2 HDA_CODEC_CONSTRUCT(VIA, 0xe722) +#define HDA_CODEC_VT1708B_3 HDA_CODEC_CONSTRUCT(VIA, 0xe723) +#define HDA_CODEC_VT1708B_4 HDA_CODEC_CONSTRUCT(VIA, 0xe724) +#define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725) +#define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726) +#define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) +/* ATI */ +#define HDA_CODEC_ATIRS600_1 HDA_CODEC_CONSTRUCT(ATI, 0x793c) +#define HDA_CODEC_ATIRS600_2 HDA_CODEC_CONSTRUCT(ATI, 0x7919) +#define HDA_CODEC_ATIRS690 HDA_CODEC_CONSTRUCT(ATI, 0x791a) +#define HDA_CODEC_ATIR6XX HDA_CODEC_CONSTRUCT(ATI, 0xaa01) +#define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff) + +/* NVIDIA */ +#define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) + +/* INTEL */ +#define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ static const struct { @@ -602,8 +728,13 @@ static const struct { } hdac_codecs[] = { { HDA_CODEC_ALC260, "Realtek ALC260" }, { HDA_CODEC_ALC262, "Realtek ALC262" }, + { HDA_CODEC_ALC267, "Realtek ALC267" }, { HDA_CODEC_ALC268, "Realtek ALC268" }, + { HDA_CODEC_ALC269, "Realtek ALC269" }, + { HDA_CODEC_ALC272, "Realtek ALC272" }, { HDA_CODEC_ALC660, "Realtek ALC660" }, + { HDA_CODEC_ALC662, "Realtek ALC662" }, + { HDA_CODEC_ALC663, "Realtek ALC663" }, { HDA_CODEC_ALC861, "Realtek ALC861" }, { HDA_CODEC_ALC861VD, "Realtek ALC861-VD" }, { HDA_CODEC_ALC880, "Realtek ALC880" }, @@ -611,23 +742,77 @@ static const struct { { HDA_CODEC_ALC883, "Realtek ALC883" }, { HDA_CODEC_ALC885, "Realtek ALC885" }, { HDA_CODEC_ALC888, "Realtek ALC888" }, + { HDA_CODEC_ALC889, "Realtek ALC889" }, + { HDA_CODEC_AD1882, "Analog Devices AD1882" }, + { HDA_CODEC_AD1882A, "Analog Devices AD1882A" }, + { HDA_CODEC_AD1883, "Analog Devices AD1883" }, + { HDA_CODEC_AD1884, "Analog Devices AD1884" }, + { HDA_CODEC_AD1884A, "Analog Devices AD1884A" }, { HDA_CODEC_AD1981HD, "Analog Devices AD1981HD" }, { HDA_CODEC_AD1983, "Analog Devices AD1983" }, { HDA_CODEC_AD1984, "Analog Devices AD1984" }, + { HDA_CODEC_AD1984A, "Analog Devices AD1984A" }, + { HDA_CODEC_AD1984B, "Analog Devices AD1984B" }, { HDA_CODEC_AD1986A, "Analog Devices AD1986A" }, - { HDA_CODEC_AD1988, "Analog Devices AD1988" }, + { HDA_CODEC_AD1987, "Analog Devices AD1987" }, + { HDA_CODEC_AD1988, "Analog Devices AD1988A" }, { HDA_CODEC_AD1988B, "Analog Devices AD1988B" }, + { HDA_CODEC_AD1989B, "Analog Devices AD1989B" }, { HDA_CODEC_CMI9880, "CMedia CMI9880" }, + { HDA_CODEC_STAC9200D, "Sigmatel STAC9200D" }, + { HDA_CODEC_STAC9204X, "Sigmatel STAC9204X" }, + { HDA_CODEC_STAC9204D, "Sigmatel STAC9204D" }, + { HDA_CODEC_STAC9205X, "Sigmatel STAC9205X" }, + { HDA_CODEC_STAC9205D, "Sigmatel STAC9205D" }, + { HDA_CODEC_STAC9220, "Sigmatel STAC9220" }, + { HDA_CODEC_STAC9220_A1, "Sigmatel STAC9220_A1" }, + { HDA_CODEC_STAC9220_A2, "Sigmatel STAC9220_A2" }, { HDA_CODEC_STAC9221, "Sigmatel STAC9221" }, + { HDA_CODEC_STAC9221_A2, "Sigmatel STAC9221_A2" }, { HDA_CODEC_STAC9221D, "Sigmatel STAC9221D" }, - { HDA_CODEC_STAC9220, "Sigmatel STAC9220" }, { HDA_CODEC_STAC922XD, "Sigmatel STAC9220D/9223D" }, - { HDA_CODEC_STAC9227, "Sigmatel STAC9227" }, + { HDA_CODEC_STAC9227X, "Sigmatel STAC9227X" }, + { HDA_CODEC_STAC9227D, "Sigmatel STAC9227D" }, + { HDA_CODEC_STAC9228X, "Sigmatel STAC9228X" }, + { HDA_CODEC_STAC9228D, "Sigmatel STAC9228D" }, + { HDA_CODEC_STAC9229X, "Sigmatel STAC9229X" }, + { HDA_CODEC_STAC9229D, "Sigmatel STAC9229D" }, + { HDA_CODEC_STAC9230X, "Sigmatel STAC9230X" }, + { HDA_CODEC_STAC9230D, "Sigmatel STAC9230D" }, + { HDA_CODEC_STAC9250, "Sigmatel STAC9250" }, + { HDA_CODEC_STAC9251, "Sigmatel STAC9251" }, + { HDA_CODEC_STAC9271X, "Sigmatel STAC9271X" }, { HDA_CODEC_STAC9271D, "Sigmatel STAC9271D" }, - { HDA_CODEC_STAC9205, "Sigmatel STAC9205" }, - { HDA_CODEC_STAC9872AK,"Sigmatel STAC9872AK" }, - { HDA_CODEC_CXVENICE, "Conexant Venice" }, - { HDA_CODEC_CXWAIKIKI, "Conexant Waikiki" }, + { HDA_CODEC_STAC9272X, "Sigmatel STAC9272X" }, + { HDA_CODEC_STAC9272D, "Sigmatel STAC9272D" }, + { HDA_CODEC_STAC9273X, "Sigmatel STAC9273X" }, + { HDA_CODEC_STAC9273D, "Sigmatel STAC9273D" }, + { HDA_CODEC_STAC9274, "Sigmatel STAC9274" }, + { HDA_CODEC_STAC9274D, "Sigmatel STAC9274D" }, + { HDA_CODEC_STAC9274X5NH, "Sigmatel STAC9274X5NH" }, + { HDA_CODEC_STAC9274D5NH, "Sigmatel STAC9274D5NH" }, + { HDA_CODEC_STAC9872AK, "Sigmatel STAC9872AK" }, + { HDA_CODEC_IDT92HD005, "IDT 92HD005" }, + { HDA_CODEC_IDT92HD005D, "IDT 92HD005D" }, + { HDA_CODEC_IDT92HD206X, "IDT 92HD206X" }, + { HDA_CODEC_IDT92HD206D, "IDT 92HD206D" }, + { HDA_CODEC_IDT92HD700X, "IDT 92HD700X" }, + { HDA_CODEC_IDT92HD700D, "IDT 92HD700D" }, + { HDA_CODEC_IDT92HD71B5, "IDT 92HD71B5" }, + { HDA_CODEC_IDT92HD71B7, "IDT 92HD71B7" }, + { HDA_CODEC_IDT92HD71B8, "IDT 92HD71B8" }, + { HDA_CODEC_IDT92HD73C1, "IDT 92HD73C1" }, + { HDA_CODEC_IDT92HD73D1, "IDT 92HD73D1" }, + { HDA_CODEC_IDT92HD73E1, "IDT 92HD73E1" }, + { HDA_CODEC_IDT92HD75B3, "IDT 92HD75B3" }, + { HDA_CODEC_IDT92HD75BX, "IDT 92HD75BX" }, + { HDA_CODEC_IDT92HD81B1C, "IDT 92HD81B1C" }, + { HDA_CODEC_IDT92HD81B1X, "IDT 92HD81B1X" }, + { HDA_CODEC_IDT92HD83C1C, "IDT 92HD83C1C" }, + { HDA_CODEC_IDT92HD83C1X, "IDT 92HD83C1X" }, + { HDA_CODEC_CX20549, "Conexant CX20549 (Venice)" }, + { HDA_CODEC_CX20551, "Conexant CX20551 (Waikiki)" }, + { HDA_CODEC_CX20561, "Conexant CX20561 (Hermosa)" }, { HDA_CODEC_VT1708_8, "VIA VT1708_8" }, { HDA_CODEC_VT1708_9, "VIA VT1708_9" }, { HDA_CODEC_VT1708_A, "VIA VT1708_A" }, @@ -640,136 +825,41 @@ static const struct { { HDA_CODEC_VT1709_5, "VIA VT1709_5" }, { HDA_CODEC_VT1709_6, "VIA VT1709_6" }, { HDA_CODEC_VT1709_7, "VIA VT1709_7" }, + { HDA_CODEC_VT1708B_0, "VIA VT1708B_0" }, + { HDA_CODEC_VT1708B_1, "VIA VT1708B_1" }, + { HDA_CODEC_VT1708B_2, "VIA VT1708B_2" }, + { HDA_CODEC_VT1708B_3, "VIA VT1708B_3" }, + { HDA_CODEC_VT1708B_4, "VIA VT1708B_4" }, + { HDA_CODEC_VT1708B_5, "VIA VT1708B_5" }, + { HDA_CODEC_VT1708B_6, "VIA VT1708B_6" }, + { HDA_CODEC_VT1708B_7, "VIA VT1708B_7" }, + { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, + { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, + { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, + { HDA_CODEC_ATIR6XX, "ATI R6xx HDMI" }, + { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ { HDA_CODEC_ALCXXXX, "Realtek (Unknown)" }, { HDA_CODEC_ADXXXX, "Analog Devices (Unknown)" }, { HDA_CODEC_CMIXXXX, "CMedia (Unknown)" }, { HDA_CODEC_STACXXXX, "Sigmatel (Unknown)" }, + { HDA_CODEC_SIIXXXX, "Silicon Image (Unknown)" }, + { HDA_CODEC_AGEREXXXX, "Lucent/Agere Systems (Unknown)" }, { HDA_CODEC_CXXXXX, "Conexant (Unknown)" }, { HDA_CODEC_VTXXXX, "VIA (Unknown)" }, + { HDA_CODEC_ATIXXXX, "ATI (Unknown)" }, + { HDA_CODEC_NVIDIAXXXX,"NVidia (Unknown)" }, + { HDA_CODEC_INTELXXXX, "Intel (Unknown)" }, + { HDA_CODEC_IDTXXXX, "IDT (Unknown)" }, }; #define HDAC_CODECS_LEN (sizeof(hdac_codecs) / sizeof(hdac_codecs[0])) -enum { - HDAC_HP_SWITCH_CTL, - HDAC_HP_SWITCH_CTRL, - HDAC_HP_SWITCH_DEBUG -}; - -static const struct { - uint32_t model; - uint32_t id; - int type; - int inverted; - int polling; - int execsense; - nid_t hpnid; - nid_t spkrnid[8]; - nid_t eapdnid; -} hdac_hp_switch[] = { - /* Specific OEM models */ - { HP_V3000_SUBVENDOR, HDA_CODEC_CXVENICE, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 17, { 16, -1 }, 16 }, - /* { HP_XW4300_SUBVENDOR, HDA_CODEC_ALC260, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 21, { 16, 17, -1 }, -1 } */ - /* { HP_3010_SUBVENDOR, HDA_CODEC_ALC260, HDAC_HP_SWITCH_DEBUG, - 0, 1, 0, 16, { 15, 18, 19, 20, 21, -1 }, -1 }, */ - { HP_NX7400_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - { HP_NX6310_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - { HP_NX6325_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - /* { HP_DC7700_SUBVENDOR, HDA_CODEC_ALC262, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 21, { 22, 27, -1 }, -1 }, */ - { TOSHIBA_U200_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, -1 }, - { TOSHIBA_A135_SUBVENDOR, HDA_CODEC_ALC861VD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 27, { 20, -1 }, -1 }, - { DELL_D820_SUBVENDOR, HDA_CODEC_STAC9220, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 13, { 14, -1 }, -1 }, - { DELL_I1300_SUBVENDOR, HDA_CODEC_STAC9220, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 13, { 14, -1 }, -1 }, - { DELL_OPLX745_SUBVENDOR, HDA_CODEC_AD1983, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, 7, -1 }, -1 }, - { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 10, { 13, -1 }, -1 }, - { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 10, { 13, -1 }, -1 }, - { APPLE_MB3_SUBVENDOR, HDA_CODEC_ALC885, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 21, { 20, 22, -1 }, -1 }, - { APPLE_INTEL_MAC, HDA_CODEC_STAC9221, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 10, { 13, -1 }, -1 }, - { LENOVO_3KN100_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, - 1, 0, -1, 26, { 27, -1 }, -1 }, - { LENOVO_3KN200_SUBVENDOR, HDA_CODEC_ALC861VD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 27, { 20, -1 }, -1 }, - /* { LENOVO_TCA55_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 26, { 27, 28, 29, 30, -1 }, -1 }, */ - { LG_LW20_SUBVENDOR, HDA_CODEC_ALC880, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 27, { 20, -1 }, -1 }, - { ACER_A5050_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_3681WXM_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_A4520_SUBVENDOR, HDA_CODEC_ALC268, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_A4710_SUBVENDOR, HDA_CODEC_ALC268, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { ACER_A4715_SUBVENDOR, HDA_CODEC_ALC268, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { UNIWILL_9080_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { MSI_MS1034_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 27, -1 }, -1 }, - { MSI_MS034A_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 27, -1 }, -1 }, - { FS_SI1848_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - { FL_S7020D_SUBVENDOR, HDA_CODEC_ALC260, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 16, -1 }, -1 }, - { FL_U1010_SUBVENDOR, HDA_CODEC_ALC262, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, - /* - * All models that at least come from the same vendor with - * simmilar codec. - */ - { HP_ALL_SUBVENDOR, HDA_CODEC_CXVENICE, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 17, { 16, -1 }, 16 }, - { HP_ALL_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, 5 }, - { TOSHIBA_ALL_SUBVENDOR, HDA_CODEC_AD1981HD, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 6, { 5, -1 }, -1 }, - { DELL_ALL_SUBVENDOR, HDA_CODEC_STAC9220, HDAC_HP_SWITCH_CTRL, - 0, 0, -1, 13, { 14, -1 }, -1 }, -#if 0 - { LENOVO_ALL_SUBVENDOR, HDA_CODEC_AD1986A, HDAC_HP_SWITCH_CTL, - 1, 0, -1, 26, { 27, -1 }, -1 }, - { ACER_ALL_SUBVENDOR, HDA_CODEC_ALC883, HDAC_HP_SWITCH_CTL, - 0, 0, -1, 20, { 21, -1 }, -1 }, -#endif -}; -#define HDAC_HP_SWITCH_LEN \ - (sizeof(hdac_hp_switch) / sizeof(hdac_hp_switch[0])) - -static const struct { - uint32_t model; - uint32_t id; - nid_t eapdnid; - int hp_switch; -} hdac_eapd_switch[] = { - { HP_V3000_SUBVENDOR, HDA_CODEC_CXVENICE, 16, 1 }, - { HP_NX7400_SUBVENDOR, HDA_CODEC_AD1981HD, 5, 1 }, - { HP_NX6310_SUBVENDOR, HDA_CODEC_AD1981HD, 5, 1 }, -}; -#define HDAC_EAPD_SWITCH_LEN \ - (sizeof(hdac_eapd_switch) / sizeof(hdac_eapd_switch[0])) /**************************************************************************** * Function prototypes ****************************************************************************/ static void hdac_intr_handler(void *); -static int hdac_reset(struct hdac_softc *); +static int hdac_reset(struct hdac_softc *, int); static int hdac_get_capabilities(struct hdac_softc *); static void hdac_dma_cb(void *, bus_dma_segment_t *, int, int); static int hdac_dma_alloc(struct hdac_softc *, @@ -783,10 +873,10 @@ static void hdac_corb_init(struct hdac_s static void hdac_rirb_init(struct hdac_softc *); static void hdac_corb_start(struct hdac_softc *); static void hdac_rirb_start(struct hdac_softc *); -static void hdac_scan_codecs(struct hdac_softc *, int); -static int hdac_probe_codec(struct hdac_codec *); -static struct hdac_devinfo *hdac_probe_function(struct hdac_codec *, nid_t); -static void hdac_add_child(struct hdac_softc *, struct hdac_devinfo *); +static void hdac_scan_codecs(struct hdac_softc *); +static void hdac_probe_codec(struct hdac_codec *); +static void hdac_probe_function(struct hdac_codec *, nid_t); +static int hdac_pcmchannel_setup(struct hdac_chan *); static void hdac_attach2(void *); @@ -798,34 +888,37 @@ static void hdac_command_send_internal(s static int hdac_probe(device_t); static int hdac_attach(device_t); static int hdac_detach(device_t); +static int hdac_suspend(device_t); +static int hdac_resume(device_t); static void hdac_widget_connection_select(struct hdac_widget *, uint8_t); static void hdac_audio_ctl_amp_set(struct hdac_audio_ctl *, uint32_t, int, int); static struct hdac_audio_ctl *hdac_audio_ctl_amp_get(struct hdac_devinfo *, - nid_t, int, int); + nid_t, int, int, int); static void hdac_audio_ctl_amp_set_internal(struct hdac_softc *, nid_t, nid_t, int, int, int, int, int, int); -static int hdac_audio_ctl_ossmixer_getnextdev(struct hdac_devinfo *); static struct hdac_widget *hdac_widget_get(struct hdac_devinfo *, nid_t); static int hdac_rirb_flush(struct hdac_softc *sc); static int hdac_unsolq_flush(struct hdac_softc *sc); +static void hdac_dump_pin_config(struct hdac_widget *w, uint32_t conf); + #define hdac_command(a1, a2, a3) \ hdac_command_sendone_internal(a1, a2, a3) -#define hdac_codec_id(d) \ - ((uint32_t)((d == NULL) ? 0x00000000 : \ - ((((uint32_t)(d)->vendor_id & 0x0000ffff) << 16) | \ - ((uint32_t)(d)->device_id & 0x0000ffff)))) +#define hdac_codec_id(c) \ + ((uint32_t)((c == NULL) ? 0x00000000 : \ + ((((uint32_t)(c)->vendor_id & 0x0000ffff) << 16) | \ + ((uint32_t)(c)->device_id & 0x0000ffff)))) static char * -hdac_codec_name(struct hdac_devinfo *devinfo) +hdac_codec_name(struct hdac_codec *codec) { uint32_t id; int i; - id = hdac_codec_id(devinfo); + id = hdac_codec_id(codec); for (i = 0; i < HDAC_CODECS_LEN; i++) { if (HDA_DEV_MATCH(hdac_codecs[i].id, id)) @@ -836,20 +929,6 @@ hdac_codec_name(struct hdac_devinfo *dev } static char * -hdac_audio_ctl_ossmixer_mask2name(uint32_t devmask) -{ - static char *ossname[] = SOUND_DEVICE_NAMES; - static char *unknown = "???"; - int i; - - for (i = SOUND_MIXER_NRDEVICES - 1; i >= 0; i--) { - if (devmask & (1 << i)) - return (ossname[i]); - } - return (unknown); -} - -static void hdac_audio_ctl_ossmixer_mask2allname(uint32_t mask, char *buf, size_t len) { static char *ossname[] = SOUND_DEVICE_NAMES; @@ -864,6 +943,7 @@ hdac_audio_ctl_ossmixer_mask2allname(uin first = 0; } } + return (buf); } static struct hdac_audio_ctl * @@ -879,48 +959,46 @@ hdac_audio_ctl_each(struct hdac_devinfo } static struct hdac_audio_ctl * -hdac_audio_ctl_amp_get(struct hdac_devinfo *devinfo, nid_t nid, +hdac_audio_ctl_amp_get(struct hdac_devinfo *devinfo, nid_t nid, int dir, int index, int cnt) { - struct hdac_audio_ctl *ctl, *retctl = NULL; - int i, at, atindex, found = 0; + struct hdac_audio_ctl *ctl; + int i, found = 0; if (devinfo == NULL || devinfo->function.audio.ctl == NULL) return (NULL); - at = cnt; - if (at == 0) - at = 1; - else if (at < 0) - at = -1; - atindex = index; - if (atindex < 0) - atindex = -1; - i = 0; while ((ctl = hdac_audio_ctl_each(devinfo, &i)) != NULL) { - if (ctl->enable == 0 || ctl->widget == NULL) + if (ctl->enable == 0) continue; - if (!(ctl->widget->nid == nid && (atindex == -1 || - ctl->index == atindex))) + if (ctl->widget->nid != nid) + continue; + if (dir && ctl->ndir != dir) + continue; + if (index >= 0 && ctl->ndir == HDA_CTL_IN && + ctl->dir == ctl->ndir && ctl->index != index) continue; found++; - if (found == cnt) + if (found == cnt || cnt <= 0) return (ctl); - retctl = ctl; } - return ((at == -1) ? retctl : NULL); + return (NULL); } +/* + * Jack detection (Speaker/HP redirection) event handler. + */ static void hdac_hp_switch_handler(struct hdac_devinfo *devinfo) { + struct hdac_audio_as *as; struct hdac_softc *sc; struct hdac_widget *w; struct hdac_audio_ctl *ctl; - uint32_t val, id, res; - int i = 0, j, timeout, forcemute; + uint32_t val, res; + int i, j; nid_t cad; if (devinfo == NULL || devinfo->codec == NULL || @@ -929,84 +1007,47 @@ hdac_hp_switch_handler(struct hdac_devin sc = devinfo->codec->sc; cad = devinfo->codec->cad; - id = hdac_codec_id(devinfo); - for (i = 0; i < HDAC_HP_SWITCH_LEN; i++) { - if (HDA_DEV_MATCH(hdac_hp_switch[i].model, - sc->pci_subvendor) && - hdac_hp_switch[i].id == id) - break; - } - - if (i >= HDAC_HP_SWITCH_LEN) - return; - - forcemute = 0; - if (hdac_hp_switch[i].eapdnid != -1) { - w = hdac_widget_get(devinfo, hdac_hp_switch[i].eapdnid); - if (w != NULL && w->param.eapdbtl != HDAC_INVALID) - forcemute = (w->param.eapdbtl & - HDA_CMD_SET_EAPD_BTL_ENABLE_EAPD) ? 0 : 1; - } - - if (hdac_hp_switch[i].execsense != -1) - hdac_command(sc, - HDA_CMD_SET_PIN_SENSE(cad, hdac_hp_switch[i].hpnid, - hdac_hp_switch[i].execsense), cad); + as = devinfo->function.audio.as; + for (i = 0; i < devinfo->function.audio.ascnt; i++) { + if (as[i].hpredir < 0) + continue; + + w = hdac_widget_get(devinfo, as[i].pins[15]); + if (w == NULL || w->enable == 0 || w->type != + HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) + continue; - timeout = 10000; - do { res = hdac_command(sc, - HDA_CMD_GET_PIN_SENSE(cad, hdac_hp_switch[i].hpnid), - cad); - if (hdac_hp_switch[i].execsense == -1 || res != 0x7fffffff) - break; - DELAY(10); - } while (--timeout != 0); + HDA_CMD_GET_PIN_SENSE(cad, as[i].pins[15]), cad); - HDA_BOOTVERBOSE( - device_printf(sc->dev, - "HDA_DEBUG: Pin sense: nid=%d timeout=%d res=0x%08x\n", - hdac_hp_switch[i].hpnid, timeout, res); - ); + HDA_BOOTVERBOSE( + device_printf(sc->dev, + "Pin sense: nid=%d res=0x%08x\n", + as[i].pins[15], res); + ); - res = HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(res); - res ^= hdac_hp_switch[i].inverted; + res = HDA_CMD_GET_PIN_SENSE_PRESENCE_DETECT(res); + if (devinfo->function.audio.quirks & HDA_QUIRK_SENSEINV) + res ^= 1; - switch (hdac_hp_switch[i].type) { - case HDAC_HP_SWITCH_CTL: + /* (Un)Mute headphone pin. */ ctl = hdac_audio_ctl_amp_get(devinfo, - hdac_hp_switch[i].hpnid, 0, 1); - if (ctl != NULL) { - val = (res != 0 && forcemute == 0) ? - HDA_AMP_MUTE_NONE : HDA_AMP_MUTE_ALL; - if (val != ctl->muted) { - ctl->muted = val; + as[i].pins[15], HDA_CTL_IN, -1, 1); + if (ctl != NULL && ctl->mute) { + /* If pin has muter - use it. */ + val = (res != 0) ? 0 : 1; + if (val != ctl->forcemute) { + ctl->forcemute = val; hdac_audio_ctl_amp_set(ctl, - HDA_AMP_MUTE_DEFAULT, ctl->left, - ctl->right); + HDA_AMP_MUTE_DEFAULT, + HDA_AMP_VOL_DEFAULT, HDA_AMP_VOL_DEFAULT); } - } - for (j = 0; hdac_hp_switch[i].spkrnid[j] != -1; j++) { - ctl = hdac_audio_ctl_amp_get(devinfo, - hdac_hp_switch[i].spkrnid[j], 0, 1); - if (ctl == NULL) - continue; - val = (res != 0 || forcemute == 1) ? - HDA_AMP_MUTE_ALL : HDA_AMP_MUTE_NONE; - if (val == ctl->muted) - continue; - ctl->muted = val; - hdac_audio_ctl_amp_set(ctl, HDA_AMP_MUTE_DEFAULT, - ctl->left, ctl->right); - } - break; - case HDAC_HP_SWITCH_CTRL: - if (res != 0) { - /* HP in */ - w = hdac_widget_get(devinfo, hdac_hp_switch[i].hpnid); + } else { + /* If there is no muter - disable pin output. */ + w = hdac_widget_get(devinfo, as[i].pins[15]); if (w != NULL && w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) { - if (forcemute == 0) + if (res != 0) val = w->wclass.pin.ctrl | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 15:31:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D011106567A; Wed, 7 Jan 2009 15:31:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49BA28FC13; Wed, 7 Jan 2009 15:31:47 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07FVlE0090819; Wed, 7 Jan 2009 15:31:47 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07FVlNx090816; Wed, 7 Jan 2009 15:31:47 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901071531.n07FVlNx090816@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 7 Jan 2009 15:31:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186863 - in stable/7: etc etc/defaults etc/rc.d share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 15:31:48 -0000 Author: bz Date: Wed Jan 7 15:31:46 2009 New Revision: 186863 URL: http://svn.freebsd.org/changeset/base/186863 Log: MFC: r183100 Allow a jail to be started with a specific route fib. Modified: stable/7/etc/ (props changed) stable/7/etc/defaults/rc.conf stable/7/etc/rc.d/jail stable/7/share/man/man5/ (props changed) stable/7/share/man/man5/rc.conf.5 Modified: stable/7/etc/defaults/rc.conf ============================================================================== --- stable/7/etc/defaults/rc.conf Wed Jan 7 15:28:47 2009 (r186862) +++ stable/7/etc/defaults/rc.conf Wed Jan 7 15:31:46 2009 (r186863) @@ -622,6 +622,7 @@ jail_sysvipc_allow="NO" # Allow SystemV #jail_example_hostname="default.domain.com" # Jail's hostname #jail_example_ip="192.168.0.10" # Jail's IP number #jail_example_interface="" # Interface to create the IP alias on +#jail_example_fib="0" # routing table for setfib(1) #jail_example_exec_start="/bin/sh /etc/rc" # command to execute in jail for starting #jail_example_exec_afterstart0="/bin/sh command" # command to execute after the one for # starting the jail. More than one can be Modified: stable/7/etc/rc.d/jail ============================================================================== --- stable/7/etc/rc.d/jail Wed Jan 7 15:28:47 2009 (r186862) +++ stable/7/etc/rc.d/jail Wed Jan 7 15:31:46 2009 (r186863) @@ -83,6 +83,7 @@ init_variables() [ -z "${_flags}" ] && _flags="-l -U root" eval _consolelog=\"\${jail_${_j}_consolelog:-${jail_consolelog}}\" [ -z "${_consolelog}" ] && _consolelog="/var/log/jail_${_j}_console.log" + eval _fib=\"\${jail_${_j}_fib:-${jail_fib}}\" # Debugging aid # @@ -93,6 +94,7 @@ init_variables() debug "$_j hostname: $_hostname" debug "$_j ip: $_ip" debug "$_j interface: $_interface" + debug "$_j fib: $_fib" debug "$_j root: $_rootdir" debug "$_j devdir: $_devdir" debug "$_j fdescdir: $_fdescdir" @@ -297,6 +299,11 @@ jail_start() if [ -n "${_interface}" ]; then ifconfig ${_interface} alias ${_ip} netmask 255.255.255.255 fi + if [ -n "${_fib}" ]; then + _setfib="setfib -F '${_fib}'" + else + _setfib="" + fi if checkyesno _mount; then info "Mounting fstab for jail ${_jail} (${_fstab})" if [ ! -f "${_fstab}" ]; then @@ -350,7 +357,7 @@ jail_start() fi fi _tmp_jail=${_tmp_dir}/jail.$$ - eval jail ${_flags} -i ${_rootdir} ${_hostname} \ + eval ${_setfib} jail ${_flags} -i ${_rootdir} ${_hostname} \ ${_ip} ${_exec_start} > ${_tmp_jail} 2>&1 if [ "$?" -eq 0 ] ; then Modified: stable/7/share/man/man5/rc.conf.5 ============================================================================== --- stable/7/share/man/man5/rc.conf.5 Wed Jan 7 15:28:47 2009 (r186862) +++ stable/7/share/man/man5/rc.conf.5 Wed Jan 7 15:31:46 2009 (r186863) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2008 +.Dd September 16, 2008 .Dt RC.CONF 5 .Os .Sh NAME @@ -3412,6 +3412,11 @@ These are flags to pass to Unset by default. When set, sets the interface to use when setting IP address alias. Note that the alias is created at jail startup and removed at jail shutdown. +.It Va jail_ Ns Ao Ar jname Ac Ns Va _fib +.Pq Vt str +Unset by default. +When set, the jail is started with the specified routing table via +.Xr setfib 1 . .It Va jail_ Ns Ao Ar jname Ac Ns Va _fstab .Pq Vt str Set to From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 16:01:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48F25106564A; Wed, 7 Jan 2009 16:01:24 +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 36BE78FC12; Wed, 7 Jan 2009 16:01:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07G1N6g091432; Wed, 7 Jan 2009 16:01:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07G1N7X091431; Wed, 7 Jan 2009 16:01:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071601.n07G1N7X091431@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186864 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:01:24 -0000 Author: mav Date: Wed Jan 7 16:01:23 2009 New Revision: 186864 URL: http://svn.freebsd.org/changeset/base/186864 Log: Add some more supported controller and codec models. Add one more proposition to check correct PCM audio device usage. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Wed Jan 7 15:31:46 2009 (r186863) +++ head/share/man/man4/snd_hda.4 Wed Jan 7 16:01:23 2009 (r186864) @@ -455,7 +455,8 @@ On headphones connection rear connectors .Sh HARDWARE The .Nm -driver supports the following audio chipsets: +driver supports many Intel HDA compatible audio chipsets including the +following: .Pp .Bl -bullet -compact .It @@ -465,13 +466,17 @@ ATI SB600 .It Intel 631x/632xESB .It -Intel 82801F +Intel 82801F (ICH6) .It -Intel 82801G +Intel 82801G (ICH7) .It -Intel 82801H +Intel 82801H (ICH8) .It -Intel 82801I +Intel 82801I (ICH9) +.It +Intel 82801J (ICH10) +.It +Intel US15W (SCH) .It nVidia MCP51 .It @@ -481,6 +486,8 @@ nVidia MCP61A .It nVidia MCP61B .It +nVidia MCP63 +.It nVidia MCP65A .It nVidia MCP65B @@ -489,14 +496,16 @@ nVidia MCP67A .It nVidia MCP67B .It +nVidia MCP68 +.It +nVidia MCP69 +.It SiS 966 .It VIA VT8251/8237A .El .Pp -Generic audio chipsets compatible with the Intel HDA specification should work, -but have not been verified yet. -The following codecs have been verified to work: +The following and many other codecs have been verified to work: .Pp .Bl -bullet -compact .It @@ -514,9 +523,11 @@ Analog Devices AD1988B .It CMedia CMI9880 .It -Conexant Venice +Conexant CX20549 (Venice) +.It +Conexant CX20551 (Waikiki) .It -Conexant Waikiki +Conexant CX20561 (Hermosa) .It Realtek ALC260 .It @@ -574,6 +585,8 @@ Sigmatel STAC9872AK .It VIA VT1708 .It +VIA VT1708B +.It VIA VT1709 .El .Sh SEE ALSO @@ -607,7 +620,11 @@ rendering the .Nm driver useless, which usually results in a state where the .Nm -driver seems to attach and work, but without any sound. +driver seems to attach and work, but without any sound. Some of +that cases can be solved by tuning loader.conf variables. But before +trying to fix problem that way, make sure that problem is really exists +and the PCM audio device you are using really corresponds to expected +audio connector. .Pp Due to OSS limitation multichannel (not multidevice) playback is not supported. From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 16:06:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59EDB106566B; Wed, 7 Jan 2009 16:06:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2ED618FC19; Wed, 7 Jan 2009 16:06:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07G69tW091558; Wed, 7 Jan 2009 16:06:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07G69Sd091557; Wed, 7 Jan 2009 16:06:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071606.n07G69Sd091557@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:06:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186865 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:06:10 -0000 Author: mav Date: Wed Jan 7 16:06:09 2009 New Revision: 186865 URL: http://svn.freebsd.org/changeset/base/186865 Log: Update date. Modified: head/share/man/man4/snd_hda.4 Modified: head/share/man/man4/snd_hda.4 ============================================================================== --- head/share/man/man4/snd_hda.4 Wed Jan 7 16:01:23 2009 (r186864) +++ head/share/man/man4/snd_hda.4 Wed Jan 7 16:06:09 2009 (r186865) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 8, 2008 +.Dd January 7, 2009 .Dt SND_HDA 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 16:15:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63093106564A; Wed, 7 Jan 2009 16:15:17 +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 4EC308FC12; Wed, 7 Jan 2009 16:15:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07GFH6q091779; Wed, 7 Jan 2009 16:15:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07GFHxE091777; Wed, 7 Jan 2009 16:15:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071615.n07GFHxE091777@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:15:17 +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: r186866 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:15:18 -0000 Author: mav Date: Wed Jan 7 16:15:17 2009 New Revision: 186866 URL: http://svn.freebsd.org/changeset/base/186866 Log: Sync snd_hda and snd_ich man pages with CURRENT. Modified: stable/7/share/man/man4/snd_hda.4 stable/7/share/man/man4/snd_ich.4 Modified: stable/7/share/man/man4/snd_hda.4 ============================================================================== --- stable/7/share/man/man4/snd_hda.4 Wed Jan 7 16:06:09 2009 (r186865) +++ stable/7/share/man/man4/snd_hda.4 Wed Jan 7 16:15:17 2009 (r186866) @@ -1,4 +1,5 @@ -.\" Copyright (c) 2006 Joel Dahl +.\" Copyright (c) 2006-2008 Joel Dahl +.\" Copyright (c) 2008 Alexander Motin .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2007 +.Dd January 7, 2009 .Dt SND_HDA 4 .Os .Sh NAME @@ -45,40 +46,52 @@ following line in snd_hda_load="YES" .Ed .Sh DESCRIPTION +The High Definition (HD) Audio specification was developed by Intel as the +logical successor of the old AC'97 specification and has several advantages, +such as higher bandwidth which allows more channels and more detailed formats, +support for several logical audio devices, and general purpose DMA channels. +.Pp The .Nm -bridge device driver allows the generic audio driver, +driver is a HDA bus controller driver and HDA codecs audio functions bridge +driver that allows the generic audio driver, .Xr sound 4 , -to attach to Intel High Definition Audio devices. +to be used with this hardware. +Only audio functions are supported by +.Nm . +Modem, HDMI and other possible functions are not implemented. +.Pp The .Nm driver supports hardware that conforms with revision 1.0 of the Intel High Definition Audio specification and tries to behave much like the Microsoft Universal Audio Architecture (UAA) draft (revision 0.7b) for handling audio devices. -HDA acts like a primary bus, similar to -.Xr miibus 4 , -for handling various child buses such as audio, modem and HDMI (High Definition -Multimedia Interface). -Only audio is implemented in the -.Nm -driver. .Pp -The High Definition (HD) Audio specification was developed by Intel as the -logical successor of the old AC'97 specification and has several advantages, -such as higher bandwidth which allows more channels and more detailed formats, -support for several logical audio devices, and general purpose DMA channels. +According to HDA and UAA specifications, depending on the number of HDA buses +and codecs present in system, their audio capabilities and BIOS provided +configuration, the +.Nm +driver often provides several PCM audio devices. +For example, one device for main rear 7.1 output and inputs, one device +for independent headset connectors at front and one device for SPDIF or +HDMI audio input/output. +The assignment of audio inputs and outputs may be tuned with +.Xr device.hints 5 . +The driver's verbose boot messages provide a lot of information about +the operation of the driver and present audio setup. .Pp -The HDA specification defines the register-level interface, physical link -characteristics, codec programming models, and codec architectural components. -This specification is intended for both device driver developers and hardware -component designers. +The default audio device may be tuned by setting the +.Ar hw.snd.default_unit +sysctl, as described in +.Xr sound 4 , +or explicitly specified in application settings. .Ss Boot-time Configuration The following variables are available at boot-time through the .Xr device.hints 5 file: -.Bl -tag -width ".Va hint.pcm.%d.config" -offset indent -.It Va hint.pcm.%d.config +.Bl -tag -width ".Va hint.hdac.%d.config"-offset indent +.It Va hint.hdac.%d.config Configures a range of possible options. Possible values are: .Dq Li dmapos , @@ -102,6 +115,7 @@ Possible values are: .Dq Li ovref50 , .Dq Li ovref80 , .Dq Li ovref100 , +.Dq Li senseinv , .Dq Li softpcmvol , and .Dq Li vref . @@ -111,6 +125,145 @@ such as .Dq Li nofixedrate , will do the opposite and takes precedence. Options can be separated by whitespace and commas. +.Dq Li GPIO Ns s +are a codec's General Purpose I/O pins which system integrators sometimes +use to control external muters, amplifiers and so on. +If you have no sound, or sound volume is not adequate, you may have to +experiment a bit with the GPIO setup to find the optimal setup for your +system. +The +.Dq Li ivref Ns Ar X +and +.Dq Li ovref Ns Ar X +options control the voltage used to power external microphones. +.It Va hint.hdac.%d.msi +Controls MSI (Message Signaled Interrupts) support. +.It Va hint.hdac.%d.cad%d.nid%d.config +Overrides codec pin configuration set by BIOS. +May be specified as a 32-bit hexadecimal value with a leading +.Dq 0x , +or as a set of space-separated +.Dq Ar option Ns = Ns Ar value +pairs. +.El +.Pp +Pin configuration is the UAA driver's main source of information about codec +usage. +This information is usually provided by the codec manufacturer and tuned +by system integrators for specific system requirements. +The +.Nm +driver allows users to override it to fix integrator mistakes or to use the +available codec in alternative ways (for example to get stereo output and 2 +inputs instead of a single 5.1 output). +.Pp +The following options are supported: +.Bl -tag -width ".Va device=" -offset indent +.It Va as +Association number. +Associations are used to group individual pins to form a complex multi-pin +device. +For example, to group 4 connectors for 7.1 output, or to treat several +input connectors as sources for the same input device. +Association numbers can be specified as numeric values from 0 to 15. +A value of 0 means disabled pin. +A value of 15 is a set of independent unassociated pins. +Each association includes only pins of the same direction (in/out) and is +detected atomically (all pins or none). +A separate PCM audio device is created for every pair of input and +output associations. +.It Va seq +Sequence number. +A unique, per-association number used to order pins inside the +particular association. +Sequence numbers can be specified as numeric values from 0 to 15. +.Pp +The sequence number 15 has a special meaning for output associations. +Output pins with this number and device type +.Dq Ar Headphones +will duplicate (with automatic mute if jack detection is supported) the +first pin in that association. +.It Va device +Device type. +Can be specified as a number from 0 to 15 or as a name: +.Dq Li Line-out , +.Dq Li Speaker , +.Dq Li Headphones, +.Dq Li CD , +.Dq Li SPDIF-out , +.Dq Li Digital-out , +.Dq Li Modem-line , +.Dq Li Modem-handset , +.Dq Li Line-in , +.Dq Li AUX , +.Dq Li Mic , +.Dq Li Telephony , +.Dq Li SPDIF-in , +.Dq Li Digital-in , +.Dq Li Res.E , +or +.Dq Li Other . +The device type also describes the pin direction (in/out). +For example, +.Dq Li CD +always means an input pin, while +.Dq Li Headphones +always means an output. +.It Va conn +Connection type. +Can be specified as a number from 0 to 3. +The connection type can also be specified as one of the special names +.Dq Li Jack , +.Dq Li None , +.Dq Li Fixed , +or +.Dq Li Both . +Pins with a connection type of +.Dq Li None +are disabled. +.It Va ctype +Connector physical type. +Can be specified as a number from 0 to 15. +This is a reference only value. +It is ignored by the +.Nm +driver. +.It Va color +Connector color. +Can be specified as a number from 0 to 15 or as one of the names +.Dq Li Unknown , +.Dq Li Black , +.Dq Li Grey , +.Dq Li Blue , +.Dq Li Green , +.Dq Li Red , +.Dq Li Orange , +.Dq Li Yellow , +.Dq Li Purple , +.Dq Li Pink , +.Dq Li Res.A , +.Dq Li Res.B , +.Dq Li Res.C , +.Dq Li Res.D , +.Dq Li White , +or +.Dq Li Other . +This is a reference only value. +It is ignored by the +.Nm +driver. +.It Va loc +Connector physical location. +Can be specified as a number from 0 to 63. +This is a reference only value. +It is ignored by the +.Nm +driver. +.It Va misc +Misc bits. +Can be specified as a number from 0 to 15. +Bit 0 has a special meaning. When set it means that jack detection is +not implemented in hardware. .El .Ss Runtime Configuration The following @@ -118,19 +271,192 @@ The following variables are available in addition to those available to all .Xr sound 4 devices: -.Bl -tag -width ".Va dev.pcm.%d.polling" -offset indent -.It Va dev.pcm.%d.polling -Experimental polling mode, where the driver operates by querying the device -state on each tick using -.Xr callout 9 . +.Bl -tag -width ".Va dev.hdac.%d.polling" -offset indent +.It Va dev.hdac.%d.polling +Enables polling mode. +In this mode the driver operates by querying the device state on timer +ticks using +.Xr callout 9 +instead of interrupts. Polling is disabled by default. Do not enable it unless you are facing weird interrupt problems or if the device cannot generate interrupts at all. +.It Va dev.hdac.%d.polling_interval +Controller/Jack Sense polling interval (1-1000 ms) +.It Va dev.hdac.%d.pindump +Setting this to a non-zero value dumps the current pin configuration, main +capabilities and jack sense status to console and syslog. .El +.Sh EXAMPLES +Taking HP Compaq DX2300 with Realtek ALC888 HDA codec for example. +This system has two audio connectors on a front side, three audio connectors +on a rear side and one internal speaker. +According to verbose driver output and the codec datasheet, +this codec has five stereo DACs and two stereo ADCs, all of them are routable to +any codec pin (external connector). +All codec pins are reversible (could be configured either as input or output). +.Pp +So high codec uniformity and flexibility allow driver to configure it in many +different ways, depending on requested pins usage decribed by pins configuration. +Driver reports such default pin configuration when verbose messages enabled: +.Bd -literal +hdac0: nid 20 0x01014020 as 2 seq 0 Line-out Jack jack 1 loc 1 color Green misc 0 +hdac0: nid 21 0x99130110 as 1 seq 0 Speaker Fixed jack 3 loc 25 color Unknown misc 1 +hdac0: nid 22 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 23 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 24 0x01a19830 as 3 seq 0 Mic Jack jack 1 loc 1 color Pink misc 8 +hdac0: nid 25 0x02a1983f as 3 seq 15 Mic Jack jack 1 loc 2 color Pink misc 8 +hdac0: nid 26 0x01813031 as 3 seq 1 Line-in Jack jack 1 loc 1 color Blue misc 0 +hdac0: nid 27 0x0221401f as 1 seq 15 Headphones Jack jack 1 loc 2 color Green misc 0 +hdac0: nid 28 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 30 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +hdac0: nid 31 0x411111f0 as 15 seq 0 Speaker None jack 1 loc 1 color Black misc 1 +.Ed +.Pp +Here we can see, that the nodes with ID (nid) 25 and 27 are front pannel +connectors (Jack, loc 2), nids 20, 24 and 26 are rear pannel connectors +(Jack, loc 1) and nid 21 is a built-in speaker (Fixed, loc 25). +Pins with nids 22, 23, 28, 30 and 31 will be disabled by driver due to "None" +connectivity. So the pin count and description matches to connectors that +we have. +.Pp +Using association (as) and sequence (seq) fields values pins are grouped into +3 associations: +.Bd -literal +hdac0: Association 0 (1) out: +hdac0: Pin nid=21 seq=0 +hdac0: Pin nid=27 seq=15 +hdac0: Association 1 (2) out: +hdac0: Pin nid=20 seq=0 +hdac0: Association 2 (3) in: +hdac0: Pin nid=24 seq=0 +hdac0: Pin nid=26 seq=1 +hdac0: Pin nid=25 seq=15 +.Ed +.Pp +Each +.Xr pcm 4 +device uses two associations: one for playback and one for recording. +Associations processed and assigned to +.Xr pcm 4 +devices in increasing numerical order. +In this case association #0 (1) will become +.Li pcm0 +device playback, using the internal speakers and +.Ar Headphones +jack with speaker automute on the headphones jack connection. +Association #1 (2) will become +.Li pcm1 +playback, using the +.Ar Line-out +jack. +Association #2 (3) will become +.Li pcm0 +recording, using the external microphones and the +.Ar Line-in +jack. +.Pp +The +.Nm +driver provides extensive verbose messages to diagnose its operation +logic and describe its current codec configuration. +.Pp +Using +.Xr device.hints 5 +it is possible to modify the configuration of the existing pins, +allowing a broad range of different audio setups. +Here are a few examples of some setups possible for this particular +hardware: +.Ss Example 1 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1" +hint.hdac.0.cad0.nid21.config="as=2" +.Ed +.Pp +will swap line-out and speaker functions. +So the +.Li pcm0 +device will play to the line-out and headphones jacks. Line-out will +be muted on the headphones jack connection. +Recording on +.Li pcm0 +will go from two external microphones and line-in jacks. +.Li pcm1 +playback will go to the internal speaker. +.Pp +.Ss Example 2 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1 seq=15 device=Headphones" +hint.hdac.0.cad0.nid27.config="as=2 seq=0" +hint.hdac.0.cad0.nid25.config="as=4 seq=0" +.Ed +.Pp +will split the headphones and one of the microphones to a separate device. +The +.Li pcm0 +device will play to the internal speaker and to the line-out jack, with +speaker automute on the line-out jack connection. +Recording on +.Li pcm0 +will use input from one external microphone and the line-in jacks. +The +.Li pcm1 +device will be completely dedicated to a headset (headphones and mic) +connected to the front connectors. +.Pp +.Ss Example 3 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1 seq=0" +hint.hdac.0.cad0.nid26.config="as=2 seq=0" +hint.hdac.0.cad0.nid27.config="as=3 seq=0" +hint.hdac.0.cad0.nid25.config="as=4 seq=0" +hint.hdac.0.cad0.nid24.config="as=5 seq=0 device=Line-out" +hint.hdac.0.cad0.nid21.config="as=6 seq=0" +.Ed +.Pp +will give 4 independent devices: +.Li pcm0 +.Pq line-out and line-in , +.Li pcm1 +.Pq headphones and mic , +.Li pcm2 +.Pq additional line-out via retasked rear mic jack , +and +.Li pcm3 +.Pq internal speaker . +.Pp +.Ss Example 4 +Setting the +.Xr device.hints 5 +options +.Bd -literal +hint.hdac.0.cad0.nid20.config="as=1 seq=0" +hint.hdac.0.cad0.nid24.config="as=1 seq=1 device=Line-out" +hint.hdac.0.cad0.nid26.config="as=1 seq=2 device=Line-out" +hint.hdac.0.cad0.nid21.config="as=2 seq=0" +.Ed +.Pp +will give 2 devices: +.Li pcm0 +for 5.1 playback via 3 rear connectors (line-out and retasked +mic and line-in) and headset (headphones and mic) at front connectors. +.Li pcm1 +for internal speaker playback. +On headphones connection rear connectors will be muted. .Sh HARDWARE The .Nm -driver supports the following audio chipsets: +driver supports many Intel HDA compatible audio chipsets including the +following: .Pp .Bl -bullet -compact .It @@ -140,13 +466,17 @@ ATI SB600 .It Intel 631x/632xESB .It -Intel 82801F +Intel 82801F (ICH6) +.It +Intel 82801G (ICH7) .It -Intel 82801G +Intel 82801H (ICH8) .It -Intel 82801H +Intel 82801I (ICH9) .It -Intel 82801I +Intel 82801J (ICH10) +.It +Intel US15W (SCH) .It nVidia MCP51 .It @@ -156,18 +486,26 @@ nVidia MCP61A .It nVidia MCP61B .It +nVidia MCP63 +.It nVidia MCP65A .It nVidia MCP65B .It +nVidia MCP67A +.It +nVidia MCP67B +.It +nVidia MCP68 +.It +nVidia MCP69 +.It SiS 966 .It VIA VT8251/8237A .El .Pp -Generic audio chipsets compatible with the Intel HDA specification should work, -but have not been verified yet. -The following codecs have been verified to work: +The following and many other codecs have been verified to work: .Pp .Bl -bullet -compact .It @@ -175,6 +513,8 @@ Analog Devices AD1981HD .It Analog Devices AD1983 .It +Analog Devices AD1984 +.It Analog Devices AD1986A .It Analog Devices AD1988 @@ -183,9 +523,11 @@ Analog Devices AD1988B .It CMedia CMI9880 .It -Conexant Venice +Conexant CX20549 (Venice) .It -Conexant Waikiki +Conexant CX20551 (Waikiki) +.It +Conexant CX20561 (Hermosa) .It Realtek ALC260 .It @@ -209,24 +551,47 @@ Realtek ALC885 .It Realtek ALC888 .It +Realtek ALC889 +.It +Sigmatel STAC9205 +.It Sigmatel STAC9220 .It -Sigmatel STAC9220D/9223D +Sigmatel STAC9220D / 9223D .It Sigmatel STAC9221 .It Sigmatel STAC9221D .It -Sigmatel STAC9227 +Sigmatel STAC9227D +.It +Sigmatel STAC9227X +.It +Sigmatel STAC9228D +.It +Sigmatel STAC9228X +.It +Sigmatel STAC9229D +.It +Sigmatel STAC9229X +.It +Sigmatel STAC9230D +.It +Sigmatel STAC9230X .It Sigmatel STAC9271D .It +Sigmatel STAC9872AK +.It VIA VT1708 .It +VIA VT1708B +.It VIA VT1709 .El .Sh SEE ALSO .Xr sound 4 , +.Xr snd_ich 4 , .Xr device.hints 5 , .Xr loader.conf 5 , .Xr sysctl 8 @@ -240,18 +605,26 @@ device driver first appeared in The .Nm driver was written by -.An Stephane E. Potvin Aq sepotvin@videotron.ca +.An Stephane E. Potvin Aq sepotvin@videotron.ca , +.An Ariff Abdullah Aq ariff@FreeBSD.org and -.An Ariff Abdullah Aq ariff@FreeBSD.org . +.An Alexander Motin Aq mav@FreeBSD.org . This manual page was written by -.An Joel Dahl Aq joel@FreeBSD.org . +.An Joel Dahl Aq joel@FreeBSD.org , +.An Alexander Motin Aq mav@FreeBSD.org +and +.An Giorgos Keramidas Aq keramida@FreeBSD.org . .Sh BUGS -There are a couple of missing features, such as support for Digital -S/PDIF and multichannel output. -.Pp A few Hardware/OEM vendors tend to screw up BIOS settings, thus rendering the .Nm driver useless, which usually results in a state where the .Nm -driver seems to attach and work, but without any sound. +driver seems to attach and work, but without any sound. Some of +that cases can be solved by tuning loader.conf variables. But before +trying to fix problem that way, make sure that problem is really exists +and the PCM audio device you are using really corresponds to expected +audio connector. +.Pp +Due to OSS limitation multichannel (not multidevice) playback is not +supported. Modified: stable/7/share/man/man4/snd_ich.4 ============================================================================== --- stable/7/share/man/man4/snd_ich.4 Wed Jan 7 16:06:09 2009 (r186865) +++ stable/7/share/man/man4/snd_ich.4 Wed Jan 7 16:15:17 2009 (r186866) @@ -24,12 +24,12 @@ .\" .\" $FreeBSD$ .\" -.Dd December 15, 2005 +.Dd January 6, 2009 .Dt SND_ICH 4 .Os .Sh NAME .Nm snd_ich -.Nd "Intel ICH PCI and compatible bridge device driver" +.Nd "Intel ICH AC'97 and compatible bridge device driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: @@ -49,7 +49,12 @@ The .Nm bridge driver allows the generic audio driver .Xr sound 4 -to attach to Intel ICH and compatible audio devices. +to attach to Intel ICH AC'97 and compatible audio devices. +.Pp +Some later chips, like ICH6/ICH7, depending on wiring can instead implement +newer Intel HD Audio specification, which is supported by +.Xr snd_hda 4 +driver. .Sh HARDWARE The .Nm @@ -94,7 +99,8 @@ NVIDIA nForce4 SiS 7012 .El .Sh SEE ALSO -.Xr sound 4 +.Xr sound 4 , +.Xr snd_hda 4 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 16:21:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C64021065670; Wed, 7 Jan 2009 16:21:04 +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 B2B528FC1A; Wed, 7 Jan 2009 16:21:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07GL4wp091954; Wed, 7 Jan 2009 16:21:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07GL48I091953; Wed, 7 Jan 2009 16:21:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071621.n07GL48I091953@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:21:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186867 - in stable/7/sys: . conf contrib/pf dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:21:05 -0000 Author: mav Date: Wed Jan 7 16:21:04 2009 New Revision: 186867 URL: http://svn.freebsd.org/changeset/base/186867 Log: MFC rev. 186828 Add small hint that snd_ich is the AC'97 controller driver. Modified: stable/7/sys/ (props changed) stable/7/sys/conf/NOTES stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/conf/NOTES ============================================================================== --- stable/7/sys/conf/NOTES Wed Jan 7 16:15:17 2009 (r186866) +++ stable/7/sys/conf/NOTES Wed Jan 7 16:21:04 2009 (r186867) @@ -2010,7 +2010,7 @@ device sound # snd_gusc: Gravis UltraSound ISA PnP/non-PnP. # snd_hda: Intel High Definition Audio (Controller) and # compatible. -# snd_ich: Intel ICH PCI and some more audio controllers +# snd_ich: Intel ICH AC'97 and some more audio controllers # embedded in a chipset, for example nVidia # nForce controllers. # snd_maestro: ESS Technology Maestro-1/2x PCI. From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 16:35:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C76F1065676; Wed, 7 Jan 2009 16:35:59 +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 8805D8FC1A; Wed, 7 Jan 2009 16:35:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07GZxWC092374; Wed, 7 Jan 2009 16:35:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07GZxei092373; Wed, 7 Jan 2009 16:35:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901071635.n07GZxei092373@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 16:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186868 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 16:36:04 -0000 Author: mav Date: Wed Jan 7 16:35:59 2009 New Revision: 186868 URL: http://svn.freebsd.org/changeset/base/186868 Log: snd_hda(4) driver was updated to version 20081226_0122. Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Wed Jan 7 16:21:04 2009 (r186867) +++ stable/7/UPDATING Wed Jan 7 16:35:59 2009 (r186868) @@ -8,6 +8,17 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090107: + snd_hda(4) driver was updated to version 20081226_0122. + + Due to added HDMI audio and logical audio devices support, updated + driver often provides several PCM devices. In some cases it can make + system default audio device no longer correspond to the users's + habbitual audio connectors. In such cases wanted device can be + specified in audio application setup or defined globally via + hw.snd.default_unit sysctl according to sound(4) and snd_hda(4) + man pages. + 20080903: ntpd has been upgraded to 4.2.4p5. From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 18:02:36 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4EC2106566C; Wed, 7 Jan 2009 18:02:36 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C16958FC1C; Wed, 7 Jan 2009 18:02:36 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07I2aVq094381; Wed, 7 Jan 2009 18:02:36 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07I2a4q094380; Wed, 7 Jan 2009 18:02:36 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200901071802.n07I2a4q094380@svn.freebsd.org> From: Maxim Konovalov Date: Wed, 7 Jan 2009 18:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186869 - stable/7/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:02:37 -0000 Author: maxim Date: Wed Jan 7 18:02:36 2009 New Revision: 186869 URL: http://svn.freebsd.org/changeset/base/186869 Log: MFC r176637,178706,180757,184517,185405,186785: Mac OS X 10.5, DragonFly 1.12.0, FreeBSD 7.0, OpenBSD 4.3, DragonFly 2.0.0, OpenBSD 4.4, FreeBSD 6.4, FreeBSD 7.1. Modified: stable/7/share/misc/bsd-family-tree Modified: stable/7/share/misc/bsd-family-tree ============================================================================== --- stable/7/share/misc/bsd-family-tree Wed Jan 7 16:35:59 2009 (r186868) +++ stable/7/share/misc/bsd-family-tree Wed Jan 7 18:02:36 2009 (r186869) @@ -169,8 +169,8 @@ FreeBSD 4.0 | | | | | NetBSD 1. | FreeBSD 4.10 | | | | | | | | | | | FreeBSD 4.11 | | | | - | | | | | | - | v `-|------|-----------------|---------------------. + | | | | | + | `-|------|-----------------|---------------------. | | | | \ FreeBSD 5.0 | | | | | | | | | @@ -212,12 +212,24 @@ FreeBSD 5.2 | | | | | | | DragonFly 1.8.0 | | | | OpenBSD 4.1 | | | | | | DragonFly 1.10.0 + | | Mac OS X | | | + | | 10.5 | | | | | | | OpenBSD 4.2 | | | | NetBSD 4.0 | | | FreeBSD 6.3 | | | | + | \ | | | | + *--FreeBSD | | | | DragonFly 1.12.0 + | 7.0 | | | | | + | | | | | OpenBSD 4.3 | + | | | | | | DragonFly 2.0.0 + | | FreeBSD | | OpenBSD 4.4 | + | | 6.4 | | | | + | | | | | | + | FreeBSD 7.1 | | | | + | | | | | | + | V | | | | | | | | | - | | | | | -FreeBSD 7 -current | NetBSD -current OpenBSD -current | +FreeBSD 8 -current | NetBSD -current OpenBSD -current | | | | | | v v v v v @@ -472,9 +484,17 @@ FreeBSD 6.2 2007-01-15 [FBD] DragonFly 1.8.0 2007-01-30 [DFB] OpenBSD 4.1 2007-05-01 [OBD] DragonFly 1.10.0 2007-08-06 [DFB] +Mac OS X 10.5 2007-10-26 [APL] OpenBSD 4.2 2007-11-01 [OBD] NetBSD 4.0 2007-12-19 [NBD] FreeBSD 6.3 2008-01-18 [FBD] +DragonFly 1.12.0 2008-02-26 [DFB] +FreeBSD 7.0 2008-02-27 [FBD] +OpenBSD 4.3 2008-05-01 [OBD] +DragonFly 2.0.0 2008-07-21 [DFB] +OpenBSD 4.4 2008-11-01 [OBD] +FreeBSD 6.4 2008-11-28 [FBD] +FreeBSD 7.1 2009-01-04 [FBD] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 18:17:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11127106564A; Wed, 7 Jan 2009 18:17:38 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36F28FC1A; Wed, 7 Jan 2009 18:17:37 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07IHaLC094753; Wed, 7 Jan 2009 18:17:36 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07IHakT094752; Wed, 7 Jan 2009 18:17:36 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901071817.n07IHakT094752@svn.freebsd.org> From: Sam Leffler Date: Wed, 7 Jan 2009 18:17:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186870 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:17:38 -0000 Author: sam Date: Wed Jan 7 18:17:36 2009 New Revision: 186870 URL: http://svn.freebsd.org/changeset/base/186870 Log: only mark an infrastructure node to require an associd for xmit; fixes adhoc mode sta's that join an existing ibss Modified: head/sys/net80211/ieee80211_node.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Wed Jan 7 18:02:36 2009 (r186869) +++ head/sys/net80211/ieee80211_node.c Wed Jan 7 18:17:36 2009 (r186870) @@ -732,7 +732,10 @@ ieee80211_sta_join(struct ieee80211vap * ni->ni_erp = se->se_erp; IEEE80211_RSSI_LPF(ni->ni_avgrssi, se->se_rssi); ni->ni_noise = se->se_noise; - ni->ni_flags |= IEEE80211_NODE_ASSOCID; + if (vap->iv_opmode == IEEE80211_M_STA) { + /* NB: only infrastructure mode requires an associd */ + ni->ni_flags |= IEEE80211_NODE_ASSOCID; + } if (ieee80211_ies_init(&ni->ni_ies, se->se_ies.data, se->se_ies.len)) { ieee80211_ies_expand(&ni->ni_ies); From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 18:37:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD2B106566C; Wed, 7 Jan 2009 18:37:08 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E1198FC12; Wed, 7 Jan 2009 18:37:08 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Ib8ML095166; Wed, 7 Jan 2009 18:37:08 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Ib86p095165; Wed, 7 Jan 2009 18:37:08 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200901071837.n07Ib86p095165@svn.freebsd.org> From: Ulf Lilleengen Date: Wed, 7 Jan 2009 18:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186871 - head/contrib/csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 18:37:10 -0000 Author: lulf Date: Wed Jan 7 18:37:07 2009 New Revision: 186871 URL: http://svn.freebsd.org/changeset/base/186871 Log: - Update manpage now that cvs mode is supported. Modified: head/contrib/csup/csup.1 Modified: head/contrib/csup/csup.1 ============================================================================== --- head/contrib/csup/csup.1 Wed Jan 7 18:17:36 2009 (r186870) +++ head/contrib/csup/csup.1 Wed Jan 7 18:37:07 2009 (r186871) @@ -442,8 +442,6 @@ They are called mode and .Em checkout mode. -.Nm -only supports the checkout mode for now. .Pp In CVS mode, the client receives copies of the actual RCS files making up the master CVS repository. CVS mode is the default mode of operation. From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 19:51:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 724DE106564A; Wed, 7 Jan 2009 19:51:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2F7CE8FC19; Wed, 7 Jan 2009 19:51:11 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n07Jlv4d060208; Wed, 7 Jan 2009 12:48:00 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 07 Jan 2009 12:48:10 -0700 (MST) Message-Id: <20090107.124810.1933499588.imp@bsdimp.com> To: rizzo@iet.unipi.it From: "M. Warner Losh" In-Reply-To: <20090106224658.GB3130@onelab2.iet.unipi.it> References: <200901061510.n06FAQ0g034585@svn.freebsd.org> <4963D4E9.707@FreeBSD.org> <20090106224658.GB3130@onelab2.iet.unipi.it> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, sobomax@freebsd.org, luigi@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn: head/sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 19:51:12 -0000 In message: <20090106224658.GB3130@onelab2.iet.unipi.it> Luigi Rizzo writes: : On Tue, Jan 06, 2009 at 02:02:17PM -0800, Maxim Sobolev wrote: : > Luigi Rizzo wrote: : > >+# through getenv() (or kenv(1) in userland). The format of the file : > >+# is 'variable=value' , same as for hints files. : > : > What do you think about extending comment with the following: : > : > "hints files" -> "hints or loader.conf(5) files". : : i don't know -- in fact, I have a curiosity here: : loader.conf is processed by some code in loader.4th which in turn : is interpreted by loader.conf, and this chain does some magic : on certain variable names (and can also do $variable expansion). : : Instead, I believe that 'hints' (and presumably 'env' values) are : passed directly to the kernel, so there are no special manipulation : of variable names or values. Is that correct ? hints are either compiled into the kernel, or are loaded into the kernel environment by reading /boot/device.hints. There's nothing really magical about it. You could put all your hints into /boot/loader.conf if you wanted... If you compile them directly into the kernel, the loader can't help... Warner From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 20:17:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FDBF10656C9; Wed, 7 Jan 2009 20:17:56 +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 66E588FC1D; Wed, 7 Jan 2009 20:17:56 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHupx098456; Wed, 7 Jan 2009 20:17:56 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHtNq098443; Wed, 7 Jan 2009 20:17:55 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHtNq098443@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:17:58 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Changes in other areas also in this revision: Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c Modified: stable/7/contrib/lukemftpd/src/extern.h ============================================================================== --- stable/7/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: stable/7/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- stable/7/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: stable/7/contrib/lukemftpd/src/ftpd.c ============================================================================== --- stable/7/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: stable/7/crypto/openssl/apps/speed.c ============================================================================== --- stable/7/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: stable/7/crypto/openssl/apps/spkac.c ============================================================================== --- stable/7/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -285,7 +285,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: stable/7/crypto/openssl/apps/verify.c ============================================================================== --- stable/7/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: stable/7/crypto/openssl/apps/x509.c ============================================================================== --- stable/7/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1144,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: stable/7/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- stable/7/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: stable/7/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- stable/7/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: stable/7/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -883,7 +883,7 @@ int ssl3_get_server_certificate(SSL *s) } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1368,7 +1368,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; @@ -1386,7 +1386,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: stable/7/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/7/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2481,7 +2481,7 @@ int ssl3_get_client_certificate(SSL *s) else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: stable/7/crypto/openssl/ssl/ssltest.c ============================================================================== --- stable/7/crypto/openssl/ssl/ssltest.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/7/crypto/openssl/ssl/ssltest.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2072,7 +2072,7 @@ static int MS_CALLBACK app_verify_callba if (cb_arg->proxy_auth) { - if (ok) + if (ok > 0) { const char *cond_end = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 20:17:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1539010656CA; Wed, 7 Jan 2009 20:17: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 EFF778FC21; Wed, 7 Jan 2009 20:17:56 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHuG1098473; Wed, 7 Jan 2009 20:17:56 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHucY098461; Wed, 7 Jan 2009 20:17:56 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHucY098461@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:18:00 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c Changes in other areas also in this revision: Modified: releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Modified: head/contrib/lukemftpd/src/extern.h ============================================================================== --- head/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ head/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: head/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- head/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ head/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: head/contrib/lukemftpd/src/ftpd.c ============================================================================== --- head/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: head/crypto/openssl/apps/speed.c ============================================================================== --- head/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: head/crypto/openssl/apps/spkac.c ============================================================================== --- head/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -285,7 +285,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: head/crypto/openssl/apps/verify.c ============================================================================== --- head/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: head/crypto/openssl/apps/x509.c ============================================================================== --- head/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1144,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: head/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: head/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- head/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: head/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- head/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -883,7 +883,7 @@ int ssl3_get_server_certificate(SSL *s) } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1368,7 +1368,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; @@ -1386,7 +1386,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: head/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- head/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2481,7 +2481,7 @@ int ssl3_get_client_certificate(SSL *s) else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: head/crypto/openssl/ssl/ssltest.c ============================================================================== --- head/crypto/openssl/ssl/ssltest.c Wed Jan 7 18:37:07 2009 (r186871) +++ head/crypto/openssl/ssl/ssltest.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2072,7 +2072,7 @@ static int MS_CALLBACK app_verify_callba if (cb_arg->proxy_auth) { - if (ok) + if (ok > 0) { const char *cond_end = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 20:18:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F876106564A; Wed, 7 Jan 2009 20:17:59 +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 173BE8FC13; Wed, 7 Jan 2009 20:17:59 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHxtc098526; Wed, 7 Jan 2009 20:17:59 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHvDk098478; Wed, 7 Jan 2009 20:17:57 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHvDk098478@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:18:02 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh Changes in other areas also in this revision: Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Modified: releng/6.3/UPDATING ============================================================================== --- releng/6.3/UPDATING Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/UPDATING Wed Jan 7 20:17:55 2009 (r186872) @@ -8,6 +8,12 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090107: p8 FreeBSD-SA-09:01.lukemftpd, FreeBSD-SA-09:02.openssl + Prevent cross-site forgery attacks on lukemftpd(8) due to splitting + long commands into multiple requests. [09:01] + + Fix incorrect OpenSSL checks for malformed signatures. [09:02] + 20081223: p7 FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Modified: releng/6.3/contrib/lukemftpd/src/extern.h ============================================================================== --- releng/6.3/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: releng/6.3/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- releng/6.3/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: releng/6.3/contrib/lukemftpd/src/ftpd.c ============================================================================== --- releng/6.3/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: releng/6.3/crypto/openssl/apps/speed.c ============================================================================== --- releng/6.3/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1486,7 +1486,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: releng/6.3/crypto/openssl/apps/spkac.c ============================================================================== --- releng/6.3/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -284,7 +284,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: releng/6.3/crypto/openssl/apps/verify.c ============================================================================== --- releng/6.3/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -275,7 +275,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -365,4 +365,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: releng/6.3/crypto/openssl/apps/x509.c ============================================================================== --- releng/6.3/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1113,7 +1113,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: releng/6.3/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- releng/6.3/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1062,7 +1062,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: releng/6.3/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- releng/6.3/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1070,7 +1070,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1099,7 +1099,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: releng/6.3/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/6.3/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -833,7 +833,7 @@ static int ssl3_get_server_certificate(S } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1206,7 +1206,7 @@ static int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: releng/6.3/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- releng/6.3/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2015,7 +2015,7 @@ static int ssl3_get_client_certificate(S else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: releng/6.3/sys/conf/newvers.sh ============================================================================== --- releng/6.3/sys/conf/newvers.sh Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.3/sys/conf/newvers.sh Wed Jan 7 20:17:55 2009 (r186872) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="6.3" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/6.4/UPDATING ============================================================================== --- releng/6.4/UPDATING Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/UPDATING Wed Jan 7 20:17:55 2009 (r186872) @@ -8,6 +8,12 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090107: p2 FreeBSD-SA-09:01.lukemftpd, FreeBSD-SA-09:02.openssl + Prevent cross-site forgery attacks on lukemftpd(8) due to splitting + long commands into multiple requests. [09:01] + + Fix incorrect OpenSSL checks for malformed signatures. [09:02] + 20081223: p1 FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Modified: releng/6.4/contrib/lukemftpd/src/extern.h ============================================================================== --- releng/6.4/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: releng/6.4/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- releng/6.4/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: releng/6.4/contrib/lukemftpd/src/ftpd.c ============================================================================== --- releng/6.4/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: releng/6.4/crypto/openssl/apps/speed.c ============================================================================== --- releng/6.4/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1486,7 +1486,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: releng/6.4/crypto/openssl/apps/spkac.c ============================================================================== --- releng/6.4/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -284,7 +284,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: releng/6.4/crypto/openssl/apps/verify.c ============================================================================== --- releng/6.4/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -275,7 +275,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -365,4 +365,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: releng/6.4/crypto/openssl/apps/x509.c ============================================================================== --- releng/6.4/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1113,7 +1113,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: releng/6.4/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- releng/6.4/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1062,7 +1062,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: releng/6.4/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- releng/6.4/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1070,7 +1070,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1099,7 +1099,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: releng/6.4/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/6.4/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -833,7 +833,7 @@ static int ssl3_get_server_certificate(S } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1206,7 +1206,7 @@ static int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: releng/6.4/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- releng/6.4/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2015,7 +2015,7 @@ static int ssl3_get_client_certificate(S else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: releng/6.4/sys/conf/newvers.sh ============================================================================== --- releng/6.4/sys/conf/newvers.sh Wed Jan 7 18:37:07 2009 (r186871) +++ releng/6.4/sys/conf/newvers.sh Wed Jan 7 20:17:55 2009 (r186872) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="6.4" -BRANCH="RELEASE-p1" +BRANCH="RELEASE-p2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.0/UPDATING ============================================================================== --- releng/7.0/UPDATING Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/UPDATING Wed Jan 7 20:17:55 2009 (r186872) @@ -8,6 +8,12 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090107: p8 FreeBSD-SA-09:01.lukemftpd, FreeBSD-SA-09:02.openssl + Prevent cross-site forgery attacks on lukemftpd(8) due to splitting + long commands into multiple requests. [09:01] + + Fix incorrect OpenSSL checks for malformed signatures. [09:02] + 20081223: p7 FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw Prevent cross-site forgery attacks on ftpd(8) due to splitting long commands into multiple requests. [08:12] Modified: releng/7.0/contrib/lukemftpd/src/extern.h ============================================================================== --- releng/7.0/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: releng/7.0/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- releng/7.0/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: releng/7.0/contrib/lukemftpd/src/ftpd.c ============================================================================== --- releng/7.0/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: releng/7.0/crypto/openssl/apps/speed.c ============================================================================== --- releng/7.0/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: releng/7.0/crypto/openssl/apps/spkac.c ============================================================================== --- releng/7.0/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -285,7 +285,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: releng/7.0/crypto/openssl/apps/verify.c ============================================================================== --- releng/7.0/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: releng/7.0/crypto/openssl/apps/x509.c ============================================================================== --- releng/7.0/crypto/openssl/apps/x509.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1144,7 +1144,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: releng/7.0/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- releng/7.0/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1044,7 +1044,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: releng/7.0/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- releng/7.0/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: releng/7.0/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- releng/7.0/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) @@ -883,7 +883,7 @@ int ssl3_get_server_certificate(SSL *s) } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1368,7 +1368,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; @@ -1386,7 +1386,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: releng/7.0/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- releng/7.0/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2481,7 +2481,7 @@ int ssl3_get_client_certificate(SSL *s) else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); Modified: releng/7.0/crypto/openssl/ssl/ssltest.c ============================================================================== --- releng/7.0/crypto/openssl/ssl/ssltest.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/crypto/openssl/ssl/ssltest.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2072,7 +2072,7 @@ static int MS_CALLBACK app_verify_callba if (cb_arg->proxy_auth) { - if (ok) + if (ok > 0) { const char *cond_end = NULL; Modified: releng/7.0/sys/conf/newvers.sh ============================================================================== --- releng/7.0/sys/conf/newvers.sh Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.0/sys/conf/newvers.sh Wed Jan 7 20:17:55 2009 (r186872) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="7.0" -BRANCH="RELEASE-p7" +BRANCH="RELEASE-p8" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/7.1/UPDATING ============================================================================== --- releng/7.1/UPDATING Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/UPDATING Wed Jan 7 20:17:55 2009 (r186872) @@ -8,6 +8,12 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090107: p1 FreeBSD-SA-09:01.lukemftpd, FreeBSD-SA-09:02.openssl + Prevent cross-site forgery attacks on lukemftpd(8) due to splitting + long commands into multiple requests. [09:01] + + Fix incorrect OpenSSL checks for malformed signatures. [09:02] + 20090106: FreeBSD 7.1-RELEASE Modified: releng/7.1/contrib/lukemftpd/src/extern.h ============================================================================== --- releng/7.1/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: releng/7.1/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- releng/7.1/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: releng/7.1/contrib/lukemftpd/src/ftpd.c ============================================================================== --- releng/7.1/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't Modified: releng/7.1/crypto/openssl/apps/speed.c ============================================================================== --- releng/7.1/crypto/openssl/apps/speed.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) @@ -2038,7 +2038,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: releng/7.1/crypto/openssl/apps/spkac.c ============================================================================== --- releng/7.1/crypto/openssl/apps/spkac.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) @@ -285,7 +285,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: releng/7.1/crypto/openssl/apps/verify.c ============================================================================== --- releng/7.1/crypto/openssl/apps/verify.c Wed Jan 7 18:37:07 2009 (r186871) +++ releng/7.1/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) @@ -266,7 +266,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -367,4 +367,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 20:18:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84DDE1065674; Wed, 7 Jan 2009 20:17:59 +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 6DF218FC22; Wed, 7 Jan 2009 20:17:59 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07KHxRd098534; Wed, 7 Jan 2009 20:17:59 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07KHxHj098531; Wed, 7 Jan 2009 20:17:59 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072017.n07KHxHj098531@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 20:17:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186872 - head/contrib/lukemftpd/src head/crypto/openssl/apps head/crypto/openssl/ssl releng/6.3 releng/6.3/contrib/lukemftpd/src releng/6.3/crypto/openssl/apps releng/6.3/crypto/openss... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 20:18:05 -0000 Author: simon Date: Wed Jan 7 20:17:55 2009 New Revision: 186872 URL: http://svn.freebsd.org/changeset/base/186872 Log: Prevent cross-site forgery attacks on lukemftpd(8) due to splitting long commands into multiple requests. [09:01] Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. [09:02] Security: FreeBSD-SA-09:01.lukemftpd Security: FreeBSD-SA-09:02.openssl Obtained from: NetBSD [SA-09:01] Obtained from: OpenSSL Project [SA-09:02] Approved by: so (simon) Modified: stable/6/contrib/lukemftpd/src/extern.h stable/6/contrib/lukemftpd/src/ftpcmd.y stable/6/contrib/lukemftpd/src/ftpd.c Changes in other areas also in this revision: Modified: head/contrib/lukemftpd/src/extern.h head/contrib/lukemftpd/src/ftpcmd.y head/contrib/lukemftpd/src/ftpd.c head/crypto/openssl/apps/speed.c head/crypto/openssl/apps/spkac.c head/crypto/openssl/apps/verify.c head/crypto/openssl/apps/x509.c head/crypto/openssl/ssl/s2_clnt.c head/crypto/openssl/ssl/s2_srvr.c head/crypto/openssl/ssl/s3_clnt.c head/crypto/openssl/ssl/s3_srvr.c head/crypto/openssl/ssl/ssltest.c releng/6.3/UPDATING releng/6.3/contrib/lukemftpd/src/extern.h releng/6.3/contrib/lukemftpd/src/ftpcmd.y releng/6.3/contrib/lukemftpd/src/ftpd.c releng/6.3/crypto/openssl/apps/speed.c releng/6.3/crypto/openssl/apps/spkac.c releng/6.3/crypto/openssl/apps/verify.c releng/6.3/crypto/openssl/apps/x509.c releng/6.3/crypto/openssl/ssl/s2_clnt.c releng/6.3/crypto/openssl/ssl/s2_srvr.c releng/6.3/crypto/openssl/ssl/s3_clnt.c releng/6.3/crypto/openssl/ssl/s3_srvr.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/lukemftpd/src/extern.h releng/6.4/contrib/lukemftpd/src/ftpcmd.y releng/6.4/contrib/lukemftpd/src/ftpd.c releng/6.4/crypto/openssl/apps/speed.c releng/6.4/crypto/openssl/apps/spkac.c releng/6.4/crypto/openssl/apps/verify.c releng/6.4/crypto/openssl/apps/x509.c releng/6.4/crypto/openssl/ssl/s2_clnt.c releng/6.4/crypto/openssl/ssl/s2_srvr.c releng/6.4/crypto/openssl/ssl/s3_clnt.c releng/6.4/crypto/openssl/ssl/s3_srvr.c releng/6.4/sys/conf/newvers.sh releng/7.0/UPDATING releng/7.0/contrib/lukemftpd/src/extern.h releng/7.0/contrib/lukemftpd/src/ftpcmd.y releng/7.0/contrib/lukemftpd/src/ftpd.c releng/7.0/crypto/openssl/apps/speed.c releng/7.0/crypto/openssl/apps/spkac.c releng/7.0/crypto/openssl/apps/verify.c releng/7.0/crypto/openssl/apps/x509.c releng/7.0/crypto/openssl/ssl/s2_clnt.c releng/7.0/crypto/openssl/ssl/s2_srvr.c releng/7.0/crypto/openssl/ssl/s3_clnt.c releng/7.0/crypto/openssl/ssl/s3_srvr.c releng/7.0/crypto/openssl/ssl/ssltest.c releng/7.0/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/lukemftpd/src/extern.h releng/7.1/contrib/lukemftpd/src/ftpcmd.y releng/7.1/contrib/lukemftpd/src/ftpd.c releng/7.1/crypto/openssl/apps/speed.c releng/7.1/crypto/openssl/apps/spkac.c releng/7.1/crypto/openssl/apps/verify.c releng/7.1/crypto/openssl/apps/x509.c releng/7.1/crypto/openssl/ssl/s2_clnt.c releng/7.1/crypto/openssl/ssl/s2_srvr.c releng/7.1/crypto/openssl/ssl/s3_clnt.c releng/7.1/crypto/openssl/ssl/s3_srvr.c releng/7.1/crypto/openssl/ssl/ssltest.c releng/7.1/sys/conf/newvers.sh stable/7/contrib/lukemftpd/src/extern.h stable/7/contrib/lukemftpd/src/ftpcmd.y stable/7/contrib/lukemftpd/src/ftpd.c stable/7/crypto/openssl/apps/speed.c stable/7/crypto/openssl/apps/spkac.c stable/7/crypto/openssl/apps/verify.c stable/7/crypto/openssl/apps/x509.c stable/7/crypto/openssl/ssl/s2_clnt.c stable/7/crypto/openssl/ssl/s2_srvr.c stable/7/crypto/openssl/ssl/s3_clnt.c stable/7/crypto/openssl/ssl/s3_srvr.c stable/7/crypto/openssl/ssl/ssltest.c Modified: stable/6/contrib/lukemftpd/src/extern.h ============================================================================== --- stable/6/contrib/lukemftpd/src/extern.h Wed Jan 7 18:37:07 2009 (r186871) +++ stable/6/contrib/lukemftpd/src/extern.h Wed Jan 7 20:17:55 2009 (r186872) @@ -139,7 +139,7 @@ void feat(void); void format_path(char *, const char *); int ftpd_pclose(FILE *); FILE *ftpd_popen(char *[], const char *, int); -char *getline(char *, int, FILE *); +int getline(char *, int, FILE *); void init_curclass(void); void logxfer(const char *, off_t, const char *, const char *, const struct timeval *, const char *); Modified: stable/6/contrib/lukemftpd/src/ftpcmd.y ============================================================================== --- stable/6/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 18:37:07 2009 (r186871) +++ stable/6/contrib/lukemftpd/src/ftpcmd.y Wed Jan 7 20:17:55 2009 (r186872) @@ -1363,8 +1363,12 @@ lookup(struct tab *p, const char *cmd) /* * getline - a hacked up version of fgets to ignore TELNET escape codes. + * `s' is the buffer to read into. + * `n' is the 1 less than the size of the buffer, to allow trailing NUL + * `iop' is the FILE to read from. + * Returns 0 on success, -1 on EOF, -2 if the command was too long. */ -char * +int getline(char *s, int n, FILE *iop) { int c; @@ -1379,7 +1383,7 @@ getline(char *s, int n, FILE *iop) if (ftpd_debug) syslog(LOG_DEBUG, "command: %s", s); tmpline[0] = '\0'; - return(s); + return(0); } if (c == 0) tmpline[0] = '\0'; @@ -1418,11 +1422,25 @@ getline(char *s, int n, FILE *iop) } } *cs++ = c; - if (--n <= 0 || c == '\n') + if (--n <= 0) { + /* + * If command doesn't fit into buffer, discard the + * rest of the command and indicate truncation. + * This prevents the command to be split up into + * multiple commands. + */ + if (ftpd_debug) + syslog(LOG_DEBUG, + "command too long, last char: %d", c); + while (c != '\n' && (c = getc(iop)) != EOF) + continue; + return (-2); + } + if (c == '\n') break; } if (c == EOF && cs == s) - return (NULL); + return (-1); *cs++ = '\0'; if (ftpd_debug) { if ((curclass.type != CLASS_GUEST && @@ -1444,7 +1462,7 @@ getline(char *s, int n, FILE *iop) syslog(LOG_DEBUG, "command: %.*s", len, s); } } - return (s); + return (0); } void @@ -1458,15 +1476,20 @@ ftp_handle_line(char *cp) void ftp_loop(void) { + int ret; while (1) { (void) alarm(curclass.timeout); - if (getline(cbuf, sizeof(cbuf)-1, stdin) == NULL) { + ret = getline(cbuf, sizeof(cbuf)-1, stdin); + (void) alarm(0); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + reply(500, "Command too long."); + } else { + ftp_handle_line(cbuf); } - (void) alarm(0); - ftp_handle_line(cbuf); } /*NOTREACHED*/ } Modified: stable/6/contrib/lukemftpd/src/ftpd.c ============================================================================== --- stable/6/contrib/lukemftpd/src/ftpd.c Wed Jan 7 18:37:07 2009 (r186871) +++ stable/6/contrib/lukemftpd/src/ftpd.c Wed Jan 7 20:17:55 2009 (r186872) @@ -1,4 +1,4 @@ -/* $NetBSD: ftpd.c,v 1.176 2006/05/09 20:18:06 mrg Exp $ */ +/* $NetBSD: ftpd.c,v 1.187 2008/09/13 03:30:35 lukem Exp $ */ /* * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -2896,6 +2896,7 @@ static int handleoobcmd() { char *cp; + int ret; if (!urgflag) return (0); @@ -2904,9 +2905,14 @@ handleoobcmd() if (!transflag) return (0); cp = tmpline; - if (getline(cp, sizeof(tmpline), stdin) == NULL) { + ret = getline(cp, sizeof(tmpline)-1, stdin); + if (ret == -1) { reply(221, "You could at least say goodbye."); dologout(0); + } else if (ret == -2) { + /* Ignore truncated command */ + /* XXX: abort xfer with "500 command too long", & return 1 ? */ + return 0; } /* * Manually parse OOB commands, because we can't From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 21:03:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3071F1065677; Wed, 7 Jan 2009 21:03:42 +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 1D3948FC1C; Wed, 7 Jan 2009 21:03:42 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07L3gad099486; Wed, 7 Jan 2009 21:03:42 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07L3fLP099478; Wed, 7 Jan 2009 21:03:41 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200901072103.n07L3fLP099478@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 7 Jan 2009 21:03:41 +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: r186873 - in stable/6/crypto/openssl: apps ssl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:03:43 -0000 Author: simon Date: Wed Jan 7 21:03:41 2009 New Revision: 186873 URL: http://svn.freebsd.org/changeset/base/186873 Log: This time really commit the OpenSSL part of the advisory round to stable/6: Fix incorrect OpenSSL checks for malformed signatures due to invalid check of return value from EVP_VerifyFinal(), DSA_verify, and DSA_do_verify. Security: FreeBSD-SA-09:02.openssl Obtained from: OpenSSL Project Modified: stable/6/crypto/openssl/apps/speed.c stable/6/crypto/openssl/apps/spkac.c stable/6/crypto/openssl/apps/verify.c stable/6/crypto/openssl/apps/x509.c stable/6/crypto/openssl/ssl/s2_clnt.c stable/6/crypto/openssl/ssl/s2_srvr.c stable/6/crypto/openssl/ssl/s3_clnt.c stable/6/crypto/openssl/ssl/s3_srvr.c Modified: stable/6/crypto/openssl/apps/speed.c ============================================================================== --- stable/6/crypto/openssl/apps/speed.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/speed.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1486,7 +1486,7 @@ int MAIN(int argc, char **argv) { ret=RSA_verify(NID_md5_sha1, buf,36, buf2, rsa_num, rsa_key[j]); - if (ret == 0) + if (ret <= 0) { BIO_printf(bio_err, "RSA verify failure\n"); Modified: stable/6/crypto/openssl/apps/spkac.c ============================================================================== --- stable/6/crypto/openssl/apps/spkac.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/spkac.c Wed Jan 7 21:03:41 2009 (r186873) @@ -284,7 +284,7 @@ bad: pkey = NETSCAPE_SPKI_get_pubkey(spki); if(verify) { i = NETSCAPE_SPKI_verify(spki, pkey); - if(i) BIO_printf(bio_err, "Signature OK\n"); + if (i > 0) BIO_printf(bio_err, "Signature OK\n"); else { BIO_printf(bio_err, "Signature Failure\n"); ERR_print_errors(bio_err); Modified: stable/6/crypto/openssl/apps/verify.c ============================================================================== --- stable/6/crypto/openssl/apps/verify.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/verify.c Wed Jan 7 21:03:41 2009 (r186873) @@ -275,7 +275,7 @@ static int check(X509_STORE *ctx, char * ret=0; end: - if (i) + if (i > 0) { fprintf(stdout,"OK\n"); ret=1; @@ -365,4 +365,3 @@ static int MS_CALLBACK cb(int ok, X509_S ERR_clear_error(); return(ok); } - Modified: stable/6/crypto/openssl/apps/x509.c ============================================================================== --- stable/6/crypto/openssl/apps/x509.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/apps/x509.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1113,7 +1113,7 @@ static int x509_certify(X509_STORE *ctx, /* NOTE: this certificate can/should be self signed, unless it was * a certificate request in which case it is not. */ X509_STORE_CTX_set_cert(&xsc,x); - if (!reqfile && !X509_verify_cert(&xsc)) + if (!reqfile && X509_verify_cert(&xsc) <= 0) goto end; if (!X509_check_private_key(xca,pkey)) Modified: stable/6/crypto/openssl/ssl/s2_clnt.c ============================================================================== --- stable/6/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s2_clnt.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1062,7 +1062,7 @@ int ssl2_set_certificate(SSL *s, int typ i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; Modified: stable/6/crypto/openssl/ssl/s2_srvr.c ============================================================================== --- stable/6/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s2_srvr.c Wed Jan 7 21:03:41 2009 (r186873) @@ -1070,7 +1070,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1099,7 +1099,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); Modified: stable/6/crypto/openssl/ssl/s3_clnt.c ============================================================================== --- stable/6/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s3_clnt.c Wed Jan 7 21:03:41 2009 (r186873) @@ -833,7 +833,7 @@ static int ssl3_get_server_certificate(S } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && (s->s3->tmp.new_cipher->algorithms & (SSL_MKEY_MASK|SSL_AUTH_MASK)) != (SSL_aKRB5|SSL_kKRB5) @@ -1206,7 +1206,7 @@ static int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; Modified: stable/6/crypto/openssl/ssl/s3_srvr.c ============================================================================== --- stable/6/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 20:17:55 2009 (r186872) +++ stable/6/crypto/openssl/ssl/s3_srvr.c Wed Jan 7 21:03:41 2009 (r186873) @@ -2015,7 +2015,7 @@ static int ssl3_get_client_certificate(S else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 21:12:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 894AE1065676; Wed, 7 Jan 2009 21:12:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7815D8FC0C; Wed, 7 Jan 2009 21:12:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07LCXPW099769; Wed, 7 Jan 2009 21:12:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07LCXCS099767; Wed, 7 Jan 2009 21:12:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901072112.n07LCXCS099767@svn.freebsd.org> From: Alexander Motin Date: Wed, 7 Jan 2009 21:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186875 - in head/sys: dev/sound/pcm sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:12:34 -0000 Author: mav Date: Wed Jan 7 21:12:33 2009 New Revision: 186875 URL: http://svn.freebsd.org/changeset/base/186875 Log: Add some new oss_sysinfo structure fields from OSSv4. Modified: head/sys/dev/sound/pcm/sound.c head/sys/sys/soundcard.h Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Wed Jan 7 21:10:16 2009 (r186874) +++ head/sys/dev/sound/pcm/sound.c Wed Jan 7 21:12:33 2009 (r186875) @@ -1405,6 +1405,7 @@ sound_oss_sysinfo(oss_sysinfo *si) { static char si_product[] = "FreeBSD native OSS ABI"; static char si_version[] = __XSTRING(__FreeBSD_version); + static char si_license[] = "BSD"; static int intnbits = sizeof(int) * 8; /* Better suited as macro? Must pester a C guru. */ @@ -1417,6 +1418,7 @@ sound_oss_sysinfo(oss_sysinfo *si) strlcpy(si->product, si_product, sizeof(si->product)); strlcpy(si->version, si_version, sizeof(si->version)); si->versionnum = SOUND_VERSION; + strlcpy(si->license, si_license, sizeof(si->license)); /* * Iterate over PCM devices and their channels, gathering up data @@ -1454,6 +1456,7 @@ sound_oss_sysinfo(oss_sysinfo *si) pcm_unlock(d); } + si->numaudioengines = si->numaudios; si->numsynths = 0; /* OSSv4 docs: this field is obsolete */ /** Modified: head/sys/sys/soundcard.h ============================================================================== --- head/sys/sys/soundcard.h Wed Jan 7 21:10:16 2009 (r186874) +++ head/sys/sys/soundcard.h Wed Jan 7 21:12:33 2009 (r186875) @@ -1639,7 +1639,10 @@ typedef struct oss_sysinfo int openedmidi[8]; /* Bit mask telling which midi devices are busy */ int numcards; /* Number of sound cards in the system */ - int filler[241]; /* For future expansion (set to -1) */ + int numaudioengines; /* Number of audio engines in the system */ + char license[16]; /* For example "GPL" or "CDDL" */ + char revision_info[256]; /* For internal use */ + int filler[172]; /* For future expansion (set to -1) */ } oss_sysinfo; typedef struct oss_mixext From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 21:25:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E74501065670; Wed, 7 Jan 2009 21:25:44 +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 D5ABC8FC08; Wed, 7 Jan 2009 21:25:44 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07LPiDr000170; Wed, 7 Jan 2009 21:25:44 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07LPiek000168; Wed, 7 Jan 2009 21:25:44 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901072125.n07LPiek000168@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 Jan 2009 21:25:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186876 - head/sys/dev/dcons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:25:45 -0000 Author: marius Date: Wed Jan 7 21:25:44 2009 New Revision: 186876 URL: http://svn.freebsd.org/changeset/base/186876 Log: Check the return values of contigmalloc(9) as well as bus_dma(9) functions and stop attaching of dcons(4) and dcons_crom(4) if they indicate failure. This fixes a panic seen on sparc64 machines with no free physical memory in the requested 32-bit region but still doesn't make dcons(4)/dcons_crom(4) these work. I think the latter can be fixed by simply specifying ~0UL as the upper limit for contigmalloc(9) and letting the bounce pages and the IOMMU respectively handle limitations of the DMA engine. I didn't want to change that without the consensus of simokawa@ though, who unfortunately didn't reply so far. MFC after: 1 week Modified: head/sys/dev/dcons/dcons_crom.c head/sys/dev/dcons/dcons_os.c Modified: head/sys/dev/dcons/dcons_crom.c ============================================================================== --- head/sys/dev/dcons/dcons_crom.c Wed Jan 7 21:12:33 2009 (r186875) +++ head/sys/dev/dcons/dcons_crom.c Wed Jan 7 21:25:44 2009 (r186876) @@ -205,7 +205,10 @@ dcons_crom_attach(device_t dev) return (-1); #else struct dcons_crom_softc *sc; + int error; + if (dcons_conf->buf == NULL) + return (ENXIO); sc = (struct dcons_crom_softc *) device_get_softc(dev); sc->fd.fc = device_get_ivars(dev); sc->fd.dev = dev; @@ -213,7 +216,7 @@ dcons_crom_attach(device_t dev) sc->fd.post_busreset = (void *) dcons_crom_post_busreset; /* map dcons buffer */ - bus_dma_tag_create( + error = bus_dma_tag_create( /*parent*/ sc->fd.fc->dmat, /*alignment*/ sizeof(u_int32_t), /*boundary*/ 0, @@ -229,10 +232,16 @@ dcons_crom_attach(device_t dev) /*lockarg*/&Giant, #endif &sc->dma_tag); - bus_dmamap_create(sc->dma_tag, BUS_DMA_COHERENT, &sc->dma_map); - bus_dmamap_load(sc->dma_tag, sc->dma_map, + if (error != 0) + return (error); + error = bus_dmamap_create(sc->dma_tag, BUS_DMA_COHERENT, &sc->dma_map); + if (error != 0) + return (error); + error = bus_dmamap_load(sc->dma_tag, sc->dma_map, (void *)dcons_conf->buf, dcons_conf->size, dmamap_cb, sc, 0); + if (error != 0) + return (error); sc->ehand = EVENTHANDLER_REGISTER(dcons_poll, dcons_crom_poll, (void *)sc, 0); return (0); Modified: head/sys/dev/dcons/dcons_os.c ============================================================================== --- head/sys/dev/dcons/dcons_os.c Wed Jan 7 21:12:33 2009 (r186875) +++ head/sys/dev/dcons/dcons_os.c Wed Jan 7 21:25:44 2009 (r186876) @@ -336,6 +336,8 @@ dcons_drv_init(int stage) */ dg.buf = (struct dcons_buf *) contigmalloc(dg.size, M_DEVBUF, 0, 0x10000, 0xffffffff, PAGE_SIZE, 0ul); + if (dg.buf == NULL) + return (-1); dcons_init(dg.buf, dg.size, sc); } @@ -400,8 +402,8 @@ dcons_modevent(module_t mode, int type, switch (type) { case MOD_LOAD: ret = dcons_drv_init(1); - dcons_attach(); if (ret == 0) { + dcons_attach(); dcons_cnprobe(&dcons_consdev); dcons_cninit(&dcons_consdev); cnadd(&dcons_consdev); @@ -409,13 +411,15 @@ dcons_modevent(module_t mode, int type, break; case MOD_UNLOAD: printf("dcons: unload\n"); - callout_stop(&dcons_callout); - cnremove(&dcons_consdev); - dcons_detach(DCONS_CON); - dcons_detach(DCONS_GDB); - dg.buf->magic = 0; + if (drv_init == 1) { + callout_stop(&dcons_callout); + cnremove(&dcons_consdev); + dcons_detach(DCONS_CON); + dcons_detach(DCONS_GDB); + dg.buf->magic = 0; - contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); + contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF); + } break; case MOD_SHUTDOWN: From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 21:52:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA3721065820; Wed, 7 Jan 2009 21:52:47 +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 A72BB8FC13; Wed, 7 Jan 2009 21:52:47 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07Lql69000813; Wed, 7 Jan 2009 21:52:47 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07Lql7h000807; Wed, 7 Jan 2009 21:52:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901072152.n07Lql7h000807@svn.freebsd.org> From: Marius Strobl Date: Wed, 7 Jan 2009 21:52:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186878 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 21:52:49 -0000 Author: marius Date: Wed Jan 7 21:52:47 2009 New Revision: 186878 URL: http://svn.freebsd.org/changeset/base/186878 Log: Make the whole initiator mode part of mpt(4) endian-clean, specifically SPI controllers now also work in big-endian machines and some conversions relevant for FC and SAS controllers as well as support for ILP32 machines which all were omitted in previous attempts are now also implemented. The IOCTL-interface is intentionally left (and where needed actually changed) to be completely little-endian as otherwise we would have to add conversion code for every possible configuration page to mpt(4), which didn't seem the right thing to do, neither did converting only half of the user- interface to the native byte order. This change was tested on amd64 (SAS+SPI), i386 (SAS) and sparc64 (SAS+SPI). Due to lack of the necessary hardware the target mode code is still left to be made endian-clean. Reviewed by: scottl MFC after: 1 month Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h head/sys/dev/mpt/mpt_cam.c head/sys/dev/mpt/mpt_raid.c head/sys/dev/mpt/mpt_user.c Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt.c Wed Jan 7 21:52:47 2009 (r186878) @@ -1637,7 +1637,7 @@ mpt_read_extcfg_header(struct mpt_softc rslt->PageVersion = cfgp->Header.PageVersion; rslt->PageNumber = cfgp->Header.PageNumber; rslt->PageType = cfgp->Header.PageType; - rslt->ExtPageLength = cfgp->ExtPageLength; + rslt->ExtPageLength = le16toh(cfgp->ExtPageLength); rslt->ExtPageType = cfgp->ExtPageType; error = 0; break; @@ -1668,7 +1668,7 @@ mpt_read_extcfg_page(struct mpt_softc *m req = mpt_get_request(mpt, sleep_ok); if (req == NULL) { - mpt_prt(mpt, "mpt_read_cfg_page: Get request failed!\n"); + mpt_prt(mpt, "mpt_read_extcfg_page: Get request failed!\n"); return (-1); } @@ -2025,6 +2025,7 @@ mpt_read_config_info_ioc(struct mpt_soft mpt_raid_free_mem(mpt); return (EIO); } + mpt2host_config_page_ioc3(mpt->ioc_page3); mpt_raid_wakeup(mpt); return (0); } @@ -2760,6 +2761,7 @@ mpt_enable_ioc(struct mpt_softc *mpt, in void mpt2host_sge_simple_union(SGE_SIMPLE_UNION *sge) { + MPT_2_HOST32(sge, FlagsLength); MPT_2_HOST32(sge, u.Address64.Low); MPT_2_HOST32(sge, u.Address64.High); @@ -2768,6 +2770,7 @@ mpt2host_sge_simple_union(SGE_SIMPLE_UNI void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *rp) { + MPT_2_HOST16(rp, MsgVersion); MPT_2_HOST16(rp, HeaderVersion); MPT_2_HOST32(rp, MsgContext); @@ -2794,6 +2797,7 @@ mpt2host_iocfacts_reply(MSG_IOC_FACTS_RE void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *pfp) { + MPT_2_HOST16(pfp, Reserved); MPT_2_HOST16(pfp, Reserved1); MPT_2_HOST32(pfp, MsgContext); @@ -2809,20 +2813,139 @@ mpt2host_portfacts_reply(MSG_PORT_FACTS_ MPT_2_HOST16(pfp, Reserved4); MPT_2_HOST32(pfp, Reserved5); } + void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *ioc2) { int i; - ioc2->CapabilitiesFlags = htole32(ioc2->CapabilitiesFlags); + + MPT_2_HOST32(ioc2, CapabilitiesFlags); for (i = 0; i < MPI_IOC_PAGE_2_RAID_VOLUME_MAX; i++) { MPT_2_HOST16(ioc2, RaidVolume[i].Reserved3); } } void +mpt2host_config_page_ioc3(CONFIG_PAGE_IOC_3 *ioc3) +{ + + MPT_2_HOST16(ioc3, Reserved2); +} + +void +mpt2host_config_page_scsi_port_0(CONFIG_PAGE_SCSI_PORT_0 *sp0) +{ + + MPT_2_HOST32(sp0, Capabilities); + MPT_2_HOST32(sp0, PhysicalInterface); +} + +void +mpt2host_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *sp1) +{ + + MPT_2_HOST32(sp1, Configuration); + MPT_2_HOST32(sp1, OnBusTimerValue); + MPT_2_HOST16(sp1, IDConfig); +} + +void +host2mpt_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *sp1) +{ + + HOST_2_MPT32(sp1, Configuration); + HOST_2_MPT32(sp1, OnBusTimerValue); + HOST_2_MPT16(sp1, IDConfig); +} + +void +mpt2host_config_page_scsi_port_2(CONFIG_PAGE_SCSI_PORT_2 *sp2) +{ + int i; + + MPT_2_HOST32(sp2, PortFlags); + MPT_2_HOST32(sp2, PortSettings); + for (i = 0; i < sizeof(sp2->DeviceSettings) / + sizeof(*sp2->DeviceSettings); i++) { + MPT_2_HOST16(sp2, DeviceSettings[i].DeviceFlags); + } +} + +void +mpt2host_config_page_scsi_device_0(CONFIG_PAGE_SCSI_DEVICE_0 *sd0) +{ + + MPT_2_HOST32(sd0, NegotiatedParameters); + MPT_2_HOST32(sd0, Information); +} + +void +mpt2host_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *sd1) +{ + + MPT_2_HOST32(sd1, RequestedParameters); + MPT_2_HOST32(sd1, Reserved); + MPT_2_HOST32(sd1, Configuration); +} + +void +host2mpt_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *sd1) +{ + + HOST_2_MPT32(sd1, RequestedParameters); + HOST_2_MPT32(sd1, Reserved); + HOST_2_MPT32(sd1, Configuration); +} + +void +mpt2host_config_page_fc_port_0(CONFIG_PAGE_FC_PORT_0 *fp0) +{ + + MPT_2_HOST32(fp0, Flags); + MPT_2_HOST32(fp0, PortIdentifier); + MPT_2_HOST32(fp0, WWNN.Low); + MPT_2_HOST32(fp0, WWNN.High); + MPT_2_HOST32(fp0, WWPN.Low); + MPT_2_HOST32(fp0, WWPN.High); + MPT_2_HOST32(fp0, SupportedServiceClass); + MPT_2_HOST32(fp0, SupportedSpeeds); + MPT_2_HOST32(fp0, CurrentSpeed); + MPT_2_HOST32(fp0, MaxFrameSize); + MPT_2_HOST32(fp0, FabricWWNN.Low); + MPT_2_HOST32(fp0, FabricWWNN.High); + MPT_2_HOST32(fp0, FabricWWPN.Low); + MPT_2_HOST32(fp0, FabricWWPN.High); + MPT_2_HOST32(fp0, DiscoveredPortsCount); + MPT_2_HOST32(fp0, MaxInitiators); +} + +void +mpt2host_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *fp1) +{ + + MPT_2_HOST32(fp1, Flags); + MPT_2_HOST32(fp1, NoSEEPROMWWNN.Low); + MPT_2_HOST32(fp1, NoSEEPROMWWNN.High); + MPT_2_HOST32(fp1, NoSEEPROMWWPN.Low); + MPT_2_HOST32(fp1, NoSEEPROMWWPN.High); +} + +void +host2mpt_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *fp1) +{ + + HOST_2_MPT32(fp1, Flags); + HOST_2_MPT32(fp1, NoSEEPROMWWNN.Low); + HOST_2_MPT32(fp1, NoSEEPROMWWNN.High); + HOST_2_MPT32(fp1, NoSEEPROMWWPN.Low); + HOST_2_MPT32(fp1, NoSEEPROMWWPN.High); +} + +void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *volp) { int i; + MPT_2_HOST16(volp, VolumeStatus.Reserved); MPT_2_HOST16(volp, VolumeSettings.Settings); MPT_2_HOST32(volp, MaxLBA); @@ -2836,8 +2959,21 @@ mpt2host_config_page_raid_vol_0(CONFIG_P } void +mpt2host_config_page_raid_phys_disk_0(CONFIG_PAGE_RAID_PHYS_DISK_0 *rpd0) +{ + + MPT_2_HOST32(rpd0, Reserved1); + MPT_2_HOST16(rpd0, PhysDiskStatus.Reserved); + MPT_2_HOST32(rpd0, MaxLBA); + MPT_2_HOST16(rpd0, ErrorData.Reserved); + MPT_2_HOST16(rpd0, ErrorData.ErrorCount); + MPT_2_HOST16(rpd0, ErrorData.SmartCount); +} + +void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *vi) { + MPT_2_HOST16(vi, TotalBlocks.High); MPT_2_HOST16(vi, TotalBlocks.Low); MPT_2_HOST16(vi, BlocksRemaining.High); Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt.h Wed Jan 7 21:52:47 2009 (r186878) @@ -317,14 +317,39 @@ void mpt2host_sge_simple_union(SGE_SIMPL void mpt2host_iocfacts_reply(MSG_IOC_FACTS_REPLY *); void mpt2host_portfacts_reply(MSG_PORT_FACTS_REPLY *); void mpt2host_config_page_ioc2(CONFIG_PAGE_IOC_2 *); +void mpt2host_config_page_ioc3(CONFIG_PAGE_IOC_3 *); +void mpt2host_config_page_scsi_port_0(CONFIG_PAGE_SCSI_PORT_0 *); +void mpt2host_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *); +void host2mpt_config_page_scsi_port_1(CONFIG_PAGE_SCSI_PORT_1 *); +void mpt2host_config_page_scsi_port_2(CONFIG_PAGE_SCSI_PORT_2 *); +void mpt2host_config_page_scsi_device_0(CONFIG_PAGE_SCSI_DEVICE_0 *); +void mpt2host_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *); +void host2mpt_config_page_scsi_device_1(CONFIG_PAGE_SCSI_DEVICE_1 *); +void mpt2host_config_page_fc_port_0(CONFIG_PAGE_FC_PORT_0 *); +void mpt2host_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *); +void host2mpt_config_page_fc_port_1(CONFIG_PAGE_FC_PORT_1 *); void mpt2host_config_page_raid_vol_0(CONFIG_PAGE_RAID_VOL_0 *); +void mpt2host_config_page_raid_phys_disk_0(CONFIG_PAGE_RAID_PHYS_DISK_0 *); void mpt2host_mpi_raid_vol_indicator(MPI_RAID_VOL_INDICATOR *); #else #define mpt2host_sge_simple_union(x) do { ; } while (0) #define mpt2host_iocfacts_reply(x) do { ; } while (0) #define mpt2host_portfacts_reply(x) do { ; } while (0) #define mpt2host_config_page_ioc2(x) do { ; } while (0) +#define mpt2host_config_page_ioc3(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_0(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_1(x) do { ; } while (0) +#define host2mpt_config_page_scsi_port_1(x) do { ; } while (0) +#define mpt2host_config_page_scsi_port_2(x) do { ; } while (0) +#define mpt2host_config_page_scsi_device_0(x) do { ; } while (0) +#define mpt2host_config_page_scsi_device_1(x) do { ; } while (0) +#define host2mpt_config_page_scsi_device_1(x) do { ; } while (0) +#define mpt2host_config_page_fc_port_0(x) do { ; } while (0) +#define mpt2host_config_page_fc_port_1(x) do { ; } while (0) +#define host2mpt_config_page_fc_port_1(x) do { ; } while (0) #define mpt2host_config_page_raid_vol_0(x) do { ; } while (0) +#define mpt2host_config_page_raid_phys_disk_0(x) \ + do { ; } while (0) #define mpt2host_mpi_raid_vol_indicator(x) do { ; } while (0) #endif Modified: head/sys/dev/mpt/mpt_cam.c ============================================================================== --- head/sys/dev/mpt/mpt_cam.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt_cam.c Wed Jan 7 21:52:47 2009 (r186878) @@ -437,6 +437,7 @@ mpt_read_config_info_fc(struct mpt_softc mpt_prt(mpt, "failed to read FC Port Page 0\n"); return (-1); } + mpt2host_config_page_fc_port_0(&mpt->mpt_fcport_page0); mpt->mpt_fcport_speed = mpt->mpt_fcport_page0.CurrentSpeed; @@ -527,13 +528,14 @@ mpt_set_initial_config_fc(struct mpt_sof mpt_prt(mpt, "failed to read FC page 1\n"); return (mpt_fc_reset_link(mpt, 1)); } + mpt2host_config_page_fc_port_1(&fc); /* * Check our flags to make sure we support the role we want. */ doit = 0; role = 0; - fl = le32toh(fc.Flags);; + fl = fc.Flags; if (fl & MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT) { role |= MPT_ROLE_INITIATOR; @@ -587,7 +589,8 @@ mpt_set_initial_config_fc(struct mpt_sof } if (doit) { - fc.Flags = htole32(fl); + fc.Flags = fl; + host2mpt_config_page_fc_port_1(&fc); r = mpt_write_cfg_page(mpt, MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM, 0, &fc.Header, sizeof(fc), FALSE, 5000); @@ -982,6 +985,7 @@ mpt_read_config_info_spi(struct mpt_soft if (rv) { mpt_prt(mpt, "failed to read SPI Port Page 0\n"); } else { + mpt2host_config_page_scsi_port_0(&mpt->mpt_port_page0); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "SPI Port Page 0: Capabilities %x PhysicalInterface %x\n", mpt->mpt_port_page0.Capabilities, @@ -993,6 +997,7 @@ mpt_read_config_info_spi(struct mpt_soft if (rv) { mpt_prt(mpt, "failed to read SPI Port Page 1\n"); } else { + mpt2host_config_page_scsi_port_1(&mpt->mpt_port_page1); mpt_lprt(mpt, MPT_PRT_DEBUG, "SPI Port Page 1: Configuration %x OnBusTimerValue %x\n", mpt->mpt_port_page1.Configuration, @@ -1008,6 +1013,7 @@ mpt_read_config_info_spi(struct mpt_soft "Port Page 2: Flags %x Settings %x\n", mpt->mpt_port_page2.PortFlags, mpt->mpt_port_page2.PortSettings); + mpt2host_config_page_scsi_port_2(&mpt->mpt_port_page2); for (i = 0; i < 16; i++) { mpt_lprt(mpt, MPT_PRT_NEGOTIATION, " Port Page 2 Tgt %d: timo %x SF %x Flags %x\n", @@ -1026,6 +1032,7 @@ mpt_read_config_info_spi(struct mpt_soft "cannot read SPI Target %d Device Page 0\n", i); continue; } + mpt2host_config_page_scsi_device_0(&mpt->mpt_dev_page0[i]); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "target %d page 0: Negotiated Params %x Information %x\n", i, mpt->mpt_dev_page0[i].NegotiatedParameters, @@ -1039,6 +1046,7 @@ mpt_read_config_info_spi(struct mpt_soft "cannot read SPI Target %d Device Page 1\n", i); continue; } + mpt2host_config_page_scsi_device_1(&mpt->mpt_dev_page1[i]); mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "target %d page 1: Requested Params %x Configuration %x\n", i, mpt->mpt_dev_page1[i].RequestedParameters, @@ -1068,6 +1076,7 @@ mpt_set_initial_config_spi(struct mpt_so "be %x\n", mpt->mpt_port_page1.Configuration, pp1val); tmp = mpt->mpt_port_page1; tmp.Configuration = pp1val; + host2mpt_config_page_scsi_port_1(&tmp); error = mpt_write_cur_cfg_page(mpt, 0, &tmp.Header, sizeof(tmp), FALSE, 5000); if (error) { @@ -1078,6 +1087,7 @@ mpt_set_initial_config_spi(struct mpt_so if (error) { return (-1); } + mpt2host_config_page_scsi_port_1(&tmp); if (tmp.Configuration != pp1val) { mpt_prt(mpt, "failed to reset SPI Port Page 1 Config value\n"); @@ -1432,7 +1442,8 @@ bad: memset(se, 0, sizeof (*se)); se->Address.Low = htole32(dm_segs->ds_addr & 0xffffffff); if (sizeof(bus_addr_t) > 4) { - se->Address.High = ((uint64_t) dm_segs->ds_addr) >> 32; + se->Address.High = + htole32(((uint64_t)dm_segs->ds_addr) >> 32); } MPI_pSGE_SET_LENGTH(se, dm_segs->ds_len); tf = flags; @@ -1507,9 +1518,9 @@ bad: chain_list_addr += cur_off; if (sizeof (bus_addr_t) > 4) { ce->Address.High = - htole32((uint32_t) ((uint64_t)chain_list_addr >> 32)); + htole32(((uint64_t)chain_list_addr) >> 32); } - ce->Address.Low = htole32((uint32_t) chain_list_addr); + ce->Address.Low = htole32(chain_list_addr & 0xffffffff); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT | MPI_SGE_FLAGS_64_BIT_ADDRESSING; @@ -1536,6 +1547,7 @@ bad: ce->Length = (this_seg_lim - seg) * sizeof (SGE_SIMPLE64); } + ce->Length = htole16(ce->Length); /* * Fill in the chain list SGE elements with our segment data. @@ -1546,7 +1558,8 @@ bad: */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address.Low = htole32(dm_segs->ds_addr); + se->Address.Low = htole32(dm_segs->ds_addr & + 0xffffffff); if (sizeof (bus_addr_t) > 4) { se->Address.High = htole32(((uint64_t)dm_segs->ds_addr) >> 32); @@ -1830,7 +1843,7 @@ bad: uint32_t tf; memset(se, 0,sizeof (*se)); - se->Address = dm_segs->ds_addr; + se->Address = htole32(dm_segs->ds_addr); @@ -1908,7 +1921,7 @@ bad: - ce->Address = chain_list_addr; + ce->Address = htole32(chain_list_addr); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT; @@ -1935,6 +1948,7 @@ bad: ce->Length = (this_seg_lim - seg) * sizeof (SGE_SIMPLE32); } + ce->Length = htole16(ce->Length); /* * Fill in the chain list SGE elements with our segment data. @@ -1945,7 +1959,7 @@ bad: */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address = dm_segs->ds_addr; + se->Address = htole32(dm_segs->ds_addr); @@ -2193,6 +2207,7 @@ mpt_start(struct cam_sim *sim, union ccb mpt_req->Control |= MPI_SCSIIO_CONTROL_NO_DISCONNECT; } } + mpt_req->Control = htole32(mpt_req->Control); /* Copy the scsi command block into place */ if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) { @@ -2317,7 +2332,7 @@ mpt_bus_reset(struct mpt_softc *mpt, tar error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, REQ_STATE_DONE, sleep_ok, 5000); - status = mpt->tmf_req->IOCStatus; + status = le16toh(mpt->tmf_req->IOCStatus); response = mpt->tmf_req->ResponseCode; mpt->tmf_req->state = REQ_STATE_FREE; @@ -2524,10 +2539,11 @@ mpt_cam_event(struct mpt_softc *mpt, req struct cam_sim *sim; struct cam_path *tmppath; struct ccb_relsim crs; - PTR_EVENT_DATA_QUEUE_FULL pqf = - (PTR_EVENT_DATA_QUEUE_FULL) msg->Data; + PTR_EVENT_DATA_QUEUE_FULL pqf; lun_id_t lun_id; + pqf = (PTR_EVENT_DATA_QUEUE_FULL)msg->Data; + pqf->CurrentDepth = le16toh(pqf->CurrentDepth); mpt_prt(mpt, "QUEUE FULL EVENT: Bus 0x%02x Target 0x%02x Depth " "%d\n", pqf->Bus, pqf->TargetID, pqf->CurrentDepth); if (mpt->phydisk_sim) { @@ -3086,9 +3102,10 @@ mpt_scsi_reply_frame_handler(struct mpt_ && (ccb->ccb_h.flags & (CAM_SENSE_PHYS | CAM_SENSE_PTR)) == 0) { ccb->ccb_h.status |= CAM_AUTOSNS_VALID; ccb->csio.sense_resid = - ccb->csio.sense_len - scsi_io_reply->SenseCount; + ccb->csio.sense_len - le32toh(scsi_io_reply->SenseCount); bcopy(req->sense_vbuf, &ccb->csio.sense_data, - min(ccb->csio.sense_len, scsi_io_reply->SenseCount)); + min(ccb->csio.sense_len, + le32toh(scsi_io_reply->SenseCount))); } if ((sstate & MPI_SCSI_STATE_QUEUE_TAG_REJECTED) != 0) { @@ -3776,6 +3793,8 @@ mpt_get_spi_settings(struct mpt_softc *m mpt_prt(mpt, "can't get tgt %d config page 0\n", tgt); return (rv); } + mpt2host_config_page_scsi_device_0(&tmp); + MPTLOCK_2_CAMLOCK(mpt); mpt_lprt(mpt, MPT_PRT_DEBUG, "mpt_get_spi_settings[%d]: current NP %x Info %x\n", tgt, @@ -3905,6 +3924,7 @@ mpt_update_spi_config(struct mpt_softc * "mpt_update_spi_config[%d].page1: Requested Params 0x%08x\n", tgt, mpt->mpt_dev_page1[tgt].RequestedParameters); tmp = mpt->mpt_dev_page1[tgt]; + host2mpt_config_page_scsi_device_1(&tmp); rv = mpt_write_cur_cfg_page(mpt, tgt, &tmp.Header, sizeof(tmp), FALSE, 5000); if (rv) { @@ -4156,7 +4176,7 @@ mpt_recover_commands(struct mpt_softc *m error = mpt_wait_req(mpt, mpt->tmf_req, REQ_STATE_DONE, REQ_STATE_DONE, TRUE, 500); - status = mpt->tmf_req->IOCStatus; + status = le16toh(mpt->tmf_req->IOCStatus); response = mpt->tmf_req->ResponseCode; mpt->tmf_req->state = REQ_STATE_FREE; Modified: head/sys/dev/mpt/mpt_raid.c ============================================================================== --- head/sys/dev/mpt/mpt_raid.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt_raid.c Wed Jan 7 21:52:47 2009 (r186878) @@ -564,7 +564,7 @@ mpt_raid_reply_frame_handler(struct mpt_ action_result = REQ_TO_RAID_ACTION_RESULT(req); memcpy(&action_result->action_data, &reply->ActionData, sizeof(action_result->action_data)); - action_result->action_status = reply->ActionStatus; + action_result->action_status = le16toh(reply->ActionStatus); return (TRUE); } @@ -583,7 +583,7 @@ mpt_issue_raid_req(struct mpt_softc *mpt rap = req->req_vbuf; memset(rap, 0, sizeof *rap); rap->Action = Action; - rap->ActionDataWord = ActionDataWord; + rap->ActionDataWord = htole32(ActionDataWord); rap->Function = MPI_FUNCTION_RAID_ACTION; rap->VolumeID = vol->config_page->VolumeID; rap->VolumeBus = vol->config_page->VolumeBus; @@ -592,12 +592,13 @@ mpt_issue_raid_req(struct mpt_softc *mpt else rap->PhysDiskNum = 0xFF; se = (SGE_SIMPLE32 *)&rap->ActionDataSGE; - se->Address = addr; + se->Address = htole32(addr); MPI_pSGE_SET_LENGTH(se, len); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); + se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | raid_handler_id); mpt_check_doorbell(mpt); @@ -1226,6 +1227,7 @@ mpt_refresh_raid_disk(struct mpt_softc * mpt_prt(mpt, "mpt_refresh_raid_disk: " "Failed to read RAID Disk Page(%d)\n", ioc_disk->PhysDiskNum); + mpt2host_config_page_raid_phys_disk_0(&mpt_disk->config_page); } static void @@ -1354,6 +1356,7 @@ mpt_refresh_raid_data(struct mpt_softc * "mpt_refresh_raid_data: Failed to read IOC Page 3\n"); return (-1); } + mpt2host_config_page_ioc3(mpt->ioc_page3); ioc_disk = mpt->ioc_page3->PhysDisk; ioc_last_disk = ioc_disk + mpt->ioc_page3->NumPhysDisks; @@ -1384,6 +1387,7 @@ mpt_refresh_raid_data(struct mpt_softc * "Failed to read IOC Page 2\n"); return (-1); } + mpt2host_config_page_ioc2(mpt->ioc_page2); ioc_vol = mpt->ioc_page2->RaidVolume; ioc_last_vol = ioc_vol + mpt->ioc_page2->NumActiveVolumes; Modified: head/sys/dev/mpt/mpt_user.c ============================================================================== --- head/sys/dev/mpt/mpt_user.c Wed Jan 7 21:36:24 2009 (r186877) +++ head/sys/dev/mpt/mpt_user.c Wed Jan 7 21:52:47 2009 (r186878) @@ -256,7 +256,7 @@ mpt_user_read_cfg_header(struct mpt_soft params.PageLength = 0; params.PageNumber = page_req->header.PageNumber; params.PageType = page_req->header.PageType; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); error = mpt_issue_cfg_req(mpt, req, ¶ms, /*addr*/0, /*len*/0, TRUE, 5000); if (error != 0) { @@ -270,7 +270,7 @@ mpt_user_read_cfg_header(struct mpt_soft return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) { cfgp = req->req_vbuf; bcopy(&cfgp->Header, &page_req->header, @@ -301,15 +301,15 @@ mpt_user_read_cfg_page(struct mpt_softc params.PageLength = hdr->PageLength; params.PageNumber = hdr->PageNumber; params.PageType = hdr->PageType & MPI_CONFIG_PAGETYPE_MASK; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - page_req->len, TRUE, 5000); + le32toh(page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_user_read_cfg_page timed out\n"); return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD); @@ -337,7 +337,7 @@ mpt_user_read_extcfg_header(struct mpt_s params.PageLength = 0; params.PageNumber = ext_page_req->header.PageNumber; params.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; - params.PageAddress = ext_page_req->page_address; + params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = ext_page_req->header.ExtPageType; params.ExtPageLength = 0; error = mpt_issue_cfg_req(mpt, req, ¶ms, /*addr*/0, /*len*/0, @@ -353,7 +353,7 @@ mpt_user_read_extcfg_header(struct mpt_s return (ETIMEDOUT); } - ext_page_req->ioc_status = req->IOCStatus; + ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) { cfgp = req->req_vbuf; ext_page_req->header.PageVersion = cfgp->Header.PageVersion; @@ -387,17 +387,17 @@ mpt_user_read_extcfg_page(struct mpt_sof params.PageLength = 0; params.PageNumber = hdr->PageNumber; params.PageType = MPI_CONFIG_PAGETYPE_EXTENDED; - params.PageAddress = ext_page_req->page_address; + params.PageAddress = le32toh(ext_page_req->page_address); params.ExtPageType = hdr->ExtPageType; params.ExtPageLength = hdr->ExtPageLength; error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - ext_page_req->len, TRUE, 5000); + le32toh(ext_page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_user_read_extcfg_page timed out\n"); return (ETIMEDOUT); } - ext_page_req->ioc_status = req->IOCStatus; + ext_page_req->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) == MPI_IOCSTATUS_SUCCESS) bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_POSTREAD); @@ -446,7 +446,7 @@ mpt_user_write_cfg_page(struct mpt_softc params.PageVersion = hdr->PageVersion; params.PageLength = hdr->PageLength; params.PageNumber = hdr->PageNumber; - params.PageAddress = page_req->page_address; + params.PageAddress = le32toh(page_req->page_address); #if 0 /* Restore stripped out attributes */ hdr->PageType |= hdr_attr; @@ -455,13 +455,13 @@ mpt_user_write_cfg_page(struct mpt_softc params.PageType = hdr->PageType; #endif error = mpt_issue_cfg_req(mpt, req, ¶ms, mpt_page->paddr, - page_req->len, TRUE, 5000); + le32toh(page_req->len), TRUE, 5000); if (error != 0) { mpt_prt(mpt, "mpt_write_cfg_page timed out\n"); return (ETIMEDOUT); } - page_req->ioc_status = req->IOCStatus; + page_req->ioc_status = htole16(req->IOCStatus); mpt_free_request(mpt, req); return (0); } @@ -536,14 +536,15 @@ mpt_user_raid_action(struct mpt_softc *m if (mpt_page->vaddr != NULL && raid_act->len != 0) { bus_dmamap_sync(mpt_page->tag, mpt_page->map, BUS_DMASYNC_PREWRITE); - se->Address = mpt_page->paddr; - MPI_pSGE_SET_LENGTH(se, raid_act->len); + se->Address = htole32(mpt_page->paddr); + MPI_pSGE_SET_LENGTH(se, le32toh(raid_act->len)); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_END_OF_LIST | raid_act->write ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST)); } + se->FlagsLength = htole32(se->FlagsLength); rap->MsgContext = htole32(req->index | user_handler_id); mpt_check_doorbell(mpt); @@ -559,7 +560,7 @@ mpt_user_raid_action(struct mpt_softc *m return (error); } - raid_act->ioc_status = req->IOCStatus; + raid_act->ioc_status = htole16(req->IOCStatus); if ((req->IOCStatus & MPI_IOCSTATUS_MASK) != MPI_IOCSTATUS_SUCCESS) { mpt_free_request(mpt, req); return (0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 7 23:30:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 152A1106566B; Wed, 7 Jan 2009 23:30:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04FFF8FC1E; Wed, 7 Jan 2009 23:30:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n07NUQkv002685; Wed, 7 Jan 2009 23:30:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n07NUQPZ002684; Wed, 7 Jan 2009 23:30:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901072330.n07NUQPZ002684@svn.freebsd.org> From: Sam Leffler Date: Wed, 7 Jan 2009 23:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186879 - head/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2009 23:30:27 -0000 Author: sam Date: Wed Jan 7 23:30:26 2009 New Revision: 186879 URL: http://svn.freebsd.org/changeset/base/186879 Log: correct fixed rate handling; the rixmap was changed a while back to be indexed by the ieee rate code Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Wed Jan 7 21:52:47 2009 (r186878) +++ head/sys/dev/ath/ath_rate/sample/sample.c Wed Jan 7 23:30:26 2009 (r186879) @@ -754,23 +754,18 @@ ath_rate_ctl_reset(struct ath_softc *sc, sn->static_rix = -1; if (tp != NULL && tp->ucastrate != IEEE80211_FIXED_RATE_NONE) { /* - * A fixed rate is to be used; ic_fixed_rate is the - * IEEE code for this rate (sans basic bit). Convert this - * to the index into the negotiated rate set for - * the node. + * A fixed rate is to be used; ucastrate is the IEEE code + * for this rate (sans basic bit). Check this against the + * negotiated rate set for the node. Note the fixed rate + * may not be available for various reasons so we only + * setup the static rate index if the lookup is successful. + * XXX handle MCS */ - /* NB: the rate set is assumed sorted */ - srate = ni->ni_rates.rs_nrates - 1; - for (; srate >= 0 && RATE(srate) != tp->ucastrate; srate--) - ; - /* - * The fixed rate may not be available due to races - * and mode settings. Also orphaned nodes created in - * adhoc mode may not have any rate set so this lookup - * can fail. - */ - if (srate >= 0) - sn->static_rix = sc->sc_rixmap[srate]; + for (srate = ni->ni_rates.rs_nrates - 1; srate >= 0; srate--) + if (RATE(srate) == tp->ucastrate) { + sn->static_rix = sc->sc_rixmap[tp->ucastrate]; + break; + } } /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 00:45:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 136D2106566C; Thu, 8 Jan 2009 00:45:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02AEC8FC12; Thu, 8 Jan 2009 00:45:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n080jlwr004299; Thu, 8 Jan 2009 00:45:47 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n080jlfQ004298; Thu, 8 Jan 2009 00:45:47 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901080045.n080jlfQ004298@svn.freebsd.org> From: Warner Losh Date: Thu, 8 Jan 2009 00:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186882 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 00:45:48 -0000 Author: imp Date: Thu Jan 8 00:45:47 2009 New Revision: 186882 URL: http://svn.freebsd.org/changeset/base/186882 Log: Make it possible to override the number of retries for the CD media. When trying to read scratched or damaged CDs and DVDs, the default mechanism is sub-optimal. Programs like ddrescue do much better if you turn off retries entirely, since their algorithms are designed scan big areas fast, then winnow the areas down. Turning off retries speeds these programs up by as much as 20x, since the drive is able to 'stream past' many small errors... The sysctl/tunable kern.cam.cd.retry_count controls this. That defaults to '4' (for a total of 5 attempts). Setting to 0 turns off all retry attempts. Reviewed by: scottl@ Modified: head/sys/cam/scsi/scsi_cd.c Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Jan 8 00:31:48 2009 (r186881) +++ head/sys/cam/scsi/scsi_cd.c Thu Jan 8 00:45:47 2009 (r186882) @@ -292,6 +292,9 @@ static struct periph_driver cddriver = PERIPHDRIVER_DECLARE(cd, cddriver); +#ifndef CD_DEFAULT_RETRY +#define CD_DEFAULT_RETRY 4 +#endif #ifndef CHANGER_MIN_BUSY_SECONDS #define CHANGER_MIN_BUSY_SECONDS 5 #endif @@ -299,11 +302,15 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #define CHANGER_MAX_BUSY_SECONDS 15 #endif +static int cd_retry_count = CD_DEFAULT_RETRY; static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer"); +SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, + &cd_retry_count, 0, "Normal I/O retry count"); +TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); @@ -1454,7 +1461,7 @@ cdstart(struct cam_periph *periph, union devstat_start_transaction_bio(softc->disk->d_devstat, bp); scsi_read_write(&start_ccb->csio, - /*retries*/4, + /*retries*/cd_retry_count, /* cbfcnp */ cddone, MSG_SIMPLE_Q_TAG, /* read */bp->bio_cmd == BIO_READ, From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 02:41:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 128341065672; Thu, 8 Jan 2009 02:41:41 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F36C78FC18; Thu, 8 Jan 2009 02:41:40 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n082feKZ006420; Thu, 8 Jan 2009 02:41:40 GMT (envelope-from scf@svn.freebsd.org) Received: (from scf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n082feiC006419; Thu, 8 Jan 2009 02:41:40 GMT (envelope-from scf@svn.freebsd.org) Message-Id: <200901080241.n082feiC006419@svn.freebsd.org> From: Sean Farley Date: Thu, 8 Jan 2009 02:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186883 - stable/7/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 02:41:41 -0000 Author: scf Date: Thu Jan 8 02:41:40 2009 New Revision: 186883 URL: http://svn.freebsd.org/changeset/base/186883 Log: MFC r184831,185237: style(9) fixes. Fixed style issues with variable ordering and naming, spacing and parentheses. Fixed alignment issue in gr_dup() in its assignment of gr_mem using a struct to force alignment without performing alignment mathematics. This was noticed recently with libutil was built with WARNS=6 on platform such as sparc64. Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults when examining struct group's with the struct members pointing to NULL's. Unlike r185237, did not enable WARNS?=6 since other changes would need to be MFC'd first. Reviewed by: des Modified: stable/7/lib/libutil/ (props changed) stable/7/lib/libutil/gr_util.c Modified: stable/7/lib/libutil/gr_util.c ============================================================================== --- stable/7/lib/libutil/gr_util.c Thu Jan 8 00:45:47 2009 (r186882) +++ stable/7/lib/libutil/gr_util.c Thu Jan 8 02:41:40 2009 (r186883) @@ -28,18 +28,21 @@ __FBSDID("$FreeBSD$"); #include + #include #include +#include #include #include #include #include -#include - - -static const char GroupLineFormat[] = "%s:%s:%ju:"; +struct group_storage { + struct group gr; + char *members[]; +}; +static const char group_line_format[] = "%s:%s:%ju:"; /* * Compares two struct group's. @@ -47,41 +50,50 @@ static const char GroupLineFormat[] = "% int gr_equal(const struct group *gr1, const struct group *gr2) { + int gr1_ndx; + int gr2_ndx; bool found; - bool equal; - int gr1Ndx; - int gr2Ndx; /* Check that the non-member information is the same. */ - equal = strcmp(gr1->gr_name, gr2->gr_name) == 0 && - strcmp(gr1->gr_passwd, gr2->gr_passwd) == 0 && - gr1->gr_gid == gr2->gr_gid; + if (gr1->gr_name == NULL || gr2->gr_name == NULL) { + if (gr1->gr_name != gr2->gr_name) + return (false); + } else if (strcmp(gr1->gr_name, gr2->gr_name) != 0) + return (false); + if (gr1->gr_passwd == NULL || gr2->gr_passwd == NULL) { + if (gr1->gr_passwd != gr2->gr_passwd) + return (false); + } else if (strcmp(gr1->gr_passwd, gr2->gr_passwd) != 0) + return (false); + if (gr1->gr_gid != gr2->gr_gid) + return (false); /* Check all members in both groups. */ - if (equal) { - for (found = false, gr1Ndx = 0; gr1->gr_mem[gr1Ndx] != NULL; - gr1Ndx++) { - for (gr2Ndx = 0; gr2->gr_mem[gr2Ndx] != NULL; gr2Ndx++) - if (strcmp(gr1->gr_mem[gr1Ndx], - gr2->gr_mem[gr2Ndx]) == 0) { + if (gr1->gr_mem == NULL || gr2->gr_mem == NULL) { + if (gr1->gr_mem != gr2->gr_mem) + return (false); + } else { + for (found = false, gr1_ndx = 0; gr1->gr_mem[gr1_ndx] != NULL; + gr1_ndx++) { + for (gr2_ndx = 0; gr2->gr_mem[gr2_ndx] != NULL; + gr2_ndx++) + if (strcmp(gr1->gr_mem[gr1_ndx], + gr2->gr_mem[gr2_ndx]) == 0) { found = true; break; } - if (! found) { - equal = false; - break; - } + if (!found) + return (false); } /* Check that group2 does not have more members than group1. */ - if (gr2->gr_mem[gr1Ndx] != NULL) - equal = false; + if (gr2->gr_mem[gr1_ndx] != NULL) + return (false); } - return (equal); + return (true); } - /* * Make a group line out of a struct group. */ @@ -89,82 +101,84 @@ char * gr_make(const struct group *gr) { char *line; + size_t line_size; int ndx; - size_t lineSize; /* Calculate the length of the group line. */ - lineSize = snprintf(NULL, 0, GroupLineFormat, gr->gr_name, + line_size = snprintf(NULL, 0, group_line_format, gr->gr_name, gr->gr_passwd, (uintmax_t)gr->gr_gid) + 1; - for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) - lineSize += strlen(gr->gr_mem[ndx]) + 1; - if (ndx > 0) - lineSize--; + if (gr->gr_mem != NULL) { + for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) + line_size += strlen(gr->gr_mem[ndx]) + 1; + if (ndx > 0) + line_size--; + } /* Create the group line and fill it. */ - if ((line = malloc(lineSize)) == NULL) + if ((line = malloc(line_size)) == NULL) return (NULL); - lineSize = snprintf(line, lineSize, GroupLineFormat, gr->gr_name, + line_size = snprintf(line, line_size, group_line_format, gr->gr_name, gr->gr_passwd, (uintmax_t)gr->gr_gid); - for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { - strcat(line, gr->gr_mem[ndx]); - if (gr->gr_mem[ndx + 1] != NULL) - strcat(line, ","); - } + if (gr->gr_mem != NULL) + for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { + strcat(line, gr->gr_mem[ndx]); + if (gr->gr_mem[ndx + 1] != NULL) + strcat(line, ","); + } return (line); } - /* * Duplicate a struct group. */ struct group * gr_dup(const struct group *gr) { - int ndx; - int numMem; + char *dst; size_t len; - struct group *ngr; + struct group_storage *gs; + int ndx; + int num_mem; - /* Calculate size of group. */ - len = sizeof(*gr) + - (gr->gr_name != NULL ? strlen(gr->gr_name) + 1 : 0) + - (gr->gr_passwd != NULL ? strlen(gr->gr_passwd) + 1 : 0); - numMem = 0; + /* Calculate size of the group. */ + len = sizeof(*gs); + if (gr->gr_name != NULL) + len += strlen(gr->gr_name) + 1; + if (gr->gr_passwd != NULL) + len += strlen(gr->gr_passwd) + 1; if (gr->gr_mem != NULL) { - for (; gr->gr_mem[numMem] != NULL; numMem++) - len += strlen(gr->gr_mem[numMem]) + 1; - len += (numMem + 1) * sizeof(*(gr->gr_mem)); - } + for (num_mem = 0; gr->gr_mem[num_mem] != NULL; num_mem++) + len += strlen(gr->gr_mem[num_mem]) + 1; + len += (num_mem + 1) * sizeof(*gr->gr_mem); + } else + num_mem = -1; /* Create new group and copy old group into it. */ - if ((ngr = calloc(1, len)) == NULL) + if ((gs = calloc(1, len)) == NULL) return (NULL); - len = sizeof(*ngr); - ngr->gr_gid = gr->gr_gid; + dst = (char *)&gs->members[num_mem + 1]; if (gr->gr_name != NULL) { - ngr->gr_name = (char *)ngr + len; - len += sprintf(ngr->gr_name, "%s", gr->gr_name) + 1; + gs->gr.gr_name = dst; + dst = stpcpy(gs->gr.gr_name, gr->gr_name) + 1; } if (gr->gr_passwd != NULL) { - ngr->gr_passwd = (char *)ngr + len; - len += sprintf(ngr->gr_passwd, "%s", gr->gr_passwd) + 1; + gs->gr.gr_passwd = dst; + dst = stpcpy(gs->gr.gr_passwd, gr->gr_passwd) + 1; } + gs->gr.gr_gid = gr->gr_gid; if (gr->gr_mem != NULL) { - ngr->gr_mem = (char **)((char *)ngr + len); - len += (numMem + 1) * sizeof(*(ngr->gr_mem)); - for (ndx = 0; gr->gr_mem[ndx] != NULL; ndx++) { - ngr->gr_mem[ndx] = (char *)ngr + len; - len += sprintf(ngr->gr_mem[ndx], "%s", - gr->gr_mem[ndx]) + 1; + gs->gr.gr_mem = gs->members; + for (ndx = 0; ndx < num_mem; ndx++) { + gs->gr.gr_mem[ndx] = dst; + dst = stpcpy(gs->gr.gr_mem[ndx], gr->gr_mem[ndx]) + 1; } - ngr->gr_mem[ndx] = NULL; + gs->gr.gr_mem[ndx] = NULL; } - return (ngr); + return (&gs->gr); } - /* * Scan a line and place it into a group structure. */ @@ -180,14 +194,14 @@ __gr_scan(char *line, struct group *gr) return (false); *loc = '\0'; gr->gr_passwd = loc + 1; - if (*(gr->gr_passwd) == ':') - *(gr->gr_passwd) = '\0'; + if (*gr->gr_passwd == ':') + *gr->gr_passwd = '\0'; else { if ((loc = strchr(loc + 1, ':')) == NULL) return (false); *loc = '\0'; } - if (sscanf(loc + 1, "%u", &(gr->gr_gid)) != 1) + if (sscanf(loc + 1, "%u", &gr->gr_gid) != 1) return (false); /* Assign member information to structure. */ @@ -195,40 +209,42 @@ __gr_scan(char *line, struct group *gr) return (false); line = loc + 1; gr->gr_mem = NULL; - if (*line != '\0') { - ndx = 0; + ndx = 0; + do { + gr->gr_mem = reallocf(gr->gr_mem, sizeof(*gr->gr_mem) * + (ndx + 1)); + if (gr->gr_mem == NULL) + return (false); + + /* Skip locations without members (i.e., empty string). */ do { - if ((gr->gr_mem = reallocf(gr->gr_mem, - sizeof(*(gr->gr_mem)) * (ndx + 1))) == NULL) - return (false); gr->gr_mem[ndx] = strsep(&line, ","); - } while (gr->gr_mem[ndx++] != NULL); - } + } while (gr->gr_mem[ndx] != NULL && *gr->gr_mem[ndx] == '\0'); + } while (gr->gr_mem[ndx++] != NULL); return (true); } - /* * Create a struct group from a line. */ struct group * gr_scan(const char *line) { - char *lineCopy; - struct group *newGr; struct group gr; + char *line_copy; + struct group *new_gr; - if ((lineCopy = strdup(line)) == NULL) + if ((line_copy = strdup(line)) == NULL) return (NULL); - if (!__gr_scan(lineCopy, &gr)) { - free(lineCopy); + if (!__gr_scan(line_copy, &gr)) { + free(line_copy); return (NULL); } - newGr = gr_dup(&gr); - free(lineCopy); + new_gr = gr_dup(&gr); + free(line_copy); if (gr.gr_mem != NULL) free(gr.gr_mem); - return (newGr); + return (new_gr); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 04:26:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2622106566C; Thu, 8 Jan 2009 04:26:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B095A8FC0C; Thu, 8 Jan 2009 04:26:44 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n084QiSS008674; Thu, 8 Jan 2009 04:26:44 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n084QiEj008673; Thu, 8 Jan 2009 04:26:44 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200901080426.n084QiEj008673@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 8 Jan 2009 04:26:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186884 - head/sys/dev/fxp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 04:26:45 -0000 Author: yongari Date: Thu Jan 8 04:26:44 2009 New Revision: 186884 URL: http://svn.freebsd.org/changeset/base/186884 Log: Always check whether dma map is valid before unloading the map. When fxp(4) intializes Rx buffers for the first time, there is no loaded dma map so attempting to unload it is an invalid operation. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Thu Jan 8 02:41:40 2009 (r186883) +++ head/sys/dev/fxp/if_fxp.c Thu Jan 8 04:26:44 2009 (r186884) @@ -2545,7 +2545,8 @@ fxp_new_rfabuf(struct fxp_softc *sc, str return (error); } - bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map); + if (rxp->rx_mbuf != NULL) + bus_dmamap_unload(sc->fxp_mtag, rxp->rx_map); tmp_map = sc->spare_map; sc->spare_map = rxp->rx_map; rxp->rx_map = tmp_map; From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 05:10:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8CFE106566B; Thu, 8 Jan 2009 05:10:03 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A69CC8FC18; Thu, 8 Jan 2009 05:10:03 +0000 (UTC) (envelope-from takawata@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n085A3ji009496; Thu, 8 Jan 2009 05:10:03 GMT (envelope-from takawata@svn.freebsd.org) Received: (from takawata@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n085A3eO009494; Thu, 8 Jan 2009 05:10:03 GMT (envelope-from takawata@svn.freebsd.org) Message-Id: <200901080510.n085A3eO009494@svn.freebsd.org> From: Takanori Watanabe Date: Thu, 8 Jan 2009 05:10:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186885 - head/sys/dev/usb2/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 05:10:04 -0000 Author: takawata Date: Thu Jan 8 05:10:03 2009 New Revision: 186885 URL: http://svn.freebsd.org/changeset/base/186885 Log: Make ufoma2 driver work. 1.Sync TD on close to ensure USB request in close callback issued. 2.Add sysctls to indicate device role. 3.Enable handsfree port support. Now modem port and obex port works well. Handsfree port works but not with good response. Modified: head/sys/dev/usb2/serial/ufoma2.c head/sys/dev/usb2/serial/usb2_serial.c Modified: head/sys/dev/usb2/serial/ufoma2.c ============================================================================== --- head/sys/dev/usb2/serial/ufoma2.c Thu Jan 8 04:26:44 2009 (r186884) +++ head/sys/dev/usb2/serial/ufoma2.c Thu Jan 8 05:10:03 2009 (r186885) @@ -2,6 +2,7 @@ #include __FBSDID("$FreeBSD$"); +#define UFOMA_HANDSFREE /*- * Copyright (c) 2005, Takanori Watanabe @@ -101,6 +102,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include typedef struct ufoma_mobile_acm_descriptor { uint8_t bFunctionLength; @@ -217,6 +220,12 @@ static void ufoma_stop_read(struct usb2_ static void ufoma_start_write(struct usb2_com_softc *); static void ufoma_stop_write(struct usb2_com_softc *); +/*sysctl stuff*/ +static int ufoma_sysctl_support(SYSCTL_HANDLER_ARGS); +static int ufoma_sysctl_current(SYSCTL_HANDLER_ARGS); +static int ufoma_sysctl_open(SYSCTL_HANDLER_ARGS); + + static const struct usb2_config ufoma_ctrl_config[UFOMA_CTRL_ENDPT_MAX] = { @@ -380,6 +389,9 @@ ufoma_attach(device_t dev) struct ufoma_softc *sc = device_get_softc(dev); struct usb2_config_descriptor *cd; struct usb2_interface_descriptor *id; + struct sysctl_ctx_list *sctx; + struct sysctl_oid *soid; + usb2_mcpc_acm_descriptor *mad; uint8_t elements; int32_t error; @@ -459,6 +471,23 @@ ufoma_attach(device_t dev) DPRINTF("usb2_com_attach failed\n"); goto detach; } + /*Sysctls*/ + sctx = device_get_sysctl_ctx(dev); + soid = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "supportmode", + CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_support, + "A", "Supporting port role"); + + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "currentmode", + CTLFLAG_RD|CTLTYPE_STRING, sc, 0, ufoma_sysctl_current, + "A", "Current port role"); + + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "openmode", + CTLFLAG_RW|CTLTYPE_STRING, sc, 0, ufoma_sysctl_open, + "A", "Mode to transit when port is opened"); + + return (0); /* success */ detach: @@ -910,7 +939,8 @@ ufoma_cfg_set_break(struct usb2_com_soft struct usb2_device_request req; uint16_t wValue; - if (sc->sc_is_pseudo) { + if (sc->sc_is_pseudo || + (sc->sc_currentmode == UMCPC_ACM_MODE_OBEX)) { return; } if (!(sc->sc_acm_cap & USB_CDC_ACM_HAS_BREAK)) { @@ -1181,3 +1211,113 @@ ufoma_stop_write(struct usb2_com_softc * usb2_transfer_stop(sc->sc_bulk_xfer[0]); } } + +struct umcpc_modetostr_tab{ + int mode; + char *str; +}umcpc_modetostr_tab[]={ + {UMCPC_ACM_MODE_DEACTIVATED, "deactivated"}, + {UMCPC_ACM_MODE_MODEM, "modem"}, + {UMCPC_ACM_MODE_ATCOMMAND, "handsfree"}, + {UMCPC_ACM_MODE_OBEX, "obex"}, + {UMCPC_ACM_MODE_VENDOR1, "vendor1"}, + {UMCPC_ACM_MODE_VENDOR2, "vendor2"}, + {UMCPC_ACM_MODE_UNLINKED, "unlinked"}, + {0, NULL} +}; + +static char *ufoma_mode_to_str(int mode) +{ + int i; + for(i = 0 ;umcpc_modetostr_tab[i].str != NULL; i++){ + if(umcpc_modetostr_tab[i].mode == mode){ + return umcpc_modetostr_tab[i].str; + } + } + return NULL; +} + +static int ufoma_str_to_mode(char *str) +{ + int i; + for(i = 0 ;umcpc_modetostr_tab[i].str != NULL; i++){ + if(strcmp(str, umcpc_modetostr_tab[i].str)==0){ + return umcpc_modetostr_tab[i].mode; + } + } + return -1; +} + +static int ufoma_sysctl_support(SYSCTL_HANDLER_ARGS) +{ + struct ufoma_softc *sc = (struct ufoma_softc *)oidp->oid_arg1; + struct sbuf sb; + int i; + char *mode; + + sbuf_new(&sb, NULL, 1, SBUF_AUTOEXTEND); + for(i = 1; i < sc->sc_modetable[0]; i++){ + mode = ufoma_mode_to_str(sc->sc_modetable[i]); + if(mode !=NULL){ + sbuf_cat(&sb, mode); + }else{ + sbuf_printf(&sb, "(%02x)", sc->sc_modetable[i]); + } + if(i < (sc->sc_modetable[0]-1)) + sbuf_cat(&sb, ","); + } + sbuf_trim(&sb); + sbuf_finish(&sb); + sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + sbuf_delete(&sb); + + return 0; +} +static int ufoma_sysctl_current(SYSCTL_HANDLER_ARGS) +{ + struct ufoma_softc *sc = (struct ufoma_softc *)oidp->oid_arg1; + char *mode; + char subbuf[]="(XXX)"; + mode = ufoma_mode_to_str(sc->sc_currentmode); + if(!mode){ + mode = subbuf; + snprintf(subbuf, sizeof(subbuf), "(%02x)", sc->sc_currentmode); + } + sysctl_handle_string(oidp, mode, strlen(mode), req); + + return 0; + +} +static int ufoma_sysctl_open(SYSCTL_HANDLER_ARGS) +{ + struct ufoma_softc *sc = (struct ufoma_softc *)oidp->oid_arg1; + char *mode; + char subbuf[40]; + int newmode; + int error; + int i; + + mode = ufoma_mode_to_str(sc->sc_modetoactivate); + if(mode){ + strncpy(subbuf, mode, sizeof(subbuf)); + }else{ + snprintf(subbuf, sizeof(subbuf), "(%02x)", sc->sc_modetoactivate); + } + error = sysctl_handle_string(oidp, subbuf, sizeof(subbuf), req); + if(error != 0 || req->newptr == NULL){ + return error; + } + + if((newmode = ufoma_str_to_mode(subbuf)) == -1){ + return EINVAL; + } + + for(i = 1 ; i < sc->sc_modetable[0] ; i++){ + if(sc->sc_modetable[i] == newmode){ + sc->sc_modetoactivate = newmode; + return 0; + } + } + + return EINVAL; +} Modified: head/sys/dev/usb2/serial/usb2_serial.c ============================================================================== --- head/sys/dev/usb2/serial/usb2_serial.c Thu Jan 8 04:26:44 2009 (r186884) +++ head/sys/dev/usb2/serial/usb2_serial.c Thu Jan 8 05:10:03 2009 (r186885) @@ -588,7 +588,8 @@ static void usb2_com_close(struct tty *tp) { struct usb2_com_softc *sc = tty_softc(tp); - + struct usb2_com_super_softc *ssc = sc->sc_super; + mtx_assert(sc->sc_parent_mtx, MA_OWNED); DPRINTF("tp=%p\n", tp); @@ -600,6 +601,7 @@ usb2_com_close(struct tty *tp) usb2_com_shutdown(sc); usb2_com_queue_command(sc, &usb2_com_cfg_close, 0); + usb2_config_td_sync(&ssc->sc_config_td); sc->sc_flag &= ~(UCOM_FLAG_HL_READY | UCOM_FLAG_WR_START | From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 06:12:04 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E20106564A; Thu, 8 Jan 2009 06:12:04 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 000688FC12; Thu, 8 Jan 2009 06:12:03 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n086C3pD010634; Thu, 8 Jan 2009 06:12:03 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n086C3ZR010633; Thu, 8 Jan 2009 06:12:03 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200901080612.n086C3ZR010633@svn.freebsd.org> From: David Schultz Date: Thu, 8 Jan 2009 06:12:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186886 - head/lib/msun/src X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 06:12:04 -0000 Author: das Date: Thu Jan 8 06:12:03 2009 New Revision: 186886 URL: http://svn.freebsd.org/changeset/base/186886 Log: Fix the types of INFINITY and NAN, which were broken in r131851. They should both be floats, not doubles. PR: 127795 Submitted by: Christoph Mallon MFC after: 2 weeks Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Thu Jan 8 05:10:03 2009 (r186885) +++ head/lib/msun/src/math.h Thu Jan 8 06:12:03 2009 (r186886) @@ -55,8 +55,8 @@ extern const union __nan_un { #ifdef __MATH_BUILTIN_CONSTANTS #define HUGE_VALF __builtin_huge_valf() #define HUGE_VALL __builtin_huge_vall() -#define INFINITY __builtin_inf() -#define NAN __builtin_nan("") +#define INFINITY __builtin_inff() +#define NAN __builtin_nanf("") #else #define HUGE_VALF (float)HUGE_VAL #define HUGE_VALL (long double)HUGE_VAL From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 06:38:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4241B106567A; Thu, 8 Jan 2009 06:38:07 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30A628FC14; Thu, 8 Jan 2009 06:38:07 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n086c7vq011110; Thu, 8 Jan 2009 06:38:07 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n086c7pq011109; Thu, 8 Jan 2009 06:38:07 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200901080638.n086c7pq011109@svn.freebsd.org> From: David Schultz Date: Thu, 8 Jan 2009 06:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186887 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 06:38:08 -0000 Author: das Date: Thu Jan 8 06:38:06 2009 New Revision: 186887 URL: http://svn.freebsd.org/changeset/base/186887 Log: Set the error indicator on an attempt to write to a read-only stream. PR: 127335 MFC after: 2 weeks Modified: head/lib/libc/stdio/wsetup.c Modified: head/lib/libc/stdio/wsetup.c ============================================================================== --- head/lib/libc/stdio/wsetup.c Thu Jan 8 06:12:03 2009 (r186886) +++ head/lib/libc/stdio/wsetup.c Thu Jan 8 06:38:06 2009 (r186887) @@ -60,6 +60,7 @@ __swsetup(fp) if ((fp->_flags & __SWR) == 0) { if ((fp->_flags & __SRW) == 0) { errno = EBADF; + fp->_flags |= __SERR; return (EOF); } if (fp->_flags & __SRD) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 09:50:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09C0E106566B; Thu, 8 Jan 2009 09:50:21 +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 E6BF08FC1A; Thu, 8 Jan 2009 09:50:20 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n089oKoQ014763; Thu, 8 Jan 2009 09:50:20 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n089oKxr014752; Thu, 8 Jan 2009 09:50:20 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901080950.n089oKxr014752@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 09:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186890 - in stable/7: gnu/usr.bin/cc gnu/usr.bin/cc/libiberty gnu/usr.bin/sort include kerberos5 kerberos5/include lib/bind lib/bind/bind lib/libc lib/libc/string lib/libmagic usr.bin/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 09:50:22 -0000 Author: kib Date: Thu Jan 8 09:50:20 2009 New Revision: 186890 URL: http://svn.freebsd.org/changeset/base/186890 Log: MFC r185689: Order the str*.c files mostly alphabetical. MFC r185690: Import the strndup(3) function. MFC r185777: Add strndup(3) prototype to string.h. Manually change #undef HAVE_STRNDUP to #define HAVE_STRNDUP 1 for the configure.h files that need it. Added: stable/7/lib/libc/string/strndup.c - copied unchanged from r185690, head/lib/libc/string/strndup.c Modified: stable/7/gnu/usr.bin/cc/ (props changed) stable/7/gnu/usr.bin/cc/libiberty/config.h stable/7/gnu/usr.bin/sort/ (props changed) stable/7/gnu/usr.bin/sort/config.h stable/7/include/ (props changed) stable/7/include/string.h stable/7/kerberos5/ (props changed) stable/7/kerberos5/include/config.h stable/7/lib/bind/ (props changed) stable/7/lib/bind/bind/port_after.h stable/7/lib/libc/ (props changed) stable/7/lib/libc/string/Makefile.inc stable/7/lib/libc/string/Symbol.map stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) stable/7/lib/libc/string/strdup.3 stable/7/lib/libmagic/ (props changed) stable/7/lib/libmagic/config.h stable/7/usr.bin/file/ (props changed) stable/7/usr.bin/file/config.h Modified: stable/7/gnu/usr.bin/cc/libiberty/config.h ============================================================================== --- stable/7/gnu/usr.bin/cc/libiberty/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/gnu/usr.bin/cc/libiberty/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -235,7 +235,7 @@ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 Modified: stable/7/gnu/usr.bin/sort/config.h ============================================================================== --- stable/7/gnu/usr.bin/sort/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/gnu/usr.bin/sort/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -759,7 +759,7 @@ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strpbrk' function. */ #define HAVE_STRPBRK 1 Modified: stable/7/include/string.h ============================================================================== --- stable/7/include/string.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/include/string.h Thu Jan 8 09:50:20 2009 (r186890) @@ -96,6 +96,7 @@ char *strncat(char * __restrict, const c int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE +char *strndup(const char *, size_t); char *strnstr(const char *, const char *, size_t) __pure; #endif char *strpbrk(const char *, const char *) __pure; Modified: stable/7/kerberos5/include/config.h ============================================================================== --- stable/7/kerberos5/include/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/kerberos5/include/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -747,7 +747,7 @@ static /**/const char *const rcsid[] = { #define HAVE_STRNCASECMP 1 /* Define if you have the function `strndup'. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define if you have the function `strnlen'. */ /* #undef HAVE_STRNLEN */ Modified: stable/7/lib/bind/bind/port_after.h ============================================================================== --- stable/7/lib/bind/bind/port_after.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/bind/bind/port_after.h Thu Jan 8 09:50:20 2009 (r186890) @@ -30,7 +30,7 @@ #undef HAS_IN_ADDR6 #define HAVE_SOCKADDR_STORAGE 1 #undef NEED_GETTIMEOFDAY -#undef HAVE_STRNDUP +#define HAVE_STRNDUP 1 #undef USE_FIONBIO_IOCTL #undef USE_SYSERROR_LIST #undef INNETGR_ARGS Modified: stable/7/lib/libc/string/Makefile.inc ============================================================================== --- stable/7/lib/libc/string/Makefile.inc Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libc/string/Makefile.inc Thu Jan 8 09:50:20 2009 (r186890) @@ -9,9 +9,9 @@ CFLAGS+= -I${.CURDIR}/locale MISRCS+=bcmp.c bcopy.c bzero.c ffs.c ffsl.c ffsll.c fls.c flsl.c flsll.c \ index.c memccpy.c memchr.c memrchr.c memcmp.c \ memcpy.c memmem.c memmove.c memset.c rindex.c stpcpy.c strcasecmp.c \ - strcat.c strchr.c strcmp.c strcoll.c strcpy.c strcspn.c strdup.c \ - strerror.c strlcat.c strlcpy.c strlen.c strmode.c strncat.c strncmp.c \ - strncpy.c strcasestr.c strnstr.c \ + strcat.c strcasestr.c strchr.c strcmp.c strcoll.c strcpy.c strcspn.c \ + strdup.c strerror.c strlcat.c strlcpy.c strlen.c strmode.c strncat.c \ + strncmp.c strncpy.c strndup.c strnstr.c \ strpbrk.c strrchr.c strsep.c strsignal.c strspn.c strstr.c strtok.c \ strxfrm.c swab.c wcscat.c wcschr.c wcscmp.c wcscoll.c wcscpy.c \ wcscspn.c wcsdup.c \ @@ -47,6 +47,7 @@ MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 MLINKS+=strcmp.3 strncmp.3 MLINKS+=strcpy.3 stpcpy.3 +MLINKS+=strdup.3 strndup.3 MLINKS+=strcpy.3 strncpy.3 MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 MLINKS+=strerror.3 strerror_r.3 Modified: stable/7/lib/libc/string/Symbol.map ============================================================================== --- stable/7/lib/libc/string/Symbol.map Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libc/string/Symbol.map Thu Jan 8 09:50:20 2009 (r186890) @@ -81,6 +81,7 @@ FBSD_1.1 { ffsll; flsll; memrchr; + strndup; }; FBSDprivate_1.0 { Modified: stable/7/lib/libc/string/strdup.3 ============================================================================== --- stable/7/lib/libc/string/strdup.3 Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libc/string/strdup.3 Thu Jan 8 09:50:20 2009 (r186890) @@ -28,11 +28,12 @@ .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd Dec 5, 2008 .Dt STRDUP 3 .Os .Sh NAME -.Nm strdup +.Nm strdup , +.Nm strndup .Nd save a copy of a string .Sh LIBRARY .Lb libc @@ -40,6 +41,8 @@ .In string.h .Ft char * .Fn strdup "const char *str" +.Ft char * +.Fn strndup "const char *str" "size_t len" .Sh DESCRIPTION The .Fn strdup @@ -56,6 +59,16 @@ If insufficient memory is available, NUL .Va errno is set to .Er ENOMEM . +.Pp +The +.Fn strndup +function copies at most +.Fa len +characters from the string +.Fa str +always +.Dv NUL +terminating the copied string. .Sh SEE ALSO .Xr free 3 , .Xr malloc 3 @@ -64,3 +77,7 @@ The .Fn strdup function first appeared in .Bx 4.4 . +The +.Fn strndup +function was added in +.Fx 8.0 . Copied: stable/7/lib/libc/string/strndup.c (from r185690, head/lib/libc/string/strndup.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/lib/libc/string/strndup.c Thu Jan 8 09:50:20 2009 (r186890, copy of r185690, head/lib/libc/string/strndup.c) @@ -0,0 +1,53 @@ +/* $NetBSD: strndup.c,v 1.3 2007/01/14 23:41:24 cbiere Exp $ */ + +/* + * Copyright (c) 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +char * +strndup(const char *str, size_t n) +{ + size_t len; + char *copy; + + for (len = 0; len < n && str[len]; len++) + continue; + + if ((copy = malloc(len + 1)) == NULL) + return (NULL); + memcpy(copy, str, len); + copy[len] = '\0'; + return (copy); +} Modified: stable/7/lib/libmagic/config.h ============================================================================== --- stable/7/lib/libmagic/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/lib/libmagic/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -77,7 +77,7 @@ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strtof' function. */ #define HAVE_STRTOF 1 Modified: stable/7/usr.bin/file/config.h ============================================================================== --- stable/7/usr.bin/file/config.h Thu Jan 8 09:38:18 2009 (r186889) +++ stable/7/usr.bin/file/config.h Thu Jan 8 09:50:20 2009 (r186890) @@ -77,7 +77,7 @@ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strtof' function. */ #define HAVE_STRTOF 1 From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 10:16:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31AFC106567E; Thu, 8 Jan 2009 10:16:03 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3C48FC1F; Thu, 8 Jan 2009 10:16:03 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08AG3C6019653; Thu, 8 Jan 2009 10:16:03 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08AG3Np019652; Thu, 8 Jan 2009 10:16:03 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081016.n08AG3Np019652@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 10:16:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186891 - head/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 10:16:04 -0000 Author: raj Date: Thu Jan 8 10:16:02 2009 New Revision: 186891 URL: http://svn.freebsd.org/changeset/base/186891 Log: cam: Retry TEST UNIT READY command if not successful. This fixes problems with discovering some USB devices that are very slow to respond during initialisation. When a USB device is inserted, CAM performs the sequence: 1) INQUIRY 2) INQUIRY (second time with other parameters) 3) TEST UNIT READY 4) READ CAPACITY Before this change CAM didn't check if TEST UNIT READY was successful and went on blindly to the next state and sent READ CAPACITY. If the device was still not ready by then, CAM ended with error message. This patch adds checking for the status of TEST UNIT READY command and retrying up to 10 times with 0.5 sec interval. Submitted by: Grzegorz Bernacki gjb ! semihalf dot com Reviewed by: scottl Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jan 8 09:50:20 2009 (r186890) +++ head/sys/cam/cam_xpt.c Thu Jan 8 10:16:02 2009 (r186891) @@ -5611,7 +5611,7 @@ probestart(struct cam_periph *periph, un case PROBE_DV_EXIT: { scsi_test_unit_ready(csio, - /*retries*/4, + /*retries*/10, probedone, MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, @@ -6218,6 +6218,13 @@ probedone(struct cam_periph *periph, uni break; } case PROBE_TUR_FOR_NEGOTIATION: + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + DELAY(500000); + if (cam_periph_error(done_ccb, 0, SF_RETRY_UA, + NULL) == ERESTART) + return; + } + /* FALLTHROUGH */ case PROBE_DV_EXIT: if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 11:09:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DB78106568C; Thu, 8 Jan 2009 11:09:28 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B0908FC19; Thu, 8 Jan 2009 11:09:28 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08B9SZ9020772; Thu, 8 Jan 2009 11:09:28 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08B9SE7020770; Thu, 8 Jan 2009 11:09:28 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081109.n08B9SE7020770@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 11:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186892 - head/sys/dev/mge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 11:09:29 -0000 Author: raj Date: Thu Jan 8 11:09:27 2009 New Revision: 186892 URL: http://svn.freebsd.org/changeset/base/186892 Log: Handle mge(4) chip revision differences at run-time rather then compile time, which is more flexible for future revisions, and lets eliminate some #defines and compile conditionals. Obtained from: Semihalf Modified: head/sys/dev/mge/if_mge.c head/sys/dev/mge/if_mgevar.h Modified: head/sys/dev/mge/if_mge.c ============================================================================== --- head/sys/dev/mge/if_mge.c Thu Jan 8 10:16:02 2009 (r186891) +++ head/sys/dev/mge/if_mge.c Thu Jan 8 11:09:27 2009 (r186892) @@ -69,14 +69,11 @@ __FBSDID("$FreeBSD$"); #include #include -#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define MGE_VER2 1 -#endif - #define MV_PHY_ADDR_BASE 8 #include #include +#include #include "miibus_if.h" @@ -103,6 +100,10 @@ static void mge_start_locked(struct ifne static void mge_watchdog(struct mge_softc *sc); static int mge_ioctl(struct ifnet *ifp, u_long command, caddr_t data); +static uint32_t mge_tfut_ipg(uint32_t val, int ver); +static uint32_t mge_rx_ipg(uint32_t val, int ver); +static void mge_ver_params(struct mge_softc *sc); + static void mge_intrs_ctrl(struct mge_softc *sc, int enable); static void mge_intr_rx(void *arg); static void mge_intr_rx_locked(struct mge_softc *sc, int count); @@ -206,6 +207,57 @@ mge_get_mac_address(struct mge_softc *sc addr[5] = (mac_l & 0x000000ff); } +static uint32_t +mge_tfut_ipg(uint32_t val, int ver) +{ + + switch (ver) { + case 1: + return ((val & 0x3fff) << 4); + case 2: + default: + return ((val & 0xffff) << 4); + } +} + +static uint32_t +mge_rx_ipg(uint32_t val, int ver) +{ + + switch (ver) { + case 1: + return ((val & 0x3fff) << 8); + case 2: + default: + return (((val & 0x8000) << 10) | ((val & 0x7fff) << 7)); + } +} + +static void +mge_ver_params(struct mge_softc *sc) +{ + uint32_t d, r; + + soc_id(&d, &r); + if (d == MV_DEV_88F6281 || d == MV_DEV_MV78100) { + sc->mge_ver = 2; + sc->mge_mtu = 0x4e8; + sc->mge_tfut_ipg_max = 0xFFFF; + sc->mge_rx_ipg_max = 0xFFFF; + sc->mge_tx_arb_cfg = 0xFC0000FF; + sc->mge_tx_tok_cfg = 0xFFFF7FFF; + sc->mge_tx_tok_cnt = 0x3FFFFFFF; + } else { + sc->mge_ver = 1; + sc->mge_mtu = 0x458; + sc->mge_tfut_ipg_max = 0x3FFF; + sc->mge_rx_ipg_max = 0x3FFF; + sc->mge_tx_arb_cfg = 0x000000FF; + sc->mge_tx_tok_cfg = 0x3FFFFFFF; + sc->mge_tx_tok_cnt = 0x3FFFFFFF; + } +} + static void mge_set_mac_address(struct mge_softc *sc) { @@ -564,6 +616,9 @@ mge_attach(device_t dev) if (device_get_unit(dev) == 0) sc_mge0 = sc; + /* Set chip version-dependent parameters */ + mge_ver_params(sc); + /* Initialize mutexes */ mtx_init(&sc->transmit_lock, device_get_nameunit(dev), "mge TX lock", MTX_DEF); mtx_init(&sc->receive_lock, device_get_nameunit(dev), "mge RX lock", MTX_DEF); @@ -797,23 +852,25 @@ mge_init_locked(void *arg) /* Setup multicast filters */ mge_setup_multicast(sc); -#if defined(MGE_VER2) - MGE_WRITE(sc, MGE_PORT_SERIAL_CTRL1, MGE_RGMII_EN); - MGE_WRITE(sc, MGE_FIXED_PRIO_CONF, MGE_FIXED_PRIO_EN(0)); -#endif + if (sc->mge_ver == 2) { + MGE_WRITE(sc, MGE_PORT_SERIAL_CTRL1, MGE_RGMII_EN); + MGE_WRITE(sc, MGE_FIXED_PRIO_CONF, MGE_FIXED_PRIO_EN(0)); + } + /* Initialize TX queue configuration registers */ - MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(0), MGE_TX_TOKEN_Q0_DFLT); - MGE_WRITE(sc, MGE_TX_TOKEN_CONF(0), MGE_TX_TOKEN_Q0_DFLT); - MGE_WRITE(sc, MGE_TX_ARBITER_CONF(0), MGE_TX_ARB_Q0_DFLT); + MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(0), sc->mge_tx_tok_cnt); + MGE_WRITE(sc, MGE_TX_TOKEN_CONF(0), sc->mge_tx_tok_cfg); + MGE_WRITE(sc, MGE_TX_ARBITER_CONF(0), sc->mge_tx_arb_cfg); + /* Clear TX queue configuration registers for unused queues */ for (i = 1; i < 7; i++) { - MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(i), MGE_TX_TOKEN_Q1_7_DFLT); - MGE_WRITE(sc, MGE_TX_TOKEN_CONF(i), MGE_TX_TOKEN_Q1_7_DFLT); - MGE_WRITE(sc, MGE_TX_ARBITER_CONF(i), MGE_TX_ARB_Q1_7_DFLT); + MGE_WRITE(sc, MGE_TX_TOKEN_COUNT(i), 0); + MGE_WRITE(sc, MGE_TX_TOKEN_CONF(i), 0); + MGE_WRITE(sc, MGE_TX_ARBITER_CONF(i), 0); } /* Set default MTU */ - MGE_WRITE(sc, MGE_MTU, MGE_MTU_DEFAULT); + MGE_WRITE(sc, sc->mge_mtu, 0); /* Port configuration */ MGE_WRITE(sc, MGE_PORT_CONFIG, @@ -1688,12 +1745,12 @@ mge_set_rxic(struct mge_softc *sc) { uint32_t reg; - if (sc->rx_ic_time > MGE_SDMA_RX_IPG_MAX) - sc->rx_ic_time = MGE_SDMA_RX_IPG_MAX; + if (sc->rx_ic_time > sc->mge_rx_ipg_max) + sc->rx_ic_time = sc->mge_rx_ipg_max; reg = MGE_READ(sc, MGE_SDMA_CONFIG); - reg &= ~MGE_SDMA_RX_IPG(MGE_SDMA_RX_IPG_MAX); - reg |= MGE_SDMA_RX_IPG(sc->rx_ic_time); + reg &= ~mge_rx_ipg(sc->mge_rx_ipg_max, sc->mge_ver); + reg |= mge_rx_ipg(sc->rx_ic_time, sc->mge_ver); MGE_WRITE(sc, MGE_SDMA_CONFIG, reg); } @@ -1702,12 +1759,12 @@ mge_set_txic(struct mge_softc *sc) { uint32_t reg; - if (sc->tx_ic_time > MGE_TX_FIFO_URGENT_TRSH_IPG_MAX) - sc->tx_ic_time = MGE_TX_FIFO_URGENT_TRSH_IPG_MAX; + if (sc->tx_ic_time > sc->mge_tfut_ipg_max) + sc->tx_ic_time = sc->mge_tfut_ipg_max; reg = MGE_READ(sc, MGE_TX_FIFO_URGENT_TRSH); - reg &= ~MGE_TX_FIFO_URGENT_TRSH_IPG(MGE_TX_FIFO_URGENT_TRSH_IPG_MAX); - reg |= MGE_TX_FIFO_URGENT_TRSH_IPG(sc->tx_ic_time); + reg &= ~mge_tfut_ipg(sc->mge_tfut_ipg_max, sc->mge_ver); + reg |= mge_tfut_ipg(sc->tx_ic_time, sc->mge_ver); MGE_WRITE(sc, MGE_TX_FIFO_URGENT_TRSH, reg); } @@ -1715,9 +1772,10 @@ static int mge_sysctl_ic(SYSCTL_HANDLER_ARGS) { struct mge_softc *sc = (struct mge_softc *)arg1; - uint32_t time = (arg2 == MGE_IC_RX) ? sc->rx_ic_time : sc->tx_ic_time; + uint32_t time; int error; + time = (arg2 == MGE_IC_RX) ? sc->rx_ic_time : sc->tx_ic_time; error = sysctl_handle_int(oidp, &time, 0, req); if (error != 0) return(error); Modified: head/sys/dev/mge/if_mgevar.h ============================================================================== --- head/sys/dev/mge/if_mgevar.h Thu Jan 8 10:16:02 2009 (r186891) +++ head/sys/dev/mge/if_mgevar.h Thu Jan 8 11:09:27 2009 (r186892) @@ -91,6 +91,14 @@ struct mge_softc { uint32_t tx_ic_time; struct mge_desc_wrapper mge_tx_desc[MGE_TX_DESC_NUM]; struct mge_desc_wrapper mge_rx_desc[MGE_RX_DESC_NUM]; + + uint32_t mge_tfut_ipg_max; /* TX FIFO Urgent Threshold */ + uint32_t mge_rx_ipg_max; + uint32_t mge_tx_arb_cfg; + uint32_t mge_tx_tok_cfg; + uint32_t mge_tx_tok_cnt; + uint16_t mge_mtu; + int mge_ver; }; @@ -183,15 +191,6 @@ struct mge_softc { #define MGE_SDMA_RX_BYTE_SWAP (1 << 4) #define MGE_SDMA_TX_BYTE_SWAP (1 << 5) #define MGE_SDMA_DESC_SWAP_MODE (1 << 6) -#if defined(MGE_VER2) -#define MGE_SDMA_RX_IPG_MAX 0xFFFF -#define MGE_SDMA_RX_IPG(val) ((((val) & 0x8000) << 10) | \ - (((val) & 0x7fff) << 7)) -#else -#define MGE_SDMA_RX_IPG_MAX 0x3FFF -#define MGE_SDMA_RX_IPG(val) (((val) & 0x3fff) << 8) -#endif - #define MGE_PORT_SERIAL_CTRL 0x43c #define PORT_SERIAL_ENABLE (1 << 0) /* serial port enable */ @@ -248,13 +247,6 @@ struct mge_softc { #define MGE_COLLISION_LIMIT(val) (((val) & 0x3f) << 16) #define MGE_DROP_ODD_PREAMBLE (1 << 22) -#if defined(MGE_VER2) -#define MGE_MTU 0x4e8 -#else -#define MGE_MTU 0x458 -#endif -#define MGE_MTU_DEFAULT 0x0 - #define MGE_PORT_INT_CAUSE 0x460 #define MGE_PORT_INT_MASK 0x468 #define MGE_PORT_INT_RX (1 << 0) @@ -277,13 +269,6 @@ struct mge_softc { #define MGE_RX_FIFO_URGENT_TRSH 0x470 #define MGE_TX_FIFO_URGENT_TRSH 0x474 -#if defined(MGE_VER2) -#define MGE_TX_FIFO_URGENT_TRSH_IPG_MAX 0xFFFF -#define MGE_TX_FIFO_URGENT_TRSH_IPG(vl) (((vl) & 0xFFFF) << 4) -#else -#define MGE_TX_FIFO_URGENT_TRSH_IPG_MAX 0x3FFF -#define MGE_TX_FIFO_URGENT_TRSH_IPG(vl) (((vl) & 0x3FFF) << 4) -#endif #define MGE_FIXED_PRIO_CONF 0x4dc #define MGE_FIXED_PRIO_EN(q) (1 << (q)) @@ -300,12 +285,7 @@ struct mge_softc { #define MGE_TX_TOKEN_COUNT(q) (0x700 + ((q)<<4)) #define MGE_TX_TOKEN_CONF(q) (0x704 + ((q)<<4)) -#define MGE_TX_TOKEN_Q0_DFLT 0x3fffffff -#define MGE_TX_TOKEN_Q1_7_DFLT 0x0 - #define MGE_TX_ARBITER_CONF(q) (0x704 + ((q)<<4)) -#define MGE_TX_ARB_Q0_DFLT 0xff -#define MGE_TX_ARB_Q1_7_DFLT 0x0 #define MGE_MCAST_REG_NUMBER 64 #define MGE_DA_FILTER_SPEC_MCAST(i) (0x1400 + ((i) << 2)) From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 12:22:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BCAF106564A; Thu, 8 Jan 2009 12:22:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89AA78FC08; Thu, 8 Jan 2009 12:22:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08CMbTo022168; Thu, 8 Jan 2009 12:22:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08CMbeR022167; Thu, 8 Jan 2009 12:22:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901081222.n08CMbeR022167@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 8 Jan 2009 12:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186894 - head/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:22:38 -0000 Author: bz Date: Thu Jan 8 12:22:37 2009 New Revision: 186894 URL: http://svn.freebsd.org/changeset/base/186894 Log: Document that with r186854 we started using KMODOWN/KMODGRP for the kernel as well and no longer only for modules. Reviewed by: kib, antoine MFC after: 26 days Modified: head/share/mk/bsd.own.mk Modified: head/share/mk/bsd.own.mk ============================================================================== --- head/share/mk/bsd.own.mk Thu Jan 8 12:10:11 2009 (r186893) +++ head/share/mk/bsd.own.mk Thu Jan 8 12:22:37 2009 (r186894) @@ -44,9 +44,9 @@ # KMODDIR Base path for loadable kernel modules # (see kld(4)). [/boot/kernel] # -# KMODOWN KLD owner. [${BINOWN}] +# KMODOWN Kernel and KLD owner. [${BINOWN}] # -# KMODGRP KLD group. [${BINGRP}] +# KMODGRP Kernel and KLD group. [${BINGRP}] # # KMODMODE KLD mode. [${BINMODE}] # From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 12:47:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6AE5106564A; Thu, 8 Jan 2009 12:47:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 943138FC16; Thu, 8 Jan 2009 12:47:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08ClUra022669; Thu, 8 Jan 2009 12:47:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08ClUT2022668; Thu, 8 Jan 2009 12:47:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901081247.n08ClUT2022668@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 12:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186896 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:47:31 -0000 Author: kib Date: Thu Jan 8 12:47:30 2009 New Revision: 186896 URL: http://svn.freebsd.org/changeset/base/186896 Log: Do not call namei() while having another user-controlled vnode locked. Lookup could attempt to recursively lock that vnode. Do not call vn_start_write(V_WAIT) while vnode is locked, this may result in a deadlock with suspension. vfs_busy() the mountpoint before dropping vnode lock for vnode that was used to look up the mountpoint, to prevent unmount in between. Reported and tested by: pho Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/kern/vfs_extattr.c Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Thu Jan 8 12:39:40 2009 (r186895) +++ head/sys/kern/vfs_extattr.c Thu Jan 8 12:47:30 2009 (r186896) @@ -87,52 +87,65 @@ extattrctl(td, uap) AUDIT_ARG(text, attrname); vfslocked = fnvfslocked = 0; - /* - * uap->filename is not always defined. If it is, grab a vnode lock, - * which VFS_EXTATTRCTL() will later release. - */ + mp = NULL; filename_vp = NULL; if (uap->filename != NULL) { - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF | - AUDITVNODE2, UIO_USERSPACE, uap->filename, td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | AUDITVNODE2, + UIO_USERSPACE, uap->filename, td); error = namei(&nd); if (error) return (error); fnvfslocked = NDHASGIANT(&nd); filename_vp = nd.ni_vp; - NDFREE(&nd, NDF_NO_VP_RELE | NDF_NO_VP_UNLOCK); + NDFREE(&nd, NDF_NO_VP_RELE); } /* uap->path is always defined. */ - NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | AUDITVNODE1, UIO_USERSPACE, - uap->path, td); + NDINIT(&nd, LOOKUP, MPSAFE | FOLLOW | LOCKLEAF | AUDITVNODE1, + UIO_USERSPACE, uap->path, td); error = namei(&nd); - if (error) { - if (filename_vp != NULL) - vput(filename_vp); + if (error) goto out; - } vfslocked = NDHASGIANT(&nd); mp = nd.ni_vp->v_mount; - error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); - NDFREE(&nd, 0); + error = vfs_busy(mp, 0); if (error) { - if (filename_vp != NULL) - vput(filename_vp); + NDFREE(&nd, 0); + mp = NULL; goto out; } + VOP_UNLOCK(nd.ni_vp, 0); + error = vn_start_write(nd.ni_vp, &mp_writable, V_WAIT | PCATCH); + NDFREE(&nd, NDF_NO_VP_UNLOCK); + if (error) + goto out; + if (filename_vp != NULL) { + /* + * uap->filename is not always defined. If it is, + * grab a vnode lock, which VFS_EXTATTRCTL() will + * later release. + */ + error = vn_lock(filename_vp, LK_EXCLUSIVE); + if (error) { + vn_finished_write(mp_writable); + goto out; + } + } error = VFS_EXTATTRCTL(mp, uap->cmd, filename_vp, uap->attrnamespace, uap->attrname != NULL ? attrname : NULL, td); vn_finished_write(mp_writable); +out: + if (mp != NULL) + vfs_unbusy(mp); + /* * VFS_EXTATTRCTL will have unlocked, but not de-ref'd, filename_vp, * so vrele it if it is defined. */ if (filename_vp != NULL) vrele(filename_vp); -out: VFS_UNLOCK_GIANT(fnvfslocked); VFS_UNLOCK_GIANT(vfslocked); return (error); From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 12:48:27 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCD3B1065677; Thu, 8 Jan 2009 12:48:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAF1F8FC12; Thu, 8 Jan 2009 12:48:27 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08CmRLn022726; Thu, 8 Jan 2009 12:48:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08CmR7N022725; Thu, 8 Jan 2009 12:48:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901081248.n08CmR7N022725@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 12:48:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186897 - head/sys/ufs/ffs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:48:28 -0000 Author: kib Date: Thu Jan 8 12:48:27 2009 New Revision: 186897 URL: http://svn.freebsd.org/changeset/base/186897 Log: If unmount of the ffs mp failed, reinitialize the extended attributes for the mp, and restart them if autostart is enabled. Reported and tested by: pho Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Thu Jan 8 12:47:30 2009 (r186896) +++ head/sys/ufs/ffs/ffs_vfsops.c Thu Jan 8 12:48:27 2009 (r186897) @@ -1030,6 +1030,9 @@ ffs_unmount(mp, mntflags, td) struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; int error, flags, susp; +#ifdef UFS_EXTATTR + int e_restart; +#endif flags = 0; fs = ump->um_fs; @@ -1043,8 +1046,10 @@ ffs_unmount(mp, mntflags, td) if (error != EOPNOTSUPP) printf("ffs_unmount: ufs_extattr_stop returned %d\n", error); + e_restart = 0; } else { ufs_extattr_uepm_destroy(&ump->um_extattr); + e_restart = 1; } #endif if (susp) { @@ -1121,6 +1126,15 @@ fail: vfs_write_resume(mp); vn_start_write(NULL, &mp, V_WAIT); } +#ifdef UFS_EXTATTR + if (e_restart) { + ufs_extattr_uepm_init(&ump->um_extattr); +#ifdef UFS_EXTATTR_AUTOSTART + (void) ufs_extattr_autostart(mp, td); +#endif + } +#endif + return (error); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 12:49:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2607106566C; Thu, 8 Jan 2009 12:49:55 +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 90B798FC12; Thu, 8 Jan 2009 12:49:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08CntwF022848; Thu, 8 Jan 2009 12:49:55 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08CntaV022847; Thu, 8 Jan 2009 12:49:55 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901081249.n08CntaV022847@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 8 Jan 2009 12:49:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186898 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 12:49:56 -0000 Author: kib Date: Thu Jan 8 12:49:55 2009 New Revision: 186898 URL: http://svn.freebsd.org/changeset/base/186898 Log: Lock the uepm_lock around the autostart of extattrs. Reported and tested by: pho Reviewed by: rwatson MFC after: 3 weeks Modified: head/sys/ufs/ufs/ufs_extattr.c Modified: head/sys/ufs/ufs/ufs_extattr.c ============================================================================== --- head/sys/ufs/ufs/ufs_extattr.c Thu Jan 8 12:48:27 2009 (r186897) +++ head/sys/ufs/ufs/ufs_extattr.c Thu Jan 8 12:49:55 2009 (r186898) @@ -93,6 +93,10 @@ static int ufs_extattr_set(struct vnode struct thread *td); static int ufs_extattr_rm(struct vnode *vp, int attrnamespace, const char *name, struct ucred *cred, struct thread *td); +static int ufs_extattr_autostart_locked(struct mount *mp, + struct thread *td); +static int ufs_extattr_start_locked(struct ufsmount *ump, + struct thread *td); /* * Per-FS attribute lock protecting attribute operations. @@ -208,24 +212,22 @@ ufs_extattr_start(struct mount *mp, stru ump = VFSTOUFS(mp); ufs_extattr_uepm_lock(ump, td); + error = ufs_extattr_start_locked(ump, td); + ufs_extattr_uepm_unlock(ump, td); + return (error); +} - if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) { - error = EOPNOTSUPP; - goto unlock; - } - if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED) { - error = EBUSY; - goto unlock; - } +static int +ufs_extattr_start_locked(struct ufsmount *ump, struct thread *td) +{ + if (!(ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)) + return (EOPNOTSUPP); + if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED) + return (EBUSY); ump->um_extattr.uepm_flags |= UFS_EXTATTR_UEPM_STARTED; - ump->um_extattr.uepm_ucred = crhold(td->td_ucred); - -unlock: - ufs_extattr_uepm_unlock(ump, td); - - return (error); + return (0); } #ifdef UFS_EXTATTR_AUTOSTART @@ -448,6 +450,19 @@ ufs_extattr_iterate_directory(struct ufs int ufs_extattr_autostart(struct mount *mp, struct thread *td) { + struct ufsmount *ump; + int error; + + ump = VFSTOUFS(mp); + ufs_extattr_uepm_lock(ump, td); + error = ufs_extattr_autostart_locked(mp, td); + ufs_extattr_uepm_unlock(ump, td); + return (error); +} + +static int +ufs_extattr_autostart_locked(struct mount *mp, struct thread *td) +{ struct vnode *rvp, *attr_dvp, *attr_system_dvp, *attr_user_dvp; struct ufsmount *ump = VFSTOUFS(mp); int error; @@ -491,7 +506,7 @@ ufs_extattr_autostart(struct mount *mp, goto return_vput_attr_dvp; } - error = ufs_extattr_start(mp, td); + error = ufs_extattr_start_locked(ump, td); if (error) { printf("ufs_extattr_autostart: ufs_extattr_start failed (%d)\n", error); From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 13:20:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A42B106566B; Thu, 8 Jan 2009 13:20:29 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 175628FC1C; Thu, 8 Jan 2009 13:20:29 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DKSZ6023488; Thu, 8 Jan 2009 13:20:28 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DKS0w023483; Thu, 8 Jan 2009 13:20:28 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081320.n08DKS0w023483@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186899 - in head/sys/arm/mv: . discovery kirkwood orion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:20:30 -0000 Author: raj Date: Thu Jan 8 13:20:28 2009 New Revision: 186899 URL: http://svn.freebsd.org/changeset/base/186899 Log: Adjust Marvell SOC support for A0 chip revision. - Clean up TCLK handling so that it's dynamically recognized depending on registers settings or chip version/revision. Update registers definitions. - Teach SOC ident routine about A0 (initial silicon version for general audience) Obtained from: Marvell, Semihalf Modified: head/sys/arm/mv/common.c head/sys/arm/mv/discovery/discovery.c head/sys/arm/mv/kirkwood/kirkwood.c head/sys/arm/mv/mvreg.h head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/common.c Thu Jan 8 13:20:28 2009 (r186899) @@ -104,17 +104,6 @@ soc_power_ctrl_get(uint32_t mask) return (mask); } -uint32_t -get_tclk(void) -{ - -#if defined(SOC_MV_DISCOVERY) - return (TCLK_200MHZ); -#else - return (TCLK_166MHZ); -#endif -} - void soc_id(uint32_t *dev, uint32_t *rev) { @@ -165,6 +154,10 @@ soc_identify(void) break; case MV_DEV_88F6281: dev = "Marvell 88F6281"; + if (r == 0) + rev = "Z0"; + else if (r == 2) + rev = "A0"; break; case MV_DEV_MV78100: dev = "Marvell MV78100"; Modified: head/sys/arm/mv/discovery/discovery.c ============================================================================== --- head/sys/arm/mv/discovery/discovery.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/discovery/discovery.c Thu Jan 8 13:20:28 2009 (r186899) @@ -226,3 +226,25 @@ const struct decode_win idma_win_tbl[] = }; const struct decode_win *idma_wins = idma_win_tbl; int idma_wins_no = sizeof(idma_win_tbl) / sizeof(struct decode_win); + +uint32_t +get_tclk(void) +{ + uint32_t sar; + + /* + * On Discovery TCLK is can be configured to 166 MHz or 200 MHz. + * Current setting is read from Sample At Reset register. + */ + sar = bus_space_read_4(obio_tag, MV_MPP_BASE, SAMPLE_AT_RESET_HI); + sar = (sar & TCLK_MASK) >> TCLK_SHIFT; + + switch (sar) { + case 0: + return (TCLK_166MHZ); + case 1: + return (TCLK_200MHZ); + default: + panic("Unknown TCLK settings!"); + } +} Modified: head/sys/arm/mv/kirkwood/kirkwood.c ============================================================================== --- head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 13:20:28 2009 (r186899) @@ -150,3 +150,21 @@ const struct decode_win cpu_win_tbl[] = }; const struct decode_win *cpu_wins = cpu_win_tbl; int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); + +uint32_t +get_tclk(void) +{ + uint32_t dev, rev; + + /* + * On Kirkwood TCLK is not configurable and depends on silicon + * revision: + * - A0 has TCLK hardcoded to 200 MHz. + * - Z0 and others have TCLK hardcoded to 166 MHz. + */ + soc_id(&dev, &rev); + if (dev == MV_DEV_88F6281 && rev == 2) + return (TCLK_200MHZ); + + return (TCLK_166MHZ); +} Modified: head/sys/arm/mv/mvreg.h ============================================================================== --- head/sys/arm/mv/mvreg.h Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/mvreg.h Thu Jan 8 13:20:28 2009 (r186899) @@ -405,15 +405,29 @@ /* * MPP */ +#if defined(SOC_MV_ORION) #define MPP_CONTROL0 0x00 #define MPP_CONTROL1 0x04 #define MPP_CONTROL2 0x50 -#define DEVICE_MULTIPLEX 0x08 +#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +#define MPP_CONTROL0 0x00 +#define MPP_CONTROL1 0x04 +#define MPP_CONTROL2 0x08 +#define MPP_CONTROL3 0x0C +#define MPP_CONTROL4 0x10 +#define MPP_CONTROL5 0x14 +#define MPP_CONTROL6 0x18 +#else +#error SOC_MV_XX not defined +#endif #if defined(SOC_MV_ORION) #define SAMPLE_AT_RESET 0x10 -#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +#elif defined(SOC_MV_KIRKWOOD) #define SAMPLE_AT_RESET 0x30 +#elif defined(SOC_MV_DISCOVERY) +#define SAMPLE_AT_RESET_LO 0x30 +#define SAMPLE_AT_RESET_HI 0x34 #else #error SOC_MV_XX not defined #endif @@ -421,14 +435,12 @@ /* * Clocks */ -#ifdef SOC_MV_ORION -#define TCLK_MASK 0x300 -#define TCLK_SHIFT 0x8 -#elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define TCLK_MASK 0x30000 -#define TCLK_SHIFT 0x10 -#else -#error SOC_MV_XX not defined +#if defined(SOC_MV_ORION) +#define TCLK_MASK 0x00000300 +#define TCLK_SHIFT 0x08 +#elif defined(SOC_MV_DISCOVERY) +#define TCLK_MASK 0x00000180 +#define TCLK_SHIFT 0x07 #endif #define TCLK_100MHZ 100000000 Modified: head/sys/arm/mv/orion/orion.c ============================================================================== --- head/sys/arm/mv/orion/orion.c Thu Jan 8 12:49:55 2009 (r186898) +++ head/sys/arm/mv/orion/orion.c Thu Jan 8 13:20:28 2009 (r186899) @@ -167,3 +167,24 @@ const struct decode_win idma_win_tbl[] = }; const struct decode_win *idma_wins = idma_win_tbl; int idma_wins_no = sizeof(idma_win_tbl) / sizeof(struct decode_win); + +uint32_t +get_tclk(void) +{ + uint32_t sar; + + /* + * On Orion TCLK is can be configured to 150 MHz or 166 MHz. + * Current setting is read from Sample At Reset register. + */ + sar = bus_space_read_4(obio_tag, MV_MPP_BASE, SAMPLE_AT_RESET); + sar = (sar & TCLK_MASK) >> TCLK_SHIFT; + switch (sar) { + case 1: + return (TCLK_150MHZ); + case 2: + return (TCLK_166MHZ); + default: + panic("Unknown TCLK settings!"); + } +} From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 13:24:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21CA2106566B; Thu, 8 Jan 2009 13:24:26 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103DE8FC0A; Thu, 8 Jan 2009 13:24:26 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DOPZL023599; Thu, 8 Jan 2009 13:24:25 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DOP1F023598; Thu, 8 Jan 2009 13:24:25 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081324.n08DOP1F023598@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186900 - head/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:24:26 -0000 Author: raj Date: Thu Jan 8 13:24:25 2009 New Revision: 186900 URL: http://svn.freebsd.org/changeset/base/186900 Log: De-hard code UART speed setting for Marvell SOCs when hw.uart.console is not specified. Instead, let uart(4) fall back to whatever speed firmware has set. Modified: head/sys/dev/uart/uart_cpu_mv.c Modified: head/sys/dev/uart/uart_cpu_mv.c ============================================================================== --- head/sys/dev/uart/uart_cpu_mv.c Thu Jan 8 13:20:28 2009 (r186899) +++ head/sys/dev/uart/uart_cpu_mv.c Thu Jan 8 13:24:25 2009 (r186900) @@ -53,6 +53,7 @@ bus_space_tag_t uart_bus_space_mem; int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { + return ((b1->bsh == b2->bsh && b1->bst == b2->bst) ? 1 : 0); } @@ -77,7 +78,7 @@ uart_cpu_getdev(int devtype, struct uart 0, &di->bas.bsh) != 0) return (ENXIO); - di->baudrate = 115200; + di->baudrate = 0; di->bas.regshft = 2; di->bas.rclk = get_tclk(); di->databits = 8; From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 13:25:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 390BD1065670; Thu, 8 Jan 2009 13:25:23 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 278708FC16; Thu, 8 Jan 2009 13:25:23 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DPNYs023655; Thu, 8 Jan 2009 13:25:23 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DPNCi023654; Thu, 8 Jan 2009 13:25:23 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081325.n08DPNCi023654@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186901 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:25:23 -0000 Author: raj Date: Thu Jan 8 13:25:22 2009 New Revision: 186901 URL: http://svn.freebsd.org/changeset/base/186901 Log: Minor style(9) corrections. Modified: head/sys/arm/mv/gpio.c Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Thu Jan 8 13:24:25 2009 (r186900) +++ head/sys/arm/mv/gpio.c Thu Jan 8 13:25:22 2009 (r186901) @@ -113,8 +113,8 @@ mv_gpio_probe(device_t dev) static int mv_gpio_attach(device_t dev) { - int error, i; - struct mv_gpio_softc *sc; + int error, i; + struct mv_gpio_softc *sc; uint32_t dev_id, rev_id; sc = (struct mv_gpio_softc *)device_get_softc(dev); @@ -219,7 +219,7 @@ mv_gpio_intr(void *arg) * GPIO interrupt handling */ -static struct intr_event *gpio_events[MV_GPIO_MAX_NPINS]; +static struct intr_event *gpio_events[MV_GPIO_MAX_NPINS]; int mv_gpio_setup_intrhandler(const char *name, driver_filter_t *filt, @@ -243,8 +243,8 @@ mv_gpio_setup_intrhandler(const char *na gpio_events[pin] = event; } - intr_event_add_handler(event, name, filt, hand, arg, intr_priority(flags), - flags, cookiep); + intr_event_add_handler(event, name, filt, hand, arg, + intr_priority(flags), flags, cookiep); return (0); } @@ -277,7 +277,7 @@ mv_gpio_intr_unmask(int pin) static void mv_gpio_intr_handler(int pin) { - struct intr_event *event; + struct intr_event *event; event = gpio_events[pin]; if (event == NULL || TAILQ_EMPTY(&event->ie_handlers)) From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 13:32:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0648E10656DB; Thu, 8 Jan 2009 13:32:09 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A74C8FC13; Thu, 8 Jan 2009 13:32:08 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08DW8K1023798; Thu, 8 Jan 2009 13:32:08 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08DW8Is023797; Thu, 8 Jan 2009 13:32:08 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081332.n08DW8Is023797@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 13:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186902 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 13:32:10 -0000 Author: raj Date: Thu Jan 8 13:32:08 2009 New Revision: 186902 URL: http://svn.freebsd.org/changeset/base/186902 Log: Provide handler for USB controller error interrupts for Marvell EHCI device. Obtained from: Semihalf Modified: head/sys/dev/usb/ehci_mbus.c Modified: head/sys/dev/usb/ehci_mbus.c ============================================================================== --- head/sys/dev/usb/ehci_mbus.c Thu Jan 8 13:25:22 2009 (r186901) +++ head/sys/dev/usb/ehci_mbus.c Thu Jan 8 13:32:08 2009 (r186902) @@ -73,6 +73,19 @@ static device_shutdown_t ehci_mbus_shutd static device_suspend_t ehci_mbus_suspend; static device_resume_t ehci_mbus_resume; +static int err_intr(void *arg); + +struct resource *irq_err; +void *ih_err; + +#define USB_BRIDGE_INTR_CAUSE 0x210 +#define USB_BRIDGE_INTR_MASK 0x214 + +#define MV_USB_ADDR_DECODE_ERR (1 << 0) +#define MV_USB_HOST_UNDERFLOW (1 << 1) +#define MV_USB_HOST_OVERFLOW (1 << 2) +#define MV_USB_DEVICE_UNDERFLOW (1 << 3) + static int ehci_mbus_suspend(device_t self) { @@ -157,6 +170,15 @@ ehci_mbus_attach(device_t self) device_get_name(self)); sc->sc_size = MV_USB_SIZE - MV_USB_HOST_OFST; + rid = 0; + irq_err = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid, + RF_SHAREABLE | RF_ACTIVE); + if (irq_err == NULL) { + device_printf(self, "Could not allocate error irq\n"); + ehci_mbus_detach(self); + return (ENXIO); + } + /* * Notice: Marvell EHCI controller has TWO interrupt lines, so make sure to * use the correct rid for the main one (controller interrupt) -- @@ -181,6 +203,19 @@ ehci_mbus_attach(device_t self) sprintf(sc->sc_vendor, "Marvell"); sc->sc_id_vendor = EHCI_VENDORID_MRVL; + err = bus_setup_intr(self, irq_err, INTR_FAST | INTR_TYPE_BIO, + err_intr, NULL, sc, &ih_err); + if (err) { + device_printf(self, "Could not setup error irq, %d\n", err); + ih_err = NULL; + ehci_mbus_detach(self); + return (ENXIO); + } + + EWRITE4(sc, USB_BRIDGE_INTR_MASK, MV_USB_ADDR_DECODE_ERR | + MV_USB_HOST_UNDERFLOW | MV_USB_HOST_OVERFLOW | + MV_USB_DEVICE_UNDERFLOW); + err = bus_setup_intr(self, sc->irq_res, INTR_TYPE_BIO, NULL, (driver_intr_t*)ehci_intr, sc, &sc->ih); if (err) { @@ -277,6 +312,17 @@ ehci_mbus_detach(device_t self) err); sc->ih = NULL; } + EWRITE4(sc, USB_BRIDGE_INTR_MASK, 0); + + if (irq_err && ih_err) { + err = bus_teardown_intr(self, irq_err, ih_err); + + if (err) + device_printf(self, "Could not tear down irq, %d\n", + err); + ih_err = NULL; + } + if (sc->sc_bus.bdev) { device_delete_child(self, sc->sc_bus.bdev); sc->sc_bus.bdev = NULL; @@ -285,6 +331,10 @@ ehci_mbus_detach(device_t self) bus_release_resource(self, SYS_RES_IRQ, 0, sc->irq_res); sc->irq_res = NULL; } + if (irq_err) { + bus_release_resource(self, SYS_RES_IRQ, 1, irq_err); + irq_err = NULL; + } if (sc->io_res) { bus_release_resource(self, SYS_RES_MEMORY, 0, sc->io_res); sc->io_res = NULL; @@ -294,6 +344,32 @@ ehci_mbus_detach(device_t self) return (0); } +static int +err_intr(void *arg) +{ + ehci_softc_t *sc = arg; + unsigned int cause; + + cause = EREAD4(sc, USB_BRIDGE_INTR_CAUSE); + if (cause) { + printf("IRQ ERR: cause: 0x%08x\n", cause); + if (cause & MV_USB_ADDR_DECODE_ERR) + printf("IRQ ERR: Address decoding error\n"); + if (cause & MV_USB_HOST_UNDERFLOW) + printf("IRQ ERR: USB Host Underflow\n"); + if (cause & MV_USB_HOST_OVERFLOW) + printf("IRQ ERR: USB Host Overflow\n"); + if (cause & MV_USB_DEVICE_UNDERFLOW) + printf("IRQ ERR: USB Device Underflow\n"); + if (cause & ~(MV_USB_ADDR_DECODE_ERR | MV_USB_HOST_UNDERFLOW | + MV_USB_HOST_OVERFLOW | MV_USB_DEVICE_UNDERFLOW)) + printf("IRQ ERR: Unknown error\n"); + + EWRITE4(sc, USB_BRIDGE_INTR_CAUSE, 0); + } + return (FILTER_HANDLED); +} + static device_method_t ehci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ehci_mbus_probe), From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 15:20:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C6A21065670; Thu, 8 Jan 2009 15:20:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9F58FC08; Thu, 8 Jan 2009 15:20:33 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08FKW0r025880; Thu, 8 Jan 2009 15:20:32 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08FKWDG025879; Thu, 8 Jan 2009 15:20:32 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901081520.n08FKWDG025879@svn.freebsd.org> From: Warner Losh Date: Thu, 8 Jan 2009 15:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186903 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 15:20:33 -0000 Author: imp Date: Thu Jan 8 15:20:32 2009 New Revision: 186903 URL: http://svn.freebsd.org/changeset/base/186903 Log: First cut at documenting hw.cam.cd.retry_count. Moved kern.cam.cd.%d.minimum_cmd_size to new SYSCTL VARIABLES section. Modified: head/share/man/man4/cd.4 Modified: head/share/man/man4/cd.4 ============================================================================== --- head/share/man/man4/cd.4 Thu Jan 8 13:32:08 2009 (r186902) +++ head/share/man/man4/cd.4 Thu Jan 8 15:20:32 2009 (r186903) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2003 +.Dd January 8, 2009 .Dt CD 4 .Os .Sh NAME @@ -370,43 +370,6 @@ Some work is planned to support some of the more common `broken' .Tn CD-ROM drives; however, this is not yet under way. -.Pp -The -.Nm -driver attempts to automatically determine whether the drive it is talking -to supports 6 byte or 10 byte MODE SENSE/MODE SELECT operations. -Many -.Tn SCSI -drives only support 6 byte commands, and -.Tn ATAPI -drives only support 10 byte commands. -The -.Nm -driver first attempts to determine whether the protocol in use typically -supports 6 byte commands by issuing a CAM Path Inquiry CCB. -It will then default to 6 byte or 10 byte commands as appropriate. -After that, the -.Nm -driver defaults to using 6 byte commands (assuming the protocol the drive -speaks claims to support 6 byte commands), until one fails with a -.Tn SCSI -ILLEGAL REQUEST error. -Then it tries the 10 byte version of the command to -see if that works instead. -Users can change the default via per-drive -sysctl variables and loader tunables. -The variable names are the same in -both instances: -.Pp -.Va kern.cam.cd.%d.minimum_cmd_size -.Pp -Where -.Dq %d -is the unit number of the drive in question. -Valid minimum command sizes -are 6 and 10. -Any value above 6 will be rounded to 10, and any value below -6 will be rounded to 6. .Sh CHANGER OPERATION This driver has built-in support for LUN-based CD changers. A LUN-based CD @@ -466,6 +429,63 @@ probe messages for the various LUNs of t while the boot process is going on. This is normal, and is caused by the changer scheduling code. +.Sh SYSCTL VARIABLES +The following variables are available as both +.Xr sysctl 8 +variables and +.Xr loader 8 +tunables: +.Bl -tag -width 12 +.It kern.cam.cd.retry_count +.Pp +This variable determines how many times the +.Nm +driver will retry a READ or WRITE command. +This does not affect the number of retries used during probe time or for +the +.Nm +driver dump routine. +This value currently defaults to 4. +.It kern.cam.cd.%d.minimum_cmd_size +.Pp +The +.Nm +driver attempts to automatically determine whether the drive it is talking +to supports 6 byte or 10 byte MODE SENSE/MODE SELECT operations. +Many +.Tn SCSI +drives only support 6 byte commands, and +.Tn ATAPI +drives only support 10 byte commands. +The +.Nm +driver first attempts to determine whether the protocol in use typically +supports 6 byte commands by issuing a CAM Path Inquiry CCB. +It will then default to 6 byte or 10 byte commands as appropriate. +After that, the +.Nm +driver defaults to using 6 byte commands (assuming the protocol the drive +speaks claims to support 6 byte commands), until one fails with a +.Tn SCSI +ILLEGAL REQUEST error. +Then it tries the 10 byte version of the command to +see if that works instead. +Users can change the default via per-drive +sysctl variables and loader tunables. +Where +.Dq %d +is the unit number of the drive in question. +Valid minimum command sizes +are 6 and 10. +Any value above 6 will be rounded to 10, and any value below +6 will be rounded to 6. +.It kern.cam.cd.changer.min_busy_seconds +.It kern.cam.cd.changer.max_busy_seconds +.Pp +Tune how long individual LUNs are 'locked' for I/O operations to +optimize changer operation. +See CHANGER OPERATION section for information on how to use these items. +.El .Sh FILES .Bl -tag -width /dev/cd[0-9][a-h] -compact .It Pa /dev/cd[0-9][a-h] From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 17:12:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BB01065883; Thu, 8 Jan 2009 17:12:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 10DD78FC30; Thu, 8 Jan 2009 17:12:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08HCmYd028063; Thu, 8 Jan 2009 17:12:48 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HClhX028057; Thu, 8 Jan 2009 17:12:47 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901081712.n08HClhX028057@svn.freebsd.org> From: Sam Leffler Date: Thu, 8 Jan 2009 17:12:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186904 - in head: sbin/ifconfig sys/conf sys/dev/ath sys/net80211 tools/tools/ath/athdebug tools/tools/ath/athstats usr.sbin/wlandebug X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:12:51 -0000 Author: sam Date: Thu Jan 8 17:12:47 2009 New Revision: 186904 URL: http://svn.freebsd.org/changeset/base/186904 Log: TDMA support for long distance point-to-point links using ath devices: o add net80211 support for a tdma vap that is built on top of the existing adhoc-demo support o add tdma scheduling of frame transmission to the ath driver; it's conceivable other devices might be capable of this too in which case they can make use of the 802.11 protocol additions etc. o add minor bits to user tools that need to know: ifconfig to setup and configure, new statistics in athstats, and new debug mask bits While the architecture can support >2 slots in a TDMA BSS the current design is intended (and tested) for only 2 slots. Sponsored by: Intel Added: head/sys/net80211/ieee80211_tdma.c (contents, props changed) head/sys/net80211/ieee80211_tdma.h (contents, props changed) Modified: head/sbin/ifconfig/ifconfig.8 head/sbin/ifconfig/ifieee80211.c head/sys/conf/files head/sys/conf/options head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athioctl.h head/sys/dev/ath/if_athvar.h head/sys/net80211/ieee80211.c head/sys/net80211/ieee80211.h head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_ddb.c head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_ioctl.c head/sys/net80211/ieee80211_ioctl.h head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h head/sys/net80211/ieee80211_scan.h head/sys/net80211/ieee80211_scan_sta.c head/sys/net80211/ieee80211_var.h head/tools/tools/ath/athdebug/athdebug.c head/tools/tools/ath/athstats/Makefile head/tools/tools/ath/athstats/athstats.c head/tools/tools/ath/athstats/main.c head/usr.sbin/wlandebug/wlandebug.c Modified: head/sbin/ifconfig/ifconfig.8 ============================================================================== --- head/sbin/ifconfig/ifconfig.8 Thu Jan 8 15:20:32 2009 (r186903) +++ head/sbin/ifconfig/ifconfig.8 Thu Jan 8 17:12:47 2009 (r186904) @@ -28,7 +28,7 @@ .\" From: @(#)ifconfig.8 8.3 (Berkeley) 1/5/94 .\" $FreeBSD$ .\" -.Dd October 19, 2008 +.Dd January 7, 2009 .Dt IFCONFIG 8 .Os .Sh NAME @@ -610,9 +610,15 @@ is one of (or .Cm hostap ), .Cm wds , +.Cm tdma , and .Cm monitor . The operating mode of a cloned interface cannot be changed. +The +.Cm tdma +mode is actually implemented as an +.Cm adhoc-demo +interface with special properties. .It Cm wlanbssid Ar bssid The 802.11 mac address to use for the bssid. This must be specified at create time for a legacy @@ -1530,6 +1536,60 @@ hexadecimal when preceded by .Ql 0x . Additionally, the SSID may be cleared by setting it to .Ql - . +.It Cm tdmaslot Ar slot +When operating with TDMA, use the specified +.Ar slot +configuration. +The +.Ar slot +is a number between 0 and the maximum number of slots in the BSS. +Note that a station configured as slot 0 is a master and +will broadcast beacon frames advertising the BSS; +stations configured to use other slots will always +scan to locate a master before they ever transmit. +By default +.Cm tdmaslot +is set to 1. +.It Cm tdmaslotcnt Ar cnt +When operating with TDMA, setup a BSS with +.Ar cnt +slots. +The slot count may be at most 8. +The current implementation is only tested with two stations +(i.e. point to point applications). +This setting is only meaningful when a station is configured as slot 0; +other stations adopt this setting from the BSS they join. +By default +.Cm tdmaslotcnt +is set to 2. +.It Cm tdmaslotlen Ar len +When operating with TDMA, setup a BSS such that each station has a slot +.Ar len +microseconds long. +The slot length must be at least 150 microseconds (1/8 TU) +and no more than 65 milliseconds. +Note that setting too small a slot length may result in poor channel +bandwidth utilization due to factors such as timer granularity and +guard time. +This setting is only meaningful when a station is configured as slot 0; +other stations adopt this setting from the BSS they join. +By default +.Cm tdmaslotlen +is set to 10 milliseconds. +.It Cm tdmabintval Ar intval +When operating with TDMA, setup a BSS such that beacons are transmitted every +.Ar intval +superframes to synchronize the TDMA slot timing. +A superframe is defined as the number of slots times the slot length; e.g. +a BSS with two slots of 10 milliseconds has a 20 millisecond superframe. +The beacon interval may not be zero. +A lower setting of +.Cm tdmabintval +causes the timers to be resynchronized more often; this can be help if +significant timer drift is observed. +By default +.Cm tdmabintval +is set to 5. .It Cm tsn When operating as an access point with WPA/802.11i allow legacy stations to associate using static key WEP and open authentication. Modified: head/sbin/ifconfig/ifieee80211.c ============================================================================== --- head/sbin/ifconfig/ifieee80211.c Thu Jan 8 15:20:32 2009 (r186903) +++ head/sbin/ifconfig/ifieee80211.c Thu Jan 8 17:12:47 2009 (r186904) @@ -1711,6 +1711,30 @@ set80211rifs(const char *val, int d, int set80211(s, IEEE80211_IOC_RIFS, d, 0, NULL); } +static +DECL_CMD_FUNC(set80211tdmaslot, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_SLOT, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211tdmaslotcnt, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_SLOTCNT, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211tdmaslotlen, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_SLOTLEN, atoi(val), 0, NULL); +} + +static +DECL_CMD_FUNC(set80211tdmabintval, val, d) +{ + set80211(s, IEEE80211_IOC_TDMA_BINTERVAL, atoi(val), 0, NULL); +} + static int regdomain_sort(const void *a, const void *b) { @@ -2558,6 +2582,22 @@ printwpsie(const char *tag, const u_int8 #undef N } +static void +printtdmaie(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen) +{ + printf("%s", tag); + if (verbose && ielen >= sizeof(struct ieee80211_tdma_param)) { + const struct ieee80211_tdma_param *tdma = + (const struct ieee80211_tdma_param *) ie; + + /* XXX tstamp */ + printf("", + tdma->tdma_version, tdma->tdma_slot, tdma->tdma_slotcnt, + LE_READ_2(&tdma->tdma_slotlen), tdma->tdma_bintval, + tdma->tdma_inuse[0]); + } +} + /* * Copy the ssid string contents into buf, truncating to fit. If the * ssid is entirely printable then just copy intact. Otherwise convert @@ -2681,6 +2721,12 @@ isatherosoui(const u_int8_t *frm) } static __inline int +istdmaoui(const uint8_t *frm) +{ + return frm[1] > 3 && LE_READ_4(frm+2) == ((TDMA_OUI_TYPE<<24)|TDMA_OUI); +} + +static __inline int iswpsoui(const uint8_t *frm) { return frm[1] > 3 && LE_READ_4(frm+2) == ((WPS_OUI_TYPE<<24)|WPA_OUI); @@ -2749,6 +2795,8 @@ printies(const u_int8_t *vp, int ielen, printathie(" ATH", vp, 2+vp[1], maxcols); else if (iswpsoui(vp)) printwpsie(" WPS", vp, 2+vp[1], maxcols); + else if (istdmaoui(vp)) + printtdmaie(" TDMA", vp, 2+vp[1], maxcols); else if (verbose) printie(" VEN", vp, 2+vp[1], maxcols); break; @@ -3192,7 +3240,7 @@ list_keys(int s) "\20\1STA\7FF\10TURBOP\11IBSS\12PMGT" \ "\13HOSTAP\14AHDEMO\15SWRETRY\16TXPMGT\17SHSLOT\20SHPREAMBLE" \ "\21MONITOR\22DFS\30WPA1\31WPA2\32BURST\33WME\34WDS\36BGSCAN" \ - "\37TXFRAG" + "\37TXFRAG\40TDMA" #define IEEE80211_CRYPTO_BITS \ "\20\1WEP\2TKIP\3AES\4AES_CCM\5TKIPMIC\6CKIP\12PMGT" @@ -4263,7 +4311,16 @@ end: } } - if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) { + if (opmode == IEEE80211_M_AHDEMO) { + if (get80211val(s, IEEE80211_IOC_TDMA_SLOT, &val) != -1) + LINE_CHECK("tdmaslot %u", val); + if (get80211val(s, IEEE80211_IOC_TDMA_SLOTCNT, &val) != -1) + LINE_CHECK("tdmaslotcnt %u", val); + if (get80211val(s, IEEE80211_IOC_TDMA_SLOTLEN, &val) != -1) + LINE_CHECK("tdmaslotlen %u", val); + if (get80211val(s, IEEE80211_IOC_TDMA_BINTERVAL, &val) != -1) + LINE_CHECK("tdmabintval %u", val); + } else if (get80211val(s, IEEE80211_IOC_BEACON_INTERVAL, &val) != -1) { /* XXX default define not visible */ if (val != 100 || verbose) LINE_CHECK("bintval %u", val); @@ -4486,7 +4543,10 @@ DECL_CMD_FUNC(set80211clone_wlanmode, ar params.icp_opmode = IEEE80211_M_WDS; else if (iseq(arg, "monitor")) params.icp_opmode = IEEE80211_M_MONITOR; - else + else if (iseq(arg, "tdma")) { + params.icp_opmode = IEEE80211_M_AHDEMO; + params.icp_flags |= IEEE80211_CLONE_TDMA; + } else errx(1, "Don't know to create %s for %s", arg, name); clone_setcallback(wlan_create); #undef iseq @@ -4662,6 +4722,11 @@ static struct cmd ieee80211_cmds[] = { /* XXX for testing */ DEF_CMD_ARG("chanswitch", set80211chanswitch), + DEF_CMD_ARG("tdmaslot", set80211tdmaslot), + DEF_CMD_ARG("tdmaslotcnt", set80211tdmaslotcnt), + DEF_CMD_ARG("tdmaslotlen", set80211tdmaslotlen), + DEF_CMD_ARG("tdmabintval", set80211tdmabintval), + /* vap cloning support */ DEF_CLONE_CMD_ARG("wlanaddr", set80211clone_wlanaddr), DEF_CLONE_CMD_ARG("wlanbssid", set80211clone_wlanbssid), Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 8 15:20:32 2009 (r186903) +++ head/sys/conf/files Thu Jan 8 17:12:47 2009 (r186904) @@ -2232,6 +2232,7 @@ net80211/ieee80211_rssadapt.c optional w net80211/ieee80211_scan.c optional wlan net80211/ieee80211_scan_sta.c optional wlan net80211/ieee80211_sta.c optional wlan +net80211/ieee80211_tdma.c optional wlan net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan_xauth netatalk/aarp.c optional netatalk Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Jan 8 15:20:32 2009 (r186903) +++ head/sys/conf/options Thu Jan 8 17:12:47 2009 (r186904) @@ -741,6 +741,7 @@ ATH_TXBUF opt_ath.h ATH_RXBUF opt_ath.h ATH_DIAGAPI opt_ath.h ATH_TX99_DIAG opt_ath.h +ATH_SUPPORT_TDMA opt_ath.h # options for the Atheros hal AH_SUPPORT_AR5416 opt_ah.h @@ -784,6 +785,15 @@ INTR_FILTER IEEE80211_DEBUG opt_wlan.h IEEE80211_DEBUG_REFCNT opt_wlan.h IEEE80211_AMPDU_AGE opt_wlan.h +IEEE80211_SUPPORT_TDMA opt_wlan.h + +# 802.11 TDMA support +TDMA_SLOTLEN_DEFAULT opt_tdma.h +TDMA_SLOTCNT_DEFAULT opt_tdma.h +TDMA_BINTVAL_DEFAULT opt_tdma.h +TDMA_TXRATE_11B_DEFAULT opt_tdma.h +TDMA_TXRATE_11G_DEFAULT opt_tdma.h +TDMA_TXRATE_11A_DEFAULT opt_tdma.h # Virtualize the network stack VIMAGE opt_global.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Jan 8 15:20:32 2009 (r186903) +++ head/sys/dev/ath/if_ath.c Thu Jan 8 17:12:47 2009 (r186904) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,6 +68,9 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef ATH_SUPPORT_TDMA +#include +#endif #include @@ -216,6 +219,50 @@ static int ath_raw_xmit(struct ieee80211 static void ath_bpfattach(struct ath_softc *); static void ath_announce(struct ath_softc *); +#ifdef ATH_SUPPORT_TDMA +static void ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, + u_int32_t bintval); +static void ath_tdma_bintvalsetup(struct ath_softc *sc, + const struct ieee80211_tdma_state *tdma); +static void ath_tdma_config(struct ath_softc *sc, struct ieee80211vap *vap); +static void ath_tdma_update(struct ieee80211_node *ni, + const struct ieee80211_tdma_param *tdma); +static void ath_tdma_beacon_send(struct ath_softc *sc, + struct ieee80211vap *vap); + +static __inline void +ath_hal_setcca(struct ath_hal *ah, int ena) +{ + /* + * NB: fill me in; this is not provided by default because disabling + * CCA in most locales violates regulatory. + */ +} + +static __inline int +ath_hal_getcca(struct ath_hal *ah) +{ + u_int32_t diag; + if (ath_hal_getcapability(ah, HAL_CAP_DIAG, 0, &diag) != HAL_OK) + return 1; + return ((diag & 0x500000) == 0); +} + +#define TDMA_EP_MULTIPLIER (1<<10) /* pow2 to optimize out * and / */ +#define TDMA_LPF_LEN 6 +#define TDMA_DUMMY_MARKER 0x127 +#define TDMA_EP_MUL(x, mul) ((x) * (mul)) +#define TDMA_IN(x) (TDMA_EP_MUL((x), TDMA_EP_MULTIPLIER)) +#define TDMA_LPF(x, y, len) \ + ((x != TDMA_DUMMY_MARKER) ? (((x) * ((len)-1) + (y)) / (len)) : (y)) +#define TDMA_SAMPLE(x, y) do { \ + x = TDMA_LPF((x), TDMA_IN(y), TDMA_LPF_LEN); \ +} while (0) +#define TDMA_EP_RND(x,mul) \ + ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) +#define TDMA_AVG(x) TDMA_EP_RND(x, TDMA_EP_MULTIPLIER) +#endif /* ATH_SUPPORT_TDMA */ + SYSCTL_DECL(_hw_ath); /* XXX validate sysctl values */ @@ -260,6 +307,8 @@ enum { ATH_DEBUG_LED = 0x00100000, /* led management */ ATH_DEBUG_FF = 0x00200000, /* fast frames */ ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ + ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */ + ATH_DEBUG_TDMA_TIMER = 0x01000000, /* TDMA timer processing */ ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ ATH_DEBUG_ANY = 0xffffffff @@ -615,7 +664,12 @@ ath_attach(u_int16_t devid, struct ath_s wmodes = ath_hal_getwirelessmodes(ah, ic->ic_regdomain.country); if (wmodes & (HAL_MODE_108G|HAL_MODE_TURBO)) ic->ic_caps |= IEEE80211_C_TURBOP; - +#ifdef ATH_SUPPORT_TDMA + if (ath_hal_macversion(ah) > 0x78) { + ic->ic_caps |= IEEE80211_C_TDMA; /* capable of TDMA */ + ic->ic_tdma_update = ath_tdma_update; + } +#endif /* * Indicate we need the 802.11 header padded to a * 32-bit boundary for 4-address and QoS frames. @@ -824,10 +878,9 @@ ath_vap_create(struct ieee80211com *ic, */ flags |= IEEE80211_CLONE_NOBEACONS; } - if (flags & IEEE80211_CLONE_NOBEACONS) { - sc->sc_swbmiss = 1; + if (flags & IEEE80211_CLONE_NOBEACONS) ic_opmode = IEEE80211_M_HOSTAP; - } else + else ic_opmode = opmode; break; case IEEE80211_M_IBSS: @@ -840,7 +893,13 @@ ath_vap_create(struct ieee80211com *ic, needbeacon = 1; break; case IEEE80211_M_AHDEMO: +#ifdef ATH_SUPPORT_TDMA + if (flags & IEEE80211_CLONE_TDMA) { + needbeacon = 1; + flags |= IEEE80211_CLONE_NOBEACONS; + } /* fall thru... */ +#endif case IEEE80211_M_MONITOR: if (sc->sc_nvaps != 0 && ic->ic_opmode != opmode) { /* XXX not right for monitor mode */ @@ -959,6 +1018,18 @@ ath_vap_create(struct ieee80211com *ic, sc->sc_opmode = HAL_M_STA; break; case IEEE80211_M_AHDEMO: +#ifdef ATH_SUPPORT_TDMA + if (vap->iv_caps & IEEE80211_C_TDMA) { + sc->sc_tdma = 1; + /* NB: disable tsf adjust */ + sc->sc_stagbeacons = 0; + } + /* + * NB: adhoc demo mode is a pseudo mode; to the hal it's + * just ap mode. + */ + /* fall thru... */ +#endif case IEEE80211_M_HOSTAP: sc->sc_opmode = HAL_M_HOSTAP; break; @@ -975,6 +1046,12 @@ ath_vap_create(struct ieee80211com *ic, */ ath_hal_settsfadjust(sc->sc_ah, sc->sc_stagbeacons); } + if (flags & IEEE80211_CLONE_NOBEACONS) { + /* + * Enable s/w beacon miss handling. + */ + sc->sc_swbmiss = 1; + } ATH_UNLOCK(sc); /* complete setup */ @@ -1047,6 +1124,13 @@ ath_vap_delete(struct ieee80211vap *vap) } if (vap->iv_opmode != IEEE80211_M_WDS) sc->sc_nvaps--; +#ifdef ATH_SUPPORT_TDMA + /* TDMA operation ceases when the last vap is destroyed */ + if (sc->sc_tdma && sc->sc_nvaps == 0) { + sc->sc_tdma = 0; + sc->sc_swbmiss = 0; + } +#endif ATH_UNLOCK(sc); free(avp, M_80211_VAP); @@ -1198,7 +1282,20 @@ ath_intr(void *arg) * this is too slow to meet timing constraints * under load. */ - ath_beacon_proc(sc, 0); +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma) { + if (sc->sc_tdmaswba == 0) { + struct ieee80211com *ic = ifp->if_l2com; + struct ieee80211vap *vap = + TAILQ_FIRST(&ic->ic_vaps); + ath_tdma_beacon_send(sc, vap); + sc->sc_tdmaswba = + vap->iv_tdma->tdma_bintval; + } else + sc->sc_tdmaswba--; + } else +#endif + ath_beacon_proc(sc, 0); } if (status & HAL_INT_RXEOL) { /* @@ -1581,8 +1678,14 @@ ath_reset(struct ifnet *ifp) * might change as a result. */ ath_chan_change(sc, ic->ic_curchan); - if (sc->sc_beacons) - ath_beacon_config(sc, NULL); /* restart beacons */ + if (sc->sc_beacons) { +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma) + ath_tdma_config(sc, NULL); + else +#endif + ath_beacon_config(sc, NULL); /* restart beacons */ + } ath_hal_intrset(ah, sc->sc_imask); ath_start(ifp); /* restart xmit */ @@ -1688,7 +1791,7 @@ ath_ff_stageq_flush(struct ath_softc *sc } ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); } } @@ -1829,7 +1932,7 @@ ath_ff_check(struct ath_softc *sc, struc * Return bfstaged to the free list. */ ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bfstaged, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bfstaged, bf_list); ATH_TXBUF_UNLOCK(sc); return m; /* ready to go */ @@ -1902,7 +2005,7 @@ ath_ff_check(struct ath_softc *sc, struc } ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bfstaged, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bfstaged, bf_list); ATH_TXBUF_UNLOCK(sc); } else { #if 0 @@ -1925,6 +2028,45 @@ ath_ff_check(struct ath_softc *sc, struc return m; } +static struct ath_buf * +_ath_getbuf_locked(struct ath_softc *sc) +{ + struct ath_buf *bf; + + ATH_TXBUF_LOCK_ASSERT(sc); + + bf = STAILQ_FIRST(&sc->sc_txbuf); + if (bf != NULL && (bf->bf_flags & ATH_BUF_BUSY) == 0) + STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); + else + bf = NULL; + if (bf == NULL) { + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: %s\n", __func__, + STAILQ_FIRST(&sc->sc_txbuf) == NULL ? + "out of xmit buffers" : "xmit buffer busy"); + sc->sc_stats.ast_tx_nobuf++; + } + return bf; +} + +static struct ath_buf * +ath_getbuf(struct ath_softc *sc) +{ + struct ath_buf *bf; + + ATH_TXBUF_LOCK(sc); + bf = _ath_getbuf_locked(sc); + if (bf == NULL) { + struct ifnet *ifp = sc->sc_ifp; + + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: stop queue\n", __func__); + sc->sc_stats.ast_tx_qstop++; + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + } + ATH_TXBUF_UNLOCK(sc); + return bf; +} + /* * Cleanup driver resources when we run out of buffers * while processing fragments; return the tx buffers @@ -1941,7 +2083,7 @@ ath_txfrag_cleanup(struct ath_softc *sc, STAILQ_FOREACH_SAFE(bf, frags, bf_list, next) { /* NB: bf assumed clean */ STAILQ_REMOVE_HEAD(frags, bf_list); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ieee80211_node_decref(ni); } } @@ -1960,12 +2102,11 @@ ath_txfrag_setup(struct ath_softc *sc, a ATH_TXBUF_LOCK(sc); for (m = m0->m_nextpkt; m != NULL; m = m->m_nextpkt) { - bf = STAILQ_FIRST(&sc->sc_txbuf); + bf = _ath_getbuf_locked(sc); if (bf == NULL) { /* out of buffers, cleanup */ ath_txfrag_cleanup(sc, frags, ni); break; } - STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); ieee80211_node_incref(ni); STAILQ_INSERT_TAIL(frags, bf, bf_list); } @@ -1992,23 +2133,14 @@ ath_start(struct ifnet *ifp) /* * Grab a TX buffer and associated resources. */ - ATH_TXBUF_LOCK(sc); - bf = STAILQ_FIRST(&sc->sc_txbuf); - if (bf != NULL) - STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); - ATH_TXBUF_UNLOCK(sc); - if (bf == NULL) { - DPRINTF(sc, ATH_DEBUG_XMIT, "%s: out of xmit buffers\n", - __func__); - sc->sc_stats.ast_tx_qstop++; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; + bf = ath_getbuf(sc); + if (bf == NULL) break; - } IFQ_DEQUEUE(&ifp->if_snd, m); if (m == NULL) { ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); break; } @@ -2082,7 +2214,7 @@ ath_start(struct ifnet *ifp) bf->bf_m = NULL; bf->bf_node = NULL; ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ath_txfrag_cleanup(sc, &frags, ni); ATH_TXBUF_UNLOCK(sc); if (ni != NULL) @@ -4215,6 +4347,9 @@ rx_accept: /* * Sending station is known, dispatch directly. */ +#ifdef ATH_SUPPORT_TDMA + sc->sc_tdmars = rs; +#endif type = ieee80211_input(ni, m, rs->rs_rssi, nf, rs->rs_tstamp); ieee80211_free_node(ni); @@ -4387,10 +4522,48 @@ ath_txq_update(struct ath_softc *sc, int HAL_TXQ_INFO qi; ath_hal_gettxqueueprops(ah, txq->axq_qnum, &qi); - qi.tqi_aifs = wmep->wmep_aifsn; - qi.tqi_cwmin = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); - qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); - qi.tqi_burstTime = ATH_TXOP_TO_US(wmep->wmep_txopLimit); +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma) { + /* + * AIFS is zero so there's no pre-transmit wait. The + * burst time defines the slot duration and is configured + * via sysctl. The QCU is setup to not do post-xmit + * back off, lockout all lower-priority QCU's, and fire + * off the DMA beacon alert timer which is setup based + * on the slot configuration. + */ + qi.tqi_qflags = HAL_TXQ_TXOKINT_ENABLE + | HAL_TXQ_TXERRINT_ENABLE + | HAL_TXQ_TXURNINT_ENABLE + | HAL_TXQ_TXEOLINT_ENABLE + | HAL_TXQ_DBA_GATED + | HAL_TXQ_BACKOFF_DISABLE + | HAL_TXQ_ARB_LOCKOUT_GLOBAL + ; + qi.tqi_aifs = 0; + /* XXX +dbaprep? */ + qi.tqi_readyTime = sc->sc_tdmaslotlen; + qi.tqi_burstTime = qi.tqi_readyTime; + } else { +#endif + qi.tqi_qflags = HAL_TXQ_TXOKINT_ENABLE + | HAL_TXQ_TXERRINT_ENABLE + | HAL_TXQ_TXDESCINT_ENABLE + | HAL_TXQ_TXURNINT_ENABLE + ; + qi.tqi_aifs = wmep->wmep_aifsn; + qi.tqi_cwmin = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmin); + qi.tqi_cwmax = ATH_EXPONENT_TO_VALUE(wmep->wmep_logcwmax); + qi.tqi_readyTime = 0; + qi.tqi_burstTime = ATH_TXOP_TO_US(wmep->wmep_txopLimit); +#ifdef ATH_SUPPORT_TDMA + } +#endif + + DPRINTF(sc, ATH_DEBUG_RESET, + "%s: Q%u qflags 0x%x aifs %u cwmin %u cwmax %u burstTime %u\n", + __func__, txq->axq_qnum, qi.tqi_qflags, + qi.tqi_aifs, qi.tqi_cwmin, qi.tqi_cwmax, qi.tqi_burstTime); if (!ath_hal_settxqueueprops(ah, txq->axq_qnum, &qi)) { if_printf(ifp, "unable to update hardware queue " @@ -4570,13 +4743,71 @@ ath_tx_handoff(struct ath_softc *sc, str * to avoid possible races. */ ATH_TXQ_LOCK(txq); + KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0, + ("busy status 0x%x", bf->bf_flags)); if (txq->axq_qnum != ATH_TXQ_SWQ) { +#ifdef ATH_SUPPORT_TDMA + int qbusy; + + ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); + qbusy = ath_hal_txqenabled(ah, txq->axq_qnum); + if (txq->axq_link == NULL) { + /* + * Be careful writing the address to TXDP. If + * the tx q is enabled then this write will be + * ignored. Normally this is not an issue but + * when tdma is in use and the q is beacon gated + * this race can occur. If the q is busy then + * defer the work to later--either when another + * packet comes along or when we prepare a beacon + * frame at SWBA. + */ + if (!qbusy) { + ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); + txq->axq_flags &= ~ATH_TXQ_PUTPENDING; + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: TXDP[%u] = %p (%p) depth %d\n", + __func__, txq->axq_qnum, + (caddr_t)bf->bf_daddr, bf->bf_desc, + txq->axq_depth); + } else { + txq->axq_flags |= ATH_TXQ_PUTPENDING; + DPRINTF(sc, ATH_DEBUG_TDMA | ATH_DEBUG_XMIT, + "%s: Q%u busy, defer enable\n", __func__, + txq->axq_qnum); + } + } else { + *txq->axq_link = bf->bf_daddr; + DPRINTF(sc, ATH_DEBUG_XMIT, + "%s: link[%u](%p)=%p (%p) depth %d\n", __func__, + txq->axq_qnum, txq->axq_link, + (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); + if ((txq->axq_flags & ATH_TXQ_PUTPENDING) && !qbusy) { + /* + * The q was busy when we previously tried + * to write the address of the first buffer + * in the chain. Since it's not busy now + * handle this chore. We are certain the + * buffer at the front is the right one since + * axq_link is NULL only when the buffer list + * is/was empty. + */ + ath_hal_puttxbuf(ah, txq->axq_qnum, + STAILQ_FIRST(&txq->axq_q)->bf_daddr); + txq->axq_flags &= ~ATH_TXQ_PUTPENDING; + DPRINTF(sc, ATH_DEBUG_TDMA | ATH_DEBUG_XMIT, + "%s: Q%u restarted\n", __func__, + txq->axq_qnum); + } + } +#else ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); if (txq->axq_link == NULL) { ath_hal_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); DPRINTF(sc, ATH_DEBUG_XMIT, - "%s: TXDP[%u] = %p (%p) depth %d\n", __func__, - txq->axq_qnum, (caddr_t)bf->bf_daddr, bf->bf_desc, + "%s: TXDP[%u] = %p (%p) depth %d\n", + __func__, txq->axq_qnum, + (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); } else { *txq->axq_link = bf->bf_daddr; @@ -4585,6 +4816,7 @@ ath_tx_handoff(struct ath_softc *sc, str txq->axq_qnum, txq->axq_link, (caddr_t)bf->bf_daddr, bf->bf_desc, txq->axq_depth); } +#endif /* ATH_SUPPORT_TDMA */ txq->axq_link = &bf->bf_desc[bf->bf_nseg - 1].ds_link; ath_hal_txstart(ah, txq->axq_qnum); } else { @@ -4819,6 +5051,15 @@ ath_tx_start(struct ath_softc *sc, struc } if (flags & HAL_TXDESC_NOACK) /* NB: avoid double counting */ sc->sc_stats.ast_tx_noack++; +#ifdef ATH_SUPPORT_TDMA + if (sc->sc_tdma && (flags & HAL_TXDESC_NOACK) == 0) { + DPRINTF(sc, ATH_DEBUG_XMIT, "%s: ACK required w/ TDMA\n", + __func__); + /* XXX statistic */ + ath_freetx(m0); + return EIO; + } +#endif /* * If 802.11g protection is enabled, determine whether @@ -5017,7 +5258,7 @@ ath_tx_processq(struct ath_softc *sc, st struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; struct ieee80211com *ic = ifp->if_l2com; - struct ath_buf *bf; + struct ath_buf *bf, *last; struct ath_desc *ds, *ds0; struct ath_tx_status *ts; struct ieee80211_node *ni; @@ -5052,7 +5293,18 @@ ath_tx_processq(struct ath_softc *sc, st break; } ATH_TXQ_REMOVE_HEAD(txq, bf_list); +#ifdef ATH_SUPPORT_TDMA + if (txq->axq_depth > 0) { + /* + * More frames follow. Mark the buffer busy + * so it's not re-used while the hardware may + * still re-read the link field in the descriptor. + */ + bf->bf_flags |= ATH_BUF_BUSY; + } else +#else if (txq->axq_depth == 0) +#endif txq->axq_link = NULL; ATH_TXQ_UNLOCK(txq); @@ -5128,6 +5380,9 @@ ath_tx_processq(struct ath_softc *sc, st bf->bf_node = NULL; ATH_TXBUF_LOCK(sc); + last = STAILQ_LAST(&sc->sc_txbuf, ath_buf, bf_list); + if (last != NULL) + last->bf_flags &= ~ATH_BUF_BUSY; STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); } @@ -5250,6 +5505,11 @@ ath_tx_draintxq(struct ath_softc *sc, st * NB: this assumes output has been stopped and * we do not need to block ath_tx_proc */ + ATH_TXBUF_LOCK(sc); + bf = STAILQ_LAST(&sc->sc_txbuf, ath_buf, bf_list); + if (bf != NULL) + bf->bf_flags &= ~ATH_BUF_BUSY; + ATH_TXBUF_UNLOCK(sc); for (ix = 0;; ix++) { ATH_TXQ_LOCK(txq); bf = STAILQ_FIRST(&txq->axq_q); @@ -5284,6 +5544,7 @@ ath_tx_draintxq(struct ath_softc *sc, st } m_freem(bf->bf_m); bf->bf_m = NULL; + bf->bf_flags &= ~ATH_BUF_BUSY; ATH_TXBUF_LOCK(sc); STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); @@ -5760,6 +6021,12 @@ ath_newstate(struct ieee80211vap *vap, e ni->ni_capinfo, ieee80211_chan2ieee(ic, ic->ic_curchan)); switch (vap->iv_opmode) { +#ifdef ATH_SUPPORT_TDMA + case IEEE80211_M_AHDEMO: + if ((vap->iv_caps & IEEE80211_C_TDMA) == 0) + break; + /* fall thru... */ +#endif case IEEE80211_M_HOSTAP: case IEEE80211_M_IBSS: /* @@ -5788,7 +6055,12 @@ ath_newstate(struct ieee80211vap *vap, e ni->ni_tstamp.tsf != 0) { sc->sc_syncbeacon = 1; } else if (!sc->sc_beacons) { - ath_beacon_config(sc, vap); +#ifdef ATH_SUPPORT_TDMA + if (vap->iv_caps & IEEE80211_C_TDMA) + ath_tdma_config(sc, vap); + else +#endif + ath_beacon_config(sc, vap); sc->sc_beacons = 1; } break; @@ -5851,6 +6123,9 @@ ath_newstate(struct ieee80211vap *vap, e taskqueue_block(sc->sc_tq); sc->sc_beacons = 0; } +#ifdef ATH_SUPPORT_TDMA + ath_hal_setcca(ah, AH_TRUE); +#endif } bad: return error; @@ -6500,6 +6775,10 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, sc->sc_stats.ast_rx_packets = ifp->if_ipackets; sc->sc_stats.ast_tx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgtxrssi); sc->sc_stats.ast_rx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgrssi); +#ifdef ATH_SUPPORT_TDMA + sc->sc_stats.ast_tdma_tsfadjp = TDMA_AVG(sc->sc_avgtsfdeltap); + sc->sc_stats.ast_tdma_tsfadjm = TDMA_AVG(sc->sc_avgtsfdeltam); +#endif rt = sc->sc_currates; /* XXX HT rates */ sc->sc_stats.ast_tx_rate = @@ -6876,6 +7155,24 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "monpass", CTLFLAG_RW, &sc->sc_monpass, 0, "mask of error frames to pass when monitoring"); +#ifdef ATH_SUPPORT_TDMA + if (ath_hal_macversion(ah) > 0x78) { + sc->sc_tdmadbaprep = 2; + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "dbaprep", CTLFLAG_RW, &sc->sc_tdmadbaprep, 0, + "TDMA DBA preparation time"); + sc->sc_tdmaswbaprep = 10; + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "swbaprep", CTLFLAG_RW, &sc->sc_tdmaswbaprep, 0, + "TDMA SWBA preparation time"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "guardtime", CTLFLAG_RW, &sc->sc_tdmaguard, 0, + "TDMA slot guard time"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "superframe", CTLFLAG_RD, &sc->sc_tdmabintval, 0, + "TDMA calculated super frame"); + } +#endif } static void @@ -7123,16 +7420,8 @@ ath_raw_xmit(struct ieee80211_node *ni, /* * Grab a TX buffer and associated resources. */ - ATH_TXBUF_LOCK(sc); - bf = STAILQ_FIRST(&sc->sc_txbuf); - if (bf != NULL) - STAILQ_REMOVE_HEAD(&sc->sc_txbuf, bf_list); - ATH_TXBUF_UNLOCK(sc); + bf = ath_getbuf(sc); if (bf == NULL) { - DPRINTF(sc, ATH_DEBUG_XMIT, "%s: out of xmit buffers\n", - __func__); - sc->sc_stats.ast_tx_qstop++; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; ieee80211_free_node(ni); m_freem(m); return ENOBUFS; @@ -7162,7 +7451,7 @@ ath_raw_xmit(struct ieee80211_node *ni, bad: ifp->if_oerrors++; ATH_TXBUF_LOCK(sc); - STAILQ_INSERT_TAIL(&sc->sc_txbuf, bf, bf_list); + STAILQ_INSERT_HEAD(&sc->sc_txbuf, bf, bf_list); ATH_TXBUF_UNLOCK(sc); ieee80211_free_node(ni); return EIO; /* XXX */ @@ -7220,3 +7509,364 @@ ath_announce(struct ath_softc *sc) if_printf(ifp, "using %u tx buffers\n", ath_txbuf); #undef HAL_MODE_DUALBAND } + +#ifdef ATH_SUPPORT_TDMA +static __inline uint32_t +ath_hal_getnexttbtt(struct ath_hal *ah) +{ +#define AR_TIMER0 0x8028 + return OS_REG_READ(ah, AR_TIMER0); +} + +static __inline void +ath_hal_adjusttsf(struct ath_hal *ah, int32_t tsfdelta) +{ + /* XXX handle wrap/overflow */ + OS_REG_WRITE(ah, AR_TSF_L32, OS_REG_READ(ah, AR_TSF_L32) + tsfdelta); +} + +static void +ath_tdma_settimers(struct ath_softc *sc, u_int32_t nexttbtt, u_int32_t bintval) +{ + struct ath_hal *ah = sc->sc_ah; + HAL_BEACON_TIMERS bt; + + bt.bt_intval = bintval | HAL_BEACON_ENA; + bt.bt_nexttbtt = nexttbtt; + bt.bt_nextdba = (nexttbtt<<3) - sc->sc_tdmadbaprep; + bt.bt_nextswba = (nexttbtt<<3) - sc->sc_tdmaswbaprep; + bt.bt_nextatim = nexttbtt+1; + ath_hal_beaconsettimers(ah, &bt); +} + +/* + * Calculate the beacon interval. This is periodic in the + * superframe for the bss. We assume each station is configured + * identically wrt transmit rate so the guard time we calculate + * above will be the same on all stations. Note we need to + * factor in the xmit time because the hardware will schedule + * a frame for transmit if the start of the frame is within + * the burst time. When we get hardware that properly kills + * frames in the PCU we can reduce/eliminate the guard time. + * + * Roundup to 1024 is so we have 1 TU buffer in the guard time + * to deal with the granularity of the nexttbtt timer. 11n MAC's + * with 1us timer granularity should allow us to reduce/eliminate + * this. + */ +static void +ath_tdma_bintvalsetup(struct ath_softc *sc, + const struct ieee80211_tdma_state *tdma) +{ + /* copy from vap state (XXX check all vaps have same value?) */ + sc->sc_tdmaslotlen = tdma->tdma_slotlen; + sc->sc_tdmabintcnt = tdma->tdma_bintval; + + sc->sc_tdmabintval = roundup((sc->sc_tdmaslotlen+sc->sc_tdmaguard) * + tdma->tdma_slotcnt, 1024); + sc->sc_tdmabintval >>= 10; /* TSF -> TU */ + if (sc->sc_tdmabintval & 1) + sc->sc_tdmabintval++; + + if (tdma->tdma_slot == 0) { + /* + * Only slot 0 beacons; other slots respond. + */ + sc->sc_imask |= HAL_INT_SWBA; + sc->sc_tdmaswba = 0; /* beacon immediately */ + } else { + /* XXX all vaps must be slot 0 or slot !0 */ + sc->sc_imask &= ~HAL_INT_SWBA; + } +} + +/* + * Max 802.11 overhead. This assumes no 4-address frames and + * the encapsulation done by ieee80211_encap (llc). We also + * include potential crypto overhead. + */ +#define IEEE80211_MAXOVERHEAD \ + (sizeof(struct ieee80211_qosframe) \ + + sizeof(struct llc) \ + + IEEE80211_ADDR_LEN \ + + IEEE80211_WEP_IVLEN \ + + IEEE80211_WEP_KIDLEN \ + + IEEE80211_WEP_CRCLEN \ + + IEEE80211_WEP_MICLEN \ + + IEEE80211_CRC_LEN) + +/* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 17:26:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC31510657CA; Thu, 8 Jan 2009 17:26:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 976518FC18; Thu, 8 Jan 2009 17:26:51 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08HQpN5028359; Thu, 8 Jan 2009 17:26:51 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HQpub028356; Thu, 8 Jan 2009 17:26:51 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901081726.n08HQpub028356@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 8 Jan 2009 17:26:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186905 - in head/sys: cam dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:26:54 -0000 Author: trasz Date: Thu Jan 8 17:26:51 2009 New Revision: 186905 URL: http://svn.freebsd.org/changeset/base/186905 Log: Make "kldunload atapicam" return EBUSY instead of deadlocking when a device created by atapicam is being kept opened or mounted. This is probably just a temporary solution until we invent something better. Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Reported by: Jaakko Heinonen Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_sim.h head/sys/dev/ata/atapi-cam.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Jan 8 17:12:47 2009 (r186904) +++ head/sys/cam/cam_xpt.c Thu Jan 8 17:26:51 2009 (r186905) @@ -2642,6 +2642,39 @@ xptbustraverse(struct cam_eb *start_bus, return(retval); } +int +xpt_sim_opened(struct cam_sim *sim) +{ + struct cam_eb *bus; + struct cam_et *target; + struct cam_ed *device; + struct cam_periph *periph; + + KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); + mtx_assert(sim->mtx, MA_OWNED); + + mtx_lock(&xsoftc.xpt_topo_lock); + TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { + if (bus->sim != sim) + continue; + + TAILQ_FOREACH(target, &bus->et_entries, links) { + TAILQ_FOREACH(device, &target->ed_entries, links) { + SLIST_FOREACH(periph, &device->periphs, + periph_links) { + if (periph->refcount > 0) { + mtx_unlock(&xsoftc.xpt_topo_lock); + return (1); + } + } + } + } + } + + mtx_unlock(&xsoftc.xpt_topo_lock); + return (0); +} + static int xpttargettraverse(struct cam_eb *bus, struct cam_et *start_target, xpt_targetfunc_t *tr_func, void *arg) @@ -4277,7 +4310,7 @@ xpt_release_ccb(union ccb *free_ccb) * for this new bus and places it in the array of busses and assigns * it a path_id. The path_id may be influenced by "hard wiring" * information specified by the user. Once interrupt services are - * availible, the bus will be probed. + * available, the bus will be probed. */ int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) Modified: head/sys/cam/cam_xpt_sim.h ============================================================================== --- head/sys/cam/cam_xpt_sim.h Thu Jan 8 17:12:47 2009 (r186904) +++ head/sys/cam/cam_xpt_sim.h Thu Jan 8 17:26:51 2009 (r186905) @@ -45,6 +45,7 @@ void xpt_release_simq(struct cam_sim *s u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); void xpt_release_devq(struct cam_path *path, u_int count, int run_queue); +int xpt_sim_opened(struct cam_sim *sim); void xpt_done(union ccb *done_ccb); #endif Modified: head/sys/dev/ata/atapi-cam.c ============================================================================== --- head/sys/dev/ata/atapi-cam.c Thu Jan 8 17:12:47 2009 (r186904) +++ head/sys/dev/ata/atapi-cam.c Thu Jan 8 17:26:51 2009 (r186905) @@ -254,6 +254,10 @@ atapi_cam_detach(device_t dev) struct atapi_xpt_softc *scp = device_get_softc(dev); mtx_lock(&scp->state_lock); + if (xpt_sim_opened(scp->sim)) { + mtx_unlock(&scp->state_lock); + return (EBUSY); + } xpt_freeze_simq(scp->sim, 1 /*count*/); scp->flags |= DETACHING; mtx_unlock(&scp->state_lock); From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 17:47:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 652C81065670; Thu, 8 Jan 2009 17:47:45 +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 535FC8FC1C; Thu, 8 Jan 2009 17:47:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08Hljqs028759; Thu, 8 Jan 2009 17:47:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HljBb028758; Thu, 8 Jan 2009 17:47:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901081747.n08HljBb028758@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 8 Jan 2009 17:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186906 - head/sys/dev/adb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:47:45 -0000 Author: nwhitehorn Date: Thu Jan 8 17:47:45 2009 New Revision: 186906 URL: http://svn.freebsd.org/changeset/base/186906 Log: Improve the AT keyboard emulation of the ADB keyboard driver, by supporting an AT-like K_RAW mode instead of just K_CODE. This has the effect of making the arrow keys on ADB keyboards work in X11. Copied from: sunkbd(4) Modified: head/sys/dev/adb/adb_kbd.c Modified: head/sys/dev/adb/adb_kbd.c ============================================================================== --- head/sys/dev/adb/adb_kbd.c Thu Jan 8 17:26:51 2009 (r186905) +++ head/sys/dev/adb/adb_kbd.c Thu Jan 8 17:47:45 2009 (r186906) @@ -72,6 +72,9 @@ struct adb_kbd_softc { int have_led_control; uint8_t buffer[8]; +#ifdef AKBD_EMULATE_ATKBD + uint8_t at_buffered_char[2]; +#endif volatile int buffers; struct callout sc_repeater; @@ -105,6 +108,17 @@ static devclass_t adb_kbd_devclass; DRIVER_MODULE(akbd, adb, adb_kbd_driver, adb_kbd_devclass, 0, 0); +#ifdef AKBD_EMULATE_ATKBD + +#define SCAN_PRESS 0x000 +#define SCAN_RELEASE 0x080 +#define SCAN_PREFIX_E0 0x100 +#define SCAN_PREFIX_E1 0x200 +#define SCAN_PREFIX_CTL 0x400 +#define SCAN_PREFIX_SHIFT 0x800 +#define SCAN_PREFIX (SCAN_PREFIX_E0 | SCAN_PREFIX_E1 | \ + SCAN_PREFIX_CTL | SCAN_PREFIX_SHIFT) + static const uint8_t adb_to_at_scancode_map[128] = { 30, 31, 32, 33, 35, 34, 44, 45, 46, 47, 0, 48, 16, 17, 18, 19, 21, 20, 2, 3, 4, 5, 7, 6, 13, 10, 8, 12, 9, 11, 27, 24, 22, 26, 23, 25, 28, 38, 36, 40, 37, 39, 43, @@ -114,6 +128,47 @@ static const uint8_t adb_to_at_scancode_ 66, 67, 0, 87, 0, 105, 0, 70, 0, 68, 0, 88, 0, 107, 102, 94, 96, 103, 62, 99, 60, 101, 59, 54, 93, 90, 0, 0 }; +static int +keycode2scancode(int keycode, int shift, int up) +{ + static const int scan[] = { + /* KP enter, right ctrl, KP divide */ + 0x1c , 0x1d , 0x35 , + /* print screen */ + 0x37 | SCAN_PREFIX_SHIFT, + /* right alt, home, up, page up, left, right, end */ + 0x38, 0x47, 0x48, 0x49, 0x4b, 0x4d, 0x4f, + /* down, page down, insert, delete */ + 0x50, 0x51, 0x52, 0x53, + /* pause/break (see also below) */ + 0x46, + /* + * MS: left window, right window, menu + * also Sun: left meta, right meta, compose + */ + 0x5b, 0x5c, 0x5d, + /* Sun type 6 USB */ + /* help, stop, again, props, undo, front, copy */ + 0x68, 0x5e, 0x5f, 0x60, 0x61, 0x62, 0x63, + /* open, paste, find, cut, audiomute, audiolower, audioraise */ + 0x64, 0x65, 0x66, 0x67, 0x25, 0x1f, 0x1e, + /* power */ + 0x20 + }; + int scancode; + + scancode = keycode; + if ((keycode >= 89) && (keycode < 89 + sizeof(scan) / sizeof(scan[0]))) + scancode = scan[keycode - 89] | SCAN_PREFIX_E0; + /* pause/break */ + if ((keycode == 104) && !(shift & CTLS)) + scancode = 0x45 | SCAN_PREFIX_E1 | SCAN_PREFIX_CTL; + if (shift & SHIFTS) + scancode &= ~SCAN_PREFIX_SHIFT; + return (scancode | (up ? SCAN_RELEASE : SCAN_PRESS)); +} +#endif + /* keyboard driver declaration */ static int akbd_configure(int flags); static kbd_probe_t akbd_probe; @@ -468,6 +523,13 @@ akbd_check(keyboard_t *kbd) sc = (struct adb_kbd_softc *)(kbd); mtx_lock(&sc->sc_mutex); +#ifdef AKBD_EMULATE_ATKBD + if (sc->at_buffered_char[0]) { + mtx_unlock(&sc->sc_mutex); + return (TRUE); + } +#endif + if (sc->buffers > 0) { mtx_unlock(&sc->sc_mutex); return (TRUE); @@ -481,36 +543,89 @@ static u_int akbd_read_char(keyboard_t *kbd, int wait) { struct adb_kbd_softc *sc; - uint8_t adb_code, final_scancode; + uint16_t key; + uint8_t adb_code; int i; sc = (struct adb_kbd_softc *)(kbd); mtx_lock(&sc->sc_mutex); - if (!sc->buffers && wait) - cv_wait(&sc->sc_cv,&sc->sc_mutex); - if (!sc->buffers) { - mtx_unlock(&sc->sc_mutex); - return (0); +#if defined(AKBD_EMULATE_ATKBD) + if (sc->sc_mode == K_RAW && sc->at_buffered_char[0]) { + key = sc->at_buffered_char[0]; + if (key & SCAN_PREFIX) { + sc->at_buffered_char[0] = key & ~SCAN_PREFIX; + key = (key & SCAN_PREFIX_E0) ? 0xe0 : 0xe1; + } else { + sc->at_buffered_char[0] = sc->at_buffered_char[1]; + sc->at_buffered_char[1] = 0; } - adb_code = sc->buffer[0]; + mtx_unlock(&sc->sc_mutex); - for (i = 1; i < sc->buffers; i++) - sc->buffer[i-1] = sc->buffer[i]; + return (key); + } +#endif - sc->buffers--; - mtx_unlock(&sc->sc_mutex); + if (!sc->buffers && wait) + cv_wait(&sc->sc_cv,&sc->sc_mutex); + + if (!sc->buffers) { + mtx_unlock(&sc->sc_mutex); + return (0); + } + + adb_code = sc->buffer[0]; + + for (i = 1; i < sc->buffers; i++) + sc->buffer[i-1] = sc->buffer[i]; + + sc->buffers--; #ifdef AKBD_EMULATE_ATKBD - final_scancode = adb_to_at_scancode_map[adb_code & 0x7f]; - final_scancode |= adb_code & 0x80; + key = adb_to_at_scancode_map[adb_code & 0x7f]; + if (sc->sc_mode == K_CODE) { + /* Add the key-release bit */ + key |= adb_code & 0x80; + } else if (sc->sc_mode == K_RAW) { + /* + * In the raw case, we have to emulate the gross + * variable-length AT keyboard thing. Since this code + * is copied from sunkbd, which is the same code + * as ukbd, it might be nice to have this centralized. + */ + + key = keycode2scancode(key, + 0, adb_code & 0x80); + + if (key & SCAN_PREFIX) { + if (key & SCAN_PREFIX_CTL) { + sc->at_buffered_char[0] = + 0x1d | (key & SCAN_RELEASE); + sc->at_buffered_char[1] = + key & ~SCAN_PREFIX; + } else if (key & SCAN_PREFIX_SHIFT) { + sc->at_buffered_char[0] = + 0x2a | (key & SCAN_RELEASE); + sc->at_buffered_char[1] = + key & ~SCAN_PREFIX_SHIFT; + } else { + sc->at_buffered_char[0] = + key & ~SCAN_PREFIX; + sc->at_buffered_char[1] = 0; + } + + key = (key & SCAN_PREFIX_E0) ? 0xe0 : 0xe1; + } + } #else - final_scancode = adb_code; + key = adb_code; #endif - return (final_scancode); + mtx_unlock(&sc->sc_mutex); + + return (key); } static int @@ -648,6 +763,20 @@ static int akbd_lock(keyboard_t *kbd, in static void akbd_clear_state(keyboard_t *kbd) { + struct adb_kbd_softc *sc; + + sc = (struct adb_kbd_softc *)(kbd); + + mtx_lock(&sc->sc_mutex); + + sc->buffers = 0; + callout_stop(&sc->sc_repeater); + +#if defined(AKBD_EMULATE_ATKBD) + sc->at_buffered_char[0] = 0; + sc->at_buffered_char[1] = 0; +#endif + mtx_unlock(&sc->sc_mutex); } static int akbd_get_state(keyboard_t *kbd, void *buf, size_t len) From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 17:51:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24F331065688; Thu, 8 Jan 2009 17:51:16 +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 13CAE8FC18; Thu, 8 Jan 2009 17:51:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08HpFLb028867; Thu, 8 Jan 2009 17:51:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08HpFV3028866; Thu, 8 Jan 2009 17:51:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901081751.n08HpFV3028866@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 Jan 2009 17:51:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186907 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:51:17 -0000 Author: mav Date: Thu Jan 8 17:51:15 2009 New Revision: 186907 URL: http://svn.freebsd.org/changeset/base/186907 Log: Mark ng_vjc node as FORCE_WRITER to protect slcompress state. I think it can be the reason of livelock in netgraph reported by some mpd users. MFC after: 3 days Modified: head/sys/netgraph/ng_vjc.c Modified: head/sys/netgraph/ng_vjc.c ============================================================================== --- head/sys/netgraph/ng_vjc.c Thu Jan 8 17:47:45 2009 (r186906) +++ head/sys/netgraph/ng_vjc.c Thu Jan 8 17:51:15 2009 (r186907) @@ -249,6 +249,9 @@ ng_vjc_constructor(node_p node) NG_NODE_SET_PRIVATE(node, priv); + /* slcompress is not thread-safe. Protect it's state here. */ + NG_NODE_FORCE_WRITER(node); + /* Done */ return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 17:51:45 2009 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF17610656EF; Thu, 8 Jan 2009 17:51:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (77-93-215-190.static.masterinter.net [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id A172D8FC18; Thu, 8 Jan 2009 17:51:44 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9446A9CB1B7; Thu, 8 Jan 2009 18:32:00 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MXxeRE04APgT; Thu, 8 Jan 2009 18:31:49 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 055009CB22D; Thu, 8 Jan 2009 18:31:49 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.2/8.14.2/Submit) id n08HVm0M049751; Thu, 8 Jan 2009 18:31:48 +0100 (CET) (envelope-from rdivacky) Date: Thu, 8 Jan 2009 18:31:48 +0100 From: Roman Divacky To: Edward Tomasz Napierala Message-ID: <20090108173148.GA49697@freebsd.org> References: <200901081726.n08HQpub028356@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901081726.n08HQpub028356@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186905 - in head/sys: cam dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 17:51:47 -0000 On Thu, Jan 08, 2009 at 05:26:51PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Jan 8 17:26:51 2009 > New Revision: 186905 > URL: http://svn.freebsd.org/changeset/base/186905 > > Log: > Make "kldunload atapicam" return EBUSY instead of deadlocking when a device > created by atapicam is being kept opened or mounted. This is probably just > a temporary solution until we invent something better. I'd put the comment about this being temporary into the code itself... From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 18:31:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA0D21065674; Thu, 8 Jan 2009 18:31:43 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B67648FC13; Thu, 8 Jan 2009 18:31:43 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08IVhmr030436; Thu, 8 Jan 2009 18:31:43 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08IVhP7030429; Thu, 8 Jan 2009 18:31:43 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901081831.n08IVhP7030429@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 8 Jan 2009 18:31:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186909 - in head/sys/arm/mv: . discovery kirkwood orion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 18:31:44 -0000 Author: raj Date: Thu Jan 8 18:31:43 2009 New Revision: 186909 URL: http://svn.freebsd.org/changeset/base/186909 Log: Improve and extend Marvell SOCs platform code. - Allow for setting per platform MPP/GPIO configuration in the kernel, so that we can override all settings firmware might set. - Set decode windows for the remaining on-chip peripherals: CESA, SATA and XOR. - Improve handling of USB controllers so that all port are available on the given SOC/platform (e.g. up to three on DB-78xxx), this includes rework of USB decode windows set-up. - Other minor fixes and cosmetics. Obtained from: Semihalf Modified: head/sys/arm/mv/common.c head/sys/arm/mv/discovery/db78xxx.c head/sys/arm/mv/discovery/discovery.c head/sys/arm/mv/gpio.c head/sys/arm/mv/kirkwood/db88f6xxx.c head/sys/arm/mv/kirkwood/kirkwood.c head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/mvreg.h head/sys/arm/mv/mvvar.h head/sys/arm/mv/obio.c head/sys/arm/mv/orion/db88f5xxx.c head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/common.c Thu Jan 8 18:31:43 2009 (r186909) @@ -46,13 +46,19 @@ static int decode_win_cpu_valid(void); static int decode_win_usb_valid(void); static int decode_win_eth_valid(void); static int decode_win_pcie_valid(void); +static int decode_win_sata_valid(void); +static int decode_win_cesa_valid(void); static void decode_win_cpu_setup(void); -static void decode_win_usb_setup(uint32_t ctrl); +static void decode_win_usb_setup(void); static void decode_win_eth_setup(uint32_t base); static void decode_win_pcie_setup(uint32_t base); +static void decode_win_sata_setup(void); +static void decode_win_cesa_setup(void); + +static void decode_win_cesa_dump(void); +static void decode_win_usb_dump(void); -static uint32_t dev, rev; static uint32_t used_cpu_wins; uint32_t @@ -81,6 +87,7 @@ cpu_reset(void) uint32_t cpu_extra_feat(void) { + uint32_t dev, rev; uint32_t ef = 0; soc_id(&dev, &rev); @@ -178,22 +185,27 @@ soc_identify(void) int soc_decode_win(void) { + uint32_t dev, rev; /* Retrieve our ID: some windows facilities vary between SoC models */ soc_id(&dev, &rev); if (decode_win_cpu_valid() != 1 || decode_win_usb_valid() != 1 || decode_win_eth_valid() != 1 || decode_win_idma_valid() != 1 || - decode_win_pcie_valid() != 1) + decode_win_pcie_valid() != 1 || decode_win_sata_valid() != 1 || + decode_win_cesa_valid() != 1) return(-1); decode_win_cpu_setup(); - decode_win_usb_setup(MV_USB0_BASE); + decode_win_usb_setup(); decode_win_eth_setup(MV_ETH0_BASE); if (dev == MV_DEV_MV78100) decode_win_eth_setup(MV_ETH1_BASE); + if (dev == MV_DEV_88F6281 || dev == MV_DEV_MV78100) + decode_win_cesa_setup(); decode_win_idma_setup(); + decode_win_xor_setup(); if (dev == MV_DEV_MV78100) { decode_win_pcie_setup(MV_PCIE00_BASE); @@ -207,7 +219,8 @@ soc_decode_win(void) } else decode_win_pcie_setup(MV_PCIE_BASE); - /* TODO set up decode wins for SATA */ + if (dev != MV_DEV_88F5281) + decode_win_sata_setup(); return (0); } @@ -227,10 +240,15 @@ WIN_REG_IDX_WR(win_cpu, remap_h, MV_WIN_ WIN_REG_IDX_RD(ddr, br, MV_WIN_DDR_BASE, MV_DDR_CADR_BASE) WIN_REG_IDX_RD(ddr, sz, MV_WIN_DDR_SIZE, MV_DDR_CADR_BASE) -WIN_REG_IDX_RD(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) -WIN_REG_IDX_RD(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) -WIN_REG_IDX_WR(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) -WIN_REG_IDX_WR(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) +WIN_REG_IDX_RD2(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) +WIN_REG_IDX_RD2(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) +WIN_REG_IDX_WR2(win_usb, cr, MV_WIN_USB_CTRL, MV_USB_AWR_BASE) +WIN_REG_IDX_WR2(win_usb, br, MV_WIN_USB_BASE, MV_USB_AWR_BASE) + +WIN_REG_IDX_RD(win_cesa, cr, MV_WIN_CESA_CTRL, MV_CESA_BASE) +WIN_REG_IDX_RD(win_cesa, br, MV_WIN_CESA_BASE, MV_CESA_BASE) +WIN_REG_IDX_WR(win_cesa, cr, MV_WIN_CESA_CTRL, MV_CESA_BASE) +WIN_REG_IDX_WR(win_cesa, br, MV_WIN_CESA_BASE, MV_CESA_BASE) WIN_REG_BASE_IDX_RD(win_eth, br, MV_WIN_ETH_BASE) WIN_REG_BASE_IDX_RD(win_eth, sz, MV_WIN_ETH_SIZE) @@ -238,6 +256,16 @@ WIN_REG_BASE_IDX_RD(win_eth, har, MV_WIN WIN_REG_BASE_IDX_WR(win_eth, br, MV_WIN_ETH_BASE) WIN_REG_BASE_IDX_WR(win_eth, sz, MV_WIN_ETH_SIZE) WIN_REG_BASE_IDX_WR(win_eth, har, MV_WIN_ETH_REMAP) + +WIN_REG_IDX_RD2(win_xor, br, MV_WIN_XOR_BASE, MV_XOR_BASE) +WIN_REG_IDX_RD2(win_xor, sz, MV_WIN_XOR_SIZE, MV_XOR_BASE) +WIN_REG_IDX_RD2(win_xor, har, MV_WIN_XOR_REMAP, MV_XOR_BASE) +WIN_REG_IDX_RD2(win_xor, ctrl, MV_WIN_XOR_CTRL, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, br, MV_WIN_XOR_BASE, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, sz, MV_WIN_XOR_SIZE, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, har, MV_WIN_XOR_REMAP, MV_XOR_BASE) +WIN_REG_IDX_WR2(win_xor, ctrl, MV_WIN_XOR_CTRL, MV_XOR_BASE) + WIN_REG_BASE_RD(win_eth, bare, 0x290) WIN_REG_BASE_RD(win_eth, epap, 0x294) WIN_REG_BASE_WR(win_eth, bare, 0x290) @@ -262,12 +290,18 @@ WIN_REG_IDX_WR(win_idma, cap, MV_WIN_IDM WIN_REG_RD(win_idma, bare, 0xa80, MV_IDMA_BASE) WIN_REG_WR(win_idma, bare, 0xa80, MV_IDMA_BASE) +WIN_REG_IDX_RD(win_sata, cr, MV_WIN_SATA_CTRL, MV_SATAHC_BASE); +WIN_REG_IDX_RD(win_sata, br, MV_WIN_SATA_BASE, MV_SATAHC_BASE); +WIN_REG_IDX_WR(win_sata, cr, MV_WIN_SATA_CTRL, MV_SATAHC_BASE); +WIN_REG_IDX_WR(win_sata, br, MV_WIN_SATA_BASE, MV_SATAHC_BASE); + /************************************************************************** * Decode windows helper routines **************************************************************************/ void soc_dump_decode_win(void) { + uint32_t dev, rev; int i; soc_id(&dev, &rev); @@ -290,10 +324,6 @@ soc_dump_decode_win(void) for (i = 0; i < MV_WIN_DDR_MAX; i++) printf("DDR CS#%d: b 0x%08x, s 0x%08x\n", i, ddr_br_read(i), ddr_sz_read(i)); - - for (i = 0; i < MV_WIN_USB_MAX; i++) - printf("USB window#%d: c 0x%08x, b 0x%08x\n", i, - win_usb_cr_read(i), win_usb_br_read(i)); for (i = 0; i < MV_WIN_ETH_MAX; i++) { printf("ETH window#%d: b 0x%08x, s 0x%08x", i, @@ -311,6 +341,8 @@ soc_dump_decode_win(void) win_eth_epap_read(MV_ETH0_BASE)); decode_win_idma_dump(); + decode_win_cesa_dump(); + decode_win_usb_dump(); printf("\n"); } @@ -320,6 +352,9 @@ soc_dump_decode_win(void) int win_cpu_can_remap(int i) { + uint32_t dev, rev; + + soc_id(&dev, &rev); /* Depending on the SoC certain windows have remap capability */ if ((dev == MV_DEV_88F5182 && i < 2) || @@ -549,42 +584,69 @@ decode_win_usb_valid(void) return (decode_win_can_cover_ddr(MV_WIN_USB_MAX)); } +static __inline int +usb_max_ports(void) +{ + uint32_t dev, rev; + + soc_id(&dev, &rev); + return (dev == MV_DEV_MV78100 ? 3 : 1); +} + +static void +decode_win_usb_dump(void) +{ + int i, p, m; + + m = usb_max_ports(); + for (p = 0; p < m; p++) + for (i = 0; i < MV_WIN_USB_MAX; i++) + printf("USB window#%d: c 0x%08x, b 0x%08x\n", i, + win_usb_cr_read(i, p), win_usb_br_read(i, p)); +} + /* * Set USB decode windows. */ static void -decode_win_usb_setup(uint32_t ctrl) +decode_win_usb_setup(void) { uint32_t br, cr; - int i, j; + int i, j, p, m; - /* Disable and clear all USB windows */ - for (i = 0; i < MV_WIN_USB_MAX; i++) { - win_usb_cr_write(i, 0); - win_usb_br_write(i, 0); - } - - /* Only access to active DRAM banks is required */ - for (i = 0; i < MV_WIN_DDR_MAX; i++) - if (ddr_is_active(i)) { - br = ddr_base(i); - /* - * XXX for 6281 we should handle Mbus write burst limit - * field in the ctrl reg - */ - cr = (((ddr_size(i) - 1) & 0xffff0000) | - (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1); + /* Disable and clear all USB windows for all ports */ + m = usb_max_ports(); + for (p = 0; p < m; p++) { + + for (i = 0; i < MV_WIN_USB_MAX; i++) { + win_usb_cr_write(i, p, 0); + win_usb_br_write(i, p, 0); + } - /* Set the first free USB window */ - for (j = 0; j < MV_WIN_USB_MAX; j++) { - if (win_usb_cr_read(j) & 0x1) - continue; + /* Only access to active DRAM banks is required */ + for (i = 0; i < MV_WIN_DDR_MAX; i++) { + if (ddr_is_active(i)) { + br = ddr_base(i); + /* + * XXX for 6281 we should handle Mbus write + * burst limit field in the ctrl reg + */ + cr = (((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << 8) | + (ddr_target(i) << 4) | 1); + + /* Set the first free USB window */ + for (j = 0; j < MV_WIN_USB_MAX; j++) { + if (win_usb_cr_read(j, p) & 0x1) + continue; - win_usb_br_write(j, br); - win_usb_cr_write(j, cr); - break; + win_usb_br_write(j, p, br); + win_usb_cr_write(j, p, cr); + break; + } } } + } } /************************************************************************** @@ -934,7 +996,7 @@ decode_win_idma_valid(void) j = decode_win_overlap(i, idma_wins_no, &idma_wins[0]); if (j >= 0) { printf("IDMA window#%d: (0x%08x - 0x%08x) overlaps " - "with " "#%d (0x%08x - 0x%08x)\n", i, b, e, j, + "with #%d (0x%08x - 0x%08x)\n", i, b, e, j, idma_wins[j].base, idma_wins[j].base + idma_wins[j].size - 1); rv = 0; @@ -983,3 +1045,413 @@ decode_win_idma_dump(void) { } #endif + +/************************************************************************** + * XOR windows routines + **************************************************************************/ +#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +static int +xor_ctrl_read(int i, int c, int e) +{ + uint32_t v; + v = win_xor_ctrl_read(c, e); + v &= (1 << i); + + return (v >> i); +} + +static void +xor_ctrl_write(int i, int c, int e, int val) +{ + uint32_t v; + + v = win_xor_ctrl_read(c, e); + v &= ~(1 << i); + v |= (val << i); + win_xor_ctrl_write(c, e, v); +} + +/* + * Set channel protection 'val' for window 'w' on channel 'c' + */ + +static void +xor_chan_write(int c, int e, int w, int val) +{ + uint32_t v; + + v = win_xor_ctrl_read(c, e); + v &= ~(0x3 << (w * 2 + 16)); + v |= (val << (w * 2 + 16)); + win_xor_ctrl_write(c, e, v); +} + +/* + * Set protection 'val' on all channels for window 'w' on engine 'e' + */ +static void +xor_set_prot(int w, int e, int val) +{ + int c; + + for (c = 0; c < MV_XOR_CHAN_MAX; c++) + xor_chan_write(c, e, w, val); +} + +static int +win_xor_can_remap(int i) +{ + + /* XOR decode windows 0-3 have remap capability */ + if (i < 4) + return (1); + + return (0); +} + +static __inline int +xor_max_eng(void) +{ + uint32_t dev, rev; + + soc_id(&dev, &rev); + return ((dev == MV_DEV_88F6281) ? 2 : + (dev == MV_DEV_MV78100) ? 1 : 0); +} + +static void +xor_active_dram(int c, int e, int *window) +{ + uint32_t br, sz; + int i, m, w; + + /* + * Set up access to all active DRAM banks + */ + m = xor_max_eng(); + for (i = 0; i < m; i++) + if (ddr_is_active(i)) { + br = ddr_base(i) | (ddr_attr(i) << 8) | + ddr_target(i); + sz = ((ddr_size(i) - 1) & 0xffff0000); + + /* Place DDR entries in non-remapped windows */ + for (w = 0; w < MV_WIN_XOR_MAX; w++) + if (win_xor_can_remap(w) != 1 && + (xor_ctrl_read(w, c, e) == 0) && + w > *window) { + /* Configure window */ + win_xor_br_write(w, e, br); + win_xor_sz_write(w, e, sz); + + /* Set protection RW on all channels */ + xor_set_prot(w, e, 0x3); + + /* Enable window */ + xor_ctrl_write(w, c, e, 1); + (*window)++; + break; + } + } +} + +void +decode_win_xor_setup(void) +{ + uint32_t br, sz; + int i, j, z, e = 1, m, window; + + /* + * Disable and clear all XOR windows, revoke protection for all + * channels + */ + m = xor_max_eng(); + for (j = 0; j < m; j++, e--) { + + /* Number of non-remaped windows */ + window = MV_XOR_NON_REMAP - 1; + + for (i = 0; i < MV_WIN_XOR_MAX; i++) { + win_xor_br_write(i, e, 0); + win_xor_sz_write(i, e, 0); + } + + if (win_xor_can_remap(i) == 1) + win_xor_har_write(i, e, 0); + + for (i = 0; i < MV_XOR_CHAN_MAX; i++) { + win_xor_ctrl_write(i, e, 0); + xor_active_dram(i, e, &window); + } + + /* + * Remaining targets -- from a statically defined table + */ + for (i = 0; i < xor_wins_no; i++) + if (xor_wins[i].target > 0) { + br = (xor_wins[i].base & 0xffff0000) | + (xor_wins[i].attr << 8) | + xor_wins[i].target; + sz = ((xor_wins[i].size - 1) & 0xffff0000); + + /* Set the first free XOR window */ + for (z = 0; z < MV_WIN_XOR_MAX; z++) { + if (xor_ctrl_read(z, 0, e) && + xor_ctrl_read(z, 1, e)) + continue; + + /* Configure window */ + win_xor_br_write(z, e, br); + win_xor_sz_write(z, e, sz); + if (win_xor_can_remap(z) && + xor_wins[z].remap >= 0) + win_xor_har_write(z, e, + xor_wins[z].remap); + + /* Set protection RW on all channels */ + xor_set_prot(z, e, 0x3); + + /* Enable window */ + xor_ctrl_write(z, 0, e, 1); + xor_ctrl_write(z, 1, e, 1); + break; + } + } + } +} + +int +decode_win_xor_valid(void) +{ + const struct decode_win *wintab; + int c, i, j, rv; + uint32_t b, e, s; + + if (xor_wins_no > MV_WIN_XOR_MAX) { + printf("XOR windows: too many entries: %d\n", xor_wins_no); + return (-1); + } + for (i = 0, c = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) + c++; + + if (xor_wins_no > (MV_WIN_XOR_MAX - c)) { + printf("XOR windows: too many entries: %d, available: %d\n", + xor_wins_no, MV_WIN_IDMA_MAX - c); + return (-1); + } + + wintab = xor_wins; + rv = 1; + for (i = 0; i < xor_wins_no; i++, wintab++) { + + if (wintab->target == 0) { + printf("XOR window#%d: DDR target window is not " + "supposed to be reprogrammed!\n", i); + rv = 0; + } + + if (wintab->remap >= 0 && win_cpu_can_remap(i) != 1) { + printf("XOR window#%d: not capable of remapping, but " + "val 0x%08x defined\n", i, wintab->remap); + rv = 0; + } + + s = wintab->size; + b = wintab->base; + e = b + s - 1; + if (s > (0xFFFFFFFF - b + 1)) { + /* + * XXX this boundary check should account for 64bit + * and remapping.. + */ + printf("XOR window#%d: no space for size 0x%08x at " + "0x%08x\n", i, s, b); + rv = 0; + continue; + } + + j = decode_win_overlap(i, xor_wins_no, &xor_wins[0]); + if (j >= 0) { + printf("XOR window#%d: (0x%08x - 0x%08x) overlaps " + "with #%d (0x%08x - 0x%08x)\n", i, b, e, j, + xor_wins[j].base, + xor_wins[j].base + xor_wins[j].size - 1); + rv = 0; + } + } + + return (rv); +} + +void +decode_win_xor_dump(void) +{ + int i, j; + int e = 1; + + for (j = 0; j < xor_max_eng(); j++, e--) { + for (i = 0; i < MV_WIN_XOR_MAX; i++) { + printf("XOR window#%d: b 0x%08x, s 0x%08x", i, + win_xor_br_read(i, e), win_xor_sz_read(i, e)); + + if (win_xor_can_remap(i)) + printf(", ha 0x%08x", win_xor_har_read(i, e)); + + printf("\n"); + } + for (i = 0; i < MV_XOR_CHAN_MAX; i++) + printf("XOR control#%d: 0x%08x\n", i, + win_xor_ctrl_read(i, e)); + } +} + +#else +/* Provide dummy functions to satisfy the build for SoCs not equipped with XOR */ +int +decode_win_xor_valid(void) +{ + + return (1); +} + +void +decode_win_xor_setup(void) +{ +} + +void +decode_win_xor_dump(void) +{ +} +#endif + +/************************************************************************** + * CESA TDMA windows routines + **************************************************************************/ +#if defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) +/* + * Dump CESA TDMA decode windows. + */ +static void +decode_win_cesa_dump(void) +{ + int i; + + for (i = 0; i < MV_WIN_CESA_MAX; i++) + printf("CESA window#%d: c 0x%08x, b 0x%08x\n", i, + win_cesa_cr_read(i), win_cesa_br_read(i)); +} + + +/* + * Set CESA TDMA decode windows. + */ +static void +decode_win_cesa_setup(void) +{ + uint32_t br, cr; + int i, j; + + /* Disable and clear all CESA windows */ + for (i = 0; i < MV_WIN_CESA_MAX; i++) { + win_cesa_cr_write(i, 0); + win_cesa_br_write(i, 0); + } + + /* Only access to active DRAM banks is required. */ + for (i = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) { + br = ddr_base(i); + cr = (((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1); + + /* Set the first available CESA window */ + for (j = 0; j < MV_WIN_CESA_MAX; j++) { + if (win_cesa_cr_read(j) & 0x1) + continue; + + win_cesa_br_write(j, br); + win_cesa_cr_write(j, cr); + break; + } + } +} + +/* + * Check CESA TDMA decode windows. + */ +static int +decode_win_cesa_valid(void) +{ + + return (decode_win_can_cover_ddr(MV_WIN_CESA_MAX)); +} +#else + +/* + * Provide dummy functions to satisfy the build for SoCs not equipped with + * CESA + */ + +int +decode_win_cesa_valid(void) +{ + + return (1); +} + +void +decode_win_cesa_setup(void) +{ +} + +void +decode_win_cesa_dump(void) +{ +} +#endif + +/************************************************************************** + * SATA windows routines + **************************************************************************/ +static void +decode_win_sata_setup(void) +{ + uint32_t cr, br; + int i, j; + + for (i = 0; i < MV_WIN_SATA_MAX; i++) { + win_sata_cr_write(i, 0); + win_sata_br_write(i, 0); + } + + for (i = 0; i < MV_WIN_DDR_MAX; i++) + if (ddr_is_active(i)) { + cr = ((ddr_size(i) - 1) & 0xffff0000) | + (ddr_attr(i) << 8) | (ddr_target(i) << 4) | 1; + br = ddr_base(i); + + /* Use the first available SATA window */ + for (j = 0; j < MV_WIN_SATA_MAX; j++) { + if ((win_sata_cr_read(j) & 1) != 0) + continue; + + win_sata_br_write(j, br); + win_sata_cr_write(j, cr); + break; + } + } +} + +static int +decode_win_sata_valid(void) +{ + uint32_t dev, rev; + + soc_id(&dev, &rev); + if (dev == MV_DEV_88F5281) + return (1); + + return (decode_win_can_cover_ddr(MV_WIN_SATA_MAX)); +} Modified: head/sys/arm/mv/discovery/db78xxx.c ============================================================================== --- head/sys/arm/mv/discovery/db78xxx.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/discovery/db78xxx.c Thu Jan 8 18:31:43 2009 (r186909) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -99,6 +100,10 @@ static const struct pmap_devmap pmap_dev { 0, 0, 0, 0, 0, } }; +const struct gpio_config mv_gpio_config[] = { + { -1, -1, -1 } +}; + int platform_pmap_init(void) { @@ -109,6 +114,52 @@ platform_pmap_init(void) return (0); } +void +platform_mpp_init(void) +{ + + /* + * MPP Configuration for DB-78100-BP + * + * MPP[0]: GE1_TXCLK + * MPP[1]: GE1_TXCTL + * MPP[2]: GE1_RXCTL + * MPP[3]: GE1_RXCLK + * MPP[4]: GE1_TXD[0] + * MPP[5]: GE1_TXD[1] + * MPP[6]: GE1_TXD[2] + * MPP[7]: GE1_TXD[3] + * MPP[8]: GE1_RXD[0] + * MPP[9]: GE1_RXD[1] + * MPP[10]: GE1_RXD[2] + * MPP[11]: GE1_RXD[3] + * MPP[13]: SYSRST_OUTn + * MPP[14]: SATA1_ACT + * MPP[15]: SATA0_ACT + * MPP[16]: UA2_TXD + * MPP[17]: UA2_RXD + * MPP[18]: + * MPP[19]: + * MPP[20]: + * MPP[21]: + * MPP[22]: UA3_TXD + * MPP[23]: UA3_RXD + * MPP[48]: + * MPP[49]: + * + * Others: GPIO + * + * entries are not documented, not on the schematics etc. + */ + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL0, 0x22222222); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL1, 0x33302222); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL2, 0x44333344); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL3, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL4, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL5, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL6, 0x0000FFFF); +} + static void platform_identify(void *dummy) { @@ -121,7 +172,3 @@ platform_identify(void *dummy) */ } SYSINIT(platform_identify, SI_SUB_CPU, SI_ORDER_SECOND, platform_identify, NULL); - -/* - * TODO routine setting GPIO/MPP pins - */ Modified: head/sys/arm/mv/discovery/discovery.c ============================================================================== --- head/sys/arm/mv/discovery/discovery.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/discovery/discovery.c Thu Jan 8 18:31:43 2009 (r186909) @@ -103,6 +103,16 @@ struct obio_device obio_devices[] = { { -1 }, CPU_PM_CTRL_USB0 | CPU_PM_CTRL_USB1 | CPU_PM_CTRL_USB2 }, + { "ehci", MV_USB1_BASE, MV_USB_SIZE, + { MV_INT_USB_ERR, MV_INT_USB1, -1 }, + { -1 }, + CPU_PM_CTRL_USB0 | CPU_PM_CTRL_USB1 | CPU_PM_CTRL_USB2 + }, + { "ehci", MV_USB2_BASE, MV_USB_SIZE, + { MV_INT_USB_ERR, MV_INT_USB2, -1 }, + { -1 }, + CPU_PM_CTRL_USB0 | CPU_PM_CTRL_USB1 | CPU_PM_CTRL_USB2 + }, { "mge", MV_ETH0_BASE, MV_ETH_SIZE, { MV_INT_GBERX, MV_INT_GBETX, MV_INT_GBEMISC, MV_INT_GBESUM, MV_INT_GBE_ERR, -1 }, @@ -177,7 +187,7 @@ const struct obio_pci mv_pci_info[] = { { 0, 0, 0 } }; -struct resource_spec mv_gpio_spec[] = { +struct resource_spec mv_gpio_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -186,7 +196,7 @@ struct resource_spec mv_gpio_spec[] = { { -1, 0 } }; -struct resource_spec mv_xor_spec[] = { +struct resource_spec mv_xor_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -206,6 +216,9 @@ const struct decode_win cpu_win_tbl[] = /* Device bus CS2 */ { 1, 0x3b, MV_DEV_CS2_PHYS_BASE, MV_DEV_CS2_SIZE, -1 }, + + /* CESA */ + { 9, 0x01, MV_CESA_SRAM_PHYS_BASE, MV_CESA_SRAM_SIZE, -1 }, }; const struct decode_win *cpu_wins = cpu_win_tbl; int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); @@ -227,6 +240,14 @@ const struct decode_win idma_win_tbl[] = const struct decode_win *idma_wins = idma_win_tbl; int idma_wins_no = sizeof(idma_win_tbl) / sizeof(struct decode_win); +const struct decode_win xor_win_tbl[] = { + /* PCIE MEM */ + { 4, 0xE8, _MV_PCIE_MEM_PHYS(0), _MV_PCIE_MEM_SIZE, -1}, + { 4, 0xD8, _MV_PCIE_MEM_PHYS(1), _MV_PCIE_MEM_SIZE, -1}, +}; +const struct decode_win *xor_wins = xor_win_tbl; +int xor_wins_no = sizeof(xor_win_tbl) / sizeof(struct decode_win); + uint32_t get_tclk(void) { Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/gpio.c Thu Jan 8 18:31:43 2009 (r186909) @@ -62,7 +62,7 @@ struct mv_gpio_softc { uint8_t use_high; }; -extern struct resource_spec mv_gpio_spec[]; +extern struct resource_spec mv_gpio_res[]; static struct mv_gpio_softc *mv_gpio_softc = NULL; static uint32_t gpio_setup[MV_GPIO_MAX_NPINS]; @@ -143,7 +143,7 @@ mv_gpio_attach(device_t dev) return (ENXIO); } - error = bus_alloc_resources(dev, mv_gpio_spec, sc->res); + error = bus_alloc_resources(dev, mv_gpio_res, sc->res); if (error) { device_printf(dev, "could not allocate resources\n"); return (ENXIO); @@ -171,21 +171,33 @@ mv_gpio_attach(device_t dev) INTR_TYPE_MISC | INTR_FAST, (driver_filter_t *)mv_gpio_intr, NULL, sc, &sc->ih_cookie[i]) != 0) { - bus_release_resources(dev, mv_gpio_spec, sc->res); + bus_release_resources(dev, mv_gpio_res, sc->res); device_printf(dev, "could not set up intr %d\n", i); return (ENXIO); } } + /* Setup GPIO lines */ + for (i = 0; mv_gpio_config[i].gc_gpio >= 0; i++) { + mv_gpio_configure(mv_gpio_config[i].gc_gpio, + mv_gpio_config[i].gc_flags, ~0u); + + if (mv_gpio_config[i].gc_output < 0) + mv_gpio_out_en(mv_gpio_config[i].gc_gpio, 0); + else + mv_gpio_out(mv_gpio_config[i].gc_gpio, + mv_gpio_config[i].gc_output, 1); + } + return (0); } static void mv_gpio_intr(void *arg) { - uint32_t int_cause, gpio_val; - uint32_t int_cause_hi, gpio_val_hi = 0; - int i; + uint32_t int_cause, gpio_val; + uint32_t int_cause_hi, gpio_val_hi = 0; + int i; int_cause = mv_gpio_reg_read(GPIO_INT_CAUSE); gpio_val = mv_gpio_reg_read(GPIO_DATA_IN); @@ -295,8 +307,8 @@ mv_gpio_configure(uint32_t pin, uint32_t if (mask & MV_GPIO_BLINK) mv_gpio_blink(pin, flags & MV_GPIO_BLINK); - if (mask & MV_GPIO_POLARITY) - mv_gpio_polarity(pin, flags & MV_GPIO_POLARITY); + if (mask & MV_GPIO_POLAR_LOW) + mv_gpio_polarity(pin, flags & MV_GPIO_POLAR_LOW); if (mask & MV_GPIO_EDGE) mv_gpio_edge(pin, flags & MV_GPIO_EDGE); if (mask & MV_GPIO_LEVEL) Modified: head/sys/arm/mv/kirkwood/db88f6xxx.c ============================================================================== --- head/sys/arm/mv/kirkwood/db88f6xxx.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/kirkwood/db88f6xxx.c Thu Jan 8 18:31:43 2009 (r186909) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -99,6 +100,10 @@ static const struct pmap_devmap pmap_dev { 0, 0, 0, 0, 0, } }; +const struct gpio_config mv_gpio_config[] = { + { -1, -1, -1 } +}; + int platform_pmap_init(void) { @@ -109,6 +114,47 @@ platform_pmap_init(void) return (0); } +void +platform_mpp_init(void) +{ + + /* + * MPP configuration for DB-88F6281-BP and DB-88F6281-BP-A + * + * MPP[0]: NF_IO[2] + * MPP[1]: NF_IO[3] + * MPP[2]: NF_IO[4] + * MPP[3]: NF_IO[5] + * MPP[4]: NF_IO[6] + * MPP[5]: NF_IO[7] + * MPP[6]: SYSRST_OUTn + * MPP[7]: SPI_SCn + * MPP[8]: TW_SDA + * MPP[9]: TW_SCK + * MPP[10]: UA0_TXD + * MPP[11]: UA0_RXD + * MPP[12]: SD_CLK + * MPP[13]: SD_CMD + * MPP[14]: SD_D[0] + * MPP[15]: SD_D[1] + * MPP[16]: SD_D[2] + * MPP[17]: SD_D[3] + * MPP[18]: NF_IO[0] + * MPP[19]: NF_IO[1] + * MPP[20]: SATA1_AC + * MPP[21]: SATA0_AC + * + * Others: GPIO + */ + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL0, 0x21111111); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL1, 0x11113311); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL2, 0x00551111); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL3, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL4, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL5, 0x00000000); + bus_space_write_4(obio_tag, MV_MPP_BASE, MPP_CONTROL6, 0x00000000); +} + static void platform_identify(void *dummy) { @@ -121,7 +167,3 @@ platform_identify(void *dummy) */ } SYSINIT(platform_identify, SI_SUB_CPU, SI_ORDER_SECOND, platform_identify, NULL); - -/* - * TODO routine setting GPIO/MPP pins - */ Modified: head/sys/arm/mv/kirkwood/kirkwood.c ============================================================================== --- head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 18:24:04 2009 (r186908) +++ head/sys/arm/mv/kirkwood/kirkwood.c Thu Jan 8 18:31:43 2009 (r186909) @@ -112,7 +112,7 @@ const struct obio_pci mv_pci_info[] = { { 0, 0, 0 } }; -struct resource_spec mv_gpio_spec[] = { +struct resource_spec mv_gpio_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -124,7 +124,7 @@ struct resource_spec mv_gpio_spec[] = { { -1, 0 } }; -struct resource_spec mv_xor_spec[] = { +struct resource_spec mv_xor_res[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, { SYS_RES_IRQ, 0, RF_ACTIVE }, { SYS_RES_IRQ, 1, RF_ACTIVE }, @@ -147,10 +147,21 @@ const struct decode_win cpu_win_tbl[] = /* Device bus CS2 */ { 1, 0x1b, MV_DEV_CS2_PHYS_BASE, MV_DEV_CS2_SIZE, -1 }, + + /* CESA */ + { 3, 0x00, MV_CESA_SRAM_PHYS_BASE, MV_CESA_SRAM_SIZE, -1 }, + }; const struct decode_win *cpu_wins = cpu_win_tbl; int cpu_wins_no = sizeof(cpu_win_tbl) / sizeof(struct decode_win); +const struct decode_win xor_win_tbl[] = { + /* PCIE MEM */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 18:34:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31F491065678; Thu, 8 Jan 2009 18:34:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F11CF8FC18; Thu, 8 Jan 2009 18:34:19 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08IYJ6M030541; Thu, 8 Jan 2009 18:34:19 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08IYJoc030540; Thu, 8 Jan 2009 18:34:19 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901081834.n08IYJoc030540@svn.freebsd.org> From: Sam Leffler Date: Thu, 8 Jan 2009 18:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186910 - stable/7/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 18:34:37 -0000 Author: sam Date: Thu Jan 8 18:34:19 2009 New Revision: 186910 URL: http://svn.freebsd.org/changeset/base/186910 Log: mfc ath hal source code Added: stable/7/sys/dev/ath/ath_hal/ (props changed) - copied from r186909, head/sys/dev/ath/ath_hal/ From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 19:13:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 535111065673; Thu, 8 Jan 2009 19:13:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 41CEE8FC16; Thu, 8 Jan 2009 19:13:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08JDZns031310; Thu, 8 Jan 2009 19:13:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08JDZvK031309; Thu, 8 Jan 2009 19:13:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901081913.n08JDZvK031309@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 8 Jan 2009 19:13:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186911 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 19:13:35 -0000 Author: trasz Date: Thu Jan 8 19:13:34 2009 New Revision: 186911 URL: http://svn.freebsd.org/changeset/base/186911 Log: Don't panic with "vinvalbuf: dirty bufs" when the mounted device that was being written to goes away. Reviewed by: kib, scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Thu Jan 8 18:34:19 2009 (r186910) +++ head/sys/fs/devfs/devfs_vnops.c Thu Jan 8 19:13:34 2009 (r186911) @@ -540,12 +540,28 @@ devfs_close_f(struct file *fp, struct th return (error); } -/* ARGSUSED */ static int devfs_fsync(struct vop_fsync_args *ap) { - if (!vn_isdisk(ap->a_vp, NULL)) + int error; + struct bufobj *bo; + struct devfs_dirent *de; + + if (!vn_isdisk(ap->a_vp, &error)) { + bo = &ap->a_vp->v_bufobj; + de = ap->a_vp->v_data; + if (error == ENXIO && bo->bo_dirty.bv_cnt > 0) { + printf("Device %s went missing before all of the data " + "could be written to it; expect data loss.\n", + de->de_dirent->d_name); + + error = vop_stdfsync(ap); + if (bo->bo_dirty.bv_cnt != 0 || error != 0) + panic("devfs_fsync: vop_stdfsync failed."); + } + return (0); + } return (vop_stdfsync(ap)); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 19:43:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06D98106564A; Thu, 8 Jan 2009 19:43:48 +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 E9A108FC13; Thu, 8 Jan 2009 19:43:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08JhlU1031901; Thu, 8 Jan 2009 19:43:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08JhlNG031900; Thu, 8 Jan 2009 19:43:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901081943.n08JhlNG031900@svn.freebsd.org> From: Alexander Motin Date: Thu, 8 Jan 2009 19:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186912 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 19:43:48 -0000 Author: mav Date: Thu Jan 8 19:43:47 2009 New Revision: 186912 URL: http://svn.freebsd.org/changeset/base/186912 Log: Add external connector jack color into widget names. It should help users to identify them while reading verbose messages. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Thu Jan 8 19:13:34 2009 (r186911) +++ head/sys/dev/sound/pci/hda/hdac.c Thu Jan 8 19:43:47 2009 (r186912) @@ -2443,9 +2443,10 @@ hdac_widget_pin_parse(struct hdac_widget { struct hdac_softc *sc = w->devinfo->codec->sc; uint32_t config, pincap; - const char *devstr, *connstr; + const char *devstr; nid_t cad = w->devinfo->codec->cad; nid_t nid = w->nid; + int conn, color; config = hdac_widget_pin_getconfig(w); w->wclass.pin.config = config; @@ -2467,13 +2468,19 @@ hdac_widget_pin_parse(struct hdac_widget devstr = HDA_DEVS[(config & HDA_CONFIG_DEFAULTCONF_DEVICE_MASK) >> HDA_CONFIG_DEFAULTCONF_DEVICE_SHIFT]; - connstr = HDA_CONNS[(config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT]; + conn = (config & HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK) >> + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_SHIFT; + color = (config & HDA_CONFIG_DEFAULTCONF_COLOR_MASK) >> + HDA_CONFIG_DEFAULTCONF_COLOR_SHIFT; strlcat(w->name, ": ", sizeof(w->name)); strlcat(w->name, devstr, sizeof(w->name)); strlcat(w->name, " (", sizeof(w->name)); - strlcat(w->name, connstr, sizeof(w->name)); + if (conn == 0 && color != 0 && color != 15) { + strlcat(w->name, HDA_COLORS[color], sizeof(w->name)); + strlcat(w->name, " ", sizeof(w->name)); + } + strlcat(w->name, HDA_CONNS[conn], sizeof(w->name)); strlcat(w->name, ")", sizeof(w->name)); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 21:29:40 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97BD51065716; Thu, 8 Jan 2009 21:29:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5095E8FC18; Thu, 8 Jan 2009 21:29:40 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08LTeDI033887; Thu, 8 Jan 2009 21:29:40 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08LTefd033886; Thu, 8 Jan 2009 21:29:40 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901082129.n08LTefd033886@svn.freebsd.org> From: Christian Brueffer Date: Thu, 8 Jan 2009 21:29:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186913 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 21:29:42 -0000 Author: brueffer Date: Thu Jan 8 21:29:40 2009 New Revision: 186913 URL: http://svn.freebsd.org/changeset/base/186913 Log: Language cleanup. Modified: head/share/man/man9/insmntque.9 Modified: head/share/man/man9/insmntque.9 ============================================================================== --- head/share/man/man9/insmntque.9 Thu Jan 8 19:43:47 2009 (r186912) +++ head/share/man/man9/insmntque.9 Thu Jan 8 21:29:40 2009 (r186913) @@ -46,7 +46,7 @@ The function associates a vnode with a mount. This includes updating .Va v_mount -for the vnode, and inserting the vnode into the mounts vnode list. +for the vnode, and inserting the vnode into the mount's vnode list. .Pp The mount reference count is incremented for each vnode added to the mount, and that reference is decremented by @@ -75,13 +75,14 @@ The .Fa dtr_arg argument is the second, supplying any additional context needed. .Sh RETURN VALUES +The .Fn insmntque -will always return 0, unless the file system is currently being unmounted +function will always return 0, unless the file system is currently being unmounted in which case it may return .Dv EBUSY . -The +Also, .Fn insmntque -function may be forced to insert the vnode into the mount's vnode list +may be forced to insert the vnode into the mount's vnode list by setting the .Va VV_FORCEINSMQ flag in the vnode From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 22:32:36 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A6FE1065705; Thu, 8 Jan 2009 22:32:36 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47FB68FC20; Thu, 8 Jan 2009 22:32:36 +0000 (UTC) (envelope-from piso@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08MWa1b035251; Thu, 8 Jan 2009 22:32:36 GMT (envelope-from piso@svn.freebsd.org) Received: (from piso@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08MWaqw035249; Thu, 8 Jan 2009 22:32:36 GMT (envelope-from piso@svn.freebsd.org) Message-Id: <200901082232.n08MWaqw035249@svn.freebsd.org> From: Paolo Pisati Date: Thu, 8 Jan 2009 22:32:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186915 - stable/7/sbin/ipfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 22:32:37 -0000 Author: piso Date: Thu Jan 8 22:32:35 2009 New Revision: 186915 URL: http://svn.freebsd.org/changeset/base/186915 Log: MFC r186297 and r186298: Honor the quiet (-q) option while adding a nat rule. Modified: stable/7/sbin/ipfw/ (props changed) stable/7/sbin/ipfw/ipfw.8 stable/7/sbin/ipfw/ipfw2.c Modified: stable/7/sbin/ipfw/ipfw.8 ============================================================================== --- stable/7/sbin/ipfw/ipfw.8 Thu Jan 8 21:46:55 2009 (r186914) +++ stable/7/sbin/ipfw/ipfw.8 Thu Jan 8 22:32:35 2009 (r186915) @@ -65,6 +65,7 @@ .Op Ar number ... .Pp .Nm +.Op Fl q .Cm nat .Ar number .Cm config @@ -231,6 +232,7 @@ Try to resolve addresses and service nam .It Fl q While .Cm add Ns ing , +.Cm nat Ns ing , .Cm zero Ns ing , .Cm resetlog Ns ging or Modified: stable/7/sbin/ipfw/ipfw2.c ============================================================================== --- stable/7/sbin/ipfw/ipfw2.c Thu Jan 8 21:46:55 2009 (r186914) +++ stable/7/sbin/ipfw/ipfw2.c Thu Jan 8 22:32:35 2009 (r186915) @@ -4067,10 +4067,12 @@ config_nat(int ac, char **av) if (i) err(1, "setsockopt(%s)", "IP_FW_NAT_CFG"); - /* After every modification, we show the resultant rule. */ - int _ac = 3; - char *_av[] = {"show", "config", id}; - show_nat(_ac, _av); + if (!do_quiet) { + /* After every modification, we show the resultant rule. */ + int _ac = 3; + char *_av[] = {"show", "config", id}; + show_nat(_ac, _av); + } } static void From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 23:27:59 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA8011065794; Thu, 8 Jan 2009 23:27:59 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B89E08FC25; Thu, 8 Jan 2009 23:27:59 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08NRx4V036337; Thu, 8 Jan 2009 23:27:59 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08NRxde036336; Thu, 8 Jan 2009 23:27:59 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901082327.n08NRxde036336@svn.freebsd.org> From: Giorgos Keramidas Date: Thu, 8 Jan 2009 23:27:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186916 - head/etc/defaults X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 23:28:00 -0000 Author: keramida (doc committer) Date: Thu Jan 8 23:27:59 2009 New Revision: 186916 URL: http://svn.freebsd.org/changeset/base/186916 Log: The description of the various securelevels has moved to the security.7 manpage a while ago. MFC after: 1 week Modified: head/etc/defaults/rc.conf Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Thu Jan 8 22:32:35 2009 (r186915) +++ head/etc/defaults/rc.conf Thu Jan 8 23:27:59 2009 (r186916) @@ -570,7 +570,7 @@ ldconfig_local_dirs="/usr/local/libdata/ ldconfig_local32_dirs="/usr/local/libdata/ldconfig32" # Local directories with 32-bit compatibility ldconfig # configuration files. -kern_securelevel_enable="NO" # kernel security level (see init(8)), +kern_securelevel_enable="NO" # kernel security level (see security(7)) kern_securelevel="-1" # range: -1..3 ; `-1' is the most insecure # Note that setting securelevel to 0 will result # in the system booting with securelevel set to 1, as From owner-svn-src-all@FreeBSD.ORG Thu Jan 8 23:50:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04879106566C; Thu, 8 Jan 2009 23:50:33 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E72EC8FC1A; Thu, 8 Jan 2009 23:50:32 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n08NoWlw036812; Thu, 8 Jan 2009 23:50:32 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n08NoWNo036811; Thu, 8 Jan 2009 23:50:32 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200901082350.n08NoWNo036811@svn.freebsd.org> From: Giorgos Keramidas Date: Thu, 8 Jan 2009 23:50:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186917 - head/share/man/man5 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2009 23:50:33 -0000 Author: keramida (doc committer) Date: Thu Jan 8 23:50:32 2009 New Revision: 186917 URL: http://svn.freebsd.org/changeset/base/186917 Log: The description of the various securelevels has moved to the security.7 manpage a while ago. MFC after: 1 week Noticed by: simon Modified: head/share/man/man5/rc.conf.5 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Thu Jan 8 23:27:59 2009 (r186916) +++ head/share/man/man5/rc.conf.5 Thu Jan 8 23:50:32 2009 (r186917) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 24, 2008 +.Dd January 9, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -3188,7 +3188,7 @@ The allowed range of ranges from \-1 (the compile time default) to 3 (the most secure). See -.Xr init 8 +.Xr security 7 for the list of possible security levels and their effect on system operation. .It Va sshd_program @@ -3987,6 +3987,7 @@ Default .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , +.Xr security 7 , .Xr accton 8 , .Xr amd 8 , .Xr apm 8 , From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 02:31:52 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45ECF1065673; Fri, 9 Jan 2009 02:31:52 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3458A8FC0C; Fri, 9 Jan 2009 02:31:52 +0000 (UTC) (envelope-from weongyo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n092Vqta040142; Fri, 9 Jan 2009 02:31:52 GMT (envelope-from weongyo@svn.freebsd.org) Received: (from weongyo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n092Vqgx040141; Fri, 9 Jan 2009 02:31:52 GMT (envelope-from weongyo@svn.freebsd.org) Message-Id: <200901090231.n092Vqgx040141@svn.freebsd.org> From: Weongyo Jeong Date: Fri, 9 Jan 2009 02:31:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186919 - head/sys/dev/if_ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 02:31:53 -0000 Author: weongyo Date: Fri Jan 9 02:31:51 2009 New Revision: 186919 URL: http://svn.freebsd.org/changeset/base/186919 Log: fix a typo to set the 48Mbps data rate. PR: kern/130189 Submitted by: Paul B. Mahol Reviewed by: sam MFC after: 3 weeks Modified: head/sys/dev/if_ndis/if_ndis.c Modified: head/sys/dev/if_ndis/if_ndis.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 01:47:24 2009 (r186918) +++ head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 02:31:51 2009 (r186919) @@ -855,13 +855,13 @@ nonettypes: IEEE80211_RATE_BASIC|22); } if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) { - TESTSETRATE(IEEE80211_MODE_11G, 47); + TESTSETRATE(IEEE80211_MODE_11G, 48); TESTSETRATE(IEEE80211_MODE_11G, 72); TESTSETRATE(IEEE80211_MODE_11G, 96); TESTSETRATE(IEEE80211_MODE_11G, 108); } if (isset(ic->ic_modecaps, IEEE80211_MODE_11A)) { - TESTSETRATE(IEEE80211_MODE_11A, 47); + TESTSETRATE(IEEE80211_MODE_11A, 48); TESTSETRATE(IEEE80211_MODE_11A, 72); TESTSETRATE(IEEE80211_MODE_11A, 96); TESTSETRATE(IEEE80211_MODE_11A, 108); From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 03:04:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CDFD1065670 for ; Fri, 9 Jan 2009 03:04:11 +0000 (UTC) (envelope-from cokane@FreeBSD.org) Received: from mail-out2.fuse.net (mail-out2.fuse.net [216.68.8.171]) by mx1.freebsd.org (Postfix) with ESMTP id CF8158FC14 for ; Fri, 9 Jan 2009 03:04:10 +0000 (UTC) (envelope-from cokane@FreeBSD.org) X-CNFS-Analysis: v=1.0 c=1 a=_RjqrDncAWMA:10 a=llEIekAKCuIA:10 a=LkYvsgB9u1MH7Ao0BLhsLg==:17 a=6I5d2MoRAAAA:8 a=ZPOgkqBvq_U8iTBhmyQA:9 a=SColOreYJS5iDMCLvAjBbBEMkOQA:4 a=dXjOxITDGsYA:10 a=LY0hPdMaydYA:10 a=X4X0yLm8SS1P9oBeTCAA:9 a=-yyTi50cmerUm02O0E7IKLK4jWMA:4 a=rPt6xJ-oxjAA:10 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Received: from [74.215.227.9] ([74.215.227.9:50984] helo=discordia) by mail-out2.fuse.net (ecelerity 2.1.1.22 r(17669)) with ESMTP id 5E/ED-17809-D9EB6694 for ; Thu, 08 Jan 2009 22:04:10 -0500 Received: by discordia (Postfix, from userid 103) id B97441DB2FA; Thu, 8 Jan 2009 22:03:57 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.1.8-gr1 (2007-02-13) on discordia X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, UPPERCASE_25_50 autolearn=ham version=3.1.8-gr1 Received: from [172.31.1.6] (unknown [172.31.1.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by discordia (Postfix) with ESMTP id 51A8D1DB2F9; Thu, 8 Jan 2009 22:03:51 -0500 (EST) From: Coleman Kane To: Weongyo Jeong In-Reply-To: <200901090231.n092Vqgx040141@svn.freebsd.org> References: <200901090231.n092Vqgx040141@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-BEtkzVjedcvQUgEss/8g" Organization: FreeBSD Project Date: Thu, 08 Jan 2009 22:03:48 -0500 Message-Id: <1231470228.1762.2.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186919 - head/sys/dev/if_ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:04:11 -0000 --=-BEtkzVjedcvQUgEss/8g Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2009-01-09 at 02:31 +0000, Weongyo Jeong wrote: > Author: weongyo > Date: Fri Jan 9 02:31:51 2009 > New Revision: 186919 > URL: http://svn.freebsd.org/changeset/base/186919 >=20 > Log: > fix a typo to set the 48Mbps data rate. > =20 > PR: kern/130189 > Submitted by: Paul B. Mahol > Reviewed by: sam > MFC after: 3 weeks >=20 > Modified: > head/sys/dev/if_ndis/if_ndis.c >=20 > Modified: head/sys/dev/if_ndis/if_ndis.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 01:47:24 2009 (r186918) > +++ head/sys/dev/if_ndis/if_ndis.c Fri Jan 9 02:31:51 2009 (r186919) > @@ -855,13 +855,13 @@ nonettypes: > IEEE80211_RATE_BASIC|22); > } > if (isset(ic->ic_modecaps, IEEE80211_MODE_11G)) { > - TESTSETRATE(IEEE80211_MODE_11G, 47); > + TESTSETRATE(IEEE80211_MODE_11G, 48); > TESTSETRATE(IEEE80211_MODE_11G, 72); > TESTSETRATE(IEEE80211_MODE_11G, 96); > TESTSETRATE(IEEE80211_MODE_11G, 108); > } > if (isset(ic->ic_modecaps, IEEE80211_MODE_11A)) { > - TESTSETRATE(IEEE80211_MODE_11A, 47); > + TESTSETRATE(IEEE80211_MODE_11A, 48); > TESTSETRATE(IEEE80211_MODE_11A, 72); > TESTSETRATE(IEEE80211_MODE_11A, 96); > TESTSETRATE(IEEE80211_MODE_11A, 108); >=20 Good catch! --=20 Coleman Kane --=-BEtkzVjedcvQUgEss/8g Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklmvo4ACgkQcMSxQcXat5f/uACeIXpwIbNnK26/lHYY6tcW9D9F asYAoIP0HZNOaQcj2PWUgxRoYOmJCBhO =Cq2f -----END PGP SIGNATURE----- --=-BEtkzVjedcvQUgEss/8g-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 03:42:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84FE51065672; Fri, 9 Jan 2009 03:42:42 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 70EF28FC08; Fri, 9 Jan 2009 03:42:42 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n093ggrY041862; Fri, 9 Jan 2009 03:42:42 GMT (envelope-from murray@svn.freebsd.org) Received: (from murray@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n093gfug041855; Fri, 9 Jan 2009 03:42:41 GMT (envelope-from murray@svn.freebsd.org) Message-Id: <200901090342.n093gfug041855@svn.freebsd.org> From: Murray Stokely Date: Fri, 9 Jan 2009 03:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186920 - in stable/7: lib/libfetch usr.bin/fetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:42:43 -0000 Author: murray Date: Fri Jan 9 03:42:41 2009 New Revision: 186920 URL: http://svn.freebsd.org/changeset/base/186920 Log: MFC r186043, 186124, 186241 Add support for If-Modified-Since to fetch with new -i option. Consistently return 1 on error. Improve usage and SYNOPSIS. _M usr.bin/fetch M usr.bin/fetch/fetch.1 M usr.bin/fetch/fetch.c _M lib/libfetch M lib/libfetch/fetch.h M lib/libfetch/http.c M lib/libfetch/fetch.3 M lib/libfetch/fetch.c Modified: stable/7/lib/libfetch/ (props changed) stable/7/lib/libfetch/fetch.3 stable/7/lib/libfetch/fetch.c stable/7/lib/libfetch/fetch.h stable/7/lib/libfetch/http.c stable/7/usr.bin/fetch/ (props changed) stable/7/usr.bin/fetch/fetch.1 stable/7/usr.bin/fetch/fetch.c Modified: stable/7/lib/libfetch/fetch.3 ============================================================================== --- stable/7/lib/libfetch/fetch.3 Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/fetch.3 Fri Jan 9 03:42:41 2009 (r186920) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2007 +.Dd December 14, 2008 .Dt FETCH 3 .Os .Sh NAME @@ -165,9 +165,16 @@ struct url { char *doc; off_t offset; size_t length; + time_t ims_time; }; .Ed .Pp +The +.Va ims_time +field stores the time value for +.Li If-Modified-Since +HTTP requests. +.Pp The pointer returned by .Fn fetchMakeURL or @@ -353,6 +360,22 @@ and .Fn fetchPutHTTP will use a direct connection even if a proxy server is defined. .Pp +If the +.Ql i +(if-modified-since) flag is specified, and +the +.Va ims_time +field is set in +.Vt "struct url" , +then +.Fn fetchXGetHTTP +and +.Fn fetchGetHTTP +will send a conditional +.Li If-Modified-Since +HTTP header to only fetch the content if it is newer than +.Va ims_time . +.Pp Since there seems to be no good way of implementing the HTTP PUT method in a manner consistent with the rest of the .Nm fetch Modified: stable/7/lib/libfetch/fetch.c ============================================================================== --- stable/7/lib/libfetch/fetch.c Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/fetch.c Fri Jan 9 03:42:41 2009 (r186920) @@ -74,9 +74,7 @@ static struct fetcherr url_errlist[] = { FILE * fetchXGet(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -110,9 +108,7 @@ fetchGet(struct url *URL, const char *fl FILE * fetchPut(struct url *URL, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchPutFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) @@ -132,9 +128,7 @@ fetchPut(struct url *URL, const char *fl int fetchStat(struct url *URL, struct url_stat *us, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (us != NULL) { us->size = -1; us->atime = us->mtime = 0; @@ -158,9 +152,7 @@ fetchStat(struct url *URL, struct url_st struct url_ent * fetchList(struct url *URL, const char *flags) { - int direct; - direct = CHECK_FLAG('d'); if (strcasecmp(URL->scheme, SCHEME_FILE) == 0) return (fetchListFile(URL, flags)); else if (strcasecmp(URL->scheme, SCHEME_FTP) == 0) Modified: stable/7/lib/libfetch/fetch.h ============================================================================== --- stable/7/lib/libfetch/fetch.h Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/fetch.h Fri Jan 9 03:42:41 2009 (r186920) @@ -46,6 +46,7 @@ struct url { char *doc; off_t offset; size_t length; + time_t ims_time; }; struct url_stat { Modified: stable/7/lib/libfetch/http.c ============================================================================== --- stable/7/lib/libfetch/http.c Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/lib/libfetch/http.c Fri Jan 9 03:42:41 2009 (r186920) @@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -92,6 +93,7 @@ __FBSDID("$FreeBSD$"); #define HTTP_MOVED_PERM 301 #define HTTP_MOVED_TEMP 302 #define HTTP_SEE_OTHER 303 +#define HTTP_NOT_MODIFIED 304 #define HTTP_TEMP_REDIRECT 307 #define HTTP_NEED_AUTH 401 #define HTTP_NEED_PROXY_AUTH 407 @@ -797,20 +799,23 @@ FILE * http_request(struct url *URL, const char *op, struct url_stat *us, struct url *purl, const char *flags) { + char timebuf[80]; + char hbuf[MAXHOSTNAMELEN + 7], *host; conn_t *conn; struct url *url, *new; - int chunked, direct, need_auth, noredirect, verbose; + int chunked, direct, ims, need_auth, noredirect, verbose; int e, i, n, val; off_t offset, clength, length, size; time_t mtime; const char *p; FILE *f; hdr_t h; - char hbuf[MAXHOSTNAMELEN + 7], *host; + struct tm *timestruct; direct = CHECK_FLAG('d'); noredirect = CHECK_FLAG('A'); verbose = CHECK_FLAG('v'); + ims = CHECK_FLAG('i'); if (direct && purl) { fetchFreeURL(purl); @@ -879,6 +884,14 @@ http_request(struct url *URL, const char op, url->doc); } + if (ims && url->ims_time) { + timestruct = gmtime((time_t *)&url->ims_time); + (void)strftime(timebuf, 80, "%a, %d %b %Y %T GMT", + timestruct); + if (verbose) + fetch_info("If-Modified-Since: %s", timebuf); + http_cmd(conn, "If-Modified-Since: %s", timebuf); + } /* virtual host */ http_cmd(conn, "Host: %s", host); @@ -940,6 +953,7 @@ http_request(struct url *URL, const char switch (http_get_reply(conn)) { case HTTP_OK: case HTTP_PARTIAL: + case HTTP_NOT_MODIFIED: /* fine */ break; case HTTP_MOVED_PERM: @@ -1074,7 +1088,10 @@ http_request(struct url *URL, const char } /* we have a hit or an error */ - if (conn->err == HTTP_OK || conn->err == HTTP_PARTIAL || HTTP_ERROR(conn->err)) + if (conn->err == HTTP_OK + || conn->err == HTTP_NOT_MODIFIED + || conn->err == HTTP_PARTIAL + || HTTP_ERROR(conn->err)) break; /* all other cases: we got a redirect */ @@ -1102,6 +1119,11 @@ http_request(struct url *URL, const char (long long)offset, (long long)length, (long long)size, (long long)clength)); + if (conn->err == HTTP_NOT_MODIFIED) { + http_seterr(HTTP_NOT_MODIFIED); + return (NULL); + } + /* check for inconsistencies */ if (clength != -1 && length != -1 && clength != length) { http_seterr(HTTP_PROTOCOL_ERROR); Modified: stable/7/usr.bin/fetch/fetch.1 ============================================================================== --- stable/7/usr.bin/fetch/fetch.1 Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/usr.bin/fetch/fetch.1 Fri Jan 9 03:42:41 2009 (r186920) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 11, 2003 +.Dd December 14, 2008 .Dt FETCH 1 .Os .Sh NAME @@ -37,17 +37,25 @@ .Nd retrieve a file by Uniform Resource Locator .Sh SYNOPSIS .Nm -.Op Fl 146AFMPRUadlmnpqrsv +.Op Fl 146AadFlMmnPpqRrsUv .Op Fl B Ar bytes +.Op Fl i Ar file +.Op Fl N Ar file +.Op Fl o Ar file .Op Fl S Ar bytes .Op Fl T Ar seconds +.Op Fl w Ar seconds +.Ar URL ... +.Nm +.Op Fl 146AadFlMmnPpqRrsUv +.Op Fl B Ar bytes +.Op Fl i Ar file .Op Fl N Ar file .Op Fl o Ar file +.Op Fl S Ar bytes +.Op Fl T Ar seconds .Op Fl w Ar seconds -.Op Fl h Ar host -.Op Fl c Ar dir -.Op Fl f Ar file -.Op Ar URL ... +.Fl h Ar host Fl f Ar file Oo Fl c Ar dir Oc .Sh DESCRIPTION The .Nm @@ -59,7 +67,7 @@ command line. .Pp The following options are available: .Bl -tag -width Fl -.It Fl \&1 +.It Fl 1 Stop and return exit code 0 at the first successfully retrieved file. .It Fl 4 Forces @@ -110,6 +118,12 @@ The file to retrieve is located on the h .Ar host . This option is deprecated and is provided for backward compatibility only. +.It Fl i Ar file +If-Modified-Since mode: the remote file will only be retrieved if it +is newer than +.Ar file +on the local host. +(HTTP only) .It Fl l If the target is a file-scheme URL, make a symbolic link to the target rather than trying to copy it. @@ -243,6 +257,12 @@ If multiple URLs are listed on the comma .Nm will attempt to retrieve each one of them in turn, and will return zero only if they were all successfully retrieved. +.Pp +If the +.Fl i +argument is used and the remote file is not newer than the +specified file then the command will still return success, +although no file is transferred. .Sh SEE ALSO .Xr fetch 3 .Sh HISTORY Modified: stable/7/usr.bin/fetch/fetch.c ============================================================================== --- stable/7/usr.bin/fetch/fetch.c Fri Jan 9 02:31:51 2009 (r186919) +++ stable/7/usr.bin/fetch/fetch.c Fri Jan 9 03:42:41 2009 (r186920) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -60,6 +59,8 @@ int d_flag; /* -d: direct connection int F_flag; /* -F: restart without checking mtime */ char *f_filename; /* -f: file to fetch */ char *h_hostname; /* -h: host to fetch from */ +int i_flag; /* -i: specify input file for mtime comparison */ +char *i_filename; /* name of input file */ int l_flag; /* -l: link rather than copy file: URLs */ int m_flag; /* -[Mm]: mirror mode */ char *N_filename; /* -N: netrc file name */ @@ -381,6 +382,14 @@ fetch(char *URL, const char *path) if (A_flag) strcat(flags, "A"); timeout = T_secs ? T_secs : http_timeout; + if (i_flag) { + if (stat(i_filename, &sb)) { + warn("%s: stat()", i_filename); + goto failure; + } + url->ims_time = sb.st_mtime; + strcat(flags, "i"); + } } /* set the protocol timeout. */ @@ -448,7 +457,14 @@ fetch(char *URL, const char *path) goto signal; if (f == NULL) { warnx("%s: %s", URL, fetchLastErrString); - goto failure; + if (i_flag && strcmp(url->scheme, SCHEME_HTTP) == 0 + && fetchLastErrCode == FETCH_OK + && strcmp(fetchLastErrString, "Not Modified") == 0) { + /* HTTP Not Modified Response, return OK. */ + r = 0; + goto done; + } else + goto failure; } if (sigint) goto signal; @@ -710,10 +726,11 @@ fetch(char *URL, const char *path) static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n", - "usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile]", - " [-S bytes] [-B bytes] [-T seconds] [-w seconds]", - " [-h host -f file [-c dir] | URL ...]"); + fprintf(stderr, "%s\n%s\n%s\n%s\n", +"usage: fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [-N file] [-o file] [-S bytes]", +" [-T seconds] [-w seconds] [-i file] URL ...", +" fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [-N file] [-o file] [-S bytes]", +" [-T seconds] [-w seconds] [-i file] -h host -f file [-c dir]"); } @@ -730,7 +747,7 @@ main(int argc, char *argv[]) int c, e, r; while ((c = getopt(argc, argv, - "146AaB:bc:dFf:Hh:lMmN:nPpo:qRrS:sT:tUvw:")) != -1) + "146AaB:bc:dFf:Hh:i:lMmN:nPpo:qRrS:sT:tUvw:")) != -1) switch (c) { case '1': once_flag = 1; @@ -775,6 +792,10 @@ main(int argc, char *argv[]) case 'h': h_hostname = optarg; break; + case 'i': + i_flag = 1; + i_filename = optarg; + break; case 'l': l_flag = 1; break; @@ -842,7 +863,7 @@ main(int argc, char *argv[]) break; default: usage(); - exit(EX_USAGE); + exit(1); } argc -= optind; @@ -851,7 +872,7 @@ main(int argc, char *argv[]) if (h_hostname || f_filename || c_dirname) { if (!h_hostname || !f_filename || argc) { usage(); - exit(EX_USAGE); + exit(1); } /* XXX this is a hack. */ if (strcspn(h_hostname, "@:/") != strlen(h_hostname)) @@ -864,7 +885,7 @@ main(int argc, char *argv[]) if (!argc) { usage(); - exit(EX_USAGE); + exit(1); } /* allocate buffer */ @@ -905,10 +926,10 @@ main(int argc, char *argv[]) } else if (stat(o_filename, &sb) == -1) { if (errno == ENOENT) { if (argc > 1) - errx(EX_USAGE, "%s is not a directory", + errx(1, "%s is not a directory", o_filename); } else { - err(EX_IOERR, "%s", o_filename); + err(1, "%s", o_filename); } } else { if (sb.st_mode & S_IFDIR) From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 03:52:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF341065674; Fri, 9 Jan 2009 03:52:12 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC69D8FC14; Fri, 9 Jan 2009 03:52:12 +0000 (UTC) (envelope-from murray@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n093qCxP042089; Fri, 9 Jan 2009 03:52:12 GMT (envelope-from murray@svn.freebsd.org) Received: (from murray@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n093qCoj042088; Fri, 9 Jan 2009 03:52:12 GMT (envelope-from murray@svn.freebsd.org) Message-Id: <200901090352.n093qCoj042088@svn.freebsd.org> From: Murray Stokely Date: Fri, 9 Jan 2009 03:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186921 - head/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 03:52:13 -0000 Author: murray Date: Fri Jan 9 03:52:12 2009 New Revision: 186921 URL: http://svn.freebsd.org/changeset/base/186921 Log: Note new fetch if-modified-since support in the userland section, and update copyright to 2009. M article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jan 9 03:42:41 2009 (r186920) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jan 9 03:52:12 2009 (r186921) @@ -29,6 +29,7 @@ 2006 2007 2008 + 2009 The &os; Documentation Project @@ -347,6 +348,12 @@ The &man.fdopendir.3; library function has been added. + The &man.fetch.3; library now support HTTP 1.1 + If-Modified-Since behavior. The &man.fetch.1; program now + supports + which will only download the specified HTTP URL if the content + is newer than filename. + &man.find.1; has been enhanced by the addition of a number of primaries that were present in GNU find but not &os; &man.find.1;. From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 04:38:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9665106564A; Fri, 9 Jan 2009 04:38:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D72488FC13; Fri, 9 Jan 2009 04:38:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n094cM3f042932; Fri, 9 Jan 2009 04:38:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n094cMAX042929; Fri, 9 Jan 2009 04:38:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200901090438.n094cMAX042929@svn.freebsd.org> From: Andrew Thompson Date: Fri, 9 Jan 2009 04:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186922 - in head/sys/dev: usb usb2/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 04:38:23 -0000 Author: thompsa Date: Fri Jan 9 04:38:22 2009 New Revision: 186922 URL: http://svn.freebsd.org/changeset/base/186922 Log: Readd the Alcor Transcend device which is referenced in usb2/storage/umass2.c, regenerate the usb2 dev tables for the scanner additions while I am here. Modified: head/sys/dev/usb/usbdevs head/sys/dev/usb2/include/usb2_devid.h head/sys/dev/usb2/include/usb2_devtable.h Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 9 03:52:12 2009 (r186921) +++ head/sys/dev/usb/usbdevs Fri Jan 9 04:38:22 2009 (r186922) @@ -808,6 +808,7 @@ product AKS USBHASP 0x0001 USB-HASP 0.0 /* Alcor Micro, Inc. products */ product ALCOR2 KBD_HUB 0x2802 Kbd Hub +product ALCOR TRANSCEND 0x6387 Transcend JetFlash Drive product ALCOR MA_KBD_HUB 0x9213 MacAlly Kbd Hub product ALCOR AU9814 0x9215 AU9814 Hub product ALCOR UMCR_9361 0x9361 USB Multimedia Card Reader Modified: head/sys/dev/usb2/include/usb2_devid.h ============================================================================== --- head/sys/dev/usb2/include/usb2_devid.h Fri Jan 9 03:52:12 2009 (r186921) +++ head/sys/dev/usb2/include/usb2_devid.h Fri Jan 9 04:38:22 2009 (r186922) @@ -4,7 +4,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.390 2008/12/23 13:09:17 remko Exp + * FreeBSD: head/sys/dev/usb/usbdevs 186651 2008-12-31 14:25:14Z luigi */ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ @@ -1247,12 +1247,18 @@ #define USB_PRODUCT_EPSON_CX5400 0x0808 /* CX5400 scanner */ #define USB_PRODUCT_EPSON_3500 0x080e /* CX-3500/3600/3650 MFP */ #define USB_PRODUCT_EPSON_RX425 0x080f /* Stylus Photo RX425 scanner */ -#define USB_PRODUCT_EPSON_4800 0x0819 /* CX4800 MP scanner */ -#define USB_PRODUCT_EPSON_4200 0x0820 /* CX4200 MP scanner */ -#define USB_PRODUCT_EPSON_5000 0x082b /* DX-50x0 MFP scanner */ -#define USB_PRODUCT_EPSON_6000 0x082e /* DX-60x0 MFP scanner */ -#define USB_PRODUCT_EPSON_DX7400 0x0838 /* DX7400/CX7300 scanner */ -#define USB_PRODUCT_EPSON_DX8400 0x0839 /* DX8400 scanner */ +#define USB_PRODUCT_EPSON_DX3800 0x0818 /* CX3700/CX3800/DX38x0 MFP scanner */ +#define USB_PRODUCT_EPSON_4800 0x0819 /* CX4700/CX4800/DX48x0 MFP scanner */ +#define USB_PRODUCT_EPSON_4200 0x0820 /* CX4100/CX4200/DX4200 MFP scanner */ +#define USB_PRODUCT_EPSON_5000 0x082b /* CX4900/CX5000/DX50x0 MFP scanner */ +#define USB_PRODUCT_EPSON_6000 0x082e /* CX5900/CX6000/DX60x0 MFP scanner */ +#define USB_PRODUCT_EPSON_DX4000 0x082f /* DX4000 MFP scanner */ +#define USB_PRODUCT_EPSON_DX7400 0x0838 /* CX7300/CX7400/DX7400 MFP scanner */ +#define USB_PRODUCT_EPSON_DX8400 0x0839 /* CX8300/CX8400/DX8400 MFP scanner */ +#define USB_PRODUCT_EPSON_SX100 0x0841 /* SX100/NX100 MFP scanner */ +#define USB_PRODUCT_EPSON_NX300 0x0848 /* NX300 MFP scanner */ +#define USB_PRODUCT_EPSON_SX200 0x0849 /* SX200/SX205 MFP scanner */ +#define USB_PRODUCT_EPSON_SX400 0x084a /* SX400/NX400/TX400 MFP scanner */ /* e-TEK Labs products */ #define USB_PRODUCT_ETEK_1COM 0x8007 /* Serial */ Modified: head/sys/dev/usb2/include/usb2_devtable.h ============================================================================== --- head/sys/dev/usb2/include/usb2_devtable.h Fri Jan 9 03:52:12 2009 (r186921) +++ head/sys/dev/usb2/include/usb2_devtable.h Fri Jan 9 04:38:22 2009 (r186922) @@ -4,7 +4,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.390 2008/12/23 13:09:17 remko Exp + * FreeBSD: head/sys/dev/usb/usbdevs 186651 2008-12-31 14:25:14Z luigi */ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ @@ -2357,40 +2357,76 @@ const struct usb_knowndev usb_knowndevs[ "Stylus Photo RX425 scanner", }, { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX3800, + 0, + "Seiko Epson", + "CX3700/CX3800/DX38x0 MFP scanner", + }, + { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_4800, 0, "Seiko Epson", - "CX4800 MP scanner", + "CX4700/CX4800/DX48x0 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_4200, 0, "Seiko Epson", - "CX4200 MP scanner", + "CX4100/CX4200/DX4200 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_5000, 0, "Seiko Epson", - "DX-50x0 MFP scanner", + "CX4900/CX5000/DX50x0 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_6000, 0, "Seiko Epson", - "DX-60x0 MFP scanner", + "CX5900/CX6000/DX60x0 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX4000, + 0, + "Seiko Epson", + "DX4000 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX7400, 0, "Seiko Epson", - "DX7400/CX7300 scanner", + "CX7300/CX7400/DX7400 MFP scanner", }, { USB_VENDOR_EPSON, USB_PRODUCT_EPSON_DX8400, 0, "Seiko Epson", - "DX8400 scanner", + "CX8300/CX8400/DX8400 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX100, + 0, + "Seiko Epson", + "SX100/NX100 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_NX300, + 0, + "Seiko Epson", + "NX300 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX200, + 0, + "Seiko Epson", + "SX200/SX205 MFP scanner", + }, + { + USB_VENDOR_EPSON, USB_PRODUCT_EPSON_SX400, + 0, + "Seiko Epson", + "SX400/NX400/TX400 MFP scanner", }, { USB_VENDOR_ETEK, USB_PRODUCT_ETEK_1COM, From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 09:04:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622DD10656F7; Fri, 9 Jan 2009 09:04:11 +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 4EEF18FC14; Fri, 9 Jan 2009 09:04:11 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0994BV6047824; Fri, 9 Jan 2009 09:04:11 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0994Axk047818; Fri, 9 Jan 2009 09:04:10 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901090904.n0994Axk047818@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 09:04:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186926 - in vendor/bind9/dist: . lib/dns lib/isc/unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 09:04:12 -0000 Author: dougb Date: Fri Jan 9 09:04:10 2009 New Revision: 186926 URL: http://svn.freebsd.org/changeset/base/186926 Log: Vendor import of BIND 9.4.3-P1 Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/lib/dns/api vendor/bind9/dist/lib/dns/openssldsa_link.c vendor/bind9/dist/lib/dns/opensslrsa_link.c vendor/bind9/dist/lib/isc/unix/socket.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Fri Jan 9 07:27:08 2009 (r186925) +++ vendor/bind9/dist/CHANGES Fri Jan 9 09:04:10 2009 (r186926) @@ -1,3 +1,11 @@ + --- 9.4.3-P1 released --- + +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] --- 9.4.3 released --- Modified: vendor/bind9/dist/lib/dns/api ============================================================================== --- vendor/bind9/dist/lib/dns/api Fri Jan 9 07:27:08 2009 (r186925) +++ vendor/bind9/dist/lib/dns/api Fri Jan 9 09:04:10 2009 (r186926) @@ -1,3 +1,3 @@ LIBINTERFACE = 36 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 0 Modified: vendor/bind9/dist/lib/dns/openssldsa_link.c ============================================================================== --- vendor/bind9/dist/lib/dns/openssldsa_link.c Fri Jan 9 07:27:08 2009 (r186925) +++ vendor/bind9/dist/lib/dns/openssldsa_link.c Fri Jan 9 09:04:10 2009 (r186926) @@ -16,7 +16,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: openssldsa_link.c,v 1.1.6.9 2007/08/28 07:20:04 tbox Exp $ */ +/* $Id: openssldsa_link.c,v 1.1.6.9.28.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, c status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa); DSA_SIG_free(dsasig); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: vendor/bind9/dist/lib/dns/opensslrsa_link.c ============================================================================== --- vendor/bind9/dist/lib/dns/opensslrsa_link.c Fri Jan 9 07:27:08 2009 (r186925) +++ vendor/bind9/dist/lib/dns/opensslrsa_link.c Fri Jan 9 09:04:10 2009 (r186926) @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: opensslrsa_link.c,v 1.1.6.11 2006/11/07 21:28:49 marka Exp $ + * $Id: opensslrsa_link.c,v 1.1.6.11.58.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, c status = RSA_verify(type, digest, digestlen, sig->base, RSA_size(rsa), rsa); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: vendor/bind9/dist/lib/isc/unix/socket.c ============================================================================== --- vendor/bind9/dist/lib/isc/unix/socket.c Fri Jan 9 07:27:08 2009 (r186925) +++ vendor/bind9/dist/lib/isc/unix/socket.c Fri Jan 9 09:04:10 2009 (r186926) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.237.18.56 2008/11/12 03:58:36 marka Exp $ */ +/* $Id: socket.c,v 1.237.18.56.2.1 2008/12/23 00:14:34 marka Exp $ */ /*! \file */ @@ -501,7 +501,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock) if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, (void *)&on, sizeof(on)) < 0) { - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_RECVPKTINFO) " "%s: %s", sock->fd, @@ -3163,7 +3163,6 @@ watcher(void *uap) { ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(1), - ISC_LOG_INFO, "unexpected POLL timeout"); } pollstate = poll_active; @@ -4902,7 +4901,7 @@ isc_socket_ipv6only(isc_socket_t *sock, if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&onoff, sizeof(int)) < 0) { char strbuf[ISC_STRERRORSIZE]; - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_V6ONLY) " "%s: %s", sock->fd, Modified: vendor/bind9/dist/version ============================================================================== --- vendor/bind9/dist/version Fri Jan 9 07:27:08 2009 (r186925) +++ vendor/bind9/dist/version Fri Jan 9 09:04:10 2009 (r186926) @@ -1,4 +1,4 @@ -# $Id: version,v 1.29.134.23 2008/11/12 04:17:12 marka Exp $ +# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=4 PATCHVER=3 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 09:05:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 339FD1065673; Fri, 9 Jan 2009 09:05:30 +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 081018FC0C; Fri, 9 Jan 2009 09:05:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0995TPj047896; Fri, 9 Jan 2009 09:05:29 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0995TGi047895; Fri, 9 Jan 2009 09:05:29 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901090905.n0995TGi047895@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 09:05:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186927 - vendor/bind9/9.4.3-P1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 09:05:31 -0000 Author: dougb Date: Fri Jan 9 09:05:29 2009 New Revision: 186927 URL: http://svn.freebsd.org/changeset/base/186927 Log: Tag the 9.4.3-P1 release Added: vendor/bind9/9.4.3-P1/ - copied from r186926, vendor/bind9/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 09:58:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 916CF1065801; Fri, 9 Jan 2009 09:58:33 +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 7A42A8FC0C; Fri, 9 Jan 2009 09:58:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n099wXIF048900; Fri, 9 Jan 2009 09:58:33 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n099wXFA048898; Fri, 9 Jan 2009 09:58:33 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901090958.n099wXFA048898@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 09:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186928 - in vendor/bind9/dist-9.3: . bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc doc/rfc lib... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 09:58:34 -0000 Author: dougb Date: Fri Jan 9 09:58:33 2009 New Revision: 186928 URL: http://svn.freebsd.org/changeset/base/186928 Log: Vendor import of BIND 9.3.6-P1 Added: vendor/bind9/dist-9.3/bin/nsupdate/nsupdate.1 (contents, props changed) vendor/bind9/dist-9.3/doc/rfc/rfc4648.txt (contents, props changed) vendor/bind9/dist-9.3/doc/rfc/rfc4701.txt (contents, props changed) vendor/bind9/dist-9.3/doc/rfc/rfc5155.txt (contents, props changed) vendor/bind9/dist-9.3/lib/isc/include/isc/portset.h (contents, props changed) vendor/bind9/dist-9.3/lib/isc/portset.c (contents, props changed) Deleted: vendor/bind9/dist-9.3/bin/nsupdate/nsupdate.8 Modified: vendor/bind9/dist-9.3/CHANGES vendor/bind9/dist-9.3/FAQ vendor/bind9/dist-9.3/FAQ.xml vendor/bind9/dist-9.3/README vendor/bind9/dist-9.3/bin/dig/dig.1 vendor/bind9/dist-9.3/bin/dig/dig.c vendor/bind9/dist-9.3/bin/dig/dig.docbook vendor/bind9/dist-9.3/bin/dig/dig.html vendor/bind9/dist-9.3/bin/dig/dighost.c vendor/bind9/dist-9.3/bin/dig/host.1 vendor/bind9/dist-9.3/bin/dig/host.docbook vendor/bind9/dist-9.3/bin/dig/host.html vendor/bind9/dist-9.3/bin/dnssec/dnssec-keygen.8 vendor/bind9/dist-9.3/bin/dnssec/dnssec-keygen.docbook vendor/bind9/dist-9.3/bin/dnssec/dnssec-keygen.html vendor/bind9/dist-9.3/bin/dnssec/dnssec-signzone.8 vendor/bind9/dist-9.3/bin/dnssec/dnssec-signzone.c vendor/bind9/dist-9.3/bin/dnssec/dnssec-signzone.docbook vendor/bind9/dist-9.3/bin/dnssec/dnssec-signzone.html vendor/bind9/dist-9.3/bin/named/client.c vendor/bind9/dist-9.3/bin/named/config.c vendor/bind9/dist-9.3/bin/named/controlconf.c vendor/bind9/dist-9.3/bin/named/include/named/globals.h vendor/bind9/dist-9.3/bin/named/interfacemgr.c vendor/bind9/dist-9.3/bin/named/lwresd.8 vendor/bind9/dist-9.3/bin/named/lwresd.c vendor/bind9/dist-9.3/bin/named/lwresd.docbook vendor/bind9/dist-9.3/bin/named/lwresd.html vendor/bind9/dist-9.3/bin/named/main.c vendor/bind9/dist-9.3/bin/named/named.8 vendor/bind9/dist-9.3/bin/named/named.conf.5 vendor/bind9/dist-9.3/bin/named/named.conf.docbook vendor/bind9/dist-9.3/bin/named/named.conf.html vendor/bind9/dist-9.3/bin/named/named.docbook vendor/bind9/dist-9.3/bin/named/named.html vendor/bind9/dist-9.3/bin/named/query.c vendor/bind9/dist-9.3/bin/named/server.c vendor/bind9/dist-9.3/bin/named/unix/include/named/os.h vendor/bind9/dist-9.3/bin/named/unix/os.c vendor/bind9/dist-9.3/bin/named/update.c vendor/bind9/dist-9.3/bin/nsupdate/Makefile.in vendor/bind9/dist-9.3/bin/nsupdate/nsupdate.docbook vendor/bind9/dist-9.3/bin/nsupdate/nsupdate.html vendor/bind9/dist-9.3/bin/rndc/rndc-confgen.c vendor/bind9/dist-9.3/bin/rndc/rndc.c vendor/bind9/dist-9.3/configure.in vendor/bind9/dist-9.3/doc/arm/Bv9ARM-book.xml vendor/bind9/dist-9.3/doc/arm/Bv9ARM.ch02.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.ch04.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.html vendor/bind9/dist-9.3/doc/arm/Bv9ARM.pdf vendor/bind9/dist-9.3/doc/misc/options vendor/bind9/dist-9.3/doc/rfc/index vendor/bind9/dist-9.3/lib/bind/api vendor/bind9/dist-9.3/lib/bind/bsd/Makefile.in vendor/bind9/dist-9.3/lib/bind/bsd/strerror.c vendor/bind9/dist-9.3/lib/bind/bsd/strtoul.c vendor/bind9/dist-9.3/lib/bind/configure.in vendor/bind9/dist-9.3/lib/bind/dst/Makefile.in vendor/bind9/dist-9.3/lib/bind/dst/dst_api.c vendor/bind9/dist-9.3/lib/bind/dst/hmac_link.c vendor/bind9/dist-9.3/lib/bind/dst/support.c vendor/bind9/dist-9.3/lib/bind/include/arpa/nameser.h vendor/bind9/dist-9.3/lib/bind/include/isc/assertions.h vendor/bind9/dist-9.3/lib/bind/include/isc/misc.h vendor/bind9/dist-9.3/lib/bind/include/resolv.h vendor/bind9/dist-9.3/lib/bind/inet/Makefile.in vendor/bind9/dist-9.3/lib/bind/inet/inet_net_pton.c vendor/bind9/dist-9.3/lib/bind/irs/Makefile.in vendor/bind9/dist-9.3/lib/bind/irs/dns_ho.c vendor/bind9/dist-9.3/lib/bind/irs/irp.c vendor/bind9/dist-9.3/lib/bind/isc/Makefile.in vendor/bind9/dist-9.3/lib/bind/isc/assertions.c vendor/bind9/dist-9.3/lib/bind/isc/bitncmp.c vendor/bind9/dist-9.3/lib/bind/isc/ctl_clnt.c vendor/bind9/dist-9.3/lib/bind/isc/ctl_srvr.c vendor/bind9/dist-9.3/lib/bind/nameser/Makefile.in vendor/bind9/dist-9.3/lib/bind/port_after.h.in vendor/bind9/dist-9.3/lib/bind/resolv/Makefile.in vendor/bind9/dist-9.3/lib/bind/resolv/res_debug.c vendor/bind9/dist-9.3/lib/bind/resolv/res_mkquery.c vendor/bind9/dist-9.3/lib/bind/resolv/res_query.c vendor/bind9/dist-9.3/lib/bind9/api vendor/bind9/dist-9.3/lib/bind9/check.c vendor/bind9/dist-9.3/lib/dns/adb.c vendor/bind9/dist-9.3/lib/dns/api vendor/bind9/dist-9.3/lib/dns/cache.c vendor/bind9/dist-9.3/lib/dns/dispatch.c vendor/bind9/dist-9.3/lib/dns/include/dns/dispatch.h vendor/bind9/dist-9.3/lib/dns/journal.c vendor/bind9/dist-9.3/lib/dns/masterdump.c vendor/bind9/dist-9.3/lib/dns/message.c vendor/bind9/dist-9.3/lib/dns/openssldsa_link.c vendor/bind9/dist-9.3/lib/dns/opensslrsa_link.c vendor/bind9/dist-9.3/lib/dns/rbt.c vendor/bind9/dist-9.3/lib/dns/rdata/generic/nsec_47.c vendor/bind9/dist-9.3/lib/dns/rdata/generic/nsec_47.h vendor/bind9/dist-9.3/lib/dns/rdata/generic/txt_16.c vendor/bind9/dist-9.3/lib/dns/rdata/in_1/naptr_35.c vendor/bind9/dist-9.3/lib/dns/request.c vendor/bind9/dist-9.3/lib/dns/resolver.c vendor/bind9/dist-9.3/lib/dns/validator.c vendor/bind9/dist-9.3/lib/dns/view.c vendor/bind9/dist-9.3/lib/dns/xfrin.c vendor/bind9/dist-9.3/lib/isc/Makefile.in vendor/bind9/dist-9.3/lib/isc/api vendor/bind9/dist-9.3/lib/isc/assertions.c vendor/bind9/dist-9.3/lib/isc/include/isc/assertions.h vendor/bind9/dist-9.3/lib/isc/include/isc/mem.h vendor/bind9/dist-9.3/lib/isc/include/isc/msgs.h vendor/bind9/dist-9.3/lib/isc/include/isc/platform.h.in vendor/bind9/dist-9.3/lib/isc/include/isc/resource.h vendor/bind9/dist-9.3/lib/isc/include/isc/socket.h vendor/bind9/dist-9.3/lib/isc/include/isc/timer.h vendor/bind9/dist-9.3/lib/isc/include/isc/types.h vendor/bind9/dist-9.3/lib/isc/mem.c vendor/bind9/dist-9.3/lib/isc/print.c vendor/bind9/dist-9.3/lib/isc/pthreads/mutex.c vendor/bind9/dist-9.3/lib/isc/timer.c vendor/bind9/dist-9.3/lib/isc/unix/app.c vendor/bind9/dist-9.3/lib/isc/unix/include/isc/net.h vendor/bind9/dist-9.3/lib/isc/unix/net.c vendor/bind9/dist-9.3/lib/isc/unix/resource.c vendor/bind9/dist-9.3/lib/isc/unix/socket.c vendor/bind9/dist-9.3/lib/isc/unix/socket_p.h vendor/bind9/dist-9.3/lib/isc/unix/time.c vendor/bind9/dist-9.3/lib/isccfg/api vendor/bind9/dist-9.3/lib/isccfg/namedconf.c vendor/bind9/dist-9.3/version Modified: vendor/bind9/dist-9.3/CHANGES ============================================================================== --- vendor/bind9/dist-9.3/CHANGES Fri Jan 9 09:05:29 2009 (r186927) +++ vendor/bind9/dist-9.3/CHANGES Fri Jan 9 09:58:33 2009 (r186928) @@ -1,14 +1,154 @@ - --- 9.3.5-P2 released --- + --- 9.3.6-P1 released --- -2406. [bug] Some operating systems have FD_SETSIZE set to a - low value by default, which can cause resource - exhaustion when many simultaneous connections are - open. Linux in particular makes it difficult to - increase this value. To use more sockets with - select(), set ISC_SOCKET_FDSETSIZE. Example: - STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure - (This should not be necessary in most cases, and - never for an authoritative-only server.) [RT #18328] +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] + + --- 9.3.6 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.3.6rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.3.6b1 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] 2404. [port] hpux: files unlimited support. @@ -22,7 +162,7 @@ 2399. [bug] Abort timeout queries to reduce the number of open UDP sockets. [RT #18367] -2398. [bug] Improve file descriptor management. New, +2398. [bug] Improve file descriptor management. New, temporary, named.conf option reserved-sockets, default 512. [RT #18344] @@ -39,11 +179,111 @@ 2392. [bug] remove 'grep -q' from acl test script, some platforms don't support it. [RT #18253] - --- 9.3.5-P1 released --- +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add a description SSHFP to ARM. + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] -2375. [security] Fully randomize UDP query ports to improve +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve forgery resilience. [RT #17949] +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger an assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2325. [port] Linux: use capset() function if available. [RT #17557] + --- 9.3.5 released --- --- 9.3.5rc2 released --- @@ -65,11 +305,11 @@ 2322. [port] MacOS: work around the limitation of setrlimit() for RLIMIT_NOFILE. [RT #17526] -2321. [bug] Silence Coverity warnings in lib/dns/master.c, +2321. [bug] Silence Coverity warnings in lib/dns/master.c, lib/dns/rbtdb.c, lib/isccfg/namedconf.c, lib/dns/tsig.c and bin/dnssec/dnssec-signzone.c. -2319. [bug] Silence Coverity warnings in +2319. [bug] Silence Coverity warnings in lib/dns/rdata/in_1/apl_42.c. [RT #17469] 2318. [port] sunos fixes for libbind. [RT #17514] @@ -83,7 +323,7 @@ 2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. [RT #17458] -2311. [func] Update ACL regression test. [RT #17462] +2311. [func] Update ACL regression test. [RT #17462] 2310. [bug] dig, host, nslookup: flush stdout before emitting debug/fatal messages. [RT #17501] @@ -106,7 +346,7 @@ 2301. [bug] Remove resource leak and fix error messages in bin/tests/system/lwresd/lwtest.c. [RT #17474] -2300. [bug] Fixed failure to close open file in +2300. [bug] Fixed failure to close open file in bin/tests/names/t_names.c. [RT #17473] 2299. [bug] Remove unnecessary NULL check in @@ -129,7 +369,7 @@ 2292. [bug] Log if the working directory is not writable. [RT #17312] -2291. [bug] PR_SET_DUMPABLE may be set too late. Also report +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report failure to set PR_SET_DUMPABLE. [RT #17312] 2290. [bug] Let AD in the query signal that the client wants AD @@ -148,7 +388,7 @@ memory context rather than the clients memory context. [RT #17377] -2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, to protect applications from receiving spurious SIGPIPE signals when using the resolver. @@ -157,7 +397,7 @@ --- 9.3.5b1 released --- -2273. [bug] Adjust log level to WARNING when saving inconsistant +2273. [bug] Adjust log level to WARNING when saving inconsistent stub/slave master and journal files. [RT# 17279] 2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. @@ -194,10 +434,10 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested +2249. [bug] Only set Authentic Data bit if client requested DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2247. [doc] Sort doc/misc/options. [RT #17067] @@ -208,18 +448,18 @@ working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] 2236. [bug] dnssec-signzone failed to preserve the case of of wildcard owner names. [RT #17085] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2229. [bug] Null pointer dereference on query pool creation - failure. [RT #17133] - + failure. [RT #17133] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -230,10 +470,10 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] -2226. [bug] Fix build error. [RT #17124] +2226. [bug] Fix build error. [RT #17124] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -247,12 +487,12 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - + 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2214. [bug] Deregister OpenSSL lock callback when cleaning up. [RT #17098] @@ -297,7 +537,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -324,7 +564,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -444,7 +684,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -453,7 +693,7 @@ 2203. [security] Query id generation was cryptographically weak. [RT # 16915] - + 2193. [port] win32: BINDInstall.exe is now linked statically. [RT #16906] @@ -463,7 +703,7 @@ --- 9.3.4 released --- -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2124. [security] It was possible to dereference a freed fetch context. [RT #16584] @@ -477,14 +717,14 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. 2101. [bug] OpenSSL version checks were not quite right. [RT #16476] 2100. [port] win32: copy libeay32.dll to Build\Debug. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. --- 9.3.3rc3 released --- @@ -493,12 +733,12 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -588,7 +828,7 @@ [RT #16287] 2049. [bug] Restore SOA before AXFR when falling back from - a attempted IXFR when transfering in a zone. + a attempted IXFR when transferring in a zone. Allow a initial SOA query before attempting a AXFR to be requested. [RT #16156] @@ -597,7 +837,7 @@ the OS always returned the same local port. [RT #16182] -2047. [bug] Failed to initialise the interface flags to zero. +2047. [bug] Failed to initialize the interface flags to zero. [RT #16245] 2043. [port] nsupdate/nslookup: Force the flushing of the prompt @@ -626,7 +866,7 @@ 2029. [bug] host printed out the server multiple times when specified on the command line. [RT #15992] -2028. [port] linux: socket.c compatability for old systems. +2028. [port] linux: socket.c compatibility for old systems. [RT #16015] 2027. [port] libbind: Solaris x86 support. [RT #16020] @@ -634,7 +874,7 @@ 2026. [bug] Rate limit the two recursive client exceeded messages. [RT #16044] -2024. [bug] named emited spurious "zone serial unchanged" +2024. [bug] named emitted spurious "zone serial unchanged" messages on reload. [RT #16027] 2023. [bug] "make install" should create ${localstatedir}/run and @@ -647,7 +887,7 @@ 2013. [bug] Handle unexpected TSIGs on unsigned AXFR/IXFR responses more gracefully. [RT #15941] -2009. [bug] libbind: coverity fixes. [RT #15808] +2009. [bug] libbind: Coverity fixes. [RT #15808] 2005. [bug] libbind: Retransmission timeouts should be based on which attempt it is to the nameserver @@ -679,16 +919,16 @@ 1994. [port] OpenSSL 0.9.8 support. [RT #15694] -1993. [bug] Log messsage, via syslog, were missing the space +1993. [bug] Log messages, via syslog, were missing the space after the timestamp if "print-time yes" was specified. [RT #15844] 1991. [cleanup] The configuration data, once read, should be treated - as readonly. Expand the use of const to enforce this + as read only. Expand the use of const to enforce this at compile time. [RT #15813] 1990. [bug] libbind: isc's override of broken gettimeofday() - implementions was not always effective. + implementations was not always effective. [RT #15709] 1989. [bug] win32: don't check the service password when @@ -703,7 +943,7 @@ server for the zone. Also any zones that contain DLV records should be removed when upgrading a slave zone. You do not however have to upgrade all - servers for a zone with DLV records simultaniously. + servers for a zone with DLV records simultaneously. 1982. [bug] DNSKEY was being accepted on the parent side of a delegation. KEY is still accepted there for @@ -728,7 +968,7 @@ 1974. [doc] List each of the zone types and associated zone options separately in the ARM. -1972. [contrib] DBUS dynamic forwarders integation from +1972. [contrib] DBUS dynamic forwarders integration from Jason Vas Dias . 1971. [port] linux: make detection of missing IF_NAMESIZE more @@ -745,7 +985,7 @@ 1966. [bug] Don't set CD when we have fallen back to plain DNS. [RT #15727] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -767,7 +1007,7 @@ by native compiler. See README for additional cross compile support information. [RT #15148] -1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998] +1955. [bug] Pre-allocate the cache cleaning iterator. [RT #14998] 1952. [port] hpux: tell the linker to build a runtime link path "-Wl,+b:". [RT #14816]. @@ -775,7 +1015,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -803,7 +1043,7 @@ 1940. [bug] Fixed a number of error conditions reported by Coverity. -1939. [bug] The resolver could dereference a null pointer after +1939. [bug] The resolver could dereference a null pointer after validation if all the queries have timed out. [RT #15528] @@ -848,7 +1088,7 @@ 1914. [protocol] DS is required to accept mnemonic algorithms (RFC 4034). Still emit numeric algorithms for - compatability with RFC 3658. [RT #15354] + compatibility with RFC 3658. [RT #15354] 1911. [bug] Update windows socket code. [RT #14965] @@ -892,7 +1132,7 @@ 1881. [func] Add a system test for named-checkconf. [RT #14931] 1877. [bug] Fix unreasonably low quantum on call to - dns_rbt_destroy2(). Remove unnecessay unhash_node() + dns_rbt_destroy2(). Remove unnecessary unhash_node() call. [RT #14919] 1875. [bug] process_dhtkey() was using the wrong memory context @@ -951,24 +1191,24 @@ 1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591] 1849. [doc] All forms of the man pages (docbook, man, html) should - have consistant copyright dates. + have consistent copyright dates. 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . -1845. [bug] Improve error reporting to distingish between +1845. [bug] Improve error reporting to distinguish between accept()/fcntl() and socket()/fcntl() errors. [RT #13745] 1844. [bug] inet_pton() accepted more that 4 hexadecimal digits for each 16 bit piece of the IPv6 address. The text - representation of a IPv6 address has been tighted + representation of a IPv6 address has been tightened to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt). [RT #5662] @@ -1026,7 +1266,7 @@ 1822. [bug] check-names test for RT was reversed. [RT #13382] -1821. [doc] acls definitions are no longer required to be +1821. [doc] acls definitions are no longer required to be in named.conf prior to reference. They can be defined after being referenced. @@ -1052,7 +1292,7 @@ 1807. [bug] When forwarding (forward only) set the active domain from the forward zone name. [RT #13526] - + 1804. [bug] Ensure that if we are queried for glue that it fits in the additional section or TC is set to tell the client to retry using TCP. [RT #10114] @@ -1165,7 +1405,7 @@ 1765. [bug] configure --with-openssl=auto failed. [RT #12937] 1764. [bug] dns_zone_replacedb failed to emit a error message - if there was no SOA record in the replacment db. + if there was no SOA record in the replacement db. [RT #13016] 1762. [bug] isc_interfaceiter_create() could return ISC_R_SUCCESS @@ -1180,7 +1420,7 @@ 1759. [bug] Named failed to startup if the OS supported IPv6 but had no IPv6 interfaces configured. [RT #12942] -1754. [bug] We wern't always attempting to query the parent +1754. [bug] We weren't always attempting to query the parent server for the DS records at the zone cut. [RT #12774] @@ -1199,7 +1439,7 @@ 1749. [bug] 'check-names response ignore;' failed to ignore. [RT #12866] -1747. [bug] BIND 8 compatability: named/named-checkconf failed +1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. 1745. [bug] Dig/host/nslookup accept replies from link locals @@ -1213,7 +1453,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -1224,7 +1464,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -1239,7 +1479,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -1277,7 +1517,7 @@ [RT #12519] 1721. [bug] Error message from the journal processing were not - always identifing the relevent journal. [RT #12519] + always identifying the relevant journal. [RT #12519] 1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1 negative response. [RT #12506] @@ -1330,7 +1570,7 @@ 1703. [bug] named would loop sending NOTIFY messages when it failed to receive a response. [RT #12322] -1702. [bug] also-notify should not be applied to builtin zones. +1702. [bug] also-notify should not be applied to built in zones. [RT #12323] 1701. [doc] A minimal named.conf man page. @@ -1402,7 +1642,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -1473,7 +1713,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -1486,7 +1726,7 @@ masters with keys are specified. 1644. [bug] Update the journal modification time after a - sucessfull refresh query. [RT #11436] + successful refresh query. [RT #11436] 1643. [bug] dns_db_closeversion() could leak memory / node references. [RT #11163] @@ -1505,11 +1745,11 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if - a error had occured. The database version no longer + a error had occurred. The database version no longer matched the version of the database that was dumped. 1635. [bug] Memory leak on error in query_addds(). @@ -1542,7 +1782,7 @@ 1625. [bug] named failed to load/transfer RFC2535 signed zones which contained CNAMES. [RT# 11237] -1606. [bug] DLV insecurity proof was failing. +1606. [bug] DLV insecurity proof was failing. 1605. [func] New dns_db_find() option DNS_DBFIND_COVERINGNSEC. @@ -1618,14 +1858,14 @@ 1604. [bug] A xfrout_ctx_create() failure would result in xfrout_ctx_destroy() being called with a partially initialized structure. - + 1603. [bug] nsupdate: set interactive based on isatty(). [RT# 10929] 1602. [bug] Logging to a file failed unless a size was specified. [RT# 10925] -1601. [bug] Silence spurious warning 'both "recursion no;" and +1601. [bug] Silence spurious warning 'both "recursion no;" and "allow-recursion" active' warning from view "_bind". [RT# 10920] @@ -1860,7 +2100,7 @@ type, class and responding nameserver. 1511. [bug] delegation-only was generating false positives - on negative answers from subzones. + on negative answers from sub-zones. 1510. [func] New view option "root-delegation-only". Apply delegation-only check to all TLDs and root. @@ -3568,7 +3808,7 @@ 954. [bug] When requesting AXFRs or IXFRs using dig, host, or nslookup, the RD bit should not be set as zone - transfers are inherently nonrecursive. [RT #1575] + transfers are inherently non-recursive. [RT #1575] 953. [func] The /var/run/named.key file from change #843 has been replaced by /etc/rndc.key. Both @@ -3841,7 +4081,7 @@ 860. [func] Drop cross class glue in zone transfers. 859. [bug] Cache cleaning now won't swamp the CPU if there - is a persistent overlimit condition. + is a persistent over limit condition. 858. [func] isc_mem_setwater() no longer requires that when the callback function is non-NULL then its hi_water @@ -4017,7 +4257,7 @@ 811. [bug] Parentheses were not quoted in zone dumps. [RT #1194] 810. [bug] The signer name in SIG records was not properly - downcased when signing/verifying records. [RT #1186] + down-cased when signing/verifying records. [RT #1186] 809. [bug] Configuring a non-local address as a transfer-source could cause an assertion failure during load. @@ -4029,9 +4269,9 @@ ignored like it should be. 806. [bug] DNS_R_SEENINCLUDE was failing to propagate back up - the calling stack to the zone maintence level, causing - zones to not reload when an included file was touched - but the top-level zone file was not. + the calling stack to the zone maintenance level, + causing zones to not reload when an included file was + touched but the top-level zone file was not. 805. [bug] When using "forward only", missing root hints should not cause queries to fail. [RT #1143] @@ -4071,7 +4311,7 @@ in rndc.conf. 793. [cleanup] The DNSSEC tools could create filenames that were - illegal or contained shell metacharacters. They + illegal or contained shell meta-characters. They now use a different text encoding of names that doesn't have these problems. [RT #1101] @@ -4095,7 +4335,7 @@ names when mapping them into file names. 786. [bug] When DNSSEC signing/verifying data, owner names were - not properly downcased. + not properly down-cased. 785. [bug] A race condition in the resolver could cause an assertion failure. [RT #673, #872, #1048] @@ -4114,7 +4354,7 @@ 780. [bug] Error handling code dealing with out of memory or other rare errors could lead to assertion failures - by calling functions on unitialized names. [RT #1065] + by calling functions on uninitialized names. [RT #1065] 779. [func] Added the "minimal-responses" option. @@ -4257,7 +4497,7 @@ 735. [doc] Add BIND 4 migration notes. 734. [bug] An attempt to re-lock the zone lock could occur if - the server was shutdown during a zone tranfer. + the server was shutdown during a zone transfer. [RT #830] 733. [bug] Reference counts of dns_acl_t objects need to be @@ -4397,7 +4637,7 @@ 688. [func] "make tags" now works on systems with the "Exuberant Ctags" etags. - 687. [bug] Only say we have IPv6, with sufficent functionality, + 687. [bug] Only say we have IPv6, with sufficient functionality, if it has actually been tested. [RT #586] 686. [bug] dig and nslookup can now be properly aborted during @@ -4713,7 +4953,7 @@ --- 9.1.0b1 released --- 591. [bug] Work around non-reentrancy in openssl by disabling - precomputation in keys. + pre-computation in keys. 590. [doc] There are now man pages for the lwres library in doc/man/lwres. @@ -4762,7 +5002,7 @@ source address for notify messages. 577. [func] Log illegal RDATA combinations. e.g. multiple - singlton types, cname and other data. + singleton types, cname and other data. 576. [doc] isc_log_create() description did not match reality. @@ -4773,7 +5013,7 @@ have their responses validated and would leak memory. 573. [bug] The journal files of IXFRed slave zones were - inadvertantly discarded on server reload, causing + inadvertently discarded on server reload, causing "journal out of sync with zone" errors on subsequent reloads. [RT #482] @@ -4938,7 +5178,7 @@ others). 519. [bug] dns_name_split() would improperly split some bitstring - labels, zeroing a few of the least signficant bits in + labels, zeroing a few of the least significant bits in the prefix part. When such an improperly created prefix was returned to the RBT database, the bogus label was dutifully stored, corrupting the tree. @@ -4966,7 +5206,7 @@ 513. [func] New functionality added to rdnc and server to allow individual zones to be refreshed or reloaded. - 512. [bug] The zone transfer code could throw an execption with + 512. [bug] The zone transfer code could throw an exception with an invalid IXFR stream. 511. [bug] The message code could throw an assertion on an @@ -5157,7 +5397,7 @@ 452. [bug] Warn if the unimplemented option "statistics-file" is specified in named.conf. [RT #301] - 451. [func] Update forwarding implememted. + 451. [func] Update forwarding implemented. 450. [func] New function ns_client_sendraw(). @@ -5258,7 +5498,7 @@ e.g. due to corrupt zones with multiple SOA records. [RT #279] - 423. [bug] When responding to a recusive query, errors that occur + 423. [bug] When responding to a recursive query, errors that occur after following a CNAME should cause the query to fail. [RT #274] @@ -5303,7 +5543,7 @@ 409. [bug] If named was shut down early in the startup process, ns_omapi_shutdown() would attempt to lock - an unintialized mutex. [RT #262] + an uninitialized mutex. [RT #262] 408. [bug] stub zones could leak memory and reference counts if all the masters were unreachable. @@ -5370,7 +5610,7 @@ making the functions dns_zone_adddbarg() and dns_zone_cleardbargs() unnecessary. - 389. [bug] Attempting to send a reqeust over IPv6 using + 389. [bug] Attempting to send a request over IPv6 using dns_request_create() on a system without IPv6 support caused an assertion failure [RT #235]. @@ -5427,7 +5667,7 @@ of a very large RRset could cause an assertion failure during logging. - 370. [bug] The error messages for rollforward failures were + 370. [bug] The error messages for roll-forward failures were overly terse. 369. [func] Support new named.conf options, view and zone @@ -5569,7 +5809,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 09:59:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C6031065729; Fri, 9 Jan 2009 09:59:34 +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 D491C8FC18; Fri, 9 Jan 2009 09:59:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n099xXqJ048961; Fri, 9 Jan 2009 09:59:33 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n099xXI6048960; Fri, 9 Jan 2009 09:59:33 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901090959.n099xXI6048960@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 09:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186929 - vendor/bind9/9.3.6-P1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 09:59:35 -0000 Author: dougb Date: Fri Jan 9 09:59:33 2009 New Revision: 186929 URL: http://svn.freebsd.org/changeset/base/186929 Log: Tag the 9.3.6-P1 release Added: vendor/bind9/9.3.6-P1/ - copied from r186928, vendor/bind9/dist-9.3/ From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 10:11:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BA4410656C1; Fri, 9 Jan 2009 10:11:53 +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 69E928FC23; Fri, 9 Jan 2009 10:11:53 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09ABrkW049342; Fri, 9 Jan 2009 10:11:53 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09ABrIf049341; Fri, 9 Jan 2009 10:11:53 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091011.n09ABrIf049341@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 10:11:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186930 - vendor/bind9/dist-9.3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:11:54 -0000 Author: dougb Date: Fri Jan 9 10:11:53 2009 New Revision: 186930 URL: http://svn.freebsd.org/changeset/base/186930 Log: Incorporate the changes to ../dist/FREEBSD-Xlist through r186452 Modified: vendor/bind9/dist-9.3/FREEBSD-Xlist Modified: vendor/bind9/dist-9.3/FREEBSD-Xlist ============================================================================== --- vendor/bind9/dist-9.3/FREEBSD-Xlist Fri Jan 9 09:59:33 2009 (r186929) +++ vendor/bind9/dist-9.3/FREEBSD-Xlist Fri Jan 9 10:11:53 2009 (r186930) @@ -2,15 +2,17 @@ # Misc. stuff .cvsignore -aclocal.m4 -bin/tests -config.h.in configure contrib docutil + +# Tests +bin/tests +lib/tests + +# Doc stuff doc/arm/latex-fixup.pl doc/xsl -lib/tests # Windows directories bin/check/win32 @@ -32,9 +34,7 @@ lib/win32 win32utils # Various ports to other OSs -lib/bind/port/aix32 -lib/bind/port/aix4 -lib/bind/port/aix5 +lib/bind/port/aix* lib/bind/port/aux3 lib/bind/port/bsdos lib/bind/port/bsdos2 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 10:16:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2C241065675; Fri, 9 Jan 2009 10:16:20 +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 8E2F78FC1C; Fri, 9 Jan 2009 10:16:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09AGKcH049471; Fri, 9 Jan 2009 10:16:20 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09AGKTi049467; Fri, 9 Jan 2009 10:16:20 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091016.n09AGKTi049467@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 10:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186931 - in vendor/bind9/dist-9.3: . lib/bind X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:16:21 -0000 Author: dougb Date: Fri Jan 9 10:16:19 2009 New Revision: 186931 URL: http://svn.freebsd.org/changeset/base/186931 Log: Vendor import of BIND 9.3.6-P1 Added: vendor/bind9/dist-9.3/aclocal.m4 vendor/bind9/dist-9.3/config.h.in (contents, props changed) vendor/bind9/dist-9.3/lib/bind/aclocal.m4 vendor/bind9/dist-9.3/lib/bind/config.h.in (contents, props changed) Added: vendor/bind9/dist-9.3/aclocal.m4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bind9/dist-9.3/aclocal.m4 Fri Jan 9 10:16:19 2009 (r186931) @@ -0,0 +1,2 @@ +sinclude(./libtool.m4)dnl + Added: vendor/bind9/dist-9.3/config.h.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bind9/dist-9.3/config.h.in Fri Jan 9 10:16:19 2009 (r186931) @@ -0,0 +1,308 @@ +/* config.h.in. Generated from configure.in by autoheader. */ +/* + * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1999-2003 Internet Software Consortium. + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH + * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, + * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE + * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +/* $Id: config.h.in,v 1.47.2.3.2.36 2008/10/21 02:48:34 marka Exp $ */ + +/*** + *** This file is not to be included by any public header files, because + *** it does not get installed. + ***/ + +/* define to `int' if doesn't define. */ +#undef ssize_t + +/* define on DEC OSF to enable 4.4BSD style sa_len support */ +#undef _SOCKADDR_LEN + +/* define if your system needs pthread_init() before using pthreads */ +#undef NEED_PTHREAD_INIT + +/* define if your system has sigwait() */ +#undef HAVE_SIGWAIT + +/* define if sigwait() is the UnixWare flavor */ +#undef HAVE_UNIXWARE_SIGWAIT + +/* define on Solaris to get sigwait() to work using pthreads semantics */ +#undef _POSIX_PTHREAD_SEMANTICS + +/* define if LinuxThreads is in use */ +#undef HAVE_LINUXTHREADS + +/* define if sysconf() is available */ +#undef HAVE_SYSCONF + +/* define if sysctlbyname() is available */ +#undef HAVE_SYSCTLBYNAME + +/* define if catgets() is available */ +#undef HAVE_CATGETS + +/* define if getifaddrs() exists */ +#undef HAVE_GETIFADDRS + +/* define if you have the NET_RT_IFLIST sysctl variable and sys/sysctl.h */ +#undef HAVE_IFLIST_SYSCTL + +/* define if chroot() is available */ +#undef HAVE_CHROOT + +/* define if tzset() is available */ +#undef HAVE_TZSET + +/* define if struct addrinfo exists */ +#undef HAVE_ADDRINFO + +/* define if getaddrinfo() exists */ +#undef HAVE_GETADDRINFO + +/* define if gai_strerror() exists */ +#undef HAVE_GAISTRERROR + +/* define if arc4random() exists */ +#undef HAVE_ARC4RANDOM + +/* define if pthread_setconcurrency() should be called to tell the + * OS how many threads we might want to run. + */ +#undef CALL_PTHREAD_SETCONCURRENCY + +/* define if IPv6 is not disabled */ +#undef WANT_IPV6 + +/* define if flockfile() is available */ +#undef HAVE_FLOCKFILE + +/* define if getc_unlocked() is available */ +#undef HAVE_GETCUNLOCKED + +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +#undef SHUTUP_SPUTAUX +#ifdef SHUTUP_SPUTAUX +struct __sFILE; +extern __inline int __sputaux(int _c, struct __sFILE *_p); +#endif + +/* Shut up warnings about missing sigwait prototype on BSD/OS 4.0* */ +#undef SHUTUP_SIGWAIT +#ifdef SHUTUP_SIGWAIT +int sigwait(const unsigned int *set, int *sig); +#endif + +/* Shut up warnings from gcc -Wcast-qual on BSD/OS 4.1. */ +#undef SHUTUP_STDARG_CAST +#if defined(SHUTUP_STDARG_CAST) && defined(__GNUC__) +#include /* Grr. Must be included *every time*. */ +/* + * The silly continuation line is to keep configure from + * commenting out the #undef. + */ +#undef \ + va_start +#define va_start(ap, last) \ + do { \ + union { const void *konst; long *var; } _u; \ + _u.konst = &(last); \ + ap = (va_list)(_u.var + __va_words(__typeof(last))); \ + } while (0) +#endif /* SHUTUP_STDARG_CAST && __GNUC__ */ + +/* define if the system has a random number generating device */ +#undef PATH_RANDOMDEV + +/* define if pthread_attr_getstacksize() is available */ +#undef HAVE_PTHREAD_ATTR_GETSTACKSIZE + +/* define if pthread_attr_setstacksize() is available */ +#undef HAVE_PTHREAD_ATTR_SETSTACKSIZE + +/* define if you have strerror in the C library. */ +#undef HAVE_STRERROR + +/* Define if you are running under Compaq TruCluster. */ +#undef HAVE_TRUCLUSTER + +/* Define if OpenSSL includes DSA support */ +#undef HAVE_OPENSSL_DSA + +/* Define to the length type used by the socket API (socklen_t, size_t, int). */ +#undef ISC_SOCKADDR_LEN_T + +/* Define if threads need PTHREAD_SCOPE_SYSTEM */ +#undef NEED_PTHREAD_SCOPE_SYSTEM + +/* Define if recvmsg() does not meet all of the BSD socket API specifications. + */ +#undef BROKEN_RECVMSG + +/* Define if you cannot bind() before connect() for TCP sockets. */ +#undef BROKEN_TCP_BIND_BEFORE_CONNECT + +/* Solaris hack to get select_large_fdset. */ +#undef FD_SETSIZE + +/* Define to 1 if you have the `capset' function. */ +#undef HAVE_CAPSET + +/* Define to 1 if you have the header file. */ +#undef HAVE_DLFCN_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the `c' library (-lc). */ +#undef HAVE_LIBC + +/* Define to 1 if you have the `c_r' library (-lc_r). */ +#undef HAVE_LIBC_R + +/* Define to 1 if you have the `nsl' library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define to 1 if you have the `pthread' library (-lpthread). */ +#undef HAVE_LIBPTHREAD + +/* Define to 1 if you have the `scf' library (-lscf). */ +#undef HAVE_LIBSCF + +/* Define to 1 if you have the `socket' library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define to 1 if you have the `thr' library (-lthr). */ +#undef HAVE_LIBTHR + +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_CAPABILITY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_NET_IF6_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CAPABILITY_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DEVPOLL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_DYNTUNE_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PRCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKIO_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if running under Compaq TruCluster */ +#undef HAVE_TRUCLUSTER + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Defined if extern char *optarg is not declared. */ +#undef NEED_OPTARG + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Sets which flag to pass to open/fcntl to make non-blocking + (O_NDELAY/O_NONBLOCK). */ +#undef PORT_NONBLOCK + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define to 1 if you can safely include both and . */ +#undef TIME_WITH_SYS_TIME + +/* Defined if you need to use ioctl(FIONBIO) instead a fcntl call to make + non-blocking. */ +#undef USE_FIONBIO_IOCTL + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +#undef WORDS_BIGENDIAN + +/* Define to empty if `const' does not conform to ANSI C. */ +#undef const + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +#undef inline +#endif + +/* Define to `unsigned int' if does not define. */ +#undef size_t + +/* Define to `int' if does not define. */ +#undef ssize_t + +/* Define to `unsigned long' if does not define. */ +#undef uintptr_t + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +#undef volatile Added: vendor/bind9/dist-9.3/lib/bind/aclocal.m4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bind9/dist-9.3/lib/bind/aclocal.m4 Fri Jan 9 10:16:19 2009 (r186931) @@ -0,0 +1,2 @@ +sinclude(../../libtool.m4)dnl + Added: vendor/bind9/dist-9.3/lib/bind/config.h.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bind9/dist-9.3/lib/bind/config.h.in Fri Jan 9 10:16:19 2009 (r186931) @@ -0,0 +1,67 @@ +#undef _SOCKADDR_LEN +#undef HAVE_FCNTL_H +#undef HAVE_PATHS_H +#undef HAVE_INTTYPES_H +#undef HAVE_STROPTS_H +#undef HAVE_SYS_TIMERS_H +#undef HAVE_SYS_SELECT_H +#undef HAVE_MEMORY_H +#undef SYS_CDEFS_H +#undef _POSIX_PTHREAD_SEMANTICS +#undef POSIX_GETPWUID_R +#undef POSIX_GETPWNAM_R +#undef POSIX_GETGRGID_R +#undef POSIX_GETGRNAM_R +#undef HAVE_MEMMOVE +#undef HAVE_MEMCHR +#undef SPRINTF_CHAR +#undef VSPRINTF_CHAR +#undef USE_SYSERROR_LIST +#undef NEED_STRTOUL +#undef NEED_SUN4PROTOS + +#undef NEED_SETGROUPENT +#undef NEED_GETGROUPLIST + +/* define if prototype for getgrnam_r() is required */ +#undef NEED_GETGRNAM_R +#undef NEED_GETGRGID_R +#undef NEED_GETGRENT_R +#undef NEED_SETGRENT_R +#undef NEED_ENDGRENT_R + +#undef NEED_INNETGR_R +#undef NEED_SETNETGRENT_R +#undef NEED_ENDNETGRENT_R + +#undef NEED_GETPWNAM_R +#undef NEED_GETPWUID_R +#undef NEED_SETPWENT_R +#undef NEED_SETPASSENT_R +#undef NEED_SETPWENT_R +#undef NEED_GETPWENT_R +#undef NEED_ENDPWENT_R + +#undef NEED_SETPASSENT + +#undef HAS_PW_CLASS + +#undef ssize_t +#undef uintptr_t + +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +#undef SHUTUP_SPUTAUX +#ifdef SHUTUP_SPUTAUX +struct __sFILE; +extern __inline int __sputaux(int _c, struct __sFILE *_p); +#endif +#undef BROKEN_IN6ADDR_INIT_MACROS +#undef HAVE_STRLCAT +/* Shut up warnings about missing braces */ +#undef SHUTUP_MUTEX_INITIALIZER +#ifdef SHUTUP_MUTEX_INITIALIZER +#define LIBBIND_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER } +#else +#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER +#endif + From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 10:20:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FD07106564A; Fri, 9 Jan 2009 10:20:51 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2208FC18; Fri, 9 Jan 2009 10:20:51 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09AKprC049622; Fri, 9 Jan 2009 10:20:51 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09AKpRa049618; Fri, 9 Jan 2009 10:20:51 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091020.n09AKpRa049618@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 10:20:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186932 - in head/sys/arm/mv: . orion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:20:52 -0000 Author: raj Date: Fri Jan 9 10:20:51 2009 New Revision: 186932 URL: http://svn.freebsd.org/changeset/base/186932 Log: Improve Marvell SOCs PCI/PCIE driver. - Provide dedicated rmans for MEM and IO resources. - Convert PCI IRQ routing info into a table (from callback approach), provide config data for alternative DB- boards. - Fix a wrong boundary check error in pcib_mbus_init_bar() Obtained from: Semihalf Modified: head/sys/arm/mv/mv_pci.c head/sys/arm/mv/mvvar.h head/sys/arm/mv/orion/db88f5xxx.c head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/mv_pci.c Fri Jan 9 10:20:51 2009 (r186932) @@ -95,10 +95,12 @@ __FBSDID("$FreeBSD$"); struct pcib_mbus_softc { device_t sc_dev; + struct rman sc_iomem_rman; bus_addr_t sc_iomem_base; bus_addr_t sc_iomem_size; bus_addr_t sc_iomem_alloc; /* Next allocation. */ + struct rman sc_ioport_rman; bus_addr_t sc_ioport_base; bus_addr_t sc_ioport_size; bus_addr_t sc_ioport_alloc; /* Next allocation. */ @@ -521,12 +523,39 @@ pcib_mbus_attach(device_t self) sc->sc_ioport_size = sc->sc_info->op_io_size; sc->sc_ioport_alloc = sc->sc_info->op_io_base; + sc->sc_iomem_rman.rm_type = RMAN_ARRAY; + err = rman_init(&sc->sc_iomem_rman); + if (err) + return (err); + + sc->sc_ioport_rman.rm_type = RMAN_ARRAY; + err = rman_init(&sc->sc_ioport_rman); + if (err) { + rman_fini(&sc->sc_iomem_rman); + return (err); + } + + err = rman_manage_region(&sc->sc_iomem_rman, sc->sc_iomem_base, + sc->sc_iomem_base + sc->sc_iomem_size - 1); + if (err) + goto error; + + err = rman_manage_region(&sc->sc_ioport_rman, sc->sc_ioport_base, + sc->sc_ioport_base + sc->sc_ioport_size - 1); + if (err) + goto error; + err = pcib_mbus_init(sc, sc->sc_busnr, pcib_mbus_maxslots(sc->sc_dev)); if (err) - return(err); + goto error; device_add_child(self, "pci", -1); return (bus_generic_attach(self)); + +error: + rman_fini(&sc->sc_iomem_rman); + rman_fini(&sc->sc_ioport_rman); + return (err); } static int @@ -570,7 +599,7 @@ pcib_mbus_init_bar(struct pcib_mbus_soft return (width); addr = (*allocp + mask) & ~mask; - if ((*allocp = addr + size) >= limit) + if ((*allocp = addr + size) > limit) return (-1); if (bootverbose) @@ -634,8 +663,10 @@ static int pcib_mbus_init_resources(struct pcib_mbus_softc *sc, int bus, int slot, int func, int hdrtype) { + const struct obio_pci_irq_map *map = sc->sc_info->op_pci_irq_map; int maxbar = (hdrtype & PCIM_HDRTYPE) ? 0 : 6; - int bar = 0, irq, pin, i; + int bar = 0, irq = -1; + int pin, i; /* Program the base address registers */ while (bar < maxbar) { @@ -652,8 +683,14 @@ pcib_mbus_init_resources(struct pcib_mbu pin = pcib_mbus_read_config(sc->sc_dev, bus, slot, func, PCIR_INTPIN, 1); - if (sc->sc_info->op_get_irq != NULL) - irq = sc->sc_info->op_get_irq(bus, slot, func, pin); + if (map != NULL) + while (map->opim_irq >= 0) { + if ((map->opim_slot == slot || map->opim_slot < 0) && + (map->opim_pin == pin || map->opim_pin < 0)) + irq = map->opim_irq; + + map++; + } else irq = sc->sc_info->op_irq; @@ -728,9 +765,37 @@ static struct resource * pcib_mbus_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { + struct pcib_mbus_softc *sc = device_get_softc(dev); + struct rman *rm = NULL; + struct resource *res; - return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, - type, rid, start, end, count, flags)); + switch (type) { + case SYS_RES_IOPORT: + rm = &sc->sc_ioport_rman; + break; + case SYS_RES_MEMORY: + rm = &sc->sc_iomem_rman; + break; + default: + return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, + type, rid, start, end, count, flags)); + }; + + res = rman_reserve_resource(rm, start, end, count, flags, child); + if (res == NULL) + return (NULL); + + rman_set_rid(res, *rid); + rman_set_bustag(res, obio_tag); + rman_set_bushandle(res, start); + + if (flags & RF_ACTIVE) + if (bus_activate_resource(child, type, *rid, res)) { + rman_release_resource(res); + return (NULL); + } + + return (res); } static int @@ -738,8 +803,11 @@ pcib_mbus_release_resource(device_t dev, struct resource *res) { - return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, - type, rid, res)); + if (type != SYS_RES_IOPORT && type != SYS_RES_MEMORY) + return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, + type, rid, res)); + + return (rman_release_resource(res)); } static int Modified: head/sys/arm/mv/mvvar.h ============================================================================== --- head/sys/arm/mv/mvvar.h Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/mvvar.h Fri Jan 9 10:20:51 2009 (r186932) @@ -63,7 +63,11 @@ struct obio_device { struct resource_list od_resources; }; -typedef int (*obio_get_irq_t)(u_int bus, u_int slot, u_int func, u_int pin); +struct obio_pci_irq_map { + int opim_slot; + int opim_pin; + int opim_irq; +}; struct obio_pci { int op_type; @@ -82,8 +86,8 @@ struct obio_pci { int op_mem_win_target; int op_mem_win_attr; - obio_get_irq_t op_get_irq; /* IRQ Mapping callback */ - int op_irq; /* used if callback is NULL */ + const struct obio_pci_irq_map *op_pci_irq_map; + int op_irq; /* used if IRQ map table is NULL */ }; struct gpio_config { Modified: head/sys/arm/mv/orion/db88f5xxx.c ============================================================================== --- head/sys/arm/mv/orion/db88f5xxx.c Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/orion/db88f5xxx.c Fri Jan 9 10:20:51 2009 (r186932) @@ -123,35 +123,32 @@ static const struct pmap_devmap pmap_dev { 0, 0, 0, 0, 0, } }; -int platform_pci_get_irq(u_int bus, u_int slot, u_int func, u_int pin) -{ - int irq; - - switch (slot) { - case 7: - irq = GPIO2IRQ(12); /* GPIO 0 for DB-88F5182 */ - break; /* GPIO 12 for DB-88F5281 */ - case 8: - case 9: - irq = GPIO2IRQ(13); /* GPIO 1 for DB-88F5182 */ - break; /* GPIO 13 for DB-88F5281 */ - default: - irq = -1; - break; - }; +/* + * The pci_irq_map table consists of 3 columns: + * - PCI slot number (less than zero means ANY). + * - PCI IRQ pin (less than zero means ANY). + * - PCI IRQ (less than zero marks end of table). + * + * IRQ number from the first matching entry is used to configure PCI device + */ - /* - * XXX This isn't the right place to setup GPIO, but it makes sure - * that PCI works on 5XXX targets where U-Boot doesn't set up the GPIO - * correctly to handle PCI IRQs (e.g., on 5182). This code will go - * away once we set up GPIO in a generic way in a proper place (TBD). - */ - if (irq >= 0) - mv_gpio_configure(IRQ2GPIO(irq), MV_GPIO_POLAR_LOW | - MV_GPIO_LEVEL, ~0u); +/* PCI IRQ Map for DB-88F5281 */ +const struct obio_pci_irq_map pci_irq_map[] = { + { 7, -1, GPIO2IRQ(12) }, + { 8, -1, GPIO2IRQ(13) }, + { 9, -1, GPIO2IRQ(13) }, + { -1, -1, -1 } +}; - return (irq); -} +#if 0 +/* PCI IRQ Map for DB-88F5182 */ +const struct obio_pci_irq_map pci_irq_map[] = { + { 7, -1, GPIO2IRQ(0) }, + { 8, -1, GPIO2IRQ(1) }, + { 9, -1, GPIO2IRQ(1) }, + { -1, -1, -1 } +}; +#endif /* * mv_gpio_config row structure: Modified: head/sys/arm/mv/orion/orion.c ============================================================================== --- head/sys/arm/mv/orion/orion.c Fri Jan 9 10:16:19 2009 (r186931) +++ head/sys/arm/mv/orion/orion.c Fri Jan 9 10:20:51 2009 (r186932) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include -extern int platform_pci_get_irq(u_int bus, u_int slot, u_int func, u_int pin); +extern const struct obio_pci_irq_map pci_irq_map[]; struct obio_device obio_devices[] = { { "ic", MV_IC_BASE, MV_IC_SIZE, @@ -106,7 +106,7 @@ const struct obio_pci mv_pci_info[] = { MV_PCI_BASE, MV_PCI_SIZE, MV_PCI_IO_BASE, MV_PCI_IO_SIZE, 3, 0x51, MV_PCI_MEM_BASE, MV_PCI_MEM_SIZE, 3, 0x59, - platform_pci_get_irq, -1 + pci_irq_map, -1 }, { 0, 0, 0 } From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 10:45:05 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 998BB106567C; Fri, 9 Jan 2009 10:45:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1A1F8FC19; Fri, 9 Jan 2009 10:45:04 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Aj4lE054121; Fri, 9 Jan 2009 10:45:04 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Aj4Nt054117; Fri, 9 Jan 2009 10:45:04 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091045.n09Aj4Nt054117@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 10:45:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186933 - in head/sys/arm: arm include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:45:06 -0000 Author: raj Date: Fri Jan 9 10:45:04 2009 New Revision: 186933 URL: http://svn.freebsd.org/changeset/base/186933 Log: Fix confusing naming of Marvell ARM CPU specific routines. - The contents of 'feroceon_cpufuncs' dispatch table was really dedicated for the new Sheeva CPU (in 88F6xxx and MV-78xxx SOCs), and NOT Feroceon. - Feroceon CPU (in 88F5xxx SOCs) appears as a regular ARM926EJ-S core and does not require dedicated routines. This will be accompanied by a file rename commit. Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/cpufunc_asm_feroceon.S head/sys/arm/arm/elf_trampoline.c head/sys/arm/include/cpufunc.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/arm/cpufunc.c Fri Jan 9 10:45:04 2009 (r186933) @@ -358,7 +358,7 @@ struct cpu_functions armv5_ec_cpufuncs = }; -struct cpu_functions feroceon_cpufuncs = { +struct cpu_functions sheeva_cpufuncs = { /* CPU functions */ cpufunc_id, /* id */ @@ -368,7 +368,7 @@ struct cpu_functions feroceon_cpufuncs = cpufunc_control, /* control */ cpufunc_domains, /* Domain */ - feroceon_setttb, /* Setttb */ + sheeva_setttb, /* Setttb */ cpufunc_faultstatus, /* Faultstatus */ cpufunc_faultaddress, /* Faultaddress */ @@ -387,17 +387,17 @@ struct cpu_functions feroceon_cpufuncs = armv5_ec_icache_sync_range, /* icache_sync_range */ armv5_ec_dcache_wbinv_all, /* dcache_wbinv_all */ - feroceon_dcache_wbinv_range, /* dcache_wbinv_range */ - feroceon_dcache_inv_range, /* dcache_inv_range */ - feroceon_dcache_wb_range, /* dcache_wb_range */ + sheeva_dcache_wbinv_range, /* dcache_wbinv_range */ + sheeva_dcache_inv_range, /* dcache_inv_range */ + sheeva_dcache_wb_range, /* dcache_wb_range */ armv5_ec_idcache_wbinv_all, /* idcache_wbinv_all */ - feroceon_idcache_wbinv_range, /* idcache_wbinv_all */ + sheeva_idcache_wbinv_range, /* idcache_wbinv_all */ - feroceon_l2cache_wbinv_all, /* l2cache_wbinv_all */ - feroceon_l2cache_wbinv_range, /* l2cache_wbinv_range */ - feroceon_l2cache_inv_range, /* l2cache_inv_range */ - feroceon_l2cache_wb_range, /* l2cache_wb_range */ + sheeva_l2cache_wbinv_all, /* l2cache_wbinv_all */ + sheeva_l2cache_wbinv_range, /* l2cache_wbinv_range */ + sheeva_l2cache_inv_range, /* l2cache_inv_range */ + sheeva_l2cache_wb_range, /* l2cache_wb_range */ /* Other functions */ @@ -1000,7 +1000,7 @@ set_cpufuncs() cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - cpufuncs = feroceon_cpufuncs; + cpufuncs = sheeva_cpufuncs; /* * Workaround for Marvell MV78100 CPU: Cache prefetch * mechanism may affect the cache coherency validity, @@ -1011,12 +1011,12 @@ set_cpufuncs() */ if (cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - feroceon_control_ext(0xffffffff, + sheeva_control_ext(0xffffffff, FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN | FC_L2_PREF_DIS); } else { - feroceon_control_ext(0xffffffff, + sheeva_control_ext(0xffffffff, FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN); } Modified: head/sys/arm/arm/cpufunc_asm_feroceon.S ============================================================================== --- head/sys/arm/arm/cpufunc_asm_feroceon.S Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/arm/cpufunc_asm_feroceon.S Fri Jan 9 10:45:04 2009 (r186933) @@ -34,12 +34,12 @@ __FBSDID("$FreeBSD$"); #include -.Lferoceon_cache_line_size: +.Lsheeva_cache_line_size: .word _C_LABEL(arm_pdcache_line_size) -.Lferoceon_asm_page_mask: +.Lsheeva_asm_page_mask: .word _C_LABEL(PAGE_MASK) -ENTRY(feroceon_setttb) +ENTRY(sheeva_setttb) /* Disable irqs */ mrs r2, cpsr orr r3, r2, #I32_bit | F32_bit @@ -63,11 +63,11 @@ ENTRY(feroceon_setttb) mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ RET -ENTRY(feroceon_dcache_wbinv_range) +ENTRY(sheeva_dcache_wbinv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -76,7 +76,7 @@ ENTRY(feroceon_dcache_wbinv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -105,11 +105,11 @@ ENTRY(feroceon_dcache_wbinv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_idcache_wbinv_range) +ENTRY(sheeva_idcache_wbinv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -118,7 +118,7 @@ ENTRY(feroceon_idcache_wbinv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -136,7 +136,7 @@ ENTRY(feroceon_idcache_wbinv_range) msr cpsr_c, lr /* Invalidate and clean icache line by line */ - ldr r3, .Lferoceon_cache_line_size + ldr r3, .Lsheeva_cache_line_size ldr r3, [r3] 2: mcr p15, 0, r0, c7, c5, 1 @@ -156,11 +156,11 @@ ENTRY(feroceon_idcache_wbinv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_dcache_inv_range) +ENTRY(sheeva_dcache_inv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -169,7 +169,7 @@ ENTRY(feroceon_dcache_inv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -198,11 +198,11 @@ ENTRY(feroceon_dcache_inv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_dcache_wb_range) +ENTRY(sheeva_dcache_wb_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -211,7 +211,7 @@ ENTRY(feroceon_dcache_wb_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -240,11 +240,11 @@ ENTRY(feroceon_dcache_wb_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_wbinv_range) +ENTRY(sheeva_l2cache_wbinv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -253,7 +253,7 @@ ENTRY(feroceon_l2cache_wbinv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -284,11 +284,11 @@ ENTRY(feroceon_l2cache_wbinv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_inv_range) +ENTRY(sheeva_l2cache_inv_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -297,7 +297,7 @@ ENTRY(feroceon_l2cache_inv_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -326,11 +326,11 @@ ENTRY(feroceon_l2cache_inv_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_wb_range) +ENTRY(sheeva_l2cache_wb_range) str lr, [sp, #-4]! mrs lr, cpsr /* Start with cache line aligned address */ - ldr ip, .Lferoceon_cache_line_size + ldr ip, .Lsheeva_cache_line_size ldr ip, [ip] sub ip, ip, #1 and r2, r0, ip @@ -339,7 +339,7 @@ ENTRY(feroceon_l2cache_wb_range) bics r1, r1, ip bics r0, r0, ip - ldr ip, .Lferoceon_asm_page_mask + ldr ip, .Lsheeva_asm_page_mask and r2, r0, ip rsb r2, r2, #PAGE_SIZE cmp r1, r2 @@ -368,14 +368,14 @@ ENTRY(feroceon_l2cache_wb_range) ldr lr, [sp], #4 RET -ENTRY(feroceon_l2cache_wbinv_all) +ENTRY(sheeva_l2cache_wbinv_all) mov r0, #0 mcr p15, 1, r0, c15, c9, 0 /* Clean L2 */ mcr p15, 1, r0, c15, c11, 0 /* Invalidate L2 */ mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ RET -ENTRY(feroceon_control_ext) +ENTRY(sheeva_control_ext) mrc p15, 1, r3, c15, c1, 0 /* Read the control register */ bic r2, r3, r0 /* Clear bits */ eor r2, r2, r1 /* XOR bits */ Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/arm/elf_trampoline.c Fri Jan 9 10:45:04 2009 (r186933) @@ -74,7 +74,7 @@ void __startC(void); #ifdef CPU_XSCALE_81342 #define cpu_l2cache_wbinv_all xscalec3_l2cache_purge #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) -#define cpu_l2cache_wbinv_all feroceon_l2cache_wbinv_all +#define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all #else #define cpu_l2cache_wbinv_all() #endif Modified: head/sys/arm/include/cpufunc.h ============================================================================== --- head/sys/arm/include/cpufunc.h Fri Jan 9 10:20:51 2009 (r186932) +++ head/sys/arm/include/cpufunc.h Fri Jan 9 10:45:04 2009 (r186933) @@ -377,17 +377,17 @@ extern unsigned arm10_dcache_sets_inc; extern unsigned arm10_dcache_index_max; extern unsigned arm10_dcache_index_inc; -u_int feroceon_control_ext (u_int, u_int); -void feroceon_setttb (u_int); -void feroceon_dcache_wbinv_range (vm_offset_t, vm_size_t); -void feroceon_dcache_inv_range (vm_offset_t, vm_size_t); -void feroceon_dcache_wb_range (vm_offset_t, vm_size_t); -void feroceon_idcache_wbinv_range (vm_offset_t, vm_size_t); - -void feroceon_l2cache_wbinv_range (vm_offset_t, vm_size_t); -void feroceon_l2cache_inv_range (vm_offset_t, vm_size_t); -void feroceon_l2cache_wb_range (vm_offset_t, vm_size_t); -void feroceon_l2cache_wbinv_all (void); +u_int sheeva_control_ext (u_int, u_int); +void sheeva_setttb (u_int); +void sheeva_dcache_wbinv_range (vm_offset_t, vm_size_t); +void sheeva_dcache_inv_range (vm_offset_t, vm_size_t); +void sheeva_dcache_wb_range (vm_offset_t, vm_size_t); +void sheeva_idcache_wbinv_range (vm_offset_t, vm_size_t); + +void sheeva_l2cache_wbinv_range (vm_offset_t, vm_size_t); +void sheeva_l2cache_inv_range (vm_offset_t, vm_size_t); +void sheeva_l2cache_wb_range (vm_offset_t, vm_size_t); +void sheeva_l2cache_wbinv_all (void); #endif #ifdef CPU_ARM11 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 10:55:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15800106564A; Fri, 9 Jan 2009 10:55:33 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C18058FC08; Fri, 9 Jan 2009 10:55:33 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09AtXVx054389; Fri, 9 Jan 2009 10:55:33 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09AtXxs054386; Fri, 9 Jan 2009 10:55:33 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091055.n09AtXxs054386@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 10:55:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186934 - in head/sys: arm/arm arm/mv conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:55:34 -0000 Author: raj Date: Fri Jan 9 10:55:33 2009 New Revision: 186934 URL: http://svn.freebsd.org/changeset/base/186934 Log: Rename Marvell ARM CPU specific file according to r186933. Added: head/sys/arm/arm/cpufunc_asm_sheeva.S (props changed) - copied unchanged from r186933, head/sys/arm/arm/cpufunc_asm_feroceon.S Deleted: head/sys/arm/arm/cpufunc_asm_feroceon.S Modified: head/sys/arm/mv/files.mv head/sys/conf/Makefile.arm Copied: head/sys/arm/arm/cpufunc_asm_sheeva.S (from r186933, head/sys/arm/arm/cpufunc_asm_feroceon.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/cpufunc_asm_sheeva.S Fri Jan 9 10:55:33 2009 (r186934, copy of r186933, head/sys/arm/arm/cpufunc_asm_feroceon.S) @@ -0,0 +1,386 @@ +/*- + * Copyright (C) 2008 MARVELL INTERNATIONAL LTD. + * All rights reserved. + * + * Developed by Semihalf. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of MARVELL nor the names of contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +.Lsheeva_cache_line_size: + .word _C_LABEL(arm_pdcache_line_size) +.Lsheeva_asm_page_mask: + .word _C_LABEL(PAGE_MASK) + +ENTRY(sheeva_setttb) + /* Disable irqs */ + mrs r2, cpsr + orr r3, r2, #I32_bit | F32_bit + msr cpsr_c, r3 + + mov r1, #0 + mcr p15, 0, r1, c7, c5, 0 /* Invalidate ICache */ +1: mrc p15, 0, r15, c7, c14, 3 /* Test, clean and invalidate DCache */ + bne 1b /* More to do? */ + + mcr p15, 1, r1, c15, c9, 0 /* Clean L2 */ + mcr p15, 1, r1, c15, c11, 0 /* Invalidate L2 */ + + /* Reenable irqs */ + msr cpsr_c, r2 + + mcr p15, 0, r1, c7, c10, 4 /* drain the write buffer */ + + mcr p15, 0, r0, c2, c0, 0 /* load new TTB */ + + mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ + RET + +ENTRY(sheeva_dcache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ + mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_idcache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ + mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + /* Invalidate and clean icache line by line */ + ldr r3, .Lsheeva_cache_line_size + ldr r3, [r3] +2: + mcr p15, 0, r0, c7, c5, 1 + add r0, r0, r3 + cmp r2, r0 + bhi 2b + + add r0, r2, #1 + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_dcache_inv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c14, 0 /* Inv zone start address */ + mcr p15, 5, r2, c15, c14, 1 /* Inv zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_dcache_wb_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 5, r0, c15, c13, 0 /* Clean zone start address */ + mcr p15, 5, r2, c15, c13, 1 /* Clean zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wbinv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ + mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ + mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ + mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_inv_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ + mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wb_range) + str lr, [sp, #-4]! + mrs lr, cpsr + /* Start with cache line aligned address */ + ldr ip, .Lsheeva_cache_line_size + ldr ip, [ip] + sub ip, ip, #1 + and r2, r0, ip + add r1, r1, r2 + add r1, r1, ip + bics r1, r1, ip + bics r0, r0, ip + + ldr ip, .Lsheeva_asm_page_mask + and r2, r0, ip + rsb r2, r2, #PAGE_SIZE + cmp r1, r2 + movcc ip, r1 + movcs ip, r2 +1: + add r3, r0, ip + sub r2, r3, #1 + /* Disable irqs */ + orr r3, lr, #I32_bit | F32_bit + msr cpsr_c, r3 + mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ + mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ + /* Enable irqs */ + msr cpsr_c, lr + + add r0, r0, ip + sub r1, r1, ip + cmp r1, #PAGE_SIZE + movcc ip, r1 + movcs ip, #PAGE_SIZE + cmp r1, #0 + bne 1b + mov r0, #0 + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + ldr lr, [sp], #4 + RET + +ENTRY(sheeva_l2cache_wbinv_all) + mov r0, #0 + mcr p15, 1, r0, c15, c9, 0 /* Clean L2 */ + mcr p15, 1, r0, c15, c11, 0 /* Invalidate L2 */ + mcr p15, 0, r0, c7, c10, 4 /* drain the write buffer */ + RET + +ENTRY(sheeva_control_ext) + mrc p15, 1, r3, c15, c1, 0 /* Read the control register */ + bic r2, r3, r0 /* Clear bits */ + eor r2, r2, r1 /* XOR bits */ + + teq r2, r3 /* Only write if there is a change */ + mcrne p15, 1, r2, c15, c1, 0 /* Write new control register */ + mov r0, r3 /* Return old value */ + RET Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Fri Jan 9 10:45:04 2009 (r186933) +++ head/sys/arm/mv/files.mv Fri Jan 9 10:55:33 2009 (r186934) @@ -15,7 +15,7 @@ arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_armv5_ec.S standard -arm/arm/cpufunc_asm_feroceon.S standard +arm/arm/cpufunc_asm_sheeva.S standard arm/arm/irq_dispatch.S standard arm/mv/bus_space.c standard Modified: head/sys/conf/Makefile.arm ============================================================================== --- head/sys/conf/Makefile.arm Fri Jan 9 10:45:04 2009 (r186933) +++ head/sys/conf/Makefile.arm Fri Jan 9 10:55:33 2009 (r186934) @@ -73,7 +73,7 @@ FILES_CPU_FUNC = $S/$M/$M/cpufunc_asm_ar $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \ $S/$M/$M/cpufunc_asm_xscale.S $S/$M/$M/cpufunc_asm.S \ $S/$M/$M/cpufunc_asm_xscale_c3.S $S/$M/$M/cpufunc_asm_armv5_ec.S \ - $S/$M/$M/cpufunc_asm_feroceon.S + $S/$M/$M/cpufunc_asm_sheeva.S KERNEL_EXTRA=trampoline KERNEL_EXTRA_INSTALL=kernel.gz.tramp trampoline: ${KERNEL_KO}.tramp From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 10:59:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38DEB106564A; Fri, 9 Jan 2009 10:59:00 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 27BE28FC16; Fri, 9 Jan 2009 10:59:00 +0000 (UTC) (envelope-from harti@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Ax0Se054488; Fri, 9 Jan 2009 10:59:00 GMT (envelope-from harti@svn.freebsd.org) Received: (from harti@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Ax0f8054487; Fri, 9 Jan 2009 10:59:00 GMT (envelope-from harti@svn.freebsd.org) Message-Id: <200901091059.n09Ax0f8054487@svn.freebsd.org> From: Hartmut Brandt Date: Fri, 9 Jan 2009 10:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186935 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 10:59:00 -0000 Author: harti Date: Fri Jan 9 10:58:59 2009 New Revision: 186935 URL: http://svn.freebsd.org/changeset/base/186935 Log: Set a minimum of information in the routing message (like version and type) so that generic routing message parsing code can parse the messages for L2 info that are retrieved via the sysctl interface. Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 9 10:55:33 2009 (r186934) +++ head/sys/netinet/in.c Fri Jan 9 10:58:59 2009 (r186935) @@ -1201,6 +1201,10 @@ in_lltable_dump(struct lltable *llt, str */ bzero(&arpc, sizeof(arpc)); arpc.rtm.rtm_msglen = sizeof(arpc); + arpc.rtm.rtm_version = RTM_VERSION; + arpc.rtm.rtm_type = RTM_GET; + arpc.rtm.rtm_flags = RTF_UP; + arpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY; arpc.sin.sin_family = AF_INET; arpc.sin.sin_len = sizeof(arpc.sin); arpc.sin.sin_addr.s_addr = SIN(lle)->sin_addr.s_addr; From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 11:09:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D47010656CA; Fri, 9 Jan 2009 11:09:58 +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 EA4758FC23; Fri, 9 Jan 2009 11:09:57 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09B9vGX054815; Fri, 9 Jan 2009 11:09:57 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09B9v5V054804; Fri, 9 Jan 2009 11:09:57 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901091109.n09B9v5V054804@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 9 Jan 2009 11:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186936 - in stable/7/sys: . amd64/amd64 amd64/linux32 arm/arm compat/ia32 compat/svr4 contrib/pf dev/cxgb i386/i386 i386/ibcs2 i386/linux ia64/ia64 kern powerpc/powerpc sparc64/sparc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:09:59 -0000 Author: kib Date: Fri Jan 9 11:09:57 2009 New Revision: 186936 URL: http://svn.freebsd.org/changeset/base/186936 Log: MFC r183322: Change the static struct sysentvec and struct Elf_Brandinfo initializers to the C99 style. Explicitely initialize sysentvec.sv_maxssiz that was missed in most sysvecs. Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/elf_machdep.c stable/7/sys/amd64/linux32/linux32_sysvec.c stable/7/sys/arm/arm/elf_machdep.c stable/7/sys/compat/ia32/ia32_sysvec.c stable/7/sys/compat/svr4/svr4_sysvec.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/elf_machdep.c stable/7/sys/i386/ibcs2/ibcs2_sysvec.c stable/7/sys/i386/linux/linux_sysvec.c stable/7/sys/ia64/ia64/elf_machdep.c stable/7/sys/kern/imgact_aout.c stable/7/sys/kern/init_main.c stable/7/sys/powerpc/powerpc/elf_machdep.c stable/7/sys/sparc64/sparc64/elf_machdep.c Modified: stable/7/sys/amd64/amd64/elf_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/amd64/amd64/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -46,59 +46,60 @@ __FBSDID("$FreeBSD$"); #include struct sysentvec elf64_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD ELF64", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF64", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf64_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_X86_64, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_X86_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_info); static Elf64_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_X86_64, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_X86_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf64_insert_brand_entry, Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -1001,62 +1001,62 @@ linux32_fixlimit(struct rlimit *rl, int } struct sysentvec elf_linux_sysvec = { - LINUX_SYS_MAXSYSCALL, - linux_sysent, - 0, - LINUX_SIGTBLSZ, - bsd_to_linux_signal, - ELAST + 1, - bsd_to_linux_errno, - translate_traps, - elf_linux_fixup, - linux_sendsig, - linux_sigcode, - &linux_szsigcode, - linux_prepsyscall, - "Linux ELF32", - elf32_coredump, - exec_linux_imgact_try, - LINUX_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - LINUX32_USRSTACK, - LINUX32_USRSTACK, - LINUX32_PS_STRINGS, - VM_PROT_ALL, - linux_copyout_strings, - exec_linux_setregs, - linux32_fixlimit, - &linux32_maxssiz, + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_sigsize = LINUX_SIGTBLSZ, + .sv_sigtbl = bsd_to_linux_signal, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_linux_errno, + .sv_transtrap = translate_traps, + .sv_fixup = elf_linux_fixup, + .sv_sendsig = linux_sendsig, + .sv_sigcode = linux_sigcode, + .sv_szsigcode = &linux_szsigcode, + .sv_prepsyscall = linux_prepsyscall, + .sv_name = "Linux ELF32", + .sv_coredump = elf32_coredump, + .sv_imgact_try = exec_linux_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = LINUX32_USRSTACK, + .sv_usrstack = LINUX32_USRSTACK, + .sv_psstrings = LINUX32_PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = linux_copyout_strings, + .sv_setregs = exec_linux_setregs, + .sv_fixlimit = linux32_fixlimit, + .sv_maxssiz = &linux32_maxssiz, }; static Elf32_Brandinfo linux_brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.1", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; static Elf32_Brandinfo linux_glibc2brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.2", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.2", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; Elf32_Brandinfo *linux_brandlist[] = { - &linux_brand, - &linux_glibc2brand, - NULL - }; + &linux_brand, + &linux_glibc2brand, + NULL +}; static int linux_elf_modevent(module_t mod, int type, void *data) Modified: stable/7/sys/arm/arm/elf_machdep.c ============================================================================== --- stable/7/sys/arm/arm/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/arm/arm/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -46,59 +46,60 @@ __FBSDID("$FreeBSD$"); #include struct sysentvec elf32_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD ELF32", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF32", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf32_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_ARM, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_ARM, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); static Elf32_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_ARM, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_ARM, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, Modified: stable/7/sys/compat/ia32/ia32_sysvec.c ============================================================================== --- stable/7/sys/compat/ia32/ia32_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/compat/ia32/ia32_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -111,61 +111,61 @@ SYSCTL_ULONG(_compat_ia32, OID_AUTO, max TUNABLE_ULONG("compat.ia32.maxvmem", &ia32_maxvmem); struct sysentvec ia32_freebsd_sysvec = { - FREEBSD32_SYS_MAXSYSCALL, - freebsd32_sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - elf32_freebsd_fixup, - ia32_sendsig, - ia32_sigcode, - &sz_ia32_sigcode, - NULL, - "FreeBSD ELF32", - elf32_coredump, - NULL, - MINSIGSTKSZ, - IA32_PAGE_SIZE, - 0, - FREEBSD32_USRSTACK, - FREEBSD32_USRSTACK, - FREEBSD32_PS_STRINGS, - VM_PROT_ALL, - ia32_copyout_strings, - ia32_setregs, - ia32_fixlimit, - &ia32_maxssiz + .sv_size = FREEBSD32_SYS_MAXSYSCALL, + .sv_table = freebsd32_sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = elf32_freebsd_fixup, + .sv_sendsig = ia32_sendsig, + .sv_sigcode = ia32_sigcode, + .sv_szsigcode = &sz_ia32_sigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF32", + .sv_coredump = elf32_coredump, + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = IA32_PAGE_SIZE, + .sv_minuser = 0, + .sv_maxuser = FREEBSD32_USRSTACK, + .sv_usrstack = FREEBSD32_USRSTACK, + .sv_psstrings = FREEBSD32_PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = ia32_copyout_strings, + .sv_setregs = ia32_setregs, + .sv_fixlimit = ia32_fixlimit, + .sv_maxssiz = &ia32_maxssiz }; static Elf32_Brandinfo ia32_brand_info = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &ia32_freebsd_sysvec, - "/libexec/ld-elf32.so.1", - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &ia32_freebsd_sysvec, + .interp_newpath = "/libexec/ld-elf32.so.1", + .flags = BI_CAN_EXEC_DYN +}; SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &ia32_brand_info); static Elf32_Brandinfo ia32_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &ia32_freebsd_sysvec, - "/libexec/ld-elf32.so.1", - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &ia32_freebsd_sysvec, + .interp_newpath = "/libexec/ld-elf32.so.1", + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, Modified: stable/7/sys/compat/svr4/svr4_sysvec.c ============================================================================== --- stable/7/sys/compat/svr4/svr4_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/compat/svr4/svr4_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -167,44 +167,46 @@ extern int svr4_szsigcode; extern char svr4_sigcode[]; struct sysentvec svr4_sysvec = { - SVR4_SYS_MAXSYSCALL, - svr4_sysent, - 0xff, - SVR4_NSIG-1, /* NB: signal trans table indexed with signno-1 */ - bsd_to_svr4_sig+1, - ELAST, /* ELAST */ - bsd_to_svr4_errno, - NULL, - svr4_fixup, - svr4_sendsig, - svr4_sigcode, - &svr4_szsigcode, - NULL, - "SVR4", - elf32_coredump, - NULL, - SVR4_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SVR4_SYS_MAXSYSCALL, + .sv_table = svr4_sysent, + .sv_mask = 0xff, + .sv_sigsize = SVR4_NSIG-1, /* NB: signal trans table indexed with signno-1 */ + .sv_sigtbl = bsd_to_svr4_sig+1, + .sv_errsize = ELAST, /* ELAST */ + .sv_errtbl = bsd_to_svr4_errno, + .sv_transtrap = NULL, + .sv_fixup = svr4_fixup, + .sv_sendsig = svr4_sendsig, + .sv_sigcode = svr4_sigcode, + .sv_szsigcode = &svr4_szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "SVR4", + .sv_coredump = elf32_coredump, + .sv_imgact_try = NULL, + .sv_minsigstksz = SVR4_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; const char svr4_emul_path[] = "/compat/svr4"; Elf32_Brandinfo svr4_brand = { - ELFOSABI_SYSV, - EM_386, /* XXX only implemented for x86 so far. */ - "SVR4", - svr4_emul_path, - "/lib/libc.so.1", - &svr4_sysvec, - NULL, + .brand = ELFOSABI_SYSV, + .machine = EM_386, /* XXX only implemented for x86 so far. */ + .compat_3_brand = "SVR4", + .emul_path = svr4_emul_path, + .interp_path = "/lib/libc.so.1", + .sysvec = &svr4_sysvec, + .interp_newpath = NULL, + .flags = 0 }; static int Modified: stable/7/sys/i386/i386/elf_machdep.c ============================================================================== --- stable/7/sys/i386/i386/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/i386/i386/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -46,59 +46,60 @@ __FBSDID("$FreeBSD$"); #include struct sysentvec elf32_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD ELF32", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF32", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf32_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, &freebsd_brand_info); static Elf32_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_386, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf32_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_FREEBSD, + .machine = EM_386, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf32_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t) elf32_insert_brand_entry, Modified: stable/7/sys/i386/ibcs2/ibcs2_sysvec.c ============================================================================== --- stable/7/sys/i386/ibcs2/ibcs2_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/i386/ibcs2/ibcs2_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -59,32 +59,33 @@ extern char sigcode[]; static int ibcs2_fixup(register_t **, struct image_params *); struct sysentvec ibcs2_svr3_sysvec = { - sizeof (ibcs2_sysent) / sizeof (ibcs2_sysent[0]), - ibcs2_sysent, - 0xFF, - IBCS2_SIGTBLSZ, - bsd_to_ibcs2_sig, - ELAST + 1, - bsd_to_ibcs2_errno, - NULL, /* trap-to-signal translation function */ - ibcs2_fixup, /* fixup */ - sendsig, - sigcode, /* use generic trampoline */ - &szsigcode, /* use generic trampoline size */ - NULL, /* prepsyscall */ - "IBCS2 COFF", - NULL, /* we don't have a COFF coredump function */ - NULL, - IBCS2_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = sizeof (ibcs2_sysent) / sizeof (ibcs2_sysent[0]), + .sv_table = ibcs2_sysent, + .sv_mask = 0xff, + .sv_sigsize = IBCS2_SIGTBLSZ, + .sv_sigtbl = bsd_to_ibcs2_sig, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_ibcs2_errno, + .sv_transtrap = NULL, + .sv_fixup = ibcs2_fixup, + .sv_sendsig = sendsig, + .sv_sigcode = sigcode, /* use generic trampoline */ + .sv_szsigcode = &szsigcode, + .sv_prepsyscall = NULL, + .sv_name = "IBCS2 COFF", + .sv_coredump = NULL, /* we don't have a COFF coredump function */ + .sv_imgact_try = NULL, + .sv_minsigstksz = IBCS2_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static int Modified: stable/7/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/7/sys/i386/linux/linux_sysvec.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/i386/linux/linux_sysvec.c Fri Jan 9 11:09:57 2009 (r186936) @@ -813,90 +813,92 @@ exec_linux_setregs(struct thread *td, u_ } struct sysentvec linux_sysvec = { - LINUX_SYS_MAXSYSCALL, - linux_sysent, - 0, - LINUX_SIGTBLSZ, - bsd_to_linux_signal, - ELAST + 1, - bsd_to_linux_errno, - translate_traps, - linux_fixup, - linux_sendsig, - linux_sigcode, - &linux_szsigcode, - linux_prepsyscall, - "Linux a.out", - NULL, - exec_linux_imgact_try, - LINUX_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_linux_setregs, - NULL + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_sigsize = LINUX_SIGTBLSZ, + .sv_sigtbl = bsd_to_linux_signal, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_linux_errno, + .sv_transtrap = translate_traps, + .sv_fixup = linux_fixup, + .sv_sendsig = linux_sendsig, + .sv_sigcode = linux_sigcode, + .sv_szsigcode = &linux_szsigcode, + .sv_prepsyscall = linux_prepsyscall, + .sv_name = "Linux a.out", + .sv_coredump = NULL, + .sv_imgact_try = exec_linux_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_linux_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; struct sysentvec elf_linux_sysvec = { - LINUX_SYS_MAXSYSCALL, - linux_sysent, - 0, - LINUX_SIGTBLSZ, - bsd_to_linux_signal, - ELAST + 1, - bsd_to_linux_errno, - translate_traps, - elf_linux_fixup, - linux_sendsig, - linux_sigcode, - &linux_szsigcode, - linux_prepsyscall, - "Linux ELF", - elf32_coredump, - exec_linux_imgact_try, - LINUX_MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_linux_setregs, - NULL + .sv_size = LINUX_SYS_MAXSYSCALL, + .sv_table = linux_sysent, + .sv_mask = 0, + .sv_sigsize = LINUX_SIGTBLSZ, + .sv_sigtbl = bsd_to_linux_signal, + .sv_errsize = ELAST + 1, + .sv_errtbl = bsd_to_linux_errno, + .sv_transtrap = translate_traps, + .sv_fixup = elf_linux_fixup, + .sv_sendsig = linux_sendsig, + .sv_sigcode = linux_sigcode, + .sv_szsigcode = &linux_szsigcode, + .sv_prepsyscall = linux_prepsyscall, + .sv_name = "Linux ELF", + .sv_coredump = elf32_coredump, + .sv_imgact_try = exec_linux_imgact_try, + .sv_minsigstksz = LINUX_MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_ALL, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_linux_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf32_Brandinfo linux_brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.1", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.1", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; static Elf32_Brandinfo linux_glibc2brand = { - ELFOSABI_LINUX, - EM_386, - "Linux", - "/compat/linux", - "/lib/ld-linux.so.2", - &elf_linux_sysvec, - NULL, - BI_CAN_EXEC_DYN, - }; + .brand = ELFOSABI_LINUX, + .machine = EM_386, + .compat_3_brand = "Linux", + .emul_path = "/compat/linux", + .interp_path = "/lib/ld-linux.so.2", + .sysvec = &elf_linux_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, +}; Elf32_Brandinfo *linux_brandlist[] = { - &linux_brand, - &linux_glibc2brand, - NULL - }; + &linux_brand, + &linux_glibc2brand, + NULL +}; static int linux_elf_modevent(module_t mod, int type, void *data) Modified: stable/7/sys/ia64/ia64/elf_machdep.c ============================================================================== --- stable/7/sys/ia64/ia64/elf_machdep.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/ia64/ia64/elf_machdep.c Fri Jan 9 11:09:57 2009 (r186936) @@ -54,56 +54,57 @@ Elf_Addr link_elf_get_gp(linker_file_t); extern Elf_Addr fptr_storage[]; struct sysentvec elf64_freebsd_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - __elfN(freebsd_fixup), - sendsig, - NULL, /* sigcode */ - NULL, /* &szsigcode */ - NULL, - "FreeBSD ELF64", - __elfN(coredump), - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_READ|VM_PROT_WRITE, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = __elfN(freebsd_fixup), + .sv_sendsig = sendsig, + .sv_sigcode = NULL, + .sv_szsigcode = NULL, + .sv_prepsyscall = NULL, + .sv_name = "FreeBSD ELF64", + .sv_coredump = __elfN(coredump), + .sv_imgact_try = NULL, + .sv_minsigstksz = MINSIGSTKSZ, + .sv_pagesize = PAGE_SIZE, + .sv_minuser = VM_MIN_ADDRESS, + .sv_maxuser = VM_MAXUSER_ADDRESS, + .sv_usrstack = USRSTACK, + .sv_psstrings = PS_STRINGS, + .sv_stackprot = VM_PROT_READ|VM_PROT_WRITE, + .sv_copyout_strings = exec_copyout_strings, + .sv_setregs = exec_setregs, + .sv_fixlimit = NULL, + .sv_maxssiz = NULL }; static Elf64_Brandinfo freebsd_brand_info = { - ELFOSABI_FREEBSD, - EM_IA_64, - "FreeBSD", - NULL, - "/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, + .brand = ELFOSABI_FREEBSD, + .machine = EM_IA_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, }; SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info); static Elf64_Brandinfo freebsd_brand_oinfo = { - ELFOSABI_FREEBSD, - EM_IA_64, - "FreeBSD", - NULL, - "/usr/libexec/ld-elf.so.1", - &elf64_freebsd_sysvec, - NULL, - BI_CAN_EXEC_DYN, + .brand = ELFOSABI_FREEBSD, + .machine = EM_IA_64, + .compat_3_brand = "FreeBSD", + .emul_path = NULL, + .interp_path = "/usr/libexec/ld-elf.so.1", + .sysvec = &elf64_freebsd_sysvec, + .interp_newpath = NULL, + .flags = BI_CAN_EXEC_DYN, }; SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY, (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo); Modified: stable/7/sys/kern/imgact_aout.c ============================================================================== --- stable/7/sys/kern/imgact_aout.c Fri Jan 9 10:58:59 2009 (r186935) +++ stable/7/sys/kern/imgact_aout.c Fri Jan 9 11:09:57 2009 (r186936) @@ -56,32 +56,33 @@ static int exec_aout_imgact(struct image static int aout_fixup(register_t **stack_base, struct image_params *imgp); struct sysentvec aout_sysvec = { - SYS_MAXSYSCALL, - sysent, - 0, - 0, - NULL, - 0, - NULL, - NULL, - aout_fixup, - sendsig, - sigcode, - &szsigcode, - NULL, - "FreeBSD a.out", - NULL, - NULL, - MINSIGSTKSZ, - PAGE_SIZE, - VM_MIN_ADDRESS, - VM_MAXUSER_ADDRESS, - USRSTACK, - PS_STRINGS, - VM_PROT_ALL, - exec_copyout_strings, - exec_setregs, - NULL + .sv_size = SYS_MAXSYSCALL, + .sv_table = sysent, + .sv_mask = 0, + .sv_sigsize = 0, + .sv_sigtbl = NULL, + .sv_errsize = 0, + .sv_errtbl = NULL, + .sv_transtrap = NULL, + .sv_fixup = aout_fixup, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 11:20:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 879DA106568A; Fri, 9 Jan 2009 11:20:51 +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 73AB68FC13; Fri, 9 Jan 2009 11:20:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BKpKq055100; Fri, 9 Jan 2009 11:20:51 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BKpRX055098; Fri, 9 Jan 2009 11:20:51 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091120.n09BKpRX055098@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 11:20: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: r186937 - stable/7/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:20:52 -0000 Author: dougb Date: Fri Jan 9 11:20:51 2009 New Revision: 186937 URL: http://svn.freebsd.org/changeset/base/186937 Log: MFC the changes from r179725, documentation of the AUTO_UPGRADE knob, and 186677:186749: o Removal of 184781, 184804, and 184832 (automatic installation of files that differ only by VCS Id) o Fix cross-platform builds o Various improvements to the mtree (-U) feature o Remove the last of the MAKEDEV stuff o Switch to using the top level (e.g., /usr/src) Makefile, and specify that we should use the *.mk files from the source directory instead of the installed versions. o Check for the deprecated 'nodev' option in /etc/fstab o Add support for the IGNORE_FILES variable o Before installing a file check to make sure that the target does not already exist as a directory o Check to be sure that the file installed and error out if not o We only need to check for the presence of the target of $PAGER if that variable is actually set Modified: stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mergemaster/mergemaster.8 stable/7/usr.sbin/mergemaster/mergemaster.sh Modified: stable/7/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:09:57 2009 (r186936) +++ stable/7/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:20:51 2009 (r186937) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2003 Douglas Barton +.\" Copyright (c) 1998-2009 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2006 +.Dd January 2, 2009 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,14 +32,14 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipCPU +.Op Fl achiprsvCPU +.Op Fl A Ar Target architecture +.Op Fl D Ar /destdir/path .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d .Op Fl u Ar N .Op Fl w Ar N -.Op Fl A Ar architecture -.Op Fl D Ar /path .Sh DESCRIPTION The .Nm @@ -54,7 +54,7 @@ recommended that you back up your directory before beginning this process. .Pp The script uses -.Pa /usr/src/etc/Makefile +.Pa /usr/src/Makefile to build a temporary root environment from .Pa / down, populating that environment with the various @@ -218,6 +218,14 @@ Specify the path to the directory where .Xr make 1 . (In other words, where your sources are, but -s was already taken.) +In previous versions of +.Nm +you needed to specify the path all the way to +.Pa src/etc . +Starting with r186678 you only need to specify the path to +.Pa src . +.Nm +will convert the path for you if you use the old method. .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root @@ -236,7 +244,7 @@ Supply an alternate screen width to the .Xr sdiff 1 command in numbers of columns. The default is 80. -.It Fl A Ar architecture +.It Fl A Ar Target architecture Specify an alternative .Ev TARGET_ARCH architecture name. @@ -294,24 +302,33 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # +# The target architecture (unset by default) +#ARCHSTRING='TARGET_ARCH=' +# +# Sourcedir is the directory to do the 'make' in (where the new files are) +#SOURCEDIR='/usr/src' +# # Directory to install the temporary root environment into #TEMPROOT='/var/tmp/temproot' # +# Specify the destination directory for the installed files +#DESTDIR= +# # Strict comparison bypasses the CVS $Id tests and compares every file #STRICT=no # # Type of diff, such as unified, context, etc. #DIFF_FLAG='-u' # -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags -# # Verbose mode includes more details and additional checks #VERBOSE= # # Automatically install files that do not exist on the system already #AUTO_INSTALL= # +# Automatically upgrade files that have not been user modified +#AUTO_UPGRADE= +# # Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf #COMP_CONFS=yes # @@ -319,25 +336,26 @@ with all values commented out: #PRESERVE_FILES=yes #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# Sourcedir is the directory to do the 'make' in (where the new files are) -#SOURCEDIR='/usr/src/etc' -# # The umask for mergemaster to compare the default file's modes to #NEW_UMASK=022 # -# Specify the destination directory for the installed files -#DESTDIR= -# # The following options have no command line overrides +# +# Files to always avoid comparing +#IGNORE_FILES='/etc/motd /etc/printcap foo bar' +# +# Additional options for diff. This will get unset when using -s. +#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags +# +# Location to store the list of mtree values for AUTO_UPGRADE purposes +#MTREEDB='/var/db' +# # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # -# Don't compare the old and new motd files -#IGNORE_MOTD=yes -# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= @@ -354,6 +372,11 @@ Invalid command line option Failure to create the temporary root environment .Pp Failure to populate the temporary root +.Pp +Presence of the 'nodev' option in +.Pa /etc/fstab +.Pp +Failure to install a file .Sh EXAMPLES Typically all you will need to do is type .Nm Modified: stable/7/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/7/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:09:57 2009 (r186936) +++ stable/7/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:20:51 2009 (r186937) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2004 Douglas Barton +# Copyright 1998-2009 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -244,10 +244,6 @@ press_to_continue () { # TEMPROOT='/var/tmp/temproot' -# Assign the location of the mtree database -# -MTREEDB='/var/db/mergemaster.mtree' - # Read /etc/mergemaster.rc first so the one in $HOME can override # if [ -r /etc/mergemaster.rc ]; then @@ -260,12 +256,17 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in A) - ARCHSTRING='MACHINE_ARCH='${OPTARG} + ARCHSTRING='TARGET_ARCH='${OPTARG} ;; U) AUTO_UPGRADE=yes @@ -338,10 +339,30 @@ if [ -n "${PRESERVE_FILES}" -a -z "${PRE PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` fi -# Check the for the mtree database in DESTDIR. -if [ ! -f ${DESTDIR}${MTREEDB} ]; then - echo "*** Unable to find mtree database. Skipping auto-upgrade." - unset AUTO_UPGRADE +# Check for the mtree database in DESTDIR +case "${AUTO_UPGRADE}" in +'') ;; # If the option is not set no need to run the test or warn the user +*) + if [ ! -f "${DESTDIR}${MTREEFILE}" ]; then + echo '' + echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo '' + press_to_continue + unset AUTO_UPGRADE + fi + ;; +esac + +if [ -e "${DESTDIR}/etc/fstab" ]; then + if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent the filesystem from being mounted on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 + fi fi echo '' @@ -350,7 +371,8 @@ echo '' # case "${DONT_CHECK_PAGER}" in '') - while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do +check_pager () { + while ! type "${PAGER%% *}" >/dev/null; do echo " *** Your PAGER environment variable specifies '${PAGER}', but" echo " due to the limited PATH that I use for security reasons," echo " I cannot execute it. So, what would you like to do?" @@ -392,6 +414,10 @@ case "${DONT_CHECK_PAGER}" in esac echo '' done +} + if [ -n "${PAGER}" ]; then + check_pager + fi ;; esac @@ -412,14 +438,25 @@ DIFF_FLAG=${DIFF_FLAG:--u} # Assign the source directory # -SOURCEDIR=${SOURCEDIR:-/usr/src/etc} +SOURCEDIR=${SOURCEDIR:-/usr/src} +if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ + -f ${SOURCEDIR}/../Makefile.inc1 ]; then + echo " *** The source directory you specified (${SOURCEDIR})" + echo " will be reset to ${SOURCEDIR}/.." + echo '' + sleep 3 + SOURCEDIR=${SOURCEDIR}/.. +fi + +# Setup make to use system files from SOURCEDIR +MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # CHANGED= -if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEDB}" ]; then - for file in `mtree -eq -f ${DESTDIR}${MTREEDB} -p ${DESTDIR}/ \ +if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then + for file in `mtree -eq -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED} ${DESTDIR}/$file" @@ -552,14 +589,14 @@ case "${RERUN}" in case "${DESTDIR}" in '') ;; *) - make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs + ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac - make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ - DESTDIR=${TEMPROOT} distribution;} || + od=${TEMPROOT}/usr/obj + ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; @@ -569,8 +606,8 @@ case "${RERUN}" in *) # Only set up files that are crucial to {build|install}world { mkdir -p ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/master.passwd ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/group ${TEMPROOT}/etc;} || + cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && + cp -p ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || { echo ''; echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; echo ''; @@ -599,17 +636,23 @@ case "${RERUN}" in esac # Avoid comparing the motd if the user specifies it in .mergemasterrc + # Compatibility shim to be removed in FreeBSD 9.x case "${IGNORE_MOTD}" in '') ;; - *) rm -f ${TEMPROOT}/etc/motd + *) IGNORE_FILES="${IGNORE_FILES} /etc/motd" + echo '' + echo "*** You have the IGNORE_MOTD option set in your mergemaster rc file." + echo " This option is deprecated in favor of the IGNORE_FILES option." + echo " Please update your rc file accordingly." + echo '' + press_to_continue ;; esac - # Avoid trying to update MAKEDEV if /dev is on a devfs - if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then - rm -f ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local - fi - + # Avoid comparing the following user specified files + for file in ${IGNORE_FILES}; do + test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} + done ;; # End of the "RERUN" test esac @@ -626,9 +669,9 @@ find ${TEMPROOT}/usr/obj -type f -delete find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null # Build the mtree database in a temporary location. -# TODO: Possibly use mktemp instead for security reasons? +MTREENEW=`mktemp -t mergemaster.mtree` case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREEDB}.new 2>/dev/null +'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 2>/dev/null ;; *) # We don't want to mess with the mtree database on a pre-world run. ;; @@ -647,7 +690,7 @@ if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN echo '' echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" echo " installs all files with the same user, group and modes that" - echo " they are created with by ${SOURCEDIR}/Makefile, compared to" + echo " they are created with by ${SOURCEDIR}/etc/Makefile, compared to" echo " a umask of 022. This umask allows world read permission when" echo " the file's default permissions have it." echo '' @@ -714,6 +757,12 @@ esac # Use the umask/mode information to install the files # Create directories as needed # +install_error () { + echo "*** FATAL ERROR: Unable to install ${1} to ${2}" + echo '' + exit 1 +} + do_install_and_rm () { case "${PRESERVE_FILES}" in [Yy][Ee][Ss]) @@ -724,8 +773,15 @@ do_install_and_rm () { ;; esac - install -m "${1}" "${2}" "${3}" && - rm -f "${2}" + if [ ! -d "${3}/${2##*/}" ]; then + if install -m ${1} ${2} ${3}; then + unlink ${2} + else + install_error ${2} ${3} + fi + else + install_error ${2} ${3} + fi } # 4095 = "obase=10;ibase=8;07777" | bc @@ -828,11 +884,6 @@ mm_install () { ;; esac else # File matched -x - case "${1#.}" in - /dev/MAKEDEV) - NEED_MAKEDEV=yes - ;; - esac do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" fi return $? @@ -904,7 +955,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th fi # Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does +# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does # check the scripts in ./dev, as we'd like (assuming no devfs of course). # for COMPFILE in `find . -type f -size +0`; do @@ -986,9 +1037,10 @@ done # This is for the do way up there a echo '' echo "*** Comparison complete" -if [ -f "${DESTDIR}${MTREEDB}.new" ]; then +if [ -f "${DESTDIR}${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - mv -f ${DESTDIR}${MTREEDB}.new ${DESTDIR}${MTREEDB} 2>/dev/null + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE} fi echo '' @@ -1096,16 +1148,6 @@ run_it_now () { esac } -case "${NEED_MAKEDEV}" in -'') ;; -*) - echo '' - echo "*** You installed a new ${DESTDIR}/dev/MAKEDEV script, so make sure that you run" - echo " 'cd ${DESTDIR}/dev && /bin/sh MAKEDEV all' to rebuild your devices" - run_it_now "cd ${DESTDIR}/dev && /bin/sh MAKEDEV all" - ;; -esac - case "${NEED_NEWALIASES}" in '') ;; *) @@ -1187,7 +1229,7 @@ esac case "${PRE_WORLD}" in '') ;; *) - MAKE_CONF="${SOURCEDIR%etc}share/examples/etc/make.conf" + MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" (echo '' echo '*** Comparing make variables' From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 11:21:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25019106566C; Fri, 9 Jan 2009 11:21:26 +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 117518FC25; Fri, 9 Jan 2009 11:21:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BLPZ3055160; Fri, 9 Jan 2009 11:21:25 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BLP32055158; Fri, 9 Jan 2009 11:21:25 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091121.n09BLP32055158@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 11:21:25 +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: r186938 - stable/6/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:21:27 -0000 Author: dougb Date: Fri Jan 9 11:21:25 2009 New Revision: 186938 URL: http://svn.freebsd.org/changeset/base/186938 Log: MFC the changes from r179725, documentation of the AUTO_UPGRADE knob, and 186677:186749: o Removal of 184781, 184804, and 184832 (automatic installation of files that differ only by VCS Id) o Fix cross-platform builds o Various improvements to the mtree (-U) feature o Remove the last of the MAKEDEV stuff o Switch to using the top level (e.g., /usr/src) Makefile, and specify that we should use the *.mk files from the source directory instead of the installed versions. o Check for the deprecated 'nodev' option in /etc/fstab o Add support for the IGNORE_FILES variable o Before installing a file check to make sure that the target does not already exist as a directory o Check to be sure that the file installed and error out if not o We only need to check for the presence of the target of $PAGER if that variable is actually set Modified: stable/6/usr.sbin/mergemaster/ (props changed) stable/6/usr.sbin/mergemaster/mergemaster.8 stable/6/usr.sbin/mergemaster/mergemaster.sh Modified: stable/6/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- stable/6/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:20:51 2009 (r186937) +++ stable/6/usr.sbin/mergemaster/mergemaster.8 Fri Jan 9 11:21:25 2009 (r186938) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2003 Douglas Barton +.\" Copyright (c) 1998-2009 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2006 +.Dd January 2, 2009 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,14 +32,14 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipCPU +.Op Fl achiprsvCPU +.Op Fl A Ar Target architecture +.Op Fl D Ar /destdir/path .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d .Op Fl u Ar N .Op Fl w Ar N -.Op Fl A Ar architecture -.Op Fl D Ar /path .Sh DESCRIPTION The .Nm @@ -54,7 +54,7 @@ recommended that you back up your directory before beginning this process. .Pp The script uses -.Pa /usr/src/etc/Makefile +.Pa /usr/src/Makefile to build a temporary root environment from .Pa / down, populating that environment with the various @@ -218,6 +218,14 @@ Specify the path to the directory where .Xr make 1 . (In other words, where your sources are, but -s was already taken.) +In previous versions of +.Nm +you needed to specify the path all the way to +.Pa src/etc . +Starting with r186678 you only need to specify the path to +.Pa src . +.Nm +will convert the path for you if you use the old method. .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root @@ -236,7 +244,7 @@ Supply an alternate screen width to the .Xr sdiff 1 command in numbers of columns. The default is 80. -.It Fl A Ar architecture +.It Fl A Ar Target architecture Specify an alternative .Ev TARGET_ARCH architecture name. @@ -294,24 +302,33 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # +# The target architecture (unset by default) +#ARCHSTRING='TARGET_ARCH=' +# +# Sourcedir is the directory to do the 'make' in (where the new files are) +#SOURCEDIR='/usr/src' +# # Directory to install the temporary root environment into #TEMPROOT='/var/tmp/temproot' # +# Specify the destination directory for the installed files +#DESTDIR= +# # Strict comparison bypasses the CVS $Id tests and compares every file #STRICT=no # # Type of diff, such as unified, context, etc. #DIFF_FLAG='-u' # -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags -# # Verbose mode includes more details and additional checks #VERBOSE= # # Automatically install files that do not exist on the system already #AUTO_INSTALL= # +# Automatically upgrade files that have not been user modified +#AUTO_UPGRADE= +# # Compare /etc/rc.conf[.local] to /etc/defaults/rc.conf #COMP_CONFS=yes # @@ -319,25 +336,26 @@ with all values commented out: #PRESERVE_FILES=yes #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# Sourcedir is the directory to do the 'make' in (where the new files are) -#SOURCEDIR='/usr/src/etc' -# # The umask for mergemaster to compare the default file's modes to #NEW_UMASK=022 # -# Specify the destination directory for the installed files -#DESTDIR= -# # The following options have no command line overrides +# +# Files to always avoid comparing +#IGNORE_FILES='/etc/motd /etc/printcap foo bar' +# +# Additional options for diff. This will get unset when using -s. +#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags +# +# Location to store the list of mtree values for AUTO_UPGRADE purposes +#MTREEDB='/var/db' +# # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # -# Don't compare the old and new motd files -#IGNORE_MOTD=yes -# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= @@ -354,6 +372,11 @@ Invalid command line option Failure to create the temporary root environment .Pp Failure to populate the temporary root +.Pp +Presence of the 'nodev' option in +.Pa /etc/fstab +.Pp +Failure to install a file .Sh EXAMPLES Typically all you will need to do is type .Nm Modified: stable/6/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/6/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:20:51 2009 (r186937) +++ stable/6/usr.sbin/mergemaster/mergemaster.sh Fri Jan 9 11:21:25 2009 (r186938) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2004 Douglas Barton +# Copyright 1998-2009 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -244,10 +244,6 @@ press_to_continue () { # TEMPROOT='/var/tmp/temproot' -# Assign the location of the mtree database -# -MTREEDB='/var/db/mergemaster.mtree' - # Read /etc/mergemaster.rc first so the one in $HOME can override # if [ -r /etc/mergemaster.rc ]; then @@ -260,12 +256,17 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in A) - ARCHSTRING='MACHINE_ARCH='${OPTARG} + ARCHSTRING='TARGET_ARCH='${OPTARG} ;; U) AUTO_UPGRADE=yes @@ -338,10 +339,30 @@ if [ -n "${PRESERVE_FILES}" -a -z "${PRE PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` fi -# Check the for the mtree database in DESTDIR. -if [ ! -f ${DESTDIR}${MTREEDB} ]; then - echo "*** Unable to find mtree database. Skipping auto-upgrade." - unset AUTO_UPGRADE +# Check for the mtree database in DESTDIR +case "${AUTO_UPGRADE}" in +'') ;; # If the option is not set no need to run the test or warn the user +*) + if [ ! -f "${DESTDIR}${MTREEFILE}" ]; then + echo '' + echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo '' + press_to_continue + unset AUTO_UPGRADE + fi + ;; +esac + +if [ -e "${DESTDIR}/etc/fstab" ]; then + if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent the filesystem from being mounted on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 + fi fi echo '' @@ -350,7 +371,8 @@ echo '' # case "${DONT_CHECK_PAGER}" in '') - while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do +check_pager () { + while ! type "${PAGER%% *}" >/dev/null; do echo " *** Your PAGER environment variable specifies '${PAGER}', but" echo " due to the limited PATH that I use for security reasons," echo " I cannot execute it. So, what would you like to do?" @@ -392,6 +414,10 @@ case "${DONT_CHECK_PAGER}" in esac echo '' done +} + if [ -n "${PAGER}" ]; then + check_pager + fi ;; esac @@ -412,14 +438,25 @@ DIFF_FLAG=${DIFF_FLAG:--u} # Assign the source directory # -SOURCEDIR=${SOURCEDIR:-/usr/src/etc} +SOURCEDIR=${SOURCEDIR:-/usr/src} +if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ + -f ${SOURCEDIR}/../Makefile.inc1 ]; then + echo " *** The source directory you specified (${SOURCEDIR})" + echo " will be reset to ${SOURCEDIR}/.." + echo '' + sleep 3 + SOURCEDIR=${SOURCEDIR}/.. +fi + +# Setup make to use system files from SOURCEDIR +MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # CHANGED= -if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEDB}" ]; then - for file in `mtree -eq -f ${DESTDIR}${MTREEDB} -p ${DESTDIR}/ \ +if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then + for file in `mtree -eq -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED} ${DESTDIR}/$file" @@ -552,14 +589,14 @@ case "${RERUN}" in case "${DESTDIR}" in '') ;; *) - make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs + ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac - make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ - DESTDIR=${TEMPROOT} distribution;} || + od=${TEMPROOT}/usr/obj + ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} _obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} everything SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=$od ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; @@ -569,8 +606,8 @@ case "${RERUN}" in *) # Only set up files that are crucial to {build|install}world { mkdir -p ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/master.passwd ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/group ${TEMPROOT}/etc;} || + cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && + cp -p ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || { echo ''; echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; echo ''; @@ -599,17 +636,17 @@ case "${RERUN}" in esac # Avoid comparing the motd if the user specifies it in .mergemasterrc + # Compatibility shim to be removed in FreeBSD 9.x case "${IGNORE_MOTD}" in '') ;; - *) rm -f ${TEMPROOT}/etc/motd + *) IGNORE_FILES="${IGNORE_FILES} /etc/motd" ;; esac - # Avoid trying to update MAKEDEV if /dev is on a devfs - if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then - rm -f ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local - fi - + # Avoid comparing the following user specified files + for file in ${IGNORE_FILES}; do + test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} + done ;; # End of the "RERUN" test esac @@ -626,9 +663,9 @@ find ${TEMPROOT}/usr/obj -type f -delete find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null # Build the mtree database in a temporary location. -# TODO: Possibly use mktemp instead for security reasons? +MTREENEW=`mktemp -t mergemaster.mtree` case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREEDB}.new 2>/dev/null +'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 2>/dev/null ;; *) # We don't want to mess with the mtree database on a pre-world run. ;; @@ -647,7 +684,7 @@ if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN echo '' echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" echo " installs all files with the same user, group and modes that" - echo " they are created with by ${SOURCEDIR}/Makefile, compared to" + echo " they are created with by ${SOURCEDIR}/etc/Makefile, compared to" echo " a umask of 022. This umask allows world read permission when" echo " the file's default permissions have it." echo '' @@ -714,6 +751,12 @@ esac # Use the umask/mode information to install the files # Create directories as needed # +install_error () { + echo "*** FATAL ERROR: Unable to install ${1} to ${2}" + echo '' + exit 1 +} + do_install_and_rm () { case "${PRESERVE_FILES}" in [Yy][Ee][Ss]) @@ -724,8 +767,15 @@ do_install_and_rm () { ;; esac - install -m "${1}" "${2}" "${3}" && - rm -f "${2}" + if [ ! -d "${3}/${2##*/}" ]; then + if install -m ${1} ${2} ${3}; then + unlink ${2} + else + install_error ${2} ${3} + fi + else + install_error ${2} ${3} + fi } # 4095 = "obase=10;ibase=8;07777" | bc @@ -828,11 +878,6 @@ mm_install () { ;; esac else # File matched -x - case "${1#.}" in - /dev/MAKEDEV) - NEED_MAKEDEV=yes - ;; - esac do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" fi return $? @@ -904,7 +949,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th fi # Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does +# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does # check the scripts in ./dev, as we'd like (assuming no devfs of course). # for COMPFILE in `find . -type f -size +0`; do @@ -947,25 +992,6 @@ for COMPFILE in `find . -type f -size +0 echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" rm "${COMPFILE}" ;; - - *) - tempfoo=`basename $0` - TMPFILE1=`mktemp -t ${tempfoo}` || break - TMPFILE2=`mktemp -t ${tempfoo}` || break - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > "${TMPFILE1}" - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" - if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ - /dev/null 2>&1; then - echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, replacing" - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} upgraded successfully" - echo '' - else - echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" - fi - fi - rm -f "${TMPFILE1}" "${TMPFILE2}" - ;; esac ;; esac @@ -1005,9 +1031,10 @@ done # This is for the do way up there a echo '' echo "*** Comparison complete" -if [ -f "${DESTDIR}${MTREEDB}.new" ]; then +if [ -f "${DESTDIR}${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - mv -f ${DESTDIR}${MTREEDB}.new ${DESTDIR}${MTREEDB} 2>/dev/null + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE} fi echo '' @@ -1115,16 +1142,6 @@ run_it_now () { esac } -case "${NEED_MAKEDEV}" in -'') ;; -*) - echo '' - echo "*** You installed a new ${DESTDIR}/dev/MAKEDEV script, so make sure that you run" - echo " 'cd ${DESTDIR}/dev && /bin/sh MAKEDEV all' to rebuild your devices" - run_it_now "cd ${DESTDIR}/dev && /bin/sh MAKEDEV all" - ;; -esac - case "${NEED_NEWALIASES}" in '') ;; *) @@ -1206,7 +1223,7 @@ esac case "${PRE_WORLD}" in '') ;; *) - MAKE_CONF="${SOURCEDIR%etc}share/examples/etc/make.conf" + MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" (echo '' echo '*** Comparing make variables' From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 11:36:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E06F1065688; Fri, 9 Jan 2009 11:36:30 +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 4A3488FC19; Fri, 9 Jan 2009 11:36:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BaU6R055482; Fri, 9 Jan 2009 11:36:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BaU39055481; Fri, 9 Jan 2009 11:36:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901091136.n09BaU39055481@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 11:36:30 +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: r186939 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:36:31 -0000 Author: mav Date: Fri Jan 9 11:36:30 2009 New Revision: 186939 URL: http://svn.freebsd.org/changeset/base/186939 Log: MFC rev. 186154 If possible, try to obtain max_mhz on cpufreq attach instead of first request. On HyperThreading CPUs logical cores have same frequency, so setting it on any core will change the other's one. In most cases first request to the second core will be the "set" request, done after setting frequency of the first core. In such case second CPU will obtain throttled frequency of the first core as it's max_mhz making cpufreq broken due to different frequency sets. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/kern_cpu.c Modified: stable/7/sys/kern/kern_cpu.c ============================================================================== --- stable/7/sys/kern/kern_cpu.c Fri Jan 9 11:21:25 2009 (r186938) +++ stable/7/sys/kern/kern_cpu.c Fri Jan 9 11:36:30 2009 (r186939) @@ -144,7 +144,9 @@ static int cpufreq_attach(device_t dev) { struct cpufreq_softc *sc; + struct pcpu *pc; device_t parent; + uint64_t rate; int numdevs; CF_DEBUG("initializing %s\n", device_get_nameunit(dev)); @@ -156,7 +158,12 @@ cpufreq_attach(device_t dev) CF_MTX_INIT(&sc->lock); sc->curr_level.total_set.freq = CPUFREQ_VAL_UNKNOWN; SLIST_INIT(&sc->saved_freq); - sc->max_mhz = CPUFREQ_VAL_UNKNOWN; + /* Try to get current CPU freq to use it as maximum later if needed */ + pc = cpu_get_pcpu(dev); + if (cpu_est_clockrate(pc->pc_cpuid, &rate) == 0) + sc->max_mhz = rate / 1000000; + else + sc->max_mhz = CPUFREQ_VAL_UNKNOWN; /* * Only initialize one set of sysctls for all CPUs. In the future, From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 11:45:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A7D010656C0; Fri, 9 Jan 2009 11:45:13 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 892F18FC0C; Fri, 9 Jan 2009 11:45:13 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BjDmL055726; Fri, 9 Jan 2009 11:45:13 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09BjD82055725; Fri, 9 Jan 2009 11:45:13 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200901091145.n09BjD82055725@svn.freebsd.org> From: Poul-Henning Kamp Date: Fri, 9 Jan 2009 11:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186941 - head/lib/libmd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:45:14 -0000 Author: phk Date: Fri Jan 9 11:45:13 2009 New Revision: 186941 URL: http://svn.freebsd.org/changeset/base/186941 Log: Remove reference to no longer existing document. Spotted by: Bjoern Voigt Modified: head/lib/libmd/mdX.3 Modified: head/lib/libmd/mdX.3 ============================================================================== --- head/lib/libmd/mdX.3 Fri Jan 9 11:44:22 2009 (r186940) +++ head/lib/libmd/mdX.3 Fri Jan 9 11:45:13 2009 (r186941) @@ -164,11 +164,6 @@ argument is non-null it must point to at .%O RFC 1321 .Re .Rs -.%A RSA Laboratories -.%T Frequently Asked Questions About today's Cryptography -.%O \& -.Re -.Rs .%A H. Dobbertin .%T Alf Swindles Ann .%J CryptoBytes From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 11:45:46 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585F71065673; Fri, 9 Jan 2009 11:45:46 +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 460A38FC14; Fri, 9 Jan 2009 11:45:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09BjkuX055778; Fri, 9 Jan 2009 11:45:46 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Bjjll055772; Fri, 9 Jan 2009 11:45:45 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901091145.n09Bjjll055772@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 11:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186942 - in head/contrib/bind9: . lib/dns lib/isc/unix X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 11:45:47 -0000 Author: dougb Date: Fri Jan 9 11:45:45 2009 New Revision: 186942 URL: http://svn.freebsd.org/changeset/base/186942 Log: Merge from vendor/bind9/dist as of the 9.4.3-P1 import Modified: head/contrib/bind9/ (props changed) head/contrib/bind9/CHANGES head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/openssldsa_link.c head/contrib/bind9/lib/dns/opensslrsa_link.c head/contrib/bind9/lib/isc/unix/socket.c head/contrib/bind9/version Modified: head/contrib/bind9/CHANGES ============================================================================== --- head/contrib/bind9/CHANGES Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/CHANGES Fri Jan 9 11:45:45 2009 (r186942) @@ -1,3 +1,11 @@ + --- 9.4.3-P1 released --- + +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] --- 9.4.3 released --- Modified: head/contrib/bind9/lib/dns/api ============================================================================== --- head/contrib/bind9/lib/dns/api Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/dns/api Fri Jan 9 11:45:45 2009 (r186942) @@ -1,3 +1,3 @@ LIBINTERFACE = 36 -LIBREVISION = 1 +LIBREVISION = 2 LIBAGE = 0 Modified: head/contrib/bind9/lib/dns/openssldsa_link.c ============================================================================== --- head/contrib/bind9/lib/dns/openssldsa_link.c Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/dns/openssldsa_link.c Fri Jan 9 11:45:45 2009 (r186942) @@ -16,7 +16,7 @@ * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: openssldsa_link.c,v 1.1.6.9 2007/08/28 07:20:04 tbox Exp $ */ +/* $Id: openssldsa_link.c,v 1.1.6.9.28.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -133,7 +133,7 @@ openssldsa_verify(dst_context_t *dctx, c status = DSA_do_verify(digest, ISC_SHA1_DIGESTLENGTH, dsasig, dsa); DSA_SIG_free(dsasig); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: head/contrib/bind9/lib/dns/opensslrsa_link.c ============================================================================== --- head/contrib/bind9/lib/dns/opensslrsa_link.c Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/dns/opensslrsa_link.c Fri Jan 9 11:45:45 2009 (r186942) @@ -17,7 +17,7 @@ /* * Principal Author: Brian Wellington - * $Id: opensslrsa_link.c,v 1.1.6.11 2006/11/07 21:28:49 marka Exp $ + * $Id: opensslrsa_link.c,v 1.1.6.11.58.1 2008/12/24 00:21:22 marka Exp $ */ #ifdef OPENSSL @@ -246,7 +246,7 @@ opensslrsa_verify(dst_context_t *dctx, c status = RSA_verify(type, digest, digestlen, sig->base, RSA_size(rsa), rsa); - if (status == 0) + if (status != 1) return (dst__openssl_toresult(DST_R_VERIFYFAILURE)); return (ISC_R_SUCCESS); Modified: head/contrib/bind9/lib/isc/unix/socket.c ============================================================================== --- head/contrib/bind9/lib/isc/unix/socket.c Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/lib/isc/unix/socket.c Fri Jan 9 11:45:45 2009 (r186942) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.237.18.56 2008/11/12 03:58:36 marka Exp $ */ +/* $Id: socket.c,v 1.237.18.56.2.1 2008/12/23 00:14:34 marka Exp $ */ /*! \file */ @@ -501,7 +501,7 @@ FIX_IPV6_RECVPKTINFO(isc_socket_t *sock) if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, (void *)&on, sizeof(on)) < 0) { - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_RECVPKTINFO) " "%s: %s", sock->fd, @@ -3163,7 +3163,6 @@ watcher(void *uap) { ISC_LOGCATEGORY_GENERAL, ISC_LOGMODULE_SOCKET, ISC_LOG_DEBUG(1), - ISC_LOG_INFO, "unexpected POLL timeout"); } pollstate = poll_active; @@ -4902,7 +4901,7 @@ isc_socket_ipv6only(isc_socket_t *sock, if (setsockopt(sock->fd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&onoff, sizeof(int)) < 0) { char strbuf[ISC_STRERRORSIZE]; - + UNEXPECTED_ERROR(__FILE__, __LINE__, "setsockopt(%d, IPV6_V6ONLY) " "%s: %s", sock->fd, Modified: head/contrib/bind9/version ============================================================================== --- head/contrib/bind9/version Fri Jan 9 11:45:13 2009 (r186941) +++ head/contrib/bind9/version Fri Jan 9 11:45:45 2009 (r186942) @@ -1,4 +1,4 @@ -# $Id: version,v 1.29.134.23 2008/11/12 04:17:12 marka Exp $ +# $Id: version,v 1.29.134.23.2.1 2008/12/24 00:21:22 marka Exp $ # # This file must follow /bin/sh rules. It is imported directly via # configure. @@ -6,5 +6,5 @@ MAJORVER=9 MINORVER=4 PATCHVER=3 -RELEASETYPE= -RELEASEVER= +RELEASETYPE=-P +RELEASEVER=1 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 12:38:41 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0640106566C; Fri, 9 Jan 2009 12:38:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8EFC98FC16; Fri, 9 Jan 2009 12:38:41 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09CcfKC057003; Fri, 9 Jan 2009 12:38:41 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09CcfVZ057002; Fri, 9 Jan 2009 12:38:41 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200901091238.n09CcfVZ057002@svn.freebsd.org> From: Rafal Jaworowski Date: Fri, 9 Jan 2009 12:38:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186947 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 12:38:42 -0000 Author: raj Date: Fri Jan 9 12:38:41 2009 New Revision: 186947 URL: http://svn.freebsd.org/changeset/base/186947 Log: Check PCIE link status before accessing the bus. Some 88F5182-based systems (Linkstation) have problems when PCIE is accessed without any peripherals present. Modified: head/sys/arm/mv/mv_pci.c Modified: head/sys/arm/mv/mv_pci.c ============================================================================== --- head/sys/arm/mv/mv_pci.c Fri Jan 9 12:17:37 2009 (r186946) +++ head/sys/arm/mv/mv_pci.c Fri Jan 9 12:38:41 2009 (r186947) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #define PCIE_REG_STATUS 0x1A04 #define PCIE_REG_IRQ_MASK 0x1910 +#define STATUS_LINK_DOWN 1 #define STATUS_BUS_OFFS 8 #define STATUS_BUS_MASK (0xFF << STATUS_BUS_OFFS) #define STATUS_DEV_OFFS 16 @@ -436,6 +437,8 @@ pcib_mbus_probe(device_t self) P2P_CONF_DEV_OFFS; } else { val = bus_space_read_4(sc->sc_bst, sc->sc_bsh, PCIE_REG_STATUS); + if (val & STATUS_LINK_DOWN) + goto out; bus = sc->sc_busnr = (val & STATUS_BUS_MASK) >> STATUS_BUS_OFFS; dev = sc->sc_devnr = (val & STATUS_DEV_MASK) >> STATUS_DEV_OFFS; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 13:06:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 436F610656F1; Fri, 9 Jan 2009 13:06:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3119F8FC1B; Fri, 9 Jan 2009 13:06:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09D6v8l057546; Fri, 9 Jan 2009 13:06:57 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09D6vcB057544; Fri, 9 Jan 2009 13:06:57 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901091306.n09D6vcB057544@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 13:06:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186948 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:06:58 -0000 Author: bz Date: Fri Jan 9 13:06:56 2009 New Revision: 186948 URL: http://svn.freebsd.org/changeset/base/186948 Log: Make SIOCGIFADDR and related, as well as SIOCGIFADDR_IN6 and related jail-aware. Up to now we returned the first address of the interface for SIOCGIFADDR w/o an ifr_addr in the query. This caused problems for programs querying for an address but running inside a jail, as the address returned usually did not belong to the jail. Like for v6, if there was an ifr_addr given on v4, you could probe for more addresses on the interfaces that you were not allowed to see from inside a jail. Return an error (EADDRNOTAVAIL) in that case now unless the address is on the given interface and valid for the jail. PR: kern/114325 Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 9 12:38:41 2009 (r186947) +++ head/sys/netinet/in.c Fri Jan 9 13:06:56 2009 (r186948) @@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include @@ -261,13 +263,19 @@ in_control(struct socket *so, u_long cmd LIST_FOREACH(iap, INADDR_HASH(dst.s_addr), ia_hash) if (iap->ia_ifp == ifp && iap->ia_addr.sin_addr.s_addr == dst.s_addr) { - ia = iap; + if (td == NULL || prison_check_ip4( + td->td_ucred, &dst)) + ia = iap; break; } if (ia == NULL) TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { iap = ifatoia(ifa); if (iap->ia_addr.sin_family == AF_INET) { + if (td != NULL && + !prison_check_ip4(td->td_ucred, + &iap->ia_addr.sin_addr)) + continue; ia = iap; break; } Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Jan 9 12:38:41 2009 (r186947) +++ head/sys/netinet6/in6.c Fri Jan 9 13:06:56 2009 (r186948) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -329,6 +330,9 @@ in6_control(struct socket *so, u_long cm error = in6_setscope(&sa6->sin6_addr, ifp, NULL); if (error != 0) return (error); + if (td != NULL && !prison_check_ip6(td->td_ucred, + &sa6->sin6_addr)) + return (EADDRNOTAVAIL); ia = in6ifa_ifpwithaddr(ifp, &sa6->sin6_addr); } else ia = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 13:10:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 813D2106568F; Fri, 9 Jan 2009 13:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 385CD8FC1C; Fri, 9 Jan 2009 13:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id AF06A41C64A; Fri, 9 Jan 2009 14:10:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 1EWkTRm6vIsc; Fri, 9 Jan 2009 14:10:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 55C7041C62D; Fri, 9 Jan 2009 14:10:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1AEB04448DD; Fri, 9 Jan 2009 13:08:50 +0000 (UTC) Date: Fri, 9 Jan 2009 13:08:49 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901091306.n09D6vcB057544@svn.freebsd.org> Message-ID: <20090109130811.E45399@maildrop.int.zabbadoz.net> References: <200901091306.n09D6vcB057544@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186948 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:10:08 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 13:06:56 2009 > New Revision: 186948 > URL: http://svn.freebsd.org/changeset/base/186948 > > Log: > Make SIOCGIFADDR and related, as well as SIOCGIFADDR_IN6 and related > jail-aware. Up to now we returned the first address of the interface > for SIOCGIFADDR w/o an ifr_addr in the query. This caused problems for > programs querying for an address but running inside a jail, as the > address returned usually did not belong to the jail. One of the programs hitting this is Samba btw. > Like for v6, if there was an ifr_addr given on v4, you could probe > for more addresses on the interfaces that you were not allowed to see > from inside a jail. Return an error (EADDRNOTAVAIL) in that case > now unless the address is on the given interface and valid for the > jail. > > PR: kern/114325 > Reviewed by: rwatson > MFC after: 4 weeks > > Modified: > head/sys/netinet/in.c > head/sys/netinet6/in6.c -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 13:53:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB17F10656D1; Fri, 9 Jan 2009 13:53:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D76AD8FC1D; Fri, 9 Jan 2009 13:53:44 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09DriDl058569; Fri, 9 Jan 2009 13:53:44 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09DriYq058568; Fri, 9 Jan 2009 13:53:44 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200901091353.n09DriYq058568@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Jan 2009 13:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186950 - in stable/7/sys: . contrib/pf dev/cxgb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 13:53:46 -0000 Author: pho Date: Fri Jan 9 13:53:44 2009 New Revision: 186950 URL: http://svn.freebsd.org/changeset/base/186950 Log: MFC r186510: Prevent overflow of uio_resid. Approved by: kib Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_syscalls.c Modified: stable/7/sys/kern/vfs_syscalls.c ============================================================================== --- stable/7/sys/kern/vfs_syscalls.c Fri Jan 9 13:18:13 2009 (r186949) +++ stable/7/sys/kern/vfs_syscalls.c Fri Jan 9 13:53:44 2009 (r186950) @@ -3800,6 +3800,8 @@ kern_getdirentries(struct thread *td, in int error, eofflag; AUDIT_ARG(fd, fd); + if (count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 14:41:37 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 214E31065672; Fri, 9 Jan 2009 14:41:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8B18FC08; Fri, 9 Jan 2009 14:41:37 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09EfaN3059606; Fri, 9 Jan 2009 14:41:36 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09EfaZn059605; Fri, 9 Jan 2009 14:41:36 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901091441.n09EfaZn059605@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Jan 2009 14:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186953 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 14:41:37 -0000 Author: brueffer Date: Fri Jan 9 14:41:36 2009 New Revision: 186953 URL: http://svn.freebsd.org/changeset/base/186953 Log: DEBUG_REDZONE needs DDB which needs KDB. PR: 130324 Submitted by: Jaakko Heinonen MFC after: 3 days Modified: head/share/man/man9/redzone.9 Modified: head/share/man/man9/redzone.9 ============================================================================== --- head/share/man/man9/redzone.9 Fri Jan 9 14:35:55 2009 (r186952) +++ head/share/man/man9/redzone.9 Fri Jan 9 14:41:36 2009 (r186953) @@ -24,13 +24,15 @@ .\" .\" $FreeBSD$ .\" -.Dd January 31, 2006 +.Dd January 9, 2009 .Dt REDZONE 9 .Os .Sh NAME .Nm RedZone .Nd "buffer corruptions detector" .Sh SYNOPSIS +.Cd "options KDB" +.Cd "options DDB" .Cd "options DEBUG_REDZONE" .Sh DESCRIPTION .Nm From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 15:13:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 418C61065691; Fri, 9 Jan 2009 15:13:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F2AC8FC0A; Fri, 9 Jan 2009 15:13:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09FDlLY060242; Fri, 9 Jan 2009 15:13:47 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09FDluo060241; Fri, 9 Jan 2009 15:13:47 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <200901091513.n09FDluo060241@svn.freebsd.org> From: Peter Holm Date: Fri, 9 Jan 2009 15:13:47 +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: r186954 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 15:13:48 -0000 Author: pho Date: Fri Jan 9 15:13:46 2009 New Revision: 186954 URL: http://svn.freebsd.org/changeset/base/186954 Log: MFC r186510: Prevent overflow of uio_resid. Approved by: kib Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_syscalls.c Modified: stable/6/sys/kern/vfs_syscalls.c ============================================================================== --- stable/6/sys/kern/vfs_syscalls.c Fri Jan 9 14:41:36 2009 (r186953) +++ stable/6/sys/kern/vfs_syscalls.c Fri Jan 9 15:13:46 2009 (r186954) @@ -3697,6 +3697,8 @@ getdirentries(td, uap) int error, eofflag; AUDIT_ARG(fd, uap->fd); + if (uap->count > INT_MAX) + return (EINVAL); if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0) return (error); if ((fp->f_flag & FREAD) == 0) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:02:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CB0106564A; Fri, 9 Jan 2009 16:02:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED298FC0A; Fri, 9 Jan 2009 16:02:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09G2Jme061170; Fri, 9 Jan 2009 16:02:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09G2Jj1061164; Fri, 9 Jan 2009 16:02:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091602.n09G2Jj1061164@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 16:02:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:02:20 -0000 Author: adrian Date: Fri Jan 9 16:02:19 2009 New Revision: 186955 URL: http://svn.freebsd.org/changeset/base/186955 Log: Implement a new IP option (not compiled/enabled by default) to allow applications to specify a non-local IP address when bind()'ing a socket to a local endpoint. This allows applications to spoof the client IP address of connections if (obviously!) they somehow are able to receive the traffic normally destined to said clients. This patch doesn't include any changes to ipfw or the bridging code to redirect the client traffic through the PCB checks so TCP gets a shot at it. The normal behaviour is that packets with a non-local destination IP address are not handled locally. This can be dealth with some IPFW hackery; modifications to IPFW to make this less hacky will occur in subsequent commmits. Thanks to Julian Elischer and others at Ironport. This work was approved and donated before Cisco acquired them. Obtained from: Julian Elischer and others MFC after: 2 weeks Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/netinet/in.h head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/ip_output.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/conf/NOTES Fri Jan 9 16:02:19 2009 (r186955) @@ -633,6 +633,14 @@ options ALTQ_PRIQ # Priority Queueing options ALTQ_NOPCC # Required if the TSC is unusable options ALTQ_DEBUG +# IP optional behaviour. +# IP_NONLOCALBIND disables the check that bind() usually makes that the +# Address is one that is assigned to an interface on this machine. +# It allows transparent proxies to pretend to be other machines. +# How the packet GET to that machine is a problem solved elsewhere, +# smart routers, ipfw fwd, etc. +options IP_NONLOCALBIND #Allow impersonation for proxies. + # netgraph(4). Enable the base netgraph code with the NETGRAPH option. # Individual node types can be enabled with the corresponding option # listed below; however, this is not strictly necessary as netgraph Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/conf/options Fri Jan 9 16:02:19 2009 (r186955) @@ -392,6 +392,7 @@ IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h +IP_NONLOCALBIND opt_inet.h IPSEC_FILTERTUNNEL opt_ipsec.h IPSTEALTH IPX Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/in.h Fri Jan 9 16:02:19 2009 (r186955) @@ -441,6 +441,7 @@ __END_DECLS #define IP_FAITH 22 /* bool; accept FAITH'ed connections */ #define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ +#define IP_NONLOCALOK 24 /* allow bind to spoof other machines */ #define IP_FW_TABLE_ADD 40 /* add entry */ #define IP_FW_TABLE_DEL 41 /* delete entry */ Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/in_pcb.c Fri Jan 9 16:02:19 2009 (r186955) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ddb.h" +#include "opt_inet.h" #include "opt_ipsec.h" #include "opt_inet6.h" #include "opt_mac.h" @@ -346,7 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru } else if (sin->sin_addr.s_addr != INADDR_ANY) { sin->sin_port = 0; /* yech... */ bzero(&sin->sin_zero, sizeof(sin->sin_zero)); - if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) + if ( +#if defined(IP_NONLOCALBIND) + ((inp->inp_flags & INP_NONLOCALOK) == 0) && +#endif + (ifa_ifwithaddr((struct sockaddr *)sin) == 0)) return (EADDRNOTAVAIL); } laddr = sin->sin_addr; Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/in_pcb.h Fri Jan 9 16:02:19 2009 (r186955) @@ -411,6 +411,8 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_FAITH 0x200 /* accept FAITH'ed connections */ #define INP_RECVTTL 0x400 /* receive incoming IP TTL */ #define INP_DONTFRAG 0x800 /* don't fragment packet */ +#define INP_NONLOCALOK 0x1000 /* Allow bind to spoof any address */ + /* - requires options IP_NONLOCALBIND */ #define IN6P_IPV6_V6ONLY 0x008000 /* restrict AF_INET6 socket for v6 */ Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Jan 9 15:13:46 2009 (r186954) +++ head/sys/netinet/ip_output.c Fri Jan 9 16:02:19 2009 (r186955) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_ipfw.h" +#include "opt_inet.h" #include "opt_ipsec.h" #include "opt_mac.h" #include "opt_mbuf_stress_test.h" @@ -95,6 +96,12 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_ &mbuf_frag_size, 0, "Fragment outgoing mbufs to this size"); #endif +#if defined(IP_NONLOCALBIND) +static int ip_nonlocalok = 0; +SYSCTL_INT(_net_inet_ip, OID_AUTO, nonlocalok, + CTLFLAG_RW|CTLFLAG_SECURE, &ip_nonlocalok, 0, ""); +#endif + static void ip_mloopback (struct ifnet *, struct mbuf *, struct sockaddr_in *, int); @@ -866,6 +873,13 @@ ip_ctloutput(struct socket *so, struct s return (error); } +#if defined(IP_NONLOCALBIND) + case IP_NONLOCALOK: + if (! ip_nonlocalok) { + error = ENOPROTOOPT; + break; + } +#endif case IP_TOS: case IP_TTL: case IP_MINTTL: @@ -937,6 +951,11 @@ ip_ctloutput(struct socket *so, struct s case IP_DONTFRAG: OPTSET(INP_DONTFRAG); break; +#if defined(IP_NONLOCALBIND) + case IP_NONLOCALOK: + OPTSET(INP_NONLOCALOK); + break; +#endif } break; #undef OPTSET From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:22:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0D6E10657E0; Fri, 9 Jan 2009 16:22:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FBE88FC13; Fri, 9 Jan 2009 16:22:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GMWs9061581; Fri, 9 Jan 2009 16:22:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GMWFp061580; Fri, 9 Jan 2009 16:22:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901091622.n09GMWFp061580@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 16:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186956 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:22:33 -0000 Author: bz Date: Fri Jan 9 16:22:32 2009 New Revision: 186956 URL: http://svn.freebsd.org/changeset/base/186956 Log: Take the cred from curthread rather than curproc as curproc would need locking but the credential from curthread (usually) never changes. Discussed with: jhb MFC after: 2 weeks Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Jan 9 16:02:19 2009 (r186955) +++ head/sys/net/rtsock.c Fri Jan 9 16:22:32 2009 (r186956) @@ -1344,7 +1344,7 @@ done: return (error); } -int +static int sysctl_ifmalist(int af, struct walkarg *w) { INIT_VNET_NET(curvnet); @@ -1365,8 +1365,8 @@ sysctl_ifmalist(int af, struct walkarg * TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (af && af != ifma->ifma_addr->sa_family) continue; - if (jailed(curproc->p_ucred) && - !prison_if(curproc->p_ucred, ifma->ifma_addr)) + if (jailed(curthread->td_ucred) && + !prison_if(curthread->td_ucred, ifma->ifma_addr)) continue; info.rti_info[RTAX_IFA] = ifma->ifma_addr; info.rti_info[RTAX_GATEWAY] = From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:24:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C65B10656CC; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A3D38FC13; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GOAlK061654; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GOAd2061653; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901091624.n09GOAd2061653@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 9 Jan 2009 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186957 - head/lib/libc/string stable/7/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:24:12 -0000 Author: ru Date: Fri Jan 9 16:24:10 2009 New Revision: 186957 URL: http://svn.freebsd.org/changeset/base/186957 Log: Sort MLINKS. Modified: head/lib/libc/string/Makefile.inc Changes in other areas also in this revision: Modified: stable/7/lib/libc/string/Makefile.inc Modified: head/lib/libc/string/Makefile.inc ============================================================================== --- head/lib/libc/string/Makefile.inc Fri Jan 9 16:22:32 2009 (r186956) +++ head/lib/libc/string/Makefile.inc Fri Jan 9 16:24:10 2009 (r186957) @@ -35,34 +35,45 @@ MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 f strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wcscoll.3 wcstok.3 \ wcswidth.3 wcsxfrm.3 wmemchr.3 -MLINKS+=ffs.3 ffsl.3 -MLINKS+=ffs.3 fls.3 -MLINKS+=ffs.3 flsl.3 -MLINKS+=ffs.3 ffsll.3 -MLINKS+=ffs.3 flsll.3 +MLINKS+=ffs.3 ffsl.3 \ + ffs.3 ffsll.3 \ + ffs.3 fls.3 \ + ffs.3 flsl.3 \ + ffs.3 flsll.3 MLINKS+=index.3 rindex.3 MLINKS+=memchr.3 memrchr.3 MLINKS+=strcasecmp.3 strncasecmp.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 MLINKS+=strcmp.3 strncmp.3 -MLINKS+=strcpy.3 stpcpy.3 +MLINKS+=strcpy.3 stpcpy.3 \ + strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 -MLINKS+=strcpy.3 strncpy.3 -MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 -MLINKS+=strerror.3 strerror_r.3 +MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_r.3 \ + strerror.3 sys_errlist.3 \ + strerror.3 sys_nerr.3 MLINKS+=strlcpy.3 strlcat.3 +MLINKS+=strstr.3 strcasestr.3 \ + strstr.3 strnstr.3 MLINKS+=strtok.3 strtok_r.3 -MLINKS+=strstr.3 strcasestr.3 -MLINKS+=strstr.3 strnstr.3 -MLINKS+=wmemchr.3 wmemcmp.3 wmemchr.3 wmemcpy.3 \ - wmemchr.3 wmemmove.3 wmemchr.3 wmemset.3 \ - wmemchr.3 wcscat.3 wmemchr.3 wcschr.3 \ - wmemchr.3 wcscmp.3 wmemchr.3 wcscpy.3 \ - wmemchr.3 wcscspn.3 wmemchr.3 wcsdup.3 \ +MLINKS+=wmemchr.3 wcscat.3 \ + wmemchr.3 wcschr.3 \ + wmemchr.3 wcscmp.3 \ + wmemchr.3 wcscpy.3 \ + wmemchr.3 wcscspn.3 \ + wmemchr.3 wcsdup.3 \ wmemchr.3 wcslcat.3 \ - wmemchr.3 wcslcpy.3 wmemchr.3 wcslen.3 \ - wmemchr.3 wcsncat.3 wmemchr.3 wcsncmp.3 \ - wmemchr.3 wcsncpy.3 wmemchr.3 wcspbrk.3 \ - wmemchr.3 wcsrchr.3 wmemchr.3 wcsspn.3 \ - wmemchr.3 wcsstr.3 + wmemchr.3 wcslcpy.3 \ + wmemchr.3 wcslen.3 \ + wmemchr.3 wcsncat.3 \ + wmemchr.3 wcsncmp.3 \ + wmemchr.3 wcsncpy.3 \ + wmemchr.3 wcspbrk.3 \ + wmemchr.3 wcsrchr.3 \ + wmemchr.3 wcsspn.3 \ + wmemchr.3 wcsstr.3 \ + wmemchr.3 wmemcmp.3 \ + wmemchr.3 wmemcpy.3 \ + wmemchr.3 wmemmove.3 \ + wmemchr.3 wmemset.3 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:24:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C511D10656D3; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B14D28FC14; Fri, 9 Jan 2009 16:24:10 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GOA6t061660; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GOAcu061659; Fri, 9 Jan 2009 16:24:10 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901091624.n09GOAcu061659@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 9 Jan 2009 16:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186957 - head/lib/libc/string stable/7/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:24:14 -0000 Author: ru Date: Fri Jan 9 16:24:10 2009 New Revision: 186957 URL: http://svn.freebsd.org/changeset/base/186957 Log: Sort MLINKS. Modified: stable/7/lib/libc/string/Makefile.inc Changes in other areas also in this revision: Modified: head/lib/libc/string/Makefile.inc Modified: stable/7/lib/libc/string/Makefile.inc ============================================================================== --- stable/7/lib/libc/string/Makefile.inc Fri Jan 9 16:22:32 2009 (r186956) +++ stable/7/lib/libc/string/Makefile.inc Fri Jan 9 16:24:10 2009 (r186957) @@ -35,34 +35,45 @@ MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 f strspn.3 strstr.3 strtok.3 strxfrm.3 swab.3 wcscoll.3 wcstok.3 \ wcswidth.3 wcsxfrm.3 wmemchr.3 -MLINKS+=ffs.3 ffsl.3 -MLINKS+=ffs.3 fls.3 -MLINKS+=ffs.3 flsl.3 -MLINKS+=ffs.3 ffsll.3 -MLINKS+=ffs.3 flsll.3 +MLINKS+=ffs.3 ffsl.3 \ + ffs.3 ffsll.3 \ + ffs.3 fls.3 \ + ffs.3 flsl.3 \ + ffs.3 flsll.3 MLINKS+=index.3 rindex.3 MLINKS+=memchr.3 memrchr.3 MLINKS+=strcasecmp.3 strncasecmp.3 MLINKS+=strcat.3 strncat.3 MLINKS+=strchr.3 strrchr.3 MLINKS+=strcmp.3 strncmp.3 -MLINKS+=strcpy.3 stpcpy.3 +MLINKS+=strcpy.3 stpcpy.3 \ + strcpy.3 strncpy.3 MLINKS+=strdup.3 strndup.3 -MLINKS+=strcpy.3 strncpy.3 -MLINKS+=strerror.3 perror.3 strerror.3 sys_errlist.3 strerror.3 sys_nerr.3 -MLINKS+=strerror.3 strerror_r.3 +MLINKS+=strerror.3 perror.3 \ + strerror.3 strerror_r.3 \ + strerror.3 sys_errlist.3 \ + strerror.3 sys_nerr.3 MLINKS+=strlcpy.3 strlcat.3 +MLINKS+=strstr.3 strcasestr.3 \ + strstr.3 strnstr.3 MLINKS+=strtok.3 strtok_r.3 -MLINKS+=strstr.3 strcasestr.3 -MLINKS+=strstr.3 strnstr.3 -MLINKS+=wmemchr.3 wmemcmp.3 wmemchr.3 wmemcpy.3 \ - wmemchr.3 wmemmove.3 wmemchr.3 wmemset.3 \ - wmemchr.3 wcscat.3 wmemchr.3 wcschr.3 \ - wmemchr.3 wcscmp.3 wmemchr.3 wcscpy.3 \ - wmemchr.3 wcscspn.3 wmemchr.3 wcsdup.3 \ +MLINKS+=wmemchr.3 wcscat.3 \ + wmemchr.3 wcschr.3 \ + wmemchr.3 wcscmp.3 \ + wmemchr.3 wcscpy.3 \ + wmemchr.3 wcscspn.3 \ + wmemchr.3 wcsdup.3 \ wmemchr.3 wcslcat.3 \ - wmemchr.3 wcslcpy.3 wmemchr.3 wcslen.3 \ - wmemchr.3 wcsncat.3 wmemchr.3 wcsncmp.3 \ - wmemchr.3 wcsncpy.3 wmemchr.3 wcspbrk.3 \ - wmemchr.3 wcsrchr.3 wmemchr.3 wcsspn.3 \ - wmemchr.3 wcsstr.3 + wmemchr.3 wcslcpy.3 \ + wmemchr.3 wcslen.3 \ + wmemchr.3 wcsncat.3 \ + wmemchr.3 wcsncmp.3 \ + wmemchr.3 wcsncpy.3 \ + wmemchr.3 wcspbrk.3 \ + wmemchr.3 wcsrchr.3 \ + wmemchr.3 wcsspn.3 \ + wmemchr.3 wcsstr.3 \ + wmemchr.3 wmemcmp.3 \ + wmemchr.3 wmemcpy.3 \ + wmemchr.3 wmemmove.3 \ + wmemchr.3 wmemset.3 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:25:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 489781065734; Fri, 9 Jan 2009 16:25:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 594F28FC24; Fri, 9 Jan 2009 16:25:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id BD88941C64C; Fri, 9 Jan 2009 17:25:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 7kZgFqBh10br; Fri, 9 Jan 2009 17:25:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 6B73341C670; Fri, 9 Jan 2009 17:25:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id CC3E34448DD; Fri, 9 Jan 2009 16:24:11 +0000 (UTC) Date: Fri, 9 Jan 2009 16:24:11 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901091622.n09GMWFp061580@svn.freebsd.org> Message-ID: <20090109162328.W45399@maildrop.int.zabbadoz.net> References: <200901091622.n09GMWFp061580@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186956 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:25:10 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 16:22:32 2009 > New Revision: 186956 > URL: http://svn.freebsd.org/changeset/base/186956 > > Log: > Take the cred from curthread rather than curproc as curproc would need > locking but the credential from curthread (usually) never changes. While there declare the static function static there as well. > Discussed with: jhb > MFC after: 2 weeks > > Modified: > head/sys/net/rtsock.c > > Modified: head/sys/net/rtsock.c > ============================================================================== > --- head/sys/net/rtsock.c Fri Jan 9 16:02:19 2009 (r186955) > +++ head/sys/net/rtsock.c Fri Jan 9 16:22:32 2009 (r186956) > @@ -1344,7 +1344,7 @@ done: > return (error); > } > > -int > +static int > sysctl_ifmalist(int af, struct walkarg *w) > { > INIT_VNET_NET(curvnet); > @@ -1365,8 +1365,8 @@ sysctl_ifmalist(int af, struct walkarg * > TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { > if (af && af != ifma->ifma_addr->sa_family) > continue; > - if (jailed(curproc->p_ucred) && > - !prison_if(curproc->p_ucred, ifma->ifma_addr)) > + if (jailed(curthread->td_ucred) && > + !prison_if(curthread->td_ucred, ifma->ifma_addr)) > continue; > info.rti_info[RTAX_IFA] = ifma->ifma_addr; > info.rti_info[RTAX_GATEWAY] = > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 16:37:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFC8510657E4; Fri, 9 Jan 2009 16:37:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD4D88FC22; Fri, 9 Jan 2009 16:37:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09GbTkS061955; Fri, 9 Jan 2009 16:37:29 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09GbTn5061954; Fri, 9 Jan 2009 16:37:29 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901091637.n09GbTn5061954@svn.freebsd.org> From: Ruslan Ermilov Date: Fri, 9 Jan 2009 16:37: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: r186958 - in stable/7/gnu/usr.bin/cvs: . contrib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 16:37:31 -0000 Author: ru Date: Fri Jan 9 16:37:29 2009 New Revision: 186958 URL: http://svn.freebsd.org/changeset/base/186958 Log: MFC: Instead of using .POSIX:, use the cool looking "@:" rule. Modified: stable/7/gnu/usr.bin/cvs/ (props changed) stable/7/gnu/usr.bin/cvs/contrib/Makefile Modified: stable/7/gnu/usr.bin/cvs/contrib/Makefile ============================================================================== --- stable/7/gnu/usr.bin/cvs/contrib/Makefile Fri Jan 9 16:24:10 2009 (r186957) +++ stable/7/gnu/usr.bin/cvs/contrib/Makefile Fri Jan 9 16:37:29 2009 (r186958) @@ -1,7 +1,5 @@ # $FreeBSD$ -.POSIX: - .include "../Makefile.inc" .PATH: ${CVSDIR}/contrib @@ -21,6 +19,10 @@ CLEANFILES+= $(SCRIPTS) .SUFFIXES: .sh .pl .in +# Prevent Makefile.in from overwriting Makefile through the suffix rules. +Makefile: + @: + .sh: cp ${.IMPSRC} ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 17:02:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54CB21065672 for ; Fri, 9 Jan 2009 17:02:13 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mx1.freebsd.org (Postfix) with ESMTP id D87438FC0C for ; Fri, 9 Jan 2009 17:02:12 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-067-249-182.pools.arcor-ip.net [88.67.249.182]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1LLKkN1oIs-0007kQ; Fri, 09 Jan 2009 18:02:11 +0100 Received: (qmail 28558 invoked from network); 9 Jan 2009 17:02:11 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 9 Jan 2009 17:02:11 -0000 From: Max Laier Organization: FreeBSD To: Adrian Chadd Date: Fri, 9 Jan 2009 18:02:09 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> In-Reply-To: <200901091602.n09G2Jj1061164@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901091802.10287.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+IlRdDJLu0NI9/THE2HgBTbhMJphwGGFAbavq Nrga4SOplHxr2Jcy6Asv/RE2jesq8muvPASUi2b0OYogDeOV2D t2sO/4bWx8+l/BzY6rQ6A== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:02:13 -0000 On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 9 16:02:19 2009 > New Revision: 186955 > URL: http://svn.freebsd.org/changeset/base/186955 > > Log: > Implement a new IP option (not compiled/enabled by default) to allow > applications to specify a non-local IP address when bind()'ing a socket > to a local endpoint. That's a *socket* option ... you had me very worried there for a moment ;) I don't quite see why you'd hide these under a build time option - having the sysctl defaulting to off under CTLFLAG_SECURE seems good enough - if people disagree - make it a boot time tuneable, but I certainly don't see why you should have to rebuild the kernel for a minor thing like this. It certainly isn't performance critical. Some nit picking below ... > Modified: head/sys/netinet/in_pcb.c > @@ -346,7 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru > } else if (sin->sin_addr.s_addr != INADDR_ANY) { > sin->sin_port = 0; /* yech... */ > bzero(&sin->sin_zero, sizeof(sin->sin_zero)); > - if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) > + if ( > +#if defined(IP_NONLOCALBIND) > + ((inp->inp_flags & INP_NONLOCALOK) == 0) && > +#endif > + (ifa_ifwithaddr((struct sockaddr *)sin) == 0)) > return (EADDRNOTAVAIL); > } > laddr = sin->sin_addr; This logic is really hard to get a first glance. Esp. the not NON...OK part. Maybe a comment is called for here - or is this just me being confused? > Modified: head/sys/netinet/ip_output.c > @@ -866,6 +873,13 @@ ip_ctloutput(struct socket *so, struct s > return (error); > } > > +#if defined(IP_NONLOCALBIND) > + case IP_NONLOCALOK: > + if (! ip_nonlocalok) { > + error = ENOPROTOOPT; > + break; > + } > +#endif Indentation is off here. And you should add a /* FALLTHROUGH */ comment to make it clear that this is intended. > case IP_TOS: > case IP_TTL: > case IP_MINTTL: -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 17:16:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFCDE106566C; Fri, 9 Jan 2009 17:16:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBE528FC17; Fri, 9 Jan 2009 17:16:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09HGIXq062769; Fri, 9 Jan 2009 17:16:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09HGIYN062768; Fri, 9 Jan 2009 17:16:18 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091716.n09HGIYN062768@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 17:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186959 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:16:21 -0000 Author: adrian Date: Fri Jan 9 17:16:18 2009 New Revision: 186959 URL: http://svn.freebsd.org/changeset/base/186959 Log: Comment some potentially confusing logic. Nitpicking by: mlaier MFC after: 2 weeks Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Jan 9 16:37:29 2009 (r186958) +++ head/sys/netinet/in_pcb.c Fri Jan 9 17:16:18 2009 (r186959) @@ -347,6 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru } else if (sin->sin_addr.s_addr != INADDR_ANY) { sin->sin_port = 0; /* yech... */ bzero(&sin->sin_zero, sizeof(sin->sin_zero)); + /* + * Is the address a local IP address? + * If INP_NONLOCALOK is set, then the socket may be bound + * to any local endpoint address. + */ if ( #if defined(IP_NONLOCALBIND) ((inp->inp_flags & INP_NONLOCALOK) == 0) && From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 17:18:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CA97106566C; Fri, 9 Jan 2009 17:18:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BBE28FC16; Fri, 9 Jan 2009 17:18:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09HIHV4062852; Fri, 9 Jan 2009 17:18:17 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09HIHqM062851; Fri, 9 Jan 2009 17:18:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091718.n09HIHqM062851@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 17:18:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186960 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:18:18 -0000 Author: adrian Date: Fri Jan 9 17:18:17 2009 New Revision: 186960 URL: http://svn.freebsd.org/changeset/base/186960 Log: Better comment what the socket option does. Thanks to Sam Leffler for suggesting this. Modified: head/sys/netinet/in.h Modified: head/sys/netinet/in.h ============================================================================== --- head/sys/netinet/in.h Fri Jan 9 17:16:18 2009 (r186959) +++ head/sys/netinet/in.h Fri Jan 9 17:18:17 2009 (r186960) @@ -441,7 +441,8 @@ __END_DECLS #define IP_FAITH 22 /* bool; accept FAITH'ed connections */ #define IP_ONESBCAST 23 /* bool: send all-ones broadcast */ -#define IP_NONLOCALOK 24 /* allow bind to spoof other machines */ +#define IP_NONLOCALOK 24 /* bool: allow bind to spoof non-local addresses; + requires kernel compile option IP_NONLOCALBIND */ #define IP_FW_TABLE_ADD 40 /* add entry */ #define IP_FW_TABLE_DEL 41 /* delete entry */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 17:21:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D87210656C1; Fri, 9 Jan 2009 17:21:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C2BF8FC0A; Fri, 9 Jan 2009 17:21:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09HLMPX062962; Fri, 9 Jan 2009 17:21:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09HLMYP062961; Fri, 9 Jan 2009 17:21:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091721.n09HLMYP062961@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 17:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186961 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:21:22 -0000 Author: adrian Date: Fri Jan 9 17:21:22 2009 New Revision: 186961 URL: http://svn.freebsd.org/changeset/base/186961 Log: Fix indentation; add FALLTHROUGH. Thanks Max! Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Jan 9 17:18:17 2009 (r186960) +++ head/sys/netinet/ip_output.c Fri Jan 9 17:21:22 2009 (r186961) @@ -876,9 +876,10 @@ ip_ctloutput(struct socket *so, struct s #if defined(IP_NONLOCALBIND) case IP_NONLOCALOK: if (! ip_nonlocalok) { - error = ENOPROTOOPT; - break; - } + error = ENOPROTOOPT; + break; + } + /* FALLTHROUGH */ #endif case IP_TOS: case IP_TTL: From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 17:56:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0173106566B; Fri, 9 Jan 2009 17:56:53 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 93B8E8FC12; Fri, 9 Jan 2009 17:56:53 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 09:47:27 -0800 Message-ID: <49678DAE.5000903@elischer.org> Date: Fri, 09 Jan 2009 09:47:26 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091716.n09HGIYN062768@svn.freebsd.org> In-Reply-To: <200901091716.n09HGIYN062768@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186959 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 17:56:54 -0000 Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 9 17:16:18 2009 > New Revision: 186959 > URL: http://svn.freebsd.org/changeset/base/186959 > > Log: > Comment some potentially confusing logic. > > Nitpicking by: mlaier > > MFC after: 2 weeks > > Modified: > head/sys/netinet/in_pcb.c > > Modified: head/sys/netinet/in_pcb.c > ============================================================================== > --- head/sys/netinet/in_pcb.c Fri Jan 9 16:37:29 2009 (r186958) > +++ head/sys/netinet/in_pcb.c Fri Jan 9 17:16:18 2009 (r186959) > @@ -347,6 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru > } else if (sin->sin_addr.s_addr != INADDR_ANY) { > sin->sin_port = 0; /* yech... */ > bzero(&sin->sin_zero, sizeof(sin->sin_zero)); > + /* > + * Is the address a local IP address? > + * If INP_NONLOCALOK is set, then the socket may be bound > + * to any local endpoint address. ^ NON or "any address, local or not" > + */ > if ( > #if defined(IP_NONLOCALBIND) > ((inp->inp_flags & INP_NONLOCALOK) == 0) && From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 18:08:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02566106564A; Fri, 9 Jan 2009 18:08:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2EB88FC18; Fri, 9 Jan 2009 18:08:50 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09I8oet064445; Fri, 9 Jan 2009 18:08:50 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09I8oFr064442; Fri, 9 Jan 2009 18:08:50 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901091808.n09I8oFr064442@svn.freebsd.org> From: Sam Leffler Date: Fri, 9 Jan 2009 18:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186962 - in stable/7/tools/tools/nanobsd: . Files/root X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:08:52 -0000 Author: sam Date: Fri Jan 9 18:08:50 2009 New Revision: 186962 URL: http://svn.freebsd.org/changeset/base/186962 Log: sync with HEAD OK'd by: phk Added: stable/7/tools/tools/nanobsd/Files/root/save_cfg - copied unchanged from r181082, head/tools/tools/nanobsd/Files/root/save_cfg Modified: stable/7/tools/tools/nanobsd/ (props changed) stable/7/tools/tools/nanobsd/FlashDevice.sub stable/7/tools/tools/nanobsd/nanobsd.sh Copied: stable/7/tools/tools/nanobsd/Files/root/save_cfg (from r181082, head/tools/tools/nanobsd/Files/root/save_cfg) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/tools/tools/nanobsd/Files/root/save_cfg Fri Jan 9 18:08:50 2009 (r186962, copy of r181082, head/tools/tools/nanobsd/Files/root/save_cfg) @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright (c) 2006 Mathieu Arnold +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +set -e + +trap "umount /cfg" 1 2 15 EXIT +mount /cfg +( +cd /cfg +for i in "$@" `find * -type f` +do + cmp -s /etc/$i /cfg/$i || cp -pfv /etc/$i /cfg/$i +done +) +umount /cfg +trap 1 2 15 EXIT Modified: stable/7/tools/tools/nanobsd/FlashDevice.sub ============================================================================== --- stable/7/tools/tools/nanobsd/FlashDevice.sub Fri Jan 9 17:21:22 2009 (r186961) +++ stable/7/tools/tools/nanobsd/FlashDevice.sub Fri Jan 9 18:08:50 2009 (r186962) @@ -117,7 +117,7 @@ sub_FlashDevice () { NANO_SECTS=63 ;; 4096|4096mb|4g) - NANO_MEDIASIZE=`expr 4097802240 / 512` + NANO_MEDIASIZE=`expr -e 4097802240 / 512` NANO_HEADS=16 NANO_SECTS=63 ;; @@ -128,9 +128,9 @@ sub_FlashDevice () { esac ;; siliconsystems) - case $2 in + case $a2 in 4096|4g) - NANO_MEDIASIZE=`expr 4224761856 / 512` + NANO_MEDIASIZE=`expr -e 4224761856 / 512` NANO_HEADS=16 NANO_SECTS=63 ;; @@ -141,7 +141,7 @@ sub_FlashDevice () { esac ;; soekris) - case $2 in + case $a2 in net4526 | 4526 | net4826 | 4826 | 64 | 64mb) NANO_MEDIASIZE=125056 NANO_HEADS=4 @@ -154,7 +154,7 @@ sub_FlashDevice () { esac ;; transcend) - case $2 in + case $a2 in dom064m) NANO_MEDIASIZE=125184 NANO_HEADS=4 Modified: stable/7/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- stable/7/tools/tools/nanobsd/nanobsd.sh Fri Jan 9 17:21:22 2009 (r186961) +++ stable/7/tools/tools/nanobsd/nanobsd.sh Fri Jan 9 18:08:50 2009 (r186962) @@ -47,15 +47,23 @@ NANO_TOOLS=tools/tools/nanobsd # Where cust_pkg() finds packages to install NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg +NANO_PACKAGE_LIST="*" # Object tree directory # default is subdir of /usr/obj # XXX: MAKEOBJDIRPREFIX handling... ? #NANO_OBJ="" +# The directory to put the final images +# default is ${NANO_OBJ} +#NANO_DISKIMGDIR="" + # Parallel Make NANO_PMAKE="make -j 3" +# The default name for any image we create. +NANO_IMGNAME="_.disk.full" + # Options to put in make.conf during buildworld only CONF_BUILD=' ' @@ -71,6 +79,9 @@ NANO_KERNEL=GENERIC # Customize commands. NANO_CUSTOMIZE="" +# Late customize commands. +NANO_LATE_CUSTOMIZE="" + # Newfs paramters to use NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 -U" @@ -78,7 +89,7 @@ NANO_NEWFS="-b 4096 -f 512 -i 8192 -O1 - NANO_DRIVE=ad0 # Target media size in 512 bytes sectors -NANO_MEDIASIZE=1000000 +NANO_MEDIASIZE=1200000 # Number of code images on media (1 or 2) NANO_IMAGES=2 @@ -114,6 +125,13 @@ NANO_HEADS=16 NANO_BOOT0CFG="-o packet -s 1 -m 3" NANO_BOOTLOADER="boot/boot0sio" +# Backing type of md(4) device +# Can be "file" or "swap" +NANO_MD_BACKING="file" + +# Progress Print level +PPLEVEL=3 + ####################################################################### # Not a variable at this time @@ -127,7 +145,7 @@ NANO_ARCH=i386 ####################################################################### clean_build ( ) ( - echo "## Clean and create object directory (${MAKEOBJDIRPREFIX})" + pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" if rm -rf ${MAKEOBJDIRPREFIX} > /dev/null 2>&1 ; then true @@ -140,24 +158,25 @@ clean_build ( ) ( ) make_conf_build ( ) ( - echo "## Construct build make.conf ($NANO_MAKE_CONF)" + pprint 2 "Construct build make.conf ($NANO_MAKE_CONF)" echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} echo "${CONF_BUILD}" >> ${NANO_MAKE_CONF} ) build_world ( ) ( - echo "## run buildworld" - echo "### log: ${MAKEOBJDIRPREFIX}/_.bw" + pprint 2 "run buildworld" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bw" cd ${NANO_SRC} - ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} buildworld \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} \ + __MAKE_CONF=${NANO_MAKE_CONF} buildworld \ > ${MAKEOBJDIRPREFIX}/_.bw 2>&1 ) build_kernel ( ) ( - echo "## build kernel ($NANO_KERNEL)" - echo "### log: ${MAKEOBJDIRPREFIX}/_.bk" + pprint 2 "build kernel ($NANO_KERNEL)" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk" if [ -f ${NANO_KERNEL} ] ; then cp ${NANO_KERNEL} ${NANO_SRC}/sys/${NANO_ARCH}/conf @@ -168,14 +187,14 @@ build_kernel ( ) ( # when cross-building unset TARGET_CPUTYPE unset TARGET_BIG_ENDIAN - ${NANO_PMAKE} buildkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} buildkernel \ __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ > ${MAKEOBJDIRPREFIX}/_.bk 2>&1 ) ) clean_world ( ) ( - echo "## Clean and create world directory (${NANO_WORLDDIR})" + pprint 2 "Clean and create world directory (${NANO_WORLDDIR})" if rm -rf ${NANO_WORLDDIR}/ > /dev/null 2>&1 ; then true else @@ -186,17 +205,18 @@ clean_world ( ) ( ) make_conf_install ( ) ( - echo "## Construct install make.conf ($NANO_MAKE_CONF)" + pprint 2 "Construct install make.conf ($NANO_MAKE_CONF)" echo "${CONF_WORLD}" > ${NANO_MAKE_CONF} echo "${CONF_INSTALL}" >> ${NANO_MAKE_CONF} ) install_world ( ) ( - echo "## installworld" - echo "### log: ${MAKEOBJDIRPREFIX}/_.iw" + pprint 2 "installworld" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.iw" cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} \ ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} installworld \ DESTDIR=${NANO_WORLDDIR} \ > ${MAKEOBJDIRPREFIX}/_.iw 2>&1 @@ -205,21 +225,22 @@ install_world ( ) ( install_etc ( ) ( - echo "## install /etc" - echo "### log: ${MAKEOBJDIRPREFIX}/_.etc" + pprint 2 "install /etc" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.etc" cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} \ ${NANO_PMAKE} __MAKE_CONF=${NANO_MAKE_CONF} distribution \ DESTDIR=${NANO_WORLDDIR} \ > ${MAKEOBJDIRPREFIX}/_.etc 2>&1 ) install_kernel ( ) ( - echo "## install kernel" - echo "### log: ${MAKEOBJDIRPREFIX}/_.ik" + pprint 2 "install kernel" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" cd ${NANO_SRC} - ${NANO_PMAKE} installkernel \ + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ DESTDIR=${NANO_WORLDDIR} \ __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 @@ -227,19 +248,31 @@ install_kernel ( ) ( run_customize() ( - echo "## run customize scripts" + pprint 2 "run customize scripts" for c in $NANO_CUSTOMIZE do - echo "## customize \"$c\"" - echo "### log: ${MAKEOBJDIRPREFIX}/_.cust.$c" - echo "### `type $c`" + pprint 2 "customize \"$c\"" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.cust.$c" + pprint 4 "`type $c`" ( $c ) > ${MAKEOBJDIRPREFIX}/_.cust.$c 2>&1 done ) +run_late_customize() ( + + pprint 2 "run late customize scripts" + for c in $NANO_LATE_CUSTOMIZE + do + pprint 2 "late customize \"$c\"" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.late_cust.$c" + pprint 4 "`type $c`" + ( $c ) > ${MAKEOBJDIRPREFIX}/_.late_cust.$c 2>&1 + done +) + setup_nanobsd ( ) ( - echo "## configure nanobsd setup" - echo "### log: ${MAKEOBJDIRPREFIX}/_.dl" + pprint 2 "configure nanobsd setup" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.dl" ( cd ${NANO_WORLDDIR} @@ -249,7 +282,7 @@ setup_nanobsd ( ) ( # have hardcoded paths under ${prefix}/etc are not tweakable. if [ -d usr/local/etc ] ; then ( - mkdir etc/local + mkdir -p etc/local cd usr/local/etc find . -print | cpio -dumpl ../../../etc/local cd .. @@ -283,7 +316,7 @@ setup_nanobsd ( ) ( ) setup_nanobsd_etc ( ) ( - echo "## configure nanobsd /etc" + pprint 2 "configure nanobsd /etc" ( cd ${NANO_WORLDDIR} @@ -314,8 +347,8 @@ prune_usr() ( ) create_i386_diskimage ( ) ( - echo "## build diskimage" - echo "### log: ${MAKEOBJDIRPREFIX}/_.di" + pprint 2 "build diskimage" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" ( echo $NANO_MEDIASIZE $NANO_IMAGES \ @@ -372,24 +405,34 @@ create_i386_diskimage ( ) ( # Data partition (if any) starts at cylinder boundary. if ($7 > 0) { print "p 4 165 " c, dsl * cs - } else if ($7 < 0 && $1 > $c) { - print "p 4 165 " c, $1 - $c + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c } else if ($1 < c) { print "Disk space overcommitted by", \ c - $1, "sectors" > "/dev/stderr" exit 2 } + + # Force slice 1 to be marked active. This is necessary + # for booting the image from a USB device to work. + print "a 1" } ' > ${MAKEOBJDIRPREFIX}/_.fdisk - IMG=${MAKEOBJDIRPREFIX}/_.disk.full + IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} MNT=${MAKEOBJDIRPREFIX}/_.mnt mkdir -p ${MNT} - dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ - count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` - - MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}` + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + else + echo "Creating md backing file..." + dd if=/dev/zero of=${IMG} bs=${NANO_SECTS}b \ + count=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` + MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + fi trap "df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT @@ -405,14 +448,17 @@ create_i386_diskimage ( ) ( newfs ${NANO_NEWFS} /dev/${MD}s1a mount /dev/${MD}s1a ${MNT} df -i ${MNT} + echo "Copying worlddir..." ( cd ${NANO_WORLDDIR} && find . -print | cpio -dump ${MNT} ) df -i ${MNT} + echo "Generating mtree..." ( cd ${MNT} && mtree -c ) > ${MAKEOBJDIRPREFIX}/_.mtree ( cd ${MNT} && du -k ) > ${MAKEOBJDIRPREFIX}/_.du umount ${MNT} if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then # Duplicate to second image (if present) + echo "Duplicating to second image..." dd if=/dev/${MD}s1 of=/dev/${MD}s2 bs=64k mount /dev/${MD}s2a ${MNT} for f in ${MNT}/etc/fstab ${MNT}/conf/base/etc/fstab @@ -433,7 +479,13 @@ create_i386_diskimage ( ) ( # XXX: fill from where ? fi - dd if=/dev/${MD}s1 of=${MAKEOBJDIRPREFIX}/_.disk.image bs=64k + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + echo "Writing out _.disk.full..." + dd if=/dev/${MD} of=${IMG} bs=64k + fi + + echo "Writing out _.disk.image..." + dd if=/dev/${MD}s1 of=${NANO_DISKIMGDIR}/_.disk.image bs=64k mdconfig -d -u $MD ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 ) @@ -464,13 +516,52 @@ FlashDevice () { sub_FlashDevice $1 $2 } +####################################################################### +# USB device geometries +# +# Usage: +# UsbDevice Generic 1000 # a generic flash key sold as having 1GB +# +# This function will set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you. +# +# Note that the capacity of a flash key is usually advertised in MB or +# GB, *not* MiB/GiB. As such, the precise number of cylinders available +# for C/H/S geometry may vary depending on the actual flash geometry. +# +# The following generic device layouts are understood: +# generic An alias for generic-hdd. +# generic-hdd 255H 63S/T xxxxC with no MBR restrictions. +# generic-fdd 64H 32S/T xxxxC with no MBR restrictions. +# +# The generic-hdd device is preferred for flash devices larger than 1GB. +# + +UsbDevice () { + a1=`echo $1 | tr '[:upper:]' '[:lower:]'` + case $a1 in + generic-fdd) + NANO_HEADS=64 + NANO_SECTS=32 + NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 )) + ;; + generic|generic-hdd) + NANO_HEADS=255 + NANO_SECTS=63 + NANO_MEDIASIZE=$(( $2 * 1000 * 1000 / 512 )) + ;; + *) + echo "Unknown USB flash device" + exit 2 + ;; + esac +} ####################################################################### # Setup serial console cust_comconsole () ( # Enable getty on console - sed -i "" -e /ttyd0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys + sed -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDIR}/etc/ttys # Disable getty on syscons devices sed -i "" -e '/^ttyv[0-8]/s/ on/ off/' ${NANO_WORLDDIR}/etc/ttys @@ -492,7 +583,7 @@ cust_allow_ssh_root () ( cust_install_files () ( cd ${NANO_TOOLS}/Files - find . -print | grep -v /CVS | cpio -dumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} ) ####################################################################### @@ -502,7 +593,11 @@ cust_pkg () ( # Copy packages into chroot mkdir -p ${NANO_WORLDDIR}/Pkg - cp ${NANO_PACKAGE_DIR}/* ${NANO_WORLDDIR}/Pkg + ( + cd ${NANO_PACKAGE_DIR} + find ${NANO_PACKAGE_LIST} -print | + cpio -dumpv ${NANO_WORLDDIR}/Pkg + ) # Count & report how many we have to install todo=`ls ${NANO_WORLDDIR}/Pkg | wc -l` @@ -511,7 +606,7 @@ cust_pkg () ( echo "===" while true do - # Record how may we have now + # Record how many we have now have=`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l` # Attempt to install more packages @@ -547,16 +642,37 @@ customize_cmd () { } ####################################################################### +# Convenience function: +# Register $1 as late customize function to run just before +# image creation. + +late_customize_cmd () { + NANO_LATE_CUSTOMIZE="$NANO_LATE_CUSTOMIZE $1" +} + +####################################################################### # # All set up to go... # ####################################################################### +# Progress Print +# Print $2 at level $1. +pprint() { + if [ "$1" -le $PPLEVEL ]; then + printf "%.${1}s %s\n" "#####" "$2" + fi +} + usage () { ( - echo "Usage: $0 [-b/-k/-w] [-c config_file]" + echo "Usage: $0 [-bikqvw] [-c config_file]" echo " -b suppress builds (both kernel and world)" + echo " -i suppress disk image build" echo " -k suppress buildkernel" + echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc" + echo " -q make output more quite" + echo " -v make output more verbose" echo " -w suppress buildworld" echo " -c specify config file" ) 1>&2 @@ -566,11 +682,13 @@ usage () { ####################################################################### # Parse arguments +do_clean=true do_kernel=true do_world=true +do_image=true set +e -args=`getopt bc:hkw $*` +args=`getopt bc:hiknqvw $*` if [ $? -ne 0 ] ; then usage exit 2 @@ -583,29 +701,45 @@ do case "$i" in -b) - shift; do_world=false do_kernel=false + shift ;; -k) - shift; do_kernel=false + shift ;; -c) . "$2" - shift; - shift; + shift + shift ;; -h) usage ;; + -i) + do_image=false + shift + ;; + -n) + do_clean=false + shift + ;; + -q) + PPLEVEL=$(($PPLEVEL - 1)) + shift + ;; + -v) + PPLEVEL=$(($PPLEVEL + 1)) + shift + ;; -w) - shift; do_world=false + shift ;; --) - shift; - break; + shift + break esac done @@ -624,6 +758,10 @@ else MAKEOBJDIRPREFIX=${NANO_OBJ} fi +if [ "x${NANO_DISKIMGDIR}" = "x" ] ; then + NANO_DISKIMGDIR=${MAKEOBJDIRPREFIX} +fi + NANO_WORLDDIR=${MAKEOBJDIRPREFIX}/_.w NANO_MAKE_CONF=${MAKEOBJDIRPREFIX}/make.conf @@ -636,6 +774,12 @@ else exit 1 fi +if $do_clean ; then + true +else + NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" +fi + export MAKEOBJDIRPREFIX export NANO_ARCH @@ -646,6 +790,7 @@ export NANO_DATASIZE export NANO_DRIVE export NANO_HEADS export NANO_IMAGES +export NANO_IMGNAME export NANO_MAKE_CONF export NANO_MEDIASIZE export NANO_NAME @@ -662,18 +807,24 @@ export NANO_BOOTLOADER ####################################################################### # And then it is as simple as that... +pprint 1 "NanoBSD image ${NANO_NAME} build starting" + if $do_world ; then - clean_build + if $do_clean ; then + clean_build + else + pprint 2 "Using existing build tree (as instructed)" + fi make_conf_build build_world else - echo "## Skipping buildworld (as instructed)" + pprint 2 "Skipping buildworld (as instructed)" fi if $do_kernel ; then build_kernel else - echo "## Skipping buildkernel (as instructed)" + pprint 2 "Skipping buildkernel (as instructed)" fi clean_world @@ -686,7 +837,13 @@ install_kernel run_customize setup_nanobsd prune_usr -create_${NANO_ARCH}_diskimage +run_late_customize +if $do_image ; then + create_${NANO_ARCH}_diskimage + echo "# Created NanoBSD disk image: ${MAKEOBJDIRPREFIX}/${NANO_IMGNAME}" +else + pprint 2 "Skipping image build (as instructed)" +fi last_orders -echo "# NanoBSD image completed" +pprint 1 "NanoBSD image ${NANO_NAME} completed" From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 18:09:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E128D10657B1 for ; Fri, 9 Jan 2009 18:09:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.freebsd.org (Postfix) with ESMTP id 71CD48FC12 for ; Fri, 9 Jan 2009 18:09:02 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-053-050.pools.arcor-ip.net [88.66.53.50]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1LLLn31BBY-0007bP; Fri, 09 Jan 2009 19:09:01 +0100 Received: (qmail 29354 invoked from network); 9 Jan 2009 18:09:00 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by laiers.local with SMTP; 9 Jan 2009 18:09:00 -0000 From: Max Laier Organization: FreeBSD To: Julian Elischer Date: Fri, 9 Jan 2009 19:08:59 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> In-Reply-To: <49678D5E.3030600@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901091909.00457.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/Xs1kCczGP1ZA/aS2F7KCJCL08MSHWdJ7cmdl L4cVlo5hO1nFDSEYcgp5VuEqxyud+GcqoCK77DTuQBQqdKEYsU vdrXNVpzwcRtgM7DsSDmQ== Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:09:03 -0000 On Friday 09 January 2009 18:46:06 Julian Elischer wrote: > Max Laier wrote: > > On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: > >> Author: adrian > >> Date: Fri Jan 9 16:02:19 2009 > >> New Revision: 186955 > >> URL: http://svn.freebsd.org/changeset/base/186955 > >> > >> Log: > >> Implement a new IP option (not compiled/enabled by default) to allow > >> applications to specify a non-local IP address when bind()'ing a > >> socket to a local endpoint. > > > > That's a *socket* option ... you had me very worried there for a moment > > ;) I don't quite see why you'd hide these under a build time option - > > having the sysctl defaulting to off under CTLFLAG_SECURE seems good > > enough - if people disagree - make it a boot time tuneable, but I > > certainly don't see why you should have to rebuild the kernel for a minor > > thing like this. It certainly isn't performance critical. > > because it can be a big security hole and you do not want people to > have it available on the average machine. > Also because purists complained about it. > You'll notice that the compile option enables the sysctl, > which is used to turn on and off the capacity to do this per socket. > so the admin can disable it, but I felt a lot more comfortable having > it not compiled in by default. Speaking of disabling it ... setting the sysctl to 0 is not really enough to do that. One would also have to walk through the active sockets and GC any that are bound to nonlocal addresses to really disable it ... or do we rely on tcpdrop or the like to do that manually? Of course it would make sense to have something like this: start tproxy, bind forwarding ports, disable sysctl, raise securelevel In addition, should there be a priv(9) check in ip_ctloutput? -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 18:14:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14D941065674; Fri, 9 Jan 2009 18:14:25 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id DB1148FC0C; Fri, 9 Jan 2009 18:14:24 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 09:46:08 -0800 Message-ID: <49678D5E.3030600@elischer.org> Date: Fri, 09 Jan 2009 09:46:06 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Max Laier References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> In-Reply-To: <200901091802.10287.max@love2party.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:14:25 -0000 Max Laier wrote: > On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. > > That's a *socket* option ... you had me very worried there for a moment ;) I > don't quite see why you'd hide these under a build time option - having the > sysctl defaulting to off under CTLFLAG_SECURE seems good enough - if people > disagree - make it a boot time tuneable, but I certainly don't see why you > should have to rebuild the kernel for a minor thing like this. It certainly > isn't performance critical. because it can be a big security hole and you do not want people to have it available on the average machine. Also because purists complained about it. You'll notice that the compile option enables the sysctl, which is used to turn on and off the capacity to do this per socket. so the admin can disable it, but I felt a lot more comfortable having it not compiled in by default. > > Some nit picking below ... > >> Modified: head/sys/netinet/in_pcb.c >> @@ -346,7 +347,11 @@ in_pcbbind_setup(struct inpcb *inp, stru >> } else if (sin->sin_addr.s_addr != INADDR_ANY) { >> sin->sin_port = 0; /* yech... */ >> bzero(&sin->sin_zero, sizeof(sin->sin_zero)); >> - if (ifa_ifwithaddr((struct sockaddr *)sin) == 0) >> + if ( >> +#if defined(IP_NONLOCALBIND) >> + ((inp->inp_flags & INP_NONLOCALOK) == 0) && >> +#endif >> + (ifa_ifwithaddr((struct sockaddr *)sin) == 0)) >> return (EADDRNOTAVAIL); >> } >> laddr = sin->sin_addr; > > This logic is really hard to get a first glance. Esp. the not NON...OK part. > Maybe a comment is called for here - or is this just me being confused? I think it's just you :-) "NONLOCAL" is one word > >> Modified: head/sys/netinet/ip_output.c >> @@ -866,6 +873,13 @@ ip_ctloutput(struct socket *so, struct s >> return (error); >> } >> >> +#if defined(IP_NONLOCALBIND) >> + case IP_NONLOCALOK: >> + if (! ip_nonlocalok) { >> + error = ENOPROTOOPT; >> + break; >> + } >> +#endif > From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 18:28:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C15EF106564A; Fri, 9 Jan 2009 18:28:08 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 9D8E98FC13; Fri, 9 Jan 2009 18:28:08 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 10:28:08 -0800 Message-ID: <49679737.60709@elischer.org> Date: Fri, 09 Jan 2009 10:28:07 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Max Laier References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> <200901091909.00457.max@love2party.net> In-Reply-To: <200901091909.00457.max@love2party.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:28:09 -0000 Max Laier wrote: > On Friday 09 January 2009 18:46:06 Julian Elischer wrote: >> Max Laier wrote: >>> On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >>>> Author: adrian >>>> Date: Fri Jan 9 16:02:19 2009 >>>> New Revision: 186955 >>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>> >>>> Log: >>>> Implement a new IP option (not compiled/enabled by default) to allow >>>> applications to specify a non-local IP address when bind()'ing a >>>> socket to a local endpoint. >>> That's a *socket* option ... you had me very worried there for a moment >>> ;) I don't quite see why you'd hide these under a build time option - >>> having the sysctl defaulting to off under CTLFLAG_SECURE seems good >>> enough - if people disagree - make it a boot time tuneable, but I >>> certainly don't see why you should have to rebuild the kernel for a minor >>> thing like this. It certainly isn't performance critical. >> because it can be a big security hole and you do not want people to >> have it available on the average machine. >> Also because purists complained about it. >> You'll notice that the compile option enables the sysctl, >> which is used to turn on and off the capacity to do this per socket. >> so the admin can disable it, but I felt a lot more comfortable having >> it not compiled in by default. > > Speaking of disabling it ... setting the sysctl to 0 is not really enough to > do that. One would also have to walk through the active sockets and GC any > that are bound to nonlocal addresses to really disable it ... or do we rely on > tcpdrop or the like to do that manually? Of course it would make sense to > have something like this: start tproxy, bind forwarding ports, disable > sysctl, raise securelevel exactly, we disable NEW connections. It's not done with securelevel but possibly because I didn't think of it.. I'm not worried about existing connections... > > In addition, should there be a priv(9) check in ip_ctloutput? I was thinking about that.. possibly. (in fact probably) > From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 18:38:57 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644581065690; Fri, 9 Jan 2009 18:38:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52E598FC17; Fri, 9 Jan 2009 18:38:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Icv4B065200; Fri, 9 Jan 2009 18:38:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Icv7m065199; Fri, 9 Jan 2009 18:38:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <200901091838.n09Icv7m065199@svn.freebsd.org> From: Adrian Chadd Date: Fri, 9 Jan 2009 18:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186963 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:38:58 -0000 Author: adrian Date: Fri Jan 9 18:38:57 2009 New Revision: 186963 URL: http://svn.freebsd.org/changeset/base/186963 Log: Fix fat-fingered comment. Noticed-by: julian Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Fri Jan 9 18:08:50 2009 (r186962) +++ head/sys/netinet/in_pcb.c Fri Jan 9 18:38:57 2009 (r186963) @@ -350,7 +350,7 @@ in_pcbbind_setup(struct inpcb *inp, stru /* * Is the address a local IP address? * If INP_NONLOCALOK is set, then the socket may be bound - * to any local endpoint address. + * to any endpoint address, local or not. */ if ( #if defined(IP_NONLOCALBIND) From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 18:50:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F062106572F for ; Fri, 9 Jan 2009 18:50:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2B5EF8FC13 for ; Fri, 9 Jan 2009 18:50:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5605372qwb.7 for ; Fri, 09 Jan 2009 10:50:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=jD83dOw5TM9WZXBvLcAX3OSVZhFNCqQ/7YZG5kyEABc=; b=QYmv4YZrU4zIYKxbdarAQ6b/NYjcPZEq8vWYhHWCgnhdL9MaXY6fgqmYZ4iywBp836 mx7ARO+iTf1vjvRy5A0157lU8UNjY3gCT3WSeqbsasM9ML+x6oXR3+Z9wfxak1vnNbGy eku8D/Yv5X3kpY87Jp7+v9++QAN0zKWG5YCf0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=l6dhf9R43M16wxB5JxnYRLiCeF4Rhq/yXOcWqyXn2SsXtJbQqs7kqYb+lXH6Q2FQHl db74xMuD7rjLFW/B2bB9NVemZyeysddFDS7UXoUJmjbnqVXE8HdswZUTNmIJj9ooWX3F Nk56D32ZzD8agKY9CZK3/ZNE4LdzPgfzfNGcg= Received: by 10.214.114.8 with SMTP id m8mr23148363qac.294.1231525751521; Fri, 09 Jan 2009 10:29:11 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 10:29:11 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 13:29:11 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Max Laier" In-Reply-To: <200901091909.00457.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> <200901091909.00457.max@love2party.net> X-Google-Sender-Auth: e69b9ba7a8b5fe1b Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 18:50:25 -0000 2009/1/9 Max Laier : > Speaking of disabling it ... setting the sysctl to 0 is not really enough to > do that. One would also have to walk through the active sockets and GC any > that are bound to nonlocal addresses to really disable it ... or do we rely on > tcpdrop or the like to do that manually? Of course it would make sense to > have something like this: start tproxy, bind forwarding ports, disable > sysctl, raise securelevel > > In addition, should there be a priv(9) check in ip_ctloutput? For which priv? Surely you don't really want people running services as root? :) gnn and I talked about this a bit on IRC, and I was waiting for rwatson to come online before posting a followup. Linux's implementation of this stuff uses the CAP_NET_ADMIN capability to define whether a process can do this or not. So users would start Squid as root, Squid would acquire CAP_NET_ADMIN, drop root, and then use it whenever required. Also, this is an option set on bind() on an outbound socket, not a listen() socket. You'd bind() to the client IP you're pretending to be, then connect() to the server destination. You can't raise securelevel/disable sysctl in the way you described. Adrian From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 19:02:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AF4810657C6; Fri, 9 Jan 2009 19:02:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 1365B8FC1B; Fri, 9 Jan 2009 19:02:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 9FBCE46B32; Fri, 9 Jan 2009 14:02:34 -0500 (EST) Date: Fri, 9 Jan 2009 19:02:34 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <49678D5E.3030600@elischer.org> Message-ID: References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Max Laier , Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:02:35 -0000 On Fri, 9 Jan 2009, Julian Elischer wrote: > Max Laier wrote: >> On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >>> Author: adrian Date: Fri Jan 9 16:02:19 2009 New Revision: 186955 URL: >>> http://svn.freebsd.org/changeset/base/186955 >>> >>> Log: >>> Implement a new IP option (not compiled/enabled by default) to allow >>> applications to specify a non-local IP address when bind()'ing a socket >>> to a local endpoint. >> >> That's a *socket* option ... you had me very worried there for a moment ;) >> I don't quite see why you'd hide these under a build time option - having >> the sysctl defaulting to off under CTLFLAG_SECURE seems good enough - if >> people disagree - make it a boot time tuneable, but I certainly don't see >> why you should have to rebuild the kernel for a minor thing like this. It >> certainly isn't performance critical. > > because it can be a big security hole and you do not want people to have it > available on the average machine. Also because purists complained about it. > You'll notice that the compile option enables the sysctl, which is used to > turn on and off the capacity to do this per socket. so the admin can disable > it, but I felt a lot more comfortable having it not compiled in by default. At the risk of turning something simply that has for unknown reasons taken a half dozen commits to get right into something that takes a half dozen plus one: the security stuff in this commit is really weird. I'd prefer this socket option: (1) Not be a kernel option, since the last thing we need is yet more conditionally compiled edge cases (2) Require privilege by default, ideally a new privilege (3) If it's desirable to make it easily accessible without privilege on some systems, add a sysctl that controls whether privilege is required. This would make it available in GENERIC, default to requiring root, but allow that to be tweaked easily in the same way we require privilege to bind low port numbers by default, but using sysctls can tune the policy to something useful in more specific environments. There's been talk of adding a fine-grained privilege model to FreeBSD 8.0 so that specific privileges could be granted in a more general way, but that hasn't happened yet. It's also possible to do that already using a custom MAC policy since MAC policy modules can tune the privilege model to add and remove privileges for processes in a granular way. But only if this operation is assigned a specific privilege. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 19:08:08 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3FB710656CD for ; Fri, 9 Jan 2009 19:08:08 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mx1.freebsd.org (Postfix) with ESMTP id 628E98FC14 for ; Fri, 9 Jan 2009 19:08:08 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-053-050.pools.arcor-ip.net [88.66.53.50]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1LLMiF0z6d-0007yg; Fri, 09 Jan 2009 20:08:07 +0100 Received: (qmail 30180 invoked from network); 9 Jan 2009 19:08:06 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by mx.laiers.local with SMTP; 9 Jan 2009 19:08:06 -0000 From: Max Laier Organization: FreeBSD To: "Adrian Chadd" Date: Fri, 9 Jan 2009 20:08:05 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091909.00457.max@love2party.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901092008.06049.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1923ECbRhCPfAZNK/imZLKUz5fvA/EZymtM/mk Y+B51SseSBLQKbhongBV137YNl6359Y2Onx+PFKp4WNsvjj206 5LlCEmgiZb+WFd1EDrPIw== Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:08:09 -0000 On Friday 09 January 2009 19:29:11 Adrian Chadd wrote: > 2009/1/9 Max Laier : > > Speaking of disabling it ... setting the sysctl to 0 is not really enough > > to do that. One would also have to walk through the active sockets and > > GC any that are bound to nonlocal addresses to really disable it ... or > > do we rely on tcpdrop or the like to do that manually? Of course it > > would make sense to have something like this: start tproxy, bind > > forwarding ports, disable sysctl, raise securelevel > > > > In addition, should there be a priv(9) check in ip_ctloutput? > > For which priv? Surely you don't really want people running services as > root? :) You don't want your normal user to be able to bind to foreign addresses either. If you need to create sockets over and over again you use privilege separation as done in OpenBSD. > gnn and I talked about this a bit on IRC, and I was waiting for > rwatson to come online before posting a followup. Linux's > implementation of this stuff uses the CAP_NET_ADMIN capability to > define whether a process can do this or not. So users would start > Squid as root, Squid would acquire CAP_NET_ADMIN, drop root, and then > use it whenever required. > > Also, this is an option set on bind() on an outbound socket, not a > listen() socket. You'd bind() to the client IP you're pretending to > be, then connect() to the server destination. You can't raise > securelevel/disable sysctl in the way you described. I see ... though there is no restriction in your code yet that would prevent one from using it on a listen() socket. Can you hold off on further commits until we reach a consensus about how this should be done? This is getting a bit messy for my taste. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 19:11:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C10C0106566B; Fri, 9 Jan 2009 19:11:01 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 972298FC0A; Fri, 9 Jan 2009 19:11:01 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 11:11:00 -0800 Message-ID: <4967A144.7070703@elischer.org> Date: Fri, 09 Jan 2009 11:11:00 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Robert Watson References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <200901091802.10287.max@love2party.net> <49678D5E.3030600@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Max Laier , Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:11:02 -0000 Robert Watson wrote: > On Fri, 9 Jan 2009, Julian Elischer wrote: > >> Max Laier wrote: >>> On Friday 09 January 2009 17:02:19 Adrian Chadd wrote: >>>> Author: adrian Date: Fri Jan 9 16:02:19 2009 New Revision: 186955 >>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>> >>>> Log: >>>> Implement a new IP option (not compiled/enabled by default) to allow >>>> applications to specify a non-local IP address when bind()'ing a >>>> socket >>>> to a local endpoint. >>> >>> That's a *socket* option ... you had me very worried there for a >>> moment ;) I don't quite see why you'd hide these under a build time >>> option - having the sysctl defaulting to off under CTLFLAG_SECURE >>> seems good enough - if people disagree - make it a boot time >>> tuneable, but I certainly don't see why you should have to rebuild >>> the kernel for a minor thing like this. It certainly isn't >>> performance critical. >> >> because it can be a big security hole and you do not want people to >> have it available on the average machine. Also because purists >> complained about it. You'll notice that the compile option enables the >> sysctl, which is used to turn on and off the capacity to do this per >> socket. so the admin can disable it, but I felt a lot more comfortable >> having it not compiled in by default. > > At the risk of turning something simply that has for unknown reasons > taken a half dozen commits to get right into something that takes a half > dozen plus one: the security stuff in this commit is really weird. I'd > prefer this socket option: > > (1) Not be a kernel option, since the last thing we need is yet more > conditionally compiled edge cases it's been my experience that things that upset old hands and purists should be options until they get used to it.. also it does add some code.. not much but bloat is bloat. > > (2) Require privilege by default, ideally a new privilege Actually I agree... ther are actually two places privs could be applied. on the sysctl (then anyone can do the socket option, but the machine is an acknowledged proxy host). on the socket option (then only root can start a proxy which may not be what is wanted). in the ironport code the whole thing is just a #if 0 > > (3) If it's desirable to make it easily accessible without privilege on > some > systems, add a sysctl that controls whether privilege is required. > > This would make it available in GENERIC, default to requiring root, but > allow that to be tweaked easily in the same way we require privilege to > bind low port numbers by default, but using sysctls can tune the policy > to something useful in more specific environments. > > There's been talk of adding a fine-grained privilege model to FreeBSD > 8.0 so that specific privileges could be granted in a more general way, > but that hasn't happened yet. It's also possible to do that already > using a custom MAC policy since MAC policy modules can tune the > privilege model to add and remove privileges for processes in a granular > way. But only if this operation is assigned a specific privilege. > > Robert N M Watson > Computer Laboratory > University of Cambridge From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 19:42:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CE8106566C; Fri, 9 Jan 2009 19:42:56 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id B81108FC0A; Fri, 9 Jan 2009 19:42:54 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.16.129.134] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 8D82FA79D6; Fri, 9 Jan 2009 20:26:57 +0100 (CET) Message-ID: <4967A500.30205@fsn.hu> Date: Fri, 09 Jan 2009 20:26:56 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> In-Reply-To: <200901091602.n09G2Jj1061164@svn.freebsd.org> X-Stationery: 0.4.8.12 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Fri, 09 Jan 2009 20:26:57 +0100 (CET) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:42:56 -0000 Hello, Adrian Chadd wrote: > Author: adrian > Date: Fri Jan 9 16:02:19 2009 > New Revision: 186955 > URL: http://svn.freebsd.org/changeset/base/186955 > > Log: > Implement a new IP option (not compiled/enabled by default) to allow > applications to specify a non-local IP address when bind()'ing a socket > to a local endpoint. > > This allows applications to spoof the client IP address of connections > if (obviously!) they somehow are able to receive the traffic normally > destined to said clients. > > This patch doesn't include any changes to ipfw or the bridging code to > redirect the client traffic through the PCB checks so TCP gets a shot > at it. The normal behaviour is that packets with a non-local destination > IP address are not handled locally. This can be dealth with some IPFW hackery; > modifications to IPFW to make this less hacky will occur in subsequent > commmits. > > Thanks to Julian Elischer and others at Ironport. This work was approved > and donated before Cisco acquired them. > > Obtained from: Julian Elischer and others > MFC after: 2 weeks > Wouldn't it be better to implement existing interfaces for that? OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 19:49:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F22AA1065673; Fri, 9 Jan 2009 19:49:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E02008FC17; Fri, 9 Jan 2009 19:49:33 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09JnW9a066582; Fri, 9 Jan 2009 19:49:32 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09JnWA6066581; Fri, 9 Jan 2009 19:49:32 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901091949.n09JnWA6066581@svn.freebsd.org> From: Christian Brueffer Date: Fri, 9 Jan 2009 19:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186965 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 19:49:34 -0000 Author: brueffer Date: Fri Jan 9 19:49:32 2009 New Revision: 186965 URL: http://svn.freebsd.org/changeset/base/186965 Log: Recognize et(4), igb(4), iwn(4), ixgbe(4) and nxge(4) devices. Correct some minor whitespace in the ae(4) entry. Reported by: Mars G Miro Approved by: rwatson (mentor) MFC after: 1 week Modified: head/usr.sbin/sysinstall/devices.c Modified: head/usr.sbin/sysinstall/devices.c ============================================================================== --- head/usr.sbin/sysinstall/devices.c Fri Jan 9 19:45:06 2009 (r186964) +++ head/usr.sbin/sysinstall/devices.c Fri Jan 9 19:49:32 2009 (r186965) @@ -89,7 +89,7 @@ static struct _devname { DISK("mfid%d", "LSI MegaRAID SAS array", 4), FLOPPY("fd%d", "floppy drive unit A", 4), SERIAL("cuad%d", "%s on device %s (COM%d)", 16), - NETWORK("ae", "Attansic/Atheros L2 FastEthernet"), + NETWORK("ae", "Attansic/Atheros L2 Fast Ethernet"), NETWORK("age", "Attansic/Atheros L1 Gigabit Ethernet"), NETWORK("ale", "Atheros AR8121/AR8113/AR8114 PCIe Ethernet"), NETWORK("an", "Aironet 4500/4800 802.11 wireless adapter"), @@ -111,14 +111,18 @@ static struct _devname { NETWORK("ed", "Novell NE1000/2000; 3C503; NE2000-compatible PCMCIA"), NETWORK("ep", "3Com 3C509 Ethernet card/3C589 PCMCIA"), NETWORK("em", "Intel(R) PRO/1000 Ethernet card"), + NETWORK("et", "Agere ET1310 based PCI Express Gigabit Ethernet card"), NETWORK("ex", "Intel EtherExpress Pro/10 Ethernet card"), NETWORK("fe", "Fujitsu MB86960A/MB86965A Ethernet card"), NETWORK("gem", "Apple GMAC or Sun ERI/GEM Ethernet adapter"), NETWORK("hme", "Sun HME (Happy Meal Ethernet) Ethernet adapter"), NETWORK("ie", "AT&T StarLAN 10 and EN100; 3Com 3C507; NI5210"), + NETWORK("igb", "Intel(R) PRO/1000 PCI Express Gigabit Ethernet card"), NETWORK("ipw", "Intel PRO/Wireless 2100 IEEE 802.11 adapter"), NETWORK("iwi", "Intel PRO/Wireless 2200BG/2225BG/2915ABG adapter"), + NETWORK("iwn", "Intel Wireless WiFi Link 4965AGN IEEE 802.11n adapter"), NETWORK("ixgb", "Intel(R) PRO/10Gb Ethernet card"), + NETWORK("ixgbe", "Intel(R) PRO/10Gb Ethernet card"), NETWORK("jme", "JMicron JMC250 Gigabit/JMC260 Fast Ethernet"), NETWORK("kue", "Kawasaki LSI USB Ethernet adapter"), NETWORK("le", "AMD Am7900 LANCE or Am79C9xx PCnet Ethernet adapter"), @@ -129,6 +133,7 @@ static struct _devname { NETWORK("nfe", "NVIDIA nForce MCP Ethernet"), NETWORK("nge", "NatSemi PCI Gigabit Ethernet card"), NETWORK("nve", "NVIDIA nForce MCP Ethernet"), + NETWORK("nxge", "Neterion Xframe 10GbE Server/Storage adapter"), NETWORK("pcn", "AMD Am79c79x PCI Ethernet card"), NETWORK("ral", "Ralink Technology IEEE 802.11 wireless adapter"), NETWORK("ray", "Raytheon Raylink 802.11 wireless adapter"), From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:02:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0B451065675; Fri, 9 Jan 2009 20:02:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6508FC16; Fri, 9 Jan 2009 20:02:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5626333qwb.7 for ; Fri, 09 Jan 2009 12:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=MGOF4TTUu6TliLz3ddtjwfvMNIcUlWlkqaJwhHoTPs4=; b=BpyrQMowcDu+SMPtCDSiCZVpXWPpAnijLi4IqFbMViqCc+M9EJcA+p6PEcw33CCLSk AUm9hRK6bfoXRu0W/I67+trOFpqjBHCqH/5QzxBK/a3kiY4Q0b4D7fSOD2h56ncgarzx 3+W8vwSH93k8E+wyjXoy2uJJJnRO4t4dw5nFE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=OKuEVpqqvZPlzpmFqp+ipzSMenaSSnL2/68qnPS5LMF1ZY1dDBVoBnireHeT9tTb07 bfeBu4234XeZkoMXKVOBL6SfozKRUHQxTxmx7xMjvH2LTuVYgc82wuFBNpBDr/x2jaF9 96HBTnf3hHdn3pQcdwyUPLnkjzDUIrzUZS0Hs= Received: by 10.214.216.5 with SMTP id o5mr23320027qag.229.1231531372603; Fri, 09 Jan 2009 12:02:52 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 12:02:52 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 15:02:52 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4967A500.30205@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> X-Google-Sender-Auth: bf8a3ae4b0dc2c01 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:02:54 -0000 I wasn't even aware of the existance of this interface. I'll check it out. Thing is, this is a socket layer option, rather than what I've committed which is a netinet layer option. Anyway, I'll check it out. I'm happy to fiddle with things if others' would like it. Adrian 2009/1/9 Attila Nagy : > Hello, > > Adrian Chadd wrote: >> >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. >> This allows applications to spoof the client IP address of connections >> if (obviously!) they somehow are able to receive the traffic normally >> destined to said clients. >> This patch doesn't include any changes to ipfw or the bridging code to >> redirect the client traffic through the PCB checks so TCP gets a shot >> at it. The normal behaviour is that packets with a non-local destination >> IP address are not handled locally. This can be dealth with some IPFW >> hackery; >> modifications to IPFW to make this less hacky will occur in subsequent >> commmits. >> Thanks to Julian Elischer and others at Ironport. This work was >> approved >> and donated before Cisco acquired them. >> Obtained from: Julian Elischer and others >> MFC after: 2 weeks >> > > Wouldn't it be better to implement existing interfaces for that? > OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: > http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b > > From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:28:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1C37106564A; Fri, 9 Jan 2009 20:28:43 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F3FC8FC08; Fri, 9 Jan 2009 20:28:43 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KShKi067489; Fri, 9 Jan 2009 20:28:43 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KShDU067488; Fri, 9 Jan 2009 20:28:43 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200901092028.n09KShDU067488@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 9 Jan 2009 20:28:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186966 - stable/7/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:28:44 -0000 Author: gnn Date: Fri Jan 9 20:28:43 2009 New Revision: 186966 URL: http://svn.freebsd.org/changeset/base/186966 Log: Make it so that debug builds with CTF (i.e. DTrace) have proper debugging symbols in the kernel. Reviewed by: jhb Modified: stable/7/sys/conf/kern.pre.mk Modified: stable/7/sys/conf/kern.pre.mk ============================================================================== --- stable/7/sys/conf/kern.pre.mk Fri Jan 9 19:49:32 2009 (r186965) +++ stable/7/sys/conf/kern.pre.mk Fri Jan 9 20:28:43 2009 (r186966) @@ -26,6 +26,7 @@ COPTFLAGS?= -O .else . if defined(DEBUG) _MINUS_O= -O +CTFFLAGS+= -g . else _MINUS_O= -O2 . endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:33:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD9A106564A; Fri, 9 Jan 2009 20:33:07 +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 7CE018FC1B; Fri, 9 Jan 2009 20:33:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KX74G067626; Fri, 9 Jan 2009 20:33:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KX7oW067624; Fri, 9 Jan 2009 20:33:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092033.n09KX7oW067624@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186967 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:33:08 -0000 Author: mav Date: Fri Jan 9 20:33:07 2009 New Revision: 186967 URL: http://svn.freebsd.org/changeset/base/186967 Log: MFC rev. 184139, 184141, 184937 Add "SD host controller" subclass. Add HDA multimedia subclass. Add ADMA, SATA and SAS mass storage subclasses. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/pci/pci.c stable/7/sys/dev/pci/pcireg.h Modified: stable/7/sys/dev/pci/pci.c ============================================================================== --- stable/7/sys/dev/pci/pci.c Fri Jan 9 20:28:43 2009 (r186966) +++ stable/7/sys/dev/pci/pci.c Fri Jan 9 20:33:07 2009 (r186967) @@ -2948,6 +2948,9 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, @@ -2962,6 +2965,7 @@ static struct {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, "video"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, "audio"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, "telephony"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, "HDA"}, {PCIC_MEMORY, -1, "memory"}, {PCIC_MEMORY, PCIS_MEMORY_RAM, "RAM"}, {PCIC_MEMORY, PCIS_MEMORY_FLASH, "flash"}, @@ -2986,6 +2990,7 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, "timer"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, Modified: stable/7/sys/dev/pci/pcireg.h ============================================================================== --- stable/7/sys/dev/pci/pcireg.h Fri Jan 9 20:28:43 2009 (r186966) +++ stable/7/sys/dev/pci/pcireg.h Fri Jan 9 20:33:07 2009 (r186967) @@ -255,6 +255,7 @@ #define PCIS_MULTIMEDIA_VIDEO 0x00 #define PCIS_MULTIMEDIA_AUDIO 0x01 #define PCIS_MULTIMEDIA_TELE 0x02 +#define PCIS_MULTIMEDIA_HDA 0x03 #define PCIS_MULTIMEDIA_OTHER 0x80 #define PCIC_MEMORY 0x05 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:34:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC501065670; Fri, 9 Jan 2009 20:34:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B9558FC1A; Fri, 9 Jan 2009 20:34:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KYWid067689; Fri, 9 Jan 2009 20:34:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KYWTk067688; Fri, 9 Jan 2009 20:34:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092034.n09KYWTk067688@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:34:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186968 - stable/7/usr.sbin/pciconf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:34:33 -0000 Author: mav Date: Fri Jan 9 20:34:32 2009 New Revision: 186968 URL: http://svn.freebsd.org/changeset/base/186968 Log: MFC rev. 184140, 184142, 184936 Add "SD host controller" subclass. Add HDA multimedia subclass. Add ADMA, SATA and SAS mass storage subclasses. Modified: stable/7/usr.sbin/pciconf/ (props changed) stable/7/usr.sbin/pciconf/pciconf.c Modified: stable/7/usr.sbin/pciconf/pciconf.c ============================================================================== --- stable/7/usr.sbin/pciconf/pciconf.c Fri Jan 9 20:33:07 2009 (r186967) +++ stable/7/usr.sbin/pciconf/pciconf.c Fri Jan 9 20:34:32 2009 (r186968) @@ -272,6 +272,9 @@ static struct {PCIC_STORAGE, PCIS_STORAGE_FLOPPY, "floppy disk"}, {PCIC_STORAGE, PCIS_STORAGE_IPI, "IPI"}, {PCIC_STORAGE, PCIS_STORAGE_RAID, "RAID"}, + {PCIC_STORAGE, PCIS_STORAGE_ATA_ADMA, "ATA (ADMA)"}, + {PCIC_STORAGE, PCIS_STORAGE_SATA, "SATA"}, + {PCIC_STORAGE, PCIS_STORAGE_SAS, "SAS"}, {PCIC_NETWORK, -1, "network"}, {PCIC_NETWORK, PCIS_NETWORK_ETHERNET, "ethernet"}, {PCIC_NETWORK, PCIS_NETWORK_TOKENRING, "token ring"}, @@ -286,6 +289,7 @@ static struct {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_VIDEO, "video"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_AUDIO, "audio"}, {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_TELE, "telephony"}, + {PCIC_MULTIMEDIA, PCIS_MULTIMEDIA_HDA, "HDA"}, {PCIC_MEMORY, -1, "memory"}, {PCIC_MEMORY, PCIS_MEMORY_RAM, "RAM"}, {PCIC_MEMORY, PCIS_MEMORY_FLASH, "flash"}, @@ -310,6 +314,7 @@ static struct {PCIC_BASEPERIPH, PCIS_BASEPERIPH_TIMER, "timer"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_RTC, "realtime clock"}, {PCIC_BASEPERIPH, PCIS_BASEPERIPH_PCIHOT, "PCI hot-plug controller"}, + {PCIC_BASEPERIPH, PCIS_BASEPERIPH_SDHC, "SD host controller"}, {PCIC_INPUTDEV, -1, "input device"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_KEYBOARD, "keyboard"}, {PCIC_INPUTDEV, PCIS_INPUTDEV_DIGITIZER,"digitizer"}, From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:38:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 116C31065672; Fri, 9 Jan 2009 20:38:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F2E838FC1E; Fri, 9 Jan 2009 20:38:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KcLD3067836; Fri, 9 Jan 2009 20:38:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KcLDf067835; Fri, 9 Jan 2009 20:38:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092038.n09KcLDf067835@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186969 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:38:22 -0000 Author: mav Date: Fri Jan 9 20:38:21 2009 New Revision: 186969 URL: http://svn.freebsd.org/changeset/base/186969 Log: MFC rev. 185179 Remove unneeded NULL check. At first msg can't be null here and and at second NG_FREE_MSG() also checks it. Found with: Coverity Prevent(tm) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_base.c Modified: stable/7/sys/netgraph/ng_base.c ============================================================================== --- stable/7/sys/netgraph/ng_base.c Fri Jan 9 20:34:32 2009 (r186968) +++ stable/7/sys/netgraph/ng_base.c Fri Jan 9 20:38:21 2009 (r186969) @@ -2847,8 +2847,7 @@ ng_generic_msg(node_p here, item_p item, */ out: NG_RESPOND_MSG(error, here, item, resp); - if (msg) - NG_FREE_MSG(msg); + NG_FREE_MSG(msg); return (error); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:40:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67D191065704; Fri, 9 Jan 2009 20:40:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 545478FC27; Fri, 9 Jan 2009 20:40:19 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KeJQr067941; Fri, 9 Jan 2009 20:40:19 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KeJtY067940; Fri, 9 Jan 2009 20:40:19 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092040.n09KeJtY067940@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186970 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:40:21 -0000 Author: mav Date: Fri Jan 9 20:40:19 2009 New Revision: 186970 URL: http://svn.freebsd.org/changeset/base/186970 Log: MFC rev. 185182 Fix typo. Clear session stats instead of config and part of stats. Found with: Coverity Prevent(tm) CID: 2472 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_l2tp.c Modified: stable/7/sys/netgraph/ng_l2tp.c ============================================================================== --- stable/7/sys/netgraph/ng_l2tp.c Fri Jan 9 20:38:21 2009 (r186969) +++ stable/7/sys/netgraph/ng_l2tp.c Fri Jan 9 20:40:19 2009 (r186970) @@ -733,7 +733,7 @@ ng_l2tp_reset_session(hook_p hook, void if (hpriv != NULL) { hpriv->conf.control_dseq = 0; hpriv->conf.enable_dseq = 0; - bzero(&hpriv->conf, sizeof(struct ng_l2tp_session_stats)); + bzero(&hpriv->stats, sizeof(struct ng_l2tp_session_stats)); hpriv->nr = 0; hpriv->ns = 0; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:41:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C633D1065677; Fri, 9 Jan 2009 20:41:58 +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 B34C18FC1F; Fri, 9 Jan 2009 20:41:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KfwIq068042; Fri, 9 Jan 2009 20:41:58 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KfwwJ068041; Fri, 9 Jan 2009 20:41:58 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092041.n09KfwwJ068041@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186971 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:42:00 -0000 Author: mav Date: Fri Jan 9 20:41:58 2009 New Revision: 186971 URL: http://svn.freebsd.org/changeset/base/186971 Log: MFC rev. 185183 Remove unused variable. Found with: Coverity Prevent(tm) CID: 3682 Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_socket.c Modified: stable/7/sys/netgraph/ng_socket.c ============================================================================== --- stable/7/sys/netgraph/ng_socket.c Fri Jan 9 20:40:19 2009 (r186970) +++ stable/7/sys/netgraph/ng_socket.c Fri Jan 9 20:41:58 2009 (r186971) @@ -259,9 +259,8 @@ ngc_send(struct socket *so, int flags, s if (msg->header.typecookie == NGM_GENERIC_COOKIE && msg->header.cmd == NGM_MKPEER) { struct ngm_mkpeer *const mkp = (struct ngm_mkpeer *) msg->data; - struct ng_type *type; - if ((type = ng_findtype(mkp->type)) == NULL) { + if (ng_findtype(mkp->type) == NULL) { char filename[NG_TYPESIZ + 3]; int fileid; @@ -275,7 +274,7 @@ ngc_send(struct socket *so, int flags, s } /* See if type has been loaded successfully. */ - if ((type = ng_findtype(mkp->type)) == NULL) { + if (ng_findtype(mkp->type) == NULL) { free(msg, M_NETGRAPH_MSG); (void)kern_kldunload(curthread, fileid, LINKER_UNLOAD_NORMAL); From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:43:06 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBA3110657B5; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7DC98FC25; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Kh6tS068112; Fri, 9 Jan 2009 20:43:06 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Kh6xl068111; Fri, 9 Jan 2009 20:43:06 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200901092043.n09Kh6xl068111@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 9 Jan 2009 20:43:06 +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: r186972 - stable/7/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:43:09 -0000 Author: gnn Date: Fri Jan 9 20:43:06 2009 New Revision: 186972 URL: http://svn.freebsd.org/changeset/base/186972 Log: Revert the last checkin as it's supposed to go against HEAD first. Modified: stable/7/sys/conf/kern.pre.mk Modified: stable/7/sys/conf/kern.pre.mk ============================================================================== --- stable/7/sys/conf/kern.pre.mk Fri Jan 9 20:41:58 2009 (r186971) +++ stable/7/sys/conf/kern.pre.mk Fri Jan 9 20:43:06 2009 (r186972) @@ -26,7 +26,6 @@ COPTFLAGS?= -O .else . if defined(DEBUG) _MINUS_O= -O -CTFFLAGS+= -g . else _MINUS_O= -O2 . endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:43:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CECBF10657B7; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id AFAB98FC26; Fri, 9 Jan 2009 20:43:06 +0000 (UTC) (envelope-from prvs=julian=25380973a@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 12:43:06 -0800 Message-ID: <4967B6D9.90001@elischer.org> Date: Fri, 09 Jan 2009 12:43:05 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Attila Nagy References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> In-Reply-To: <4967A500.30205@fsn.hu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:43:10 -0000 Attila Nagy wrote: > Hello, > > Adrian Chadd wrote: >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. >> This allows applications to spoof the client IP address of >> connections >> if (obviously!) they somehow are able to receive the traffic normally >> destined to said clients. >> This patch doesn't include any changes to ipfw or the bridging >> code to >> redirect the client traffic through the PCB checks so TCP gets a shot >> at it. The normal behaviour is that packets with a non-local >> destination >> IP address are not handled locally. This can be dealth with some >> IPFW hackery; >> modifications to IPFW to make this less hacky will occur in subsequent >> commmits. >> Thanks to Julian Elischer and others at Ironport. This work was >> approved >> and donated before Cisco acquired them. >> Obtained from: Julian Elischer and others >> MFC after: 2 weeks >> > Wouldn't it be better to implement existing interfaces for that? > OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: > http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b good point From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:55:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1486106566C; Fri, 9 Jan 2009 20:55:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDB8E8FC16; Fri, 9 Jan 2009 20:55:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09KtQp7068455; Fri, 9 Jan 2009 20:55:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09KtQpv068452; Fri, 9 Jan 2009 20:55:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092055.n09KtQpv068452@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186973 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph/netflow X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:55:27 -0000 Author: mav Date: Fri Jan 9 20:55:26 2009 New Revision: 186973 URL: http://svn.freebsd.org/changeset/base/186973 Log: MFC rev. 183693 Add ability to generate egress netflow instead or in addition to ingress. Use mbuf tagging for accounted packets to not account packets twice when both ingress and egress netflow enabled. To keep compatibility new "setconfig" message added to control new functionality. By default node works as before, doing only ingress accounting without using mbuf tags. Reviewed by: glebius Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/netflow/netflow.c stable/7/sys/netgraph/netflow/ng_netflow.c stable/7/sys/netgraph/netflow/ng_netflow.h Modified: stable/7/sys/netgraph/netflow/netflow.c ============================================================================== --- stable/7/sys/netgraph/netflow/netflow.c Fri Jan 9 20:43:06 2009 (r186972) +++ stable/7/sys/netgraph/netflow/netflow.c Fri Jan 9 20:55:26 2009 (r186973) @@ -395,8 +395,7 @@ ng_netflow_cache_flush(priv_p priv) /* Insert packet from into flow cache. */ int -ng_netflow_flow_add(priv_p priv, struct ip *ip, iface_p iface, - struct ifnet *ifp) +ng_netflow_flow_add(priv_p priv, struct ip *ip, unsigned int src_if_index) { register struct flow_entry *fle, *fle1; struct flow_hash_entry *hsh; @@ -427,12 +426,7 @@ ng_netflow_flow_add(priv_p priv, struct r.r_ip_p = ip->ip_p; r.r_tos = ip->ip_tos; - /* Configured in_ifx overrides mbuf's */ - if (iface->info.ifinfo_index == 0) { - if (ifp != NULL) - r.r_i_ifx = ifp->if_index; - } else - r.r_i_ifx = iface->info.ifinfo_index; + r.r_i_ifx = src_if_index; /* * XXX NOTE: only first fragment of fragmented TCP, UDP and Modified: stable/7/sys/netgraph/netflow/ng_netflow.c ============================================================================== --- stable/7/sys/netgraph/netflow/ng_netflow.c Fri Jan 9 20:43:06 2009 (r186972) +++ stable/7/sys/netgraph/netflow/ng_netflow.c Fri Jan 9 20:55:26 2009 (r186973) @@ -106,6 +106,14 @@ static const struct ng_parse_type ng_net &ng_netflow_settimeouts_type_fields }; +/* Parse type for ng_netflow_setconfig */ +static const struct ng_parse_struct_field ng_netflow_setconfig_type_fields[] + = NG_NETFLOW_SETCONFIG_TYPE; +static const struct ng_parse_type ng_netflow_setconfig_type = { + &ng_parse_struct_type, + &ng_netflow_setconfig_type_fields +}; + /* List of commands and how to convert arguments to/from ASCII */ static const struct ng_cmdlist ng_netflow_cmds[] = { { @@ -143,6 +151,13 @@ static const struct ng_cmdlist ng_netflo &ng_netflow_settimeouts_type, NULL }, + { + NGM_NETFLOW_COOKIE, + NGM_NETFLOW_SETCONFIG, + "setconfig", + &ng_netflow_setconfig_type, + NULL + }, { 0 } }; @@ -167,7 +182,7 @@ static int ng_netflow_constructor(node_p node) { priv_p priv; - int error = 0; + int error = 0, i; /* Initialize private data */ MALLOC(priv, priv_p, sizeof(*priv), M_NETGRAPH, M_NOWAIT); @@ -183,6 +198,10 @@ ng_netflow_constructor(node_p node) priv->info.nfinfo_inact_t = INACTIVE_TIMEOUT; priv->info.nfinfo_act_t = ACTIVE_TIMEOUT; + /* Set default config */ + for (i = 0; i < NG_NETFLOW_MAXIFACES; i++) + priv->ifaces[i].info.conf = NG_NETFLOW_CONF_INGRESS; + /* Initialize callout handle */ callout_init(&priv->exp_callout, CALLOUT_MPSAFE); @@ -399,6 +418,22 @@ ng_netflow_rcvmsg (node_p node, item_p i break; } + case NGM_NETFLOW_SETCONFIG: + { + struct ng_netflow_setconfig *set; + + if (msg->header.arglen != sizeof(struct ng_netflow_settimeouts)) + ERROUT(EINVAL); + + set = (struct ng_netflow_setconfig *)msg->data; + + if (set->iface >= NG_NETFLOW_MAXIFACES) + ERROUT(EINVAL); + + priv->ifaces[set->iface].info.conf = set->conf; + + break; + } case NGM_NETFLOW_SHOW: { uint32_t *last; @@ -445,10 +480,13 @@ ng_netflow_rcvdata (hook_p hook, item_p const node_p node = NG_HOOK_NODE(hook); const priv_p priv = NG_NODE_PRIVATE(node); const iface_p iface = NG_HOOK_PRIVATE(hook); + hook_p out; struct mbuf *m = NULL; struct ip *ip; + struct m_tag *mtag; int pullup_len = 0; - int error = 0; + int error = 0, bypass = 0; + unsigned int src_if_index; if (hook == priv->export) { /* @@ -459,16 +497,48 @@ ng_netflow_rcvdata (hook_p hook, item_p ERROUT(EINVAL); }; - if (hook == iface->out) { - /* - * Data arrived on out hook. Bypass it. - */ - if (iface->hook == NULL) + if (hook == iface->hook) { + if ((iface->info.conf & NG_NETFLOW_CONF_INGRESS) == 0) + bypass = 1; + out = iface->out; + } else if (hook == iface->out) { + if ((iface->info.conf & NG_NETFLOW_CONF_EGRESS) == 0) + bypass = 1; + out = iface->hook; + } else + ERROUT(EINVAL); + + if ((!bypass) && + (iface->info.conf & (NG_NETFLOW_CONF_ONCE | NG_NETFLOW_CONF_THISONCE))) { + mtag = m_tag_locate(NGI_M(item), MTAG_NETFLOW, + MTAG_NETFLOW_CALLED, NULL); + while (mtag != NULL) { + if ((iface->info.conf & NG_NETFLOW_CONF_ONCE) || + ((ng_ID_t *)(mtag + 1))[0] == NG_NODE_ID(node)) { + bypass = 1; + break; + } + mtag = m_tag_locate(NGI_M(item), MTAG_NETFLOW, + MTAG_NETFLOW_CALLED, mtag); + } + } + + if (bypass) { + if (out == NULL) ERROUT(ENOTCONN); - NG_FWD_ITEM_HOOK(error, item, iface->hook); + NG_FWD_ITEM_HOOK(error, item, out); return (error); } + + if (iface->info.conf & (NG_NETFLOW_CONF_ONCE | NG_NETFLOW_CONF_THISONCE)) { + mtag = m_tag_alloc(MTAG_NETFLOW, MTAG_NETFLOW_CALLED, + sizeof(ng_ID_t), M_NOWAIT); + if (mtag) { + ((ng_ID_t *)(mtag + 1))[0] = NG_NODE_ID(node); + m_tag_prepend(NGI_M(item), mtag); + } + } NGI_GET_M(item, m); @@ -592,12 +662,20 @@ ng_netflow_rcvdata (hook_p hook, item_p #undef M_CHECK - error = ng_netflow_flow_add(priv, ip, iface, m->m_pkthdr.rcvif); + /* Determine packet input interface. Prefer configured. */ + src_if_index = 0; + if (hook == iface->out || iface->info.ifinfo_index == 0) { + if (m->m_pkthdr.rcvif != NULL) + src_if_index = m->m_pkthdr.rcvif->if_index; + } else + src_if_index = iface->info.ifinfo_index; + + error = ng_netflow_flow_add(priv, ip, src_if_index); bypass: - if (iface->out != NULL) { + if (out != NULL) { /* XXX: error gets overwritten here */ - NG_FWD_NEW_DATA(error, item, iface->out, m); + NG_FWD_NEW_DATA(error, item, out, m); return (error); } done: Modified: stable/7/sys/netgraph/netflow/ng_netflow.h ============================================================================== --- stable/7/sys/netgraph/netflow/ng_netflow.h Fri Jan 9 20:43:06 2009 (r186972) +++ stable/7/sys/netgraph/netflow/ng_netflow.h Fri Jan 9 20:55:26 2009 (r186973) @@ -50,6 +50,7 @@ enum { NGM_NETFLOW_SETDLT = 4, /* set data-link type */ NGM_NETFLOW_SETIFINDEX = 5, /* set interface index */ NGM_NETFLOW_SETTIMEOUTS = 6, /* set active/inactive flow timeouts */ + NGM_NETFLOW_SETCONFIG = 7, /* set flow generation options */ }; /* This structure is returned by the NGM_NETFLOW_INFO message */ @@ -71,6 +72,7 @@ struct ng_netflow_ifinfo { uint8_t ifinfo_dlt; /* Data Link Type, DLT_XXX */ #define MAXDLTNAMELEN 20 u_int16_t ifinfo_index; /* connected iface index */ + uint32_t conf; }; @@ -92,6 +94,17 @@ struct ng_netflow_settimeouts { uint32_t active_timeout; /* flow active timeout */ }; +#define NG_NETFLOW_CONF_INGRESS 1 +#define NG_NETFLOW_CONF_EGRESS 2 +#define NG_NETFLOW_CONF_ONCE 4 +#define NG_NETFLOW_CONF_THISONCE 8 + +/* This structure is passed to NGM_NETFLOW_SETCONFIG */ +struct ng_netflow_setconfig { + u_int16_t iface; /* which iface config change */ + u_int32_t conf; /* new config */ +}; + /* This is unique data, which identifies flow */ struct flow_rec { struct in_addr r_src; @@ -182,6 +195,7 @@ struct flow_entry { { "packets", &ng_parse_uint32_type }, \ { "data link type", &ng_parse_uint8_type }, \ { "index", &ng_parse_uint16_type }, \ + { "conf", &ng_parse_uint32_type }, \ { NULL } \ } @@ -206,6 +220,13 @@ struct flow_entry { { NULL } \ } +/* Parse the setifindex structure */ +#define NG_NETFLOW_SETCONFIG_TYPE { \ + { "iface", &ng_parse_uint16_type }, \ + { "conf", &ng_parse_uint32_type }, \ + { NULL } \ +} + /* Private hook data */ struct ng_netflow_iface { hook_p hook; /* NULL when disconnected */ @@ -263,12 +284,15 @@ struct flow_hash_entry { #define ERROUT(x) { error = (x); goto done; } +#define MTAG_NETFLOW 1221656444 +#define MTAG_NETFLOW_CALLED 0 + /* Prototypes for netflow.c */ int ng_netflow_cache_init(priv_p); void ng_netflow_cache_flush(priv_p); void ng_netflow_copyinfo(priv_p, struct ng_netflow_info *); timeout_t ng_netflow_expire; -int ng_netflow_flow_add(priv_p, struct ip *, iface_p, struct ifnet *); +int ng_netflow_flow_add(priv_p, struct ip *, unsigned int src_if_index); int ng_netflow_flow_show(priv_p, uint32_t last, struct ng_mesg *); #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:57:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EDC01065672; Fri, 9 Jan 2009 20:57:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE938FC0C; Fri, 9 Jan 2009 20:57:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Kv1hS068548; Fri, 9 Jan 2009 20:57:01 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Kv12s068547; Fri, 9 Jan 2009 20:57:01 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092057.n09Kv12s068547@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 20:57: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: r186974 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:57:02 -0000 Author: mav Date: Fri Jan 9 20:57:01 2009 New Revision: 186974 URL: http://svn.freebsd.org/changeset/base/186974 Log: MFC rev. 183695 Document new NGM_NETFLOW_SETCONFIG control message. Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/ng_netflow.4 Modified: stable/7/share/man/man4/ng_netflow.4 ============================================================================== --- stable/7/share/man/man4/ng_netflow.4 Fri Jan 9 20:55:26 2009 (r186973) +++ stable/7/share/man/man4/ng_netflow.4 Fri Jan 9 20:57:01 2009 (r186974) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 2, 2006 +.Dd October 8, 2008 .Os .Dt NG_NETFLOW 4 .Sh NAME @@ -71,7 +71,8 @@ and the same number of hooks named etc., plus a single hook named .Va export . -The node does NetFlow accounting of data received on +By default (ingress NetFlow enabled) node does NetFlow accounting of data +received on .Va iface* hooks. If corresponding @@ -81,7 +82,7 @@ If data is received on .Va out hook, it is bypassed to corresponding .Va iface -hook without any processing. +hook without any processing (egress NetFlow disabled by default). When full export datagram is built it is sent to the .Va export hook. @@ -162,6 +163,31 @@ struct ng_netflow_settimeouts { uint32_t active_timeout; }; .Ed +.It Dv NGM_NETFLOW_SETCONFIG +Sets configuration for the specified interface. +This message requires +.Vt "struct ng_netflow_setconfig" +as an argument: +.Bd -literal -offset 4n +struct ng_netflow_setconfig { + u_int16_t iface; + u_int32_t conf; +#define NG_NETFLOW_CONF_INGRESS 1 +#define NG_NETFLOW_CONF_EGRESS 2 +#define NG_NETFLOW_CONF_ONCE 4 +#define NG_NETFLOW_CONF_THISONCE 8 +}; +.Ed +.Pp +Configuration is a bitmask of several options. Option NG_NETFLOW_CONF_INGRESS +enabled by default enables ingress NetFlow generation (for data coming from +ifaceX hook). Option NG_NETFLOW_CONF_EGRESS enables egress NetFlow (for data +coming from outX hook). Option NG_NETFLOW_CONF_ONCE defines that packet should +be accounted only once if it several times passes via netflow node. Option +NG_NETFLOW_CONF_THISONCE defines that packet should be accounted only once +if it several times passes via exactly this netflow node. Last two options are +important to avoid duplicate accounting when both ingress and egress NetFlow +are enabled. .It Dv NGM_NETFLOW_SHOW This control message asks a node to dump the entire contents of the flow cache. It is called from @@ -191,6 +217,8 @@ commands are: .Qq Li "setifindex { iface = %u index = %u }" .It Dv NGM_NETFLOW_SETTIMEOUTS .Qq Li "settimeouts { inactive = %u active = %u }" +.It Dv NGM_NETFLOW_SETCONFIG +.Qq Li "setconfig { iface = %u conf = %u }" .El .Sh SHUTDOWN This node shuts down upon receipt of a From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 21:02:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D2BA1065672; Fri, 9 Jan 2009 21:02:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EECBA8FC08; Fri, 9 Jan 2009 21:02:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09L2sYc068795; Fri, 9 Jan 2009 21:02:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09L2sMa068794; Fri, 9 Jan 2009 21:02:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092102.n09L2sMa068794@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 21:02:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186976 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:02:55 -0000 Author: mav Date: Fri Jan 9 21:02:54 2009 New Revision: 186976 URL: http://svn.freebsd.org/changeset/base/186976 Log: MFC rev. 182995 We can't implicitly trust the hook on NGQF_FN/NGQF_FN2 processing in ng_apply_item(). There are possible (and I have got one) use-after-free class panics because of it. If hook is specified, require it to be valid at the apply time. The only exceptions are the internal ng_con_part2(), ng_con_part3() and ng_rmhook_part2() functions which are specially made to work with invalid hooks. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netgraph/ng_base.c Modified: stable/7/sys/netgraph/ng_base.c ============================================================================== --- stable/7/sys/netgraph/ng_base.c Fri Jan 9 20:57:43 2009 (r186975) +++ stable/7/sys/netgraph/ng_base.c Fri Jan 9 21:02:54 2009 (r186976) @@ -2377,19 +2377,27 @@ ng_apply_item(node_p node, item_p item, case NGQF_FN: case NGQF_FN2: /* - * We have to implicitly trust the hook, - * as some of these are used for system purposes - * where the hook is invalid. In the case of - * the shutdown message we allow it to hit + * In the case of the shutdown message we allow it to hit * even if the node is invalid. */ - if ((NG_NODE_NOT_VALID(node)) - && (NGI_FN(item) != &ng_rmnode)) { + if (NG_NODE_NOT_VALID(node) && + NGI_FN(item) != &ng_rmnode) { TRAP_ERROR(); error = EINVAL; NG_FREE_ITEM(item); break; } + /* Same is about some internal functions and invalid hook. */ + if (hook && NG_HOOK_NOT_VALID(hook) && + NGI_FN2(item) != &ng_con_part2 && + NGI_FN2(item) != &ng_con_part3 && + NGI_FN(item) != &ng_rmhook_part2) { + TRAP_ERROR(); + error = EINVAL; + NG_FREE_ITEM(item); + break; + } + if ((item->el_flags & NGQF_TYPE) == NGQF_FN) { (*NGI_FN(item))(node, hook, NGI_ARG1(item), NGI_ARG2(item)); From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 21:39:45 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0222A106564A; Fri, 9 Jan 2009 21:39:45 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3B0E8FC16; Fri, 9 Jan 2009 21:39:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09LdiaR069635; Fri, 9 Jan 2009 21:39:44 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09LdiVA069626; Fri, 9 Jan 2009 21:39:44 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901092139.n09LdiVA069626@svn.freebsd.org> From: Sam Leffler Date: Fri, 9 Jan 2009 21:39:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186979 - in head/tools/tools/nanobsd/gateworks: . Files Files/root cfg cfg/ssh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:39:45 -0000 Author: sam Date: Fri Jan 9 21:39:44 2009 New Revision: 186979 URL: http://svn.freebsd.org/changeset/base/186979 Log: example configurations for cross-building to Gateworks 2348 and 2358 boards; probably needs cleanups to be less specific to my needs/uses MFC after: 2 weeks Added: head/tools/tools/nanobsd/gateworks/ head/tools/tools/nanobsd/gateworks/Files/ (props changed) head/tools/tools/nanobsd/gateworks/Files/root/ (props changed) head/tools/tools/nanobsd/gateworks/Files/root/.profile (contents, props changed) head/tools/tools/nanobsd/gateworks/G2348 (contents, props changed) head/tools/tools/nanobsd/gateworks/G2358 (contents, props changed) head/tools/tools/nanobsd/gateworks/avila (contents, props changed) head/tools/tools/nanobsd/gateworks/cambria (contents, props changed) head/tools/tools/nanobsd/gateworks/cfg/ (props changed) head/tools/tools/nanobsd/gateworks/cfg/motd (contents, props changed) head/tools/tools/nanobsd/gateworks/cfg/rc.conf (contents, props changed) head/tools/tools/nanobsd/gateworks/cfg/ssh/ (props changed) head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config (contents, props changed) head/tools/tools/nanobsd/gateworks/common (contents, props changed) Added: head/tools/tools/nanobsd/gateworks/Files/root/.profile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/Files/root/.profile Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,15 @@ +# $FreeBSD: src/etc/root/dot.profile,v 1.21 2007/05/29 06:33:10 dougb Exp $ +# +PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:~/bin +export PATH +HOME=/root; export HOME +TERM=${TERM:-cons25}; export TERM +PAGER=more; export PAGER + +#set -o vi +set -o emacs +if [ `id -u` = 0 ]; then + PS1="`hostname -s`# " +else + PS1="`hostname -s`% " +fi Added: head/tools/tools/nanobsd/gateworks/G2348 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/G2348 Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,120 @@ +# +# Gateworks Avila IXP425 XScale board +# kernel configuration file for FreeBSD/arm +# +# $FreeBSD$ + +machine arm +ident G2348 + +include "../xscale/ixp425/std.ixp425" +include "../xscale/ixp425/std.avila" +options XSCALE_CACHE_READ_WRITE_ALLOCATE +#options ARM_USE_SMALL_ALLOC +hints "AVILA.hints" +makeoptions MODULES_OVERRIDE="" + +# NB: patched by boot2 to reflect boot/root partition +options ROOTDEVNAME=\"ufs:ad0s1\" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions CONF_CFLAGS=-mcpu=xscale + +options HZ=100 +options DEVICE_POLLING + +# Debugging for use in -current +options KDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +options SCHED_4BSD #4BSD scheduler +#options PREEMPTION + +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +#options VERBOSE_SYSINIT + +#device saarm + +device pci +device uart + +# I2C Bus +device iicbus +device iicbb +device iic + +device ixpiic +device ixpwdog # watchdog timer +device ds1672 # DS1672 on I2C bus +device ad7418 # AD7418 on I2C bus + +device avila_led + +device ata +device atadisk # ATA disk drives +device avila_ata # Gateworks CF/IDE support + +device npe # Network Processing Engine +device npe_fw +device firmware +device qmgr # Q Manager (required by npe) +device miibus # NB: required by npe +device ether +device bpf + +device pty +device loop +device if_bridge + +device md +device random # Entropy device + +# Wireless NIC cards +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debugging msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support + +device ath # Atheros pci/cardbus NIC's +device ath_rate_sample # SampleRate tx rate control for ath +options ATH_DEBUG # enable athdebug msgs +options ATH_DIAGAPI # enable api for athregs + +device ath_hal # Atheros HAL (includes binary component) +options AH_DEBUG +#options AH_ASSERT +options AH_SUPPORT_AR5416 + +#device crypto +#device cryptodev +#device hifn # NB: Soekris minipci card known to work + +device usb +options USB_DEBUG +device uhci +device ohci +device ehci +device ugen +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) Added: head/tools/tools/nanobsd/gateworks/G2358 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/G2358 Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,121 @@ +# +# Gateworks Cambria IXP435 XScale board +# kernel configuration file for FreeBSD/arm +# +# $FreeBSD$ + +machine arm +ident G2358 + +include "../xscale/ixp425/std.ixp435" +include "../xscale/ixp425/std.avila" +options XSCALE_CACHE_READ_WRITE_ALLOCATE +#options ARM_USE_SMALL_ALLOC +hints "CAMBRIA.hints" +makeoptions MODULES_OVERRIDE="" + +# NB: patched by boot2 to reflect boot/root partition +options ROOTDEVNAME=\"ufs:ad0s1\" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions CONF_CFLAGS=-mcpu=xscale + +options HZ=100 +options DEVICE_POLLING + +# Debugging for use in -current +options KDB +options DDB #Enable the kernel debugger +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +options SCHED_4BSD #4BSD scheduler +#options PREEMPTION + +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +#options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options KTRACE #ktrace(1) support +options SYSVSHM #SYSV-style shared memory +options SYSVMSG #SYSV-style message queues +options SYSVSEM #SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +#options VERBOSE_SYSINIT + +#device saarm + +device pci +device uart + +# I2C Bus +device iicbus +device iicbb +device iic + +device ixpiic +device ixpwdog # watchdog timer +device ds1672 # DS1672 on I2C bus +device ad7418 # AD7418 on I2C bus + +device cambria_led +device cambria_fled + +device ata +device atadisk # ATA disk drives +device avila_ata # Gateworks CF/IDE support + +device npe # Network Processing Engine +device npe_fw +device firmware +device qmgr # Q Manager (required by npe) +device miibus # NB: required by npe +device ether +device bpf + +device pty +device loop +device if_bridge + +device md +device random # Entropy device + +# Wireless NIC cards +device wlan # 802.11 support +options IEEE80211_DEBUG # enable debugging msgs +options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support + +device ath # Atheros pci/cardbus NIC's +device ath_rate_sample # SampleRate tx rate control for ath +options ATH_DEBUG # enable athdebug msgs +options ATH_DIAGAPI # enable api for athregs + +device ath_hal # Atheros HAL (includes binary component) +options AH_DEBUG +#options AH_ASSERT +options AH_SUPPORT_AR5416 + +#device crypto +#device cryptodev +#device hifn # NB: Soekris minipci card known to work + +device usb +options USB_DEBUG +device uhci +device ohci +device ehci +device ugen +device umass +device scbus # SCSI bus (required for SCSI) +device da # Direct Access (disks) Added: head/tools/tools/nanobsd/gateworks/avila ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/avila Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +NANO_NAME="avila" +NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` +NANO_KERNEL="G2348" + +NANO_IMAGES=1 +FlashDevice Sandisk 64 + +. common Added: head/tools/tools/nanobsd/gateworks/cambria ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cambria Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +NANO_NAME="cambria" +NANO_SRC=`pwd | sed 's/.tools.tools.nanobsd.*//'` +NANO_KERNEL="G2358" + +NANO_IMAGES=1 +FlashDevice Sandisk 64 + +. common Added: head/tools/tools/nanobsd/gateworks/cfg/motd ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cfg/motd Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1 @@ +FreeBSD 7.1-PRERELEASE (G2348) #1: Fri Sep 26 14:37:41 PDT 2008 Added: head/tools/tools/nanobsd/gateworks/cfg/rc.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cfg/rc.conf Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,24 @@ +#!/bin/sh + +hostname="avila" +ifconfig_npe0="DHCP" +background_dhclient_npe0="YES" # Start dhcp client in the background. +#ifconfig_npe1="DHCP" +background_dhclient_npe1="YES" # Start dhcp client in the background. + +wlans_ath0="wlan0" + +sshd_enable="YES" +nfs_client_enable="YES" + +sendmail_enable="NO" # Run the sendmail inbound daemon (YES/NO). +sendmail_submit_enable="NO" # Start a localhost-only MTA for mail submission +sendmail_outbound_enable="NO" # Dequeue stuck mail (YES/NO). +sendmail_msp_queue_enable="NO" # Dequeue stuck clientmqueue mail (YES/NO). + +dumpdev="NO" # Device to crashdump to (device name, AUTO, or NO). +background_fsck="NO" + +harvest_interrupt="NO" # Entropy device harvests interrupt randomness +harvest_ethernet="NO" # Entropy device harvests ethernet randomness +harvest_p_to_p="NO" # Entropy device harvests point-to-point randomness Added: head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/cfg/ssh/sshd_config Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,126 @@ +# $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ +# $FreeBSD: src/crypto/openssh/sshd_config,v 1.48 2008/08/01 02:48:36 des Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options change a +# default value. + +# Note that some of FreeBSD's defaults differ from OpenBSD's, and +# FreeBSD has a few additional options. + +#VersionAddendum FreeBSD-20080801 + +#Port 22 +#Protocol 2 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +# Disable legacy (protocol version 1) support in the server for new +# installations. In future the default will change to require explicit +# activation of protocol 1 +Protocol 2 + +# HostKey for protocol version 1 +#HostKey /etc/ssh/ssh_host_key +# HostKeys for protocol version 2 +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_dsa_key + +# Lifetime and size of ephemeral version 1 server key +#KeyRegenerationInterval 1h +#ServerKeyBits 1024 + +# Logging +# obsoletes QuietMode and FascistLogging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#RSAAuthentication yes +#PubkeyAuthentication yes +#AuthorizedKeysFile .ssh/authorized_keys + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#RhostsRSAAuthentication no +# similar for protocol version 2 +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# RhostsRSAAuthentication and HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# Change to yes to enable built-in password authentication. +PasswordAuthentication yes +PermitEmptyPasswords yes + +# Change to no to disable PAM authentication +ChallengeResponseAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'no' to disable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +#UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS yes +#PidFile /var/run/sshd.pid +#MaxStartups 10 +#PermitTunnel no +#ChrootDirectory none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# ForceCommand cvs server Added: head/tools/tools/nanobsd/gateworks/common ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/nanobsd/gateworks/common Fri Jan 9 21:39:44 2009 (r186979) @@ -0,0 +1,346 @@ +# $FreeBSD$ + +NANO_CFGDIR=${NANO_SRC}/${NANO_TOOLS}/gateworks/cfg +test -d ${NANO_CFGDIR} || NANO_CFGDIR=/var/empty +NANO_PMAKE="make" # NB: disable -j 3 + +NANO_ARCH=arm +TARGET_CPUTYPE=xscale; export TARGET_CPUTYPE # XXX +TARGET_BIG_ENDIAN=true; export TARGET_BIG_ENDIAN # XXX + +NANO_CUSTOMIZE="cust_allow_ssh_root" + +clean_usr_local() +{ + LOCAL_DIR=${NANO_WORLDDIR}/usr/local + pprint 2 "Clean and create world directory (${LOCAL_DIR})" + if rm -rf ${LOCAL_DIR}/ > /dev/null 2>&1 ; then + true + else + chflags -R noschg ${LOCAL_DIR}/ + rm -rf ${LOCAL_DIR}/ + fi + for f in bin etc lib libdata libexec sbin share; do + mkdir -p ${LOCAL_DIR}/$f + done +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE clean_usr_local" + +cust_install_machine_files() +{ + echo "cd ${NANO_TOOLS}/gateworks/Files" + cd ${NANO_TOOLS}/gateworks/Files + find . -print | grep -Ev '/(CVS|\.svn)' | cpio -dumpv ${NANO_WORLDDIR} +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE cust_install_files cust_install_machine_files" + +buildenv() +{ + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} __MAKE_CONF=${NANO_MAKE_CONF} \ + DESTDIR=${NANO_WORLDDIR} make buildenv +} + +net80211_tools() +{ + for f in wlanstats wlanwds wlanwatch; do + echo "(cd tools/tools/net80211/$f; make $1)"; + done | buildenv +} +net80211_clean_tools() +{ + net80211_tools "clean" +} +net80211_build_tools() +{ + net80211_tools "" +} +net80211_install_tools() +{ + net80211_tools "install" +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_clean_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_build_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE net80211_install_tools" + +ath_clean_tools() +{ + echo "cd tools/tools/ath; make clean" | buildenv +} +ath_build_tools() +{ + echo "cd tools/tools/ath; make" | buildenv +} +ath_install_tools() +{ + echo "cd tools/tools/ath; make install" | buildenv +} +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_clean_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_build_tools" +NANO_CUSTOMIZE="$NANO_CUSTOMIZE ath_install_tools" + +NANO_MAKEFS="makefs -B big \ + -o bsize=4096,fsize=512,density=8192,optimization=space" +export NANO_MAKEFS + +# NB: leave c++ enabled so devd can be built +CONF_BUILD=" +WITHOUT_ACPI=true +WITHOUT_ATM=true +WITHOUT_AUDIT=true +WITHOUT_BIND_DNSSEC=true +WITHOUT_BIND_ETC=true +WITHOUT_BIND_LIBS_LWRES=true +WITHOUT_BLUETOOTH=true +WITHOUT_CALENDAR=true +WITHOUT_CDDL=true +WITHOUT_CVS=true +WITHOUT_DICT=true +WITHOUT_EXAMPLES=true +WITHOUT_FORTRAN=true +WITHOUT_GAMES=true +WITHOUT_GCOV=true +WITHOUT_GPIB=true +WITHOUT_HTML=true +WITHOUT_I4B=true +WITHOUT_INET6=true +WITHOUT_INFO=true +WITHOUT_IPFILTER=true +WITHOUT_IPX=true +WITHOUT_KERBEROS=true +WITHOUT_LIBKSE=true +WITHOUT_LOCALES=true +WITHOUT_LPR=true +WITHOUT_MAN=true +WITHOUT_NETCAT=true +WITHOUT_NIS=true +WITHOUT_NLS=true +WITHOUT_NS_CACHING=true +WITHOUT_OBJC=true +WITHOUT_PROFILE=true +WITHOUT_RCMDS=true +WITHOUT_RCS=true +WITHOUT_RESCUE=true +WITHOUT_SENDMAIL=true +WITHOUT_SHAREDOCS=true +WITHOUT_SSP=true +WITHOUT_SYSCONS=true +WITHOUT_TCSH=true +" +CONF_INSTALL="$CONF_BUILD +WITHOUT_TOOLCHAIN=true +WITHOUT_INSTALLLIB=true +" + +# NB: override to suppress install of kernel.symbols +install_kernel() +{ + pprint 2 "install kernel" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.ik" + + cd ${NANO_SRC} + env TARGET_ARCH=${NANO_ARCH} ${NANO_PMAKE} installkernel \ + INSTALL_NODEBUG=true \ + DESTDIR=${NANO_WORLDDIR} \ + __MAKE_CONF=${NANO_MAKE_CONF} KERNCONF=`basename ${NANO_KERNEL}` \ + > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 +} + +# NB: override to force / on s1 instead of s1a +setup_nanobsd_etc() +{ + pprint 2 "configure nanobsd /etc" + + ( + cd ${NANO_WORLDDIR} + + # create diskless marker file + touch etc/diskless + + # Make root filesystem R/O by default + echo "root_rw_mount=NO" >> etc/defaults/rc.conf + + # save config file for scripts + echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf + + echo "/dev/${NANO_DRIVE}s1 / ufs ro 1 1" > etc/fstab + echo "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab + mkdir -p cfg + ) +} + +create_arm_diskimage() +{ + pprint 2 "build diskimage" + pprint 3 "log: ${MAKEOBJDIRPREFIX}/_.di" + + ( + echo "NANO_MEDIASIZE: $NANO_MEDIASIZE" + echo "NANO_IMAGES: $NANO_IMAGES" + echo "NANO_SECTS: $NANO_SECTS" + echo "NANO_HEADS: $NANO_HEADS" + echo "NANO_CODESIZE: $NANO_CODESIZE" + echo "NANO_CONFSIZE: $NANO_CONFSIZE" + echo "NANO_DATASIZE: $NANO_DATASIZE" + + echo $NANO_MEDIASIZE $NANO_IMAGES \ + $NANO_SECTS $NANO_HEADS \ + $NANO_CODESIZE $NANO_CONFSIZE $NANO_DATASIZE | + awk ' + { + printf "# %s\n", $0 + + # size of cylinder in sectors + cs = $3 * $4 + + # number of full cylinders on media + cyl = int ($1 / cs) + + # output fdisk geometry spec, truncate cyls to 1023 + if (cyl <= 1023) + print "g c" cyl " h" $4 " s" $3 + else + print "g c" 1023 " h" $4 " s" $3 + + if ($7 > 0) { + # size of data partition in full cylinders + dsl = int (($7 + cs - 1) / cs) + } else { + dsl = 0; + } + + # size of config partition in full cylinders + csl = int (($6 + cs - 1) / cs) + + if ($5 == 0) { + # size of image partition(s) in full cylinders + isl = int ((cyl - dsl - csl) / $2) + } else { + isl = int (($5 + cs - 1) / cs) + } + + # First image partition start at second track + print "p 1 165 " $3, isl * cs - $3 + c = isl * cs; + + # Second image partition (if any) also starts offset one + # track to keep them identical. + if ($2 > 1) { + print "p 2 165 " $3 + c, isl * cs - $3 + c += isl * cs; + } + + # Config partition starts at cylinder boundary. + print "p 3 165 " c, csl * cs + c += csl * cs + + # Data partition (if any) starts at cylinder boundary. + if ($7 > 0) { + print "p 4 165 " c, dsl * cs + } else if ($7 < 0 && $1 > c) { + print "p 4 165 " c, $1 - c + } else if ($1 < c) { + print "Disk space overcommitted by", \ + c - $1, "sectors" > "/dev/stderr" + exit 2 + } + + # Force slice 1 to be marked active. This is necessary + # for booting the image from a USB device to work. + print "a 1" + } + ' > ${MAKEOBJDIRPREFIX}/_.fdisk + + IMG=${NANO_DISKIMGDIR}/${NANO_IMGNAME} + BS=${NANO_SECTS}b + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + MD=`mdconfig -a -t swap -s ${NANO_MEDIASIZE} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + else + echo ""; echo "Creating md backing file ${IMG} ..." + _c=`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}` + pprint 2 "dd if=/dev/zero of=${IMG} bs=${BS} count=${_c}" + dd if=/dev/zero of=${IMG} bs=${BS} count=${_c} + pprint 2 "mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} -y ${NANO_HEADS}" + MD=`mdconfig -a -t vnode -f ${IMG} -x ${NANO_SECTS} \ + -y ${NANO_HEADS}` + fi + + trap "mdconfig -d -u $MD" 1 2 15 EXIT + + echo ""; echo "Write partition table ..." + FDISK=${MAKEOBJDIRPREFIX}/_.fdisk + pprint 2 "fdisk -i -f ${FDISK} ${MD}" + fdisk -i -f ${FDISK} ${MD} + pprint 2 "fdisk ${MD}" + fdisk ${MD} + + # Create first image + IMG1=${NANO_DISKIMGDIR}/_.disk.image1 + echo ""; echo "Create first image ${IMG1} ..." + SIZE=`awk '/^p 1/ { print $5 "b" }' ${FDISK}` + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${IMG1} ${NANO_WORLDDIR} + pprint 2 "dd if=${IMG1} of=/dev/${MD}s1 bs=${BS}" + dd if=${IMG1} of=/dev/${MD}s1 bs=${BS} + + if [ $NANO_IMAGES -gt 1 -a $NANO_INIT_IMG2 -gt 0 ] ; then + IMG2=${NANO_DISKIMGDIR}/_.disk.image2 + echo ""; echo "Create second image ${IMG2}..." + for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab + do + sed -i "" "s/${NANO_DRIVE}s1/${NANO_DRIVE}s2/g" $f + done + + SIZE=`awk '/^p 2/ { print $5 "b" }' ${FDISK}` + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${IMG2} ${NANO_WORLDDIR} + pprint 2 "dd if=${IMG2} of=/dev/${MD}s2 bs=${BS}" + dd if=${IMG2} of=/dev/${MD}s2 bs=${BS} + fi + + # Create Config slice + CFG=${NANO_DISKIMGDIR}/_.disk.cfg + echo ""; echo "Creating config partition ${CFG}..." + SIZE=`awk '/^p 3/ { print $5 "b" }' ${FDISK}` + # XXX: fill from where ? + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR}" + ${NANO_MAKEFS} -s ${SIZE} ${CFG} ${NANO_CFGDIR} + pprint 2 "dd if=${CFG} of=/dev/${MD}s3 bs=${BS}" + dd if=${CFG} of=/dev/${MD}s3 bs=${BS} + pprint 2 "rm ${CFG}" + rm ${CFG}; CFG= # NB: disable printing below + + # Create Data slice, if any. + if [ $NANO_DATASIZE -gt 0 ] ; then + DATA=${NANO_DISKIMGDIR}/_.disk.data + echo ""; echo "Creating data partition ${DATA}..." + SIZE=`awk '/^p 4/ { print $5 "b" }' ${FDISK}` + # XXX: fill from where ? + pprint 2 "${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty" + ${NANO_MAKEFS} -s ${SIZE} ${DATA} /var/empty + pprint 2 "dd if=${DATA} of=/dev/${MD}s4 bs=${BS}" + dd if=${DATA} of=/dev/${MD}s4 bs=${BS} + pprint 2 "rm ${DATA}" + rm ${DATA}; DATA= # NB: disable printing below + fi + + if [ "${NANO_MD_BACKING}" = "swap" ] ; then + echo "Writing out _.disk.full..." + dd if=/dev/${MD} of=${IMG} bs=${BS} + fi + + echo "" + echo "Completed images in:" + echo "" + echo "Full disk: ${IMG}" + echo "Primary partition: ${IMG1}" + test "${IMG2}" && echo "2ndary partition: ${IMG2}" + test "${CFG}" && echo "/cfg partition: ${CFG}" + test "${DATA}" && echo "/data partition: ${DATA}" + echo "" + echo "Use dd if= of=/dev/ bs=${BS} to transfer an" + echo "image to bootable media /dev/." + ) > ${MAKEOBJDIRPREFIX}/_.di 2>&1 +} From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 21:44:29 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA111065675; Fri, 9 Jan 2009 21:44:29 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 2597B8FC16; Fri, 9 Jan 2009 21:44:27 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id EBE70A7CEC; Fri, 9 Jan 2009 22:44:25 +0100 (CET) Message-ID: <4967C539.2060803@fsn.hu> Date: Fri, 09 Jan 2009 22:44:25 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Julian Elischer References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> In-Reply-To: <4967B6D9.90001@elischer.org> X-Stationery: 0.4.8.12 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Fri, 09 Jan 2009 22:44:26 +0100 (CET) Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:44:30 -0000 Julian Elischer wrote: > Attila Nagy wrote: >> Hello, >> >> Adrian Chadd wrote: >>> Author: adrian >>> Date: Fri Jan 9 16:02:19 2009 >>> New Revision: 186955 >>> URL: http://svn.freebsd.org/changeset/base/186955 >>> >>> Log: >>> Implement a new IP option (not compiled/enabled by default) to allow >>> applications to specify a non-local IP address when bind()'ing a >>> socket >>> to a local endpoint. >>> This allows applications to spoof the client IP address of >>> connections >>> if (obviously!) they somehow are able to receive the traffic normally >>> destined to said clients. >>> This patch doesn't include any changes to ipfw or the bridging >>> code to >>> redirect the client traffic through the PCB checks so TCP gets a shot >>> at it. The normal behaviour is that packets with a non-local >>> destination >>> IP address are not handled locally. This can be dealth with some >>> IPFW hackery; >>> modifications to IPFW to make this less hacky will occur in >>> subsequent >>> commmits. >>> Thanks to Julian Elischer and others at Ironport. This work was >>> approved >>> and donated before Cisco acquired them. >>> Obtained from: Julian Elischer and others >>> MFC after: 2 weeks >>> >> Wouldn't it be better to implement existing interfaces for that? >> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b > > good point BTW, it also makes easier to port OpenBSD's relayd (and of course other applications relying on this). pf has some related changes there too, which helps programs to use this feature. From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 21:57:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CC811065672; Fri, 9 Jan 2009 21:57:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B7A08FC0A; Fri, 9 Jan 2009 21:57:50 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09LvnHR070064; Fri, 9 Jan 2009 21:57:49 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09LvnG4070060; Fri, 9 Jan 2009 21:57:49 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901092157.n09LvnG4070060@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 21:57:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186980 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 21:57:50 -0000 Author: bz Date: Fri Jan 9 21:57:49 2009 New Revision: 186980 URL: http://svn.freebsd.org/changeset/base/186980 Log: Restrict arp, ndp and theoretically the FIB listing (if not read with libkvm) to the addresses of a prison, when inside a jail. [1] As the patch from the PR was pre-'new-arp', add checks to the llt_dump handlers as well. While touching RTM_GET in route_output(), consistently use curthread credentials rather than the creds from the socket there. [2] PR: kern/68189 Submitted by: Mark Delany [1] Discussed with: rwatson [2] Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/net/rtsock.c head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Jan 9 21:39:44 2009 (r186979) +++ head/sys/net/rtsock.c Fri Jan 9 21:57:49 2009 (r186980) @@ -611,6 +611,12 @@ route_output(struct mbuf *m, struct sock case RTM_GET: report: RT_LOCK_ASSERT(rt); + if (jailed(curthread->td_ucred) && + ((rt->rt_flags & RTF_HOST) == 0 || + !prison_if(curthread->td_ucred, rt_key(rt)))) { + RT_UNLOCK(rt); + senderr(ESRCH); + } info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; info.rti_info[RTAX_NETMASK] = rt_mask(rt); @@ -620,10 +626,10 @@ route_output(struct mbuf *m, struct sock if (ifp) { info.rti_info[RTAX_IFP] = ifp->if_addr->ifa_addr; - if (jailed(so->so_cred)) { + if (jailed(curthread->td_ucred)) { error = rtm_get_jailed( &info, ifp, rt, &saun, - so->so_cred); + curthread->td_ucred); if (error != 0) { RT_UNLOCK(rt); senderr(ESRCH); @@ -1256,6 +1262,10 @@ sysctl_dumpentry(struct radix_node *rn, if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg)) return 0; + if (jailed(w->w_req->td->td_ucred) && + ((rt->rt_flags & RTF_HOST) == 0 || + !prison_if(w->w_req->td->td_ucred, rt_key(rt)))) + return (0); bzero((caddr_t)&info, sizeof(info)); info.rti_info[RTAX_DST] = rt_key(rt); info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 9 21:39:44 2009 (r186979) +++ head/sys/netinet/in.c Fri Jan 9 21:57:49 2009 (r186980) @@ -1201,6 +1201,10 @@ in_lltable_dump(struct lltable *llt, str /* skip deleted entries */ if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) continue; + /* Skip if jailed and not a valid IP of the prison. */ + if (jailed(wr->td->td_ucred) && + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) + continue; /* * produce a msg made of: * struct rt_msghdr; Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Jan 9 21:39:44 2009 (r186979) +++ head/sys/netinet6/in6.c Fri Jan 9 21:57:49 2009 (r186980) @@ -2240,6 +2240,10 @@ in6_lltable_dump(struct lltable *llt, st /* skip deleted or invalid entries */ if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) continue; + /* Skip if jailed and not a valid IP of the prison. */ + if (jailed(wr->td->td_ucred) && + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) + continue; /* * produce a msg made of: * struct rt_msghdr; From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 22:00:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C51FA106567B; Fri, 9 Jan 2009 22:00:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9E3DF8FC0A; Fri, 9 Jan 2009 22:00:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 3C0B341C650; Fri, 9 Jan 2009 23:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id NXuApMfAW58e; Fri, 9 Jan 2009 23:00:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A75D641C64A; Fri, 9 Jan 2009 23:00:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id CB2CB4448DD; Fri, 9 Jan 2009 21:59:53 +0000 (UTC) Date: Fri, 9 Jan 2009 21:59:53 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200901092157.n09LvnG4070060@svn.freebsd.org> Message-ID: <20090109215851.B45399@maildrop.int.zabbadoz.net> References: <200901092157.n09LvnG4070060@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r186980 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:00:22 -0000 On Fri, 9 Jan 2009, Bjoern A. Zeeb wrote: > Author: bz > Date: Fri Jan 9 21:57:49 2009 > New Revision: 186980 > URL: http://svn.freebsd.org/changeset/base/186980 > > Log: > Restrict arp, ndp and theoretically the FIB listing (if not > read with libkvm) to the addresses of a prison, when inside a > jail. [1] > As the patch from the PR was pre-'new-arp', add checks to the > llt_dump handlers as well. > > While touching RTM_GET in route_output(), consistently use > curthread credentials rather than the creds from the socket > there. [2] > > PR: kern/68189 > Submitted by: Mark Delany [1] That should have been: Submitted by: Uwe Doering [1] > Discussed with: rwatson [2] > Reviewed by: rwatson > MFC after: 4 weeks > > Modified: > head/sys/net/rtsock.c > head/sys/netinet/in.c > head/sys/netinet6/in6.c > > Modified: head/sys/net/rtsock.c > ============================================================================== > --- head/sys/net/rtsock.c Fri Jan 9 21:39:44 2009 (r186979) > +++ head/sys/net/rtsock.c Fri Jan 9 21:57:49 2009 (r186980) > @@ -611,6 +611,12 @@ route_output(struct mbuf *m, struct sock > case RTM_GET: > report: > RT_LOCK_ASSERT(rt); > + if (jailed(curthread->td_ucred) && > + ((rt->rt_flags & RTF_HOST) == 0 || > + !prison_if(curthread->td_ucred, rt_key(rt)))) { > + RT_UNLOCK(rt); > + senderr(ESRCH); > + } > info.rti_info[RTAX_DST] = rt_key(rt); > info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; > info.rti_info[RTAX_NETMASK] = rt_mask(rt); > @@ -620,10 +626,10 @@ route_output(struct mbuf *m, struct sock > if (ifp) { > info.rti_info[RTAX_IFP] = > ifp->if_addr->ifa_addr; > - if (jailed(so->so_cred)) { > + if (jailed(curthread->td_ucred)) { > error = rtm_get_jailed( > &info, ifp, rt, &saun, > - so->so_cred); > + curthread->td_ucred); > if (error != 0) { > RT_UNLOCK(rt); > senderr(ESRCH); > @@ -1256,6 +1262,10 @@ sysctl_dumpentry(struct radix_node *rn, > > if (w->w_op == NET_RT_FLAGS && !(rt->rt_flags & w->w_arg)) > return 0; > + if (jailed(w->w_req->td->td_ucred) && > + ((rt->rt_flags & RTF_HOST) == 0 || > + !prison_if(w->w_req->td->td_ucred, rt_key(rt)))) > + return (0); > bzero((caddr_t)&info, sizeof(info)); > info.rti_info[RTAX_DST] = rt_key(rt); > info.rti_info[RTAX_GATEWAY] = rt->rt_gateway; > > Modified: head/sys/netinet/in.c > ============================================================================== > --- head/sys/netinet/in.c Fri Jan 9 21:39:44 2009 (r186979) > +++ head/sys/netinet/in.c Fri Jan 9 21:57:49 2009 (r186980) > @@ -1201,6 +1201,10 @@ in_lltable_dump(struct lltable *llt, str > /* skip deleted entries */ > if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) > continue; > + /* Skip if jailed and not a valid IP of the prison. */ > + if (jailed(wr->td->td_ucred) && > + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) > + continue; > /* > * produce a msg made of: > * struct rt_msghdr; > > Modified: head/sys/netinet6/in6.c > ============================================================================== > --- head/sys/netinet6/in6.c Fri Jan 9 21:39:44 2009 (r186979) > +++ head/sys/netinet6/in6.c Fri Jan 9 21:57:49 2009 (r186980) > @@ -2240,6 +2240,10 @@ in6_lltable_dump(struct lltable *llt, st > /* skip deleted or invalid entries */ > if ((lle->la_flags & (LLE_DELETED|LLE_VALID)) != LLE_VALID) > continue; > + /* Skip if jailed and not a valid IP of the prison. */ > + if (jailed(wr->td->td_ucred) && > + !prison_if(wr->td->td_ucred, L3_ADDR(lle))) > + continue; > /* > * produce a msg made of: > * struct rt_msghdr; > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 22:06:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B29E3106568F; Fri, 9 Jan 2009 22:06:48 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1B668FC0C; Fri, 9 Jan 2009 22:06:48 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09M6mEY070420; Fri, 9 Jan 2009 22:06:48 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09M6mun070419; Fri, 9 Jan 2009 22:06:48 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200901092206.n09M6mun070419@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 9 Jan 2009 22:06:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186981 - head/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:06:49 -0000 Author: marcus (doc,ports committer) Date: Fri Jan 9 22:06:48 2009 New Revision: 186981 URL: http://svn.freebsd.org/changeset/base/186981 Log: Fix a deadlock which can occur due to a pseudofs vnode not getting unlocked. Reported by: Richard Todd Reviewed by: kib Approved by: kib Modified: head/sys/fs/pseudofs/pseudofs_vncache.c Modified: head/sys/fs/pseudofs/pseudofs_vncache.c ============================================================================== --- head/sys/fs/pseudofs/pseudofs_vncache.c Fri Jan 9 21:57:49 2009 (r186980) +++ head/sys/fs/pseudofs/pseudofs_vncache.c Fri Jan 9 22:06:48 2009 (r186981) @@ -212,6 +212,7 @@ retry2: if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, curthread) == 0) { ++pfs_vncache_hits; vgone(*vpp); + vput(*vpp); *vpp = vp; cache_purge(vp); return (0); From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 22:10:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 611D4106567A; Fri, 9 Jan 2009 22:10:07 +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 4D2BC8FC19; Fri, 9 Jan 2009 22:10:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09MA7fv070529; Fri, 9 Jan 2009 22:10:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09MA7Xb070527; Fri, 9 Jan 2009 22:10:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092210.n09MA7Xb070527@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 22:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:10:08 -0000 Author: mav Date: Fri Jan 9 22:10:07 2009 New Revision: 186982 URL: http://svn.freebsd.org/changeset/base/186982 Log: Sync powerd with CURRENT. 1. Make it more SMP polite. Previous version uses average CPU load that often leads to load underestimation. It make powerd with default configuration unusable on systems with more then 2 CPUs. I propose to use summary load instead of average one. IMO this is the best we can do without specially tuned scheduler. Also as soon as measuring total load on SMP systems is more useful then total idle, I have switched to it. 2. Make powerd's operation independent from number and size of frequency levels. I have added internal frequency counter which translated into real frequencies only on a last stage and only as good as gone. Some systems may have only several power levels, while others - many of them, so adaptation time with previous approach was completely different. 3. As part of previous I have changed adaptive mode to rise frequency on demand up to 2 times and fall on 1/8 per time internal. 4. For desktop (AC-powered) systems I have added one more mode - "hiadaptive". It rises frequency twice faster, drops it 4 times slower, prefers twice lower CPU load and has additional delay before leaving the highest frequency after the period of maximum load. This mode was specially made to improve interactivity of the systems where operation capabilities are more significant then power consumption, but keeping maximum frequency all the time is not needed. 5. I have reduced default polling interval from 1/2 to 1/4 of second. It is not so important for algorithm math now, but gives better system interactivity. 6. Restore original frequency on exit. 7. getopt(3) returns -1, not EOF. Discussed on: mobile@ Modified: stable/7/usr.sbin/powerd/powerd.8 stable/7/usr.sbin/powerd/powerd.c Modified: stable/7/usr.sbin/powerd/powerd.8 ============================================================================== --- stable/7/usr.sbin/powerd/powerd.8 Fri Jan 9 22:06:48 2009 (r186981) +++ stable/7/usr.sbin/powerd/powerd.8 Fri Jan 9 22:10:07 2009 (r186982) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 6, 2005 +.Dd December 24, 2008 .Dt POWERD 8 .Os .Sh NAME @@ -47,7 +47,8 @@ utility monitors the system state and se accordingly. It offers three modes (maximum, minimum, and adaptive) that can be individually selected while on AC power or batteries. -The modes maximum, minimum, and adaptive may be abbreviated max, min, adp. +The modes maximum, minimum, adaptive and hiadaptive may be abbreviated +max, min, adp, hadp. .Pp Maximum mode chooses the highest performance values. Minimum mode selects the lowest performance values to get the most power @@ -56,8 +57,10 @@ Adaptive mode attempts to strike a balan the system appears idle and increasing it when the system is busy. It offers a good balance between a small performance loss for greatly increased power savings. -The default mode is -adaptive. +Hiadaptive mode is alike adaptive mode, but tuned for systems where +performance and interactivity are more important then power consumption. +It rises frequency faster, drops slower and keeps twice lower CPU load. +The default mode is adaptive for battery power and hiadaptive for the rest. .Pp The .Nm @@ -72,10 +75,9 @@ Selects the .Ar mode to use while on battery power. .It Fl i Ar percent -Specifies the CPU idle percent level when -adaptive +Specifies the CPU load percent level when adaptive mode should begin to degrade performance to save power. -The default is 90% or higher. +The default is 50% or lower. .It Fl n Ar mode Selects the .Ar mode @@ -83,16 +85,15 @@ to use normally when the AC line state i .It Fl p Ar ival Specifies a different polling interval (in milliseconds) for AC line state and system idle levels. -The default is 500 ms. +The default is 250 ms. .It Fl P Ar pidfile Specifies an alternative file in which the process ID should be stored. The default is .Pa /var/run/powerd.pid . .It Fl r Ar percent -Specifies the CPU idle percent level where -adaptive +Specifies the CPU load percent level where adaptive mode should consider the CPU running and increase performance. -The default is 65% or lower. +The default is 75% or higher. .It Fl v Verbose mode. Messages about power changes will be printed to stdout and Modified: stable/7/usr.sbin/powerd/powerd.c ============================================================================== --- stable/7/usr.sbin/powerd/powerd.c Fri Jan 9 22:06:48 2009 (r186981) +++ stable/7/usr.sbin/powerd/powerd.c Fri Jan 9 22:10:07 2009 (r186982) @@ -50,13 +50,14 @@ __FBSDID("$FreeBSD$"); #include #endif -#define DEFAULT_ACTIVE_PERCENT 65 -#define DEFAULT_IDLE_PERCENT 90 -#define DEFAULT_POLL_INTERVAL 500 /* Poll interval in milliseconds */ +#define DEFAULT_ACTIVE_PERCENT 75 +#define DEFAULT_IDLE_PERCENT 50 +#define DEFAULT_POLL_INTERVAL 250 /* Poll interval in milliseconds */ typedef enum { MODE_MIN, MODE_ADAPTIVE, + MODE_HIADAPTIVE, MODE_MAX, } modes_t; @@ -77,7 +78,7 @@ const char *modes[] = { #define DEVDPIPE "/var/run/devd.pipe" #define DEVCTL_MAXBUF 1024 -static int read_usage_times(long *idle, long *total); +static int read_usage_times(int *load); static int read_freqs(int *numfreqs, int **freqs, int **power); static int set_freq(int freq); static void acline_init(void); @@ -89,7 +90,7 @@ static void parse_mode(char *arg, int *m static void usage(void); /* Sysctl data structures. */ -static int cp_time_mib[2]; +static int cp_times_mib[2]; static int freq_mib[4]; static int levels_mib[4]; static int acline_mib[3]; @@ -119,27 +120,49 @@ static int devd_pipe = -1; static struct timeval tried_devd; static int -read_usage_times(long *idle, long *total) +read_usage_times(int *load) { - static long idle_old, total_old; - long cp_time[CPUSTATES], i, total_new; - size_t cp_time_len; - int error; + static long *cp_times = NULL, *cp_times_old = NULL; + static int ncpus = 0; + size_t cp_times_len; + int error, cpu, i, total; + + if (cp_times == NULL) { + cp_times_len = 0; + error = sysctl(cp_times_mib, 2, NULL, &cp_times_len, NULL, 0); + if (error) + return (error); + if ((cp_times = malloc(cp_times_len)) == NULL) + return (errno); + if ((cp_times_old = malloc(cp_times_len)) == NULL) { + free(cp_times); + cp_times = NULL; + return (errno); + } + ncpus = cp_times_len / (sizeof(long) * CPUSTATES); + } - cp_time_len = sizeof(cp_time); - error = sysctl(cp_time_mib, 2, cp_time, &cp_time_len, NULL, 0); + cp_times_len = sizeof(long) * CPUSTATES * ncpus; + error = sysctl(cp_times_mib, 2, cp_times, &cp_times_len, NULL, 0); if (error) return (error); - for (total_new = 0, i = 0; i < CPUSTATES; i++) - total_new += cp_time[i]; - - if (idle) - *idle = cp_time[CP_IDLE] - idle_old; - if (total) - *total = total_new - total_old; + + if (load) { + *load = 0; + for (cpu = 0; cpu < ncpus; cpu++) { + total = 0; + for (i = 0; i < CPUSTATES; i++) { + total += cp_times[cpu * CPUSTATES + i] - + cp_times_old[cpu * CPUSTATES + i]; + } + if (total == 0) + continue; + *load += 100 - (cp_times[cpu * CPUSTATES + CP_IDLE] - + cp_times_old[cpu * CPUSTATES + CP_IDLE]) * 100 / total; + } + } - idle_old = cp_time[CP_IDLE]; - total_old = total_new; + memcpy(cp_times_old, cp_times, cp_times_len); return (0); } @@ -190,6 +213,21 @@ read_freqs(int *numfreqs, int **freqs, i } static int +get_freq(void) +{ + size_t len; + int curfreq; + + len = sizeof(curfreq); + if (sysctl(freq_mib, 4, &curfreq, &len, NULL, 0) != 0) { + if (vflag) + warn("error reading current CPU frequency"); + curfreq = 0; + } + return (curfreq); +} + +static int set_freq(int freq) { @@ -201,6 +239,19 @@ set_freq(int freq) return (0); } +static int +get_freq_id(int freq, int *freqs, int numfreqs) +{ + int i = 1; + + while (i < numfreqs) { + if (freqs[i] < freq) + break; + i++; + } + return (i - 1); +} + /* * Try to use ACPI to find the AC line status. If this fails, fall back * to APM. If nothing succeeds, we'll just run in default mode. @@ -341,6 +392,8 @@ parse_mode(char *arg, int *mode, int ch) *mode = MODE_MAX; else if (strcmp(arg, "adaptive") == 0 || strcmp(arg, "adp") == 0) *mode = MODE_ADAPTIVE; + else if (strcmp(arg, "hiadaptive") == 0 || strcmp(arg, "hadp") == 0) + *mode = MODE_HIADAPTIVE; else errx(1, "bad option: -%c %s", (char)ch, optarg); } @@ -369,14 +422,14 @@ main(int argc, char * argv[]) int nfds; struct pidfh *pfh = NULL; const char *pidfile = NULL; - long idle, total; - int curfreq, *freqs, i, *mwatts, numfreqs; + int freq, curfreq, initfreq, *freqs, i, j, *mwatts, numfreqs, load; int ch, mode, mode_ac, mode_battery, mode_none; uint64_t mjoules_used; size_t len; /* Default mode for all AC states is adaptive. */ - mode_ac = mode_battery = mode_none = MODE_ADAPTIVE; + mode_ac = mode_none = MODE_HIADAPTIVE; + mode_battery = MODE_ADAPTIVE; cpu_running_mark = DEFAULT_ACTIVE_PERCENT; cpu_idle_mark = DEFAULT_IDLE_PERCENT; poll_ival = DEFAULT_POLL_INTERVAL; @@ -387,7 +440,7 @@ main(int argc, char * argv[]) if (geteuid() != 0) errx(1, "must be root to run"); - while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != EOF) + while ((ch = getopt(argc, argv, "a:b:i:n:p:P:r:v")) != -1) switch (ch) { case 'a': parse_mode(optarg, &mode_ac, ch); @@ -418,7 +471,7 @@ main(int argc, char * argv[]) break; case 'r': cpu_running_mark = atoi(optarg); - if (cpu_running_mark < 0 || cpu_running_mark > 100) { + if (cpu_running_mark <= 0 || cpu_running_mark > 100) { warnx("%d is not a valid percent", cpu_running_mark); usage(); @@ -438,8 +491,8 @@ main(int argc, char * argv[]) /* Look up various sysctl MIBs. */ len = 2; - if (sysctlnametomib("kern.cp_time", cp_time_mib, &len)) - err(1, "lookup kern.cp_time"); + if (sysctlnametomib("kern.cp_times", cp_times_mib, &len)) + err(1, "lookup kern.cp_times"); len = 4; if (sysctlnametomib("dev.cpu.0.freq", freq_mib, &len)) err(1, "lookup freq"); @@ -447,8 +500,8 @@ main(int argc, char * argv[]) if (sysctlnametomib("dev.cpu.0.freq_levels", levels_mib, &len)) err(1, "lookup freq_levels"); - /* Check if we can read the idle time and supported freqs. */ - if (read_usage_times(NULL, NULL)) + /* Check if we can read the load and supported freqs. */ + if (read_usage_times(NULL)) err(1, "read_usage_times"); if (read_freqs(&numfreqs, &freqs, &mwatts)) err(1, "error reading supported CPU frequencies"); @@ -483,6 +536,9 @@ main(int argc, char * argv[]) signal(SIGINT, handle_sigs); signal(SIGTERM, handle_sigs); + freq = initfreq = get_freq(); + if (freq < 1) + freq = 1; /* Main loop. */ for (;;) { FD_ZERO(&fdset); @@ -522,37 +578,30 @@ main(int argc, char * argv[]) } /* Read the current frequency. */ - len = sizeof(curfreq); - if (sysctl(freq_mib, 4, &curfreq, &len, NULL, 0) != 0) { - if (vflag) - warn("error reading current CPU frequency"); + if ((curfreq = get_freq()) == 0) continue; - } + i = get_freq_id(curfreq, freqs, numfreqs); + if (vflag) { - for (i = 0; i < numfreqs; i++) { - if (freqs[i] == curfreq) - break; - } - /* Keep a sum of all power actually used. */ - if (i < numfreqs && mwatts[i] != -1) + if (mwatts[i] != -1) mjoules_used += (mwatts[i] * (poll_ival / 1000)) / 1000; } /* Always switch to the lowest frequency in min mode. */ if (mode == MODE_MIN) { - if (curfreq != freqs[numfreqs - 1]) { + freq = freqs[numfreqs - 1]; + if (curfreq != freq) { if (vflag) { printf("now operating on %s power; " "changing frequency to %d MHz\n", - modes[acline_status], - freqs[numfreqs - 1]); + modes[acline_status], freq); } - if (set_freq(freqs[numfreqs - 1]) != 0) { + if (set_freq(freq) != 0) { warn("error setting CPU freq %d", - freqs[numfreqs - 1]); + freq); continue; } } @@ -561,16 +610,16 @@ main(int argc, char * argv[]) /* Always switch to the highest frequency in max mode. */ if (mode == MODE_MAX) { - if (curfreq != freqs[0]) { + freq = freqs[0]; + if (curfreq != freq) { if (vflag) { printf("now operating on %s power; " "changing frequency to %d MHz\n", - modes[acline_status], - freqs[0]); + modes[acline_status], freq); } - if (set_freq(freqs[0]) != 0) { + if (set_freq(freq) != 0) { warn("error setting CPU freq %d", - freqs[0]); + freq); continue; } } @@ -578,46 +627,63 @@ main(int argc, char * argv[]) } /* Adaptive mode; get the current CPU usage times. */ - if (read_usage_times(&idle, &total)) { + if (read_usage_times(&load)) { if (vflag) warn("read_usage_times() failed"); continue; } - - /* - * If we're idle less than the active mark, bump up two levels. - * If we're idle more than the idle mark, drop down one level. - */ - for (i = 0; i < numfreqs - 1; i++) { - if (freqs[i] == curfreq) - break; - } - if (idle < (total * cpu_running_mark) / 100 && - curfreq < freqs[0]) { - i -= 2; - if (i < 0) - i = 0; - if (vflag) { - printf("idle time < %d%%, increasing clock" - " speed from %d MHz to %d MHz\n", - cpu_running_mark, curfreq, freqs[i]); + + if (mode == MODE_ADAPTIVE) { + if (load > cpu_running_mark) { + if (load > 95 || load > cpu_running_mark * 2) + freq *= 2; + else + freq = freq * load / cpu_running_mark; + if (freq > freqs[0]) + freq = freqs[0]; + } else if (load < cpu_idle_mark && + curfreq * load < freqs[get_freq_id( + freq * 7 / 8, freqs, numfreqs)] * + cpu_running_mark) { + freq = freq * 7 / 8; + if (freq < freqs[numfreqs - 1]) + freq = freqs[numfreqs - 1]; } - if (set_freq(freqs[i])) - warn("error setting CPU frequency %d", - freqs[i]); - } else if (idle > (total * cpu_idle_mark) / 100 && - curfreq > freqs[numfreqs - 1]) { - i++; + } else { /* MODE_HIADAPTIVE */ + if (load > cpu_running_mark / 2) { + if (load > 95 || load > cpu_running_mark) + freq *= 4; + else + freq = freq * load * 2 / cpu_running_mark; + if (freq > freqs[0] * 2) + freq = freqs[0] * 2; + } else if (load < cpu_idle_mark / 2 && + curfreq * load < freqs[get_freq_id( + freq * 31 / 32, freqs, numfreqs)] * + cpu_running_mark / 2) { + freq = freq * 31 / 32; + if (freq < freqs[numfreqs - 1]) + freq = freqs[numfreqs - 1]; + } + } + if (vflag) { + printf("load %3d%%, current freq %4d MHz (%2d), wanted freq %4d MHz\n", + load, curfreq, i, freq); + } + j = get_freq_id(freq, freqs, numfreqs); + if (i != j) { if (vflag) { - printf("idle time > %d%%, decreasing clock" + printf("changing clock" " speed from %d MHz to %d MHz\n", - cpu_idle_mark, curfreq, freqs[i]); + freqs[i], freqs[j]); } - if (set_freq(freqs[i]) != 0) + if (set_freq(freqs[j])) warn("error setting CPU frequency %d", - freqs[i]); + freqs[j]); } } + if (set_freq(initfreq)) + warn("error setting CPU frequency %d", initfreq); free(freqs); free(mwatts); devd_close(); From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 22:11:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 070031065838; Fri, 9 Jan 2009 22:11:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.26]) by mx1.freebsd.org (Postfix) with ESMTP id 0CF758FC0C; Fri, 9 Jan 2009 22:11:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5660550qwb.7 for ; Fri, 09 Jan 2009 14:11:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=TJ7x4uFTpR9AehwXscAezm1/I5SqS4MBPENbvFQZABI=; b=PLp4tofNuvBtR3sgXTll/GtKNmkKf282LkzCdq+DQjJEnFnstanL99e3Nh8I0+sSmy P2GAeSiEVfmMwSMO8+3mjfNiFrs0VJEQrngS870TYKISIurQdKo8qGr9XYNB7/VNSdPL MR3kthEx1qRkt0JRTGwvV12ZVSzfGwHAMegvY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=FN6RX58XatVCCQ6guY4oSVNdAGzAg7eOnP0H0NfgT+RvDTmDGsCwB++sPsF5/Xkfj9 n2ly4iST9hiV8X9BeFq20v5Ulu9xUWUIW6CGBPf5GOyymAbWPMQcNVja/gaE04R7J6Z6 6CdHmt7Ldfb6jCB7BSHzY7XmX34veCdoI6G0I= Received: by 10.215.40.10 with SMTP id s10mr235907qaj.39.1231539070306; Fri, 09 Jan 2009 14:11:10 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 14:11:10 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 17:11:10 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4967C539.2060803@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> X-Google-Sender-Auth: 1c24ce4daaba03db Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:11:28 -0000 Well, they can be used mostly interchangably - they socket option is just implemented at a different layer. Porting should be a case of a simple #ifdef. :) I wonder what pf changes are needed.. Adrian 2009/1/9 Attila Nagy : > Julian Elischer wrote: >> >> Attila Nagy wrote: >>> >>> Hello, >>> >>> Adrian Chadd wrote: >>>> >>>> Author: adrian >>>> Date: Fri Jan 9 16:02:19 2009 >>>> New Revision: 186955 >>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>> >>>> Log: >>>> Implement a new IP option (not compiled/enabled by default) to allow >>>> applications to specify a non-local IP address when bind()'ing a socket >>>> to a local endpoint. >>>> This allows applications to spoof the client IP address of >>>> connections >>>> if (obviously!) they somehow are able to receive the traffic normally >>>> destined to said clients. >>>> This patch doesn't include any changes to ipfw or the bridging code >>>> to >>>> redirect the client traffic through the PCB checks so TCP gets a shot >>>> at it. The normal behaviour is that packets with a non-local >>>> destination >>>> IP address are not handled locally. This can be dealth with some IPFW >>>> hackery; >>>> modifications to IPFW to make this less hacky will occur in subsequent >>>> commmits. >>>> Thanks to Julian Elischer and others at Ironport. This work was >>>> approved >>>> and donated before Cisco acquired them. >>>> Obtained from: Julian Elischer and others >>>> MFC after: 2 weeks >>>> >>> >>> Wouldn't it be better to implement existing interfaces for that? >>> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >>> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b >> >> good point > > BTW, it also makes easier to port OpenBSD's relayd (and of course other > applications relying on this). pf has some related changes there too, which > helps programs to use this feature. > From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 22:19:49 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032C91065774; Fri, 9 Jan 2009 22: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 E50298FC08; Fri, 9 Jan 2009 22:19:48 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09MJmeV070744; Fri, 9 Jan 2009 22: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 n09MJm8F070743; Fri, 9 Jan 2009 22:19:48 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901092219.n09MJm8F070743@svn.freebsd.org> From: Alexander Motin Date: Fri, 9 Jan 2009 22: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: r186983 - stable/7 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:19:50 -0000 Author: mav Date: Fri Jan 9 22:19:48 2009 New Revision: 186983 URL: http://svn.freebsd.org/changeset/base/186983 Log: powerd(8) was updated to get better SMP support. Meanings of the -i and -r command line options were changed. Modified: stable/7/UPDATING Modified: stable/7/UPDATING ============================================================================== --- stable/7/UPDATING Fri Jan 9 22:10:07 2009 (r186982) +++ stable/7/UPDATING Fri Jan 9 22:19:48 2009 (r186983) @@ -8,6 +8,10 @@ Items affecting the ports and packages s /usr/ports/UPDATING. Please read that file before running portupgrade. +20090110: + powerd(8) was updated to get better SMP support. + Meanings of the -i and -r command line options were changed. + 20090107: snd_hda(4) driver was updated to version 20081226_0122. From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 22:35:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7E841065672; Fri, 9 Jan 2009 22:35:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C74A18FC14; Fri, 9 Jan 2009 22:35:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09MZPa8071071; Fri, 9 Jan 2009 22:35:25 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09MZP1e071070; Fri, 9 Jan 2009 22:35:25 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200901092235.n09MZP1e071070@svn.freebsd.org> From: Sam Leffler Date: Fri, 9 Jan 2009 22:35:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186984 - head/sys/modules/iwnfw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 22:35:26 -0000 Author: sam Date: Fri Jan 9 22:35:25 2009 New Revision: 186984 URL: http://svn.freebsd.org/changeset/base/186984 Log: remove license ack requirement; this was never needed Reviewed by: core Modified: head/sys/modules/iwnfw/Makefile Modified: head/sys/modules/iwnfw/Makefile ============================================================================== --- head/sys/modules/iwnfw/Makefile Fri Jan 9 22:19:48 2009 (r186983) +++ head/sys/modules/iwnfw/Makefile Fri Jan 9 22:35:25 2009 (r186984) @@ -4,7 +4,6 @@ KMOD= iwnfw FIRMWS= iwlwifi-4965-4.44.17.fw:iwnfw:44417 -FIRMWARE_LICENSE= intel_iwn CLEANFILES= iwlwifi-4965-4.44.17.fw From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 23:14:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 662131065670; Fri, 9 Jan 2009 23:14:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 412B08FC16; Fri, 9 Jan 2009 23:14:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id C55F946B03; Fri, 9 Jan 2009 18:14:12 -0500 (EST) Date: Fri, 9 Jan 2009 23:14:12 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <200901092210.n09MA7Xb070527@svn.freebsd.org> Message-ID: References: <200901092210.n09MA7Xb070527@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:14:14 -0000 On Fri, 9 Jan 2009, Alexander Motin wrote: > Modified: > stable/7/usr.sbin/powerd/powerd.8 > stable/7/usr.sbin/powerd/powerd.c I notice that you didn't use svn merge for this MFC, so there's no tracking of what revs were merged. Was it just everything to date? Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 23:31:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 729281065670; Fri, 9 Jan 2009 23:31:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 106528FC1A; Fri, 9 Jan 2009 23:31:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 231279149; Sat, 10 Jan 2009 01:31:09 +0200 Message-ID: <4967DE41.20109@FreeBSD.org> Date: Sat, 10 Jan 2009 01:31:13 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.17 (X11/20081029) MIME-Version: 1.0 To: Robert Watson References: <200901092210.n09MA7Xb070527@svn.freebsd.org> In-Reply-To: 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: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:31:33 -0000 Robert Watson wrote: > > On Fri, 9 Jan 2009, Alexander Motin wrote: > >> Modified: >> stable/7/usr.sbin/powerd/powerd.8 >> stable/7/usr.sbin/powerd/powerd.c > > I notice that you didn't use svn merge for this MFC, so there's no > tracking of what revs were merged. Was it just everything to date? I just copied files completely, so everything is merged now. AFAIK it was decided that merge info is not mandatory before 9.x branching. I'm just not very good with this merge stuff yet. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 23:54:15 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E69DA106564A; Fri, 9 Jan 2009 23:54:15 +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 D31B88FC1F; Fri, 9 Jan 2009 23:54:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09NsFGT072643; Fri, 9 Jan 2009 23:54:15 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09NsFvH072638; Fri, 9 Jan 2009 23:54:15 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901092354.n09NsFvH072638@svn.freebsd.org> From: Doug Barton Date: Fri, 9 Jan 2009 23:54:15 +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: r186985 - in stable/6/lib/bind: dns dns/dns lwres/lwres X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:54:16 -0000 Author: dougb Date: Fri Jan 9 23:54:15 2009 New Revision: 186985 URL: http://svn.freebsd.org/changeset/base/186985 Log: Non-functional changes to comments, copyrights, and VCS Ids related to the 9.3.6-P1 import Modified: stable/6/lib/bind/dns/code.h stable/6/lib/bind/dns/dns/enumclass.h stable/6/lib/bind/dns/dns/enumtype.h stable/6/lib/bind/dns/dns/rdatastruct.h stable/6/lib/bind/lwres/lwres/platform.h Modified: stable/6/lib/bind/dns/code.h ============================================================================== --- stable/6/lib/bind/dns/code.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/code.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/6/lib/bind/dns/dns/enumclass.h ============================================================================== --- stable/6/lib/bind/dns/dns/enumclass.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/dns/enumclass.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/6/lib/bind/dns/dns/enumtype.h ============================================================================== --- stable/6/lib/bind/dns/dns/enumtype.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/dns/enumtype.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/6/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- stable/6/lib/bind/dns/dns/rdatastruct.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/dns/dns/rdatastruct.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2009 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -1044,10 +1044,10 @@ typedef struct dns_rdata_loc { #endif /* GENERIC_LOC_29_H */ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 1999-2002 Internet Software Consortium. + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 1999-2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -1063,7 +1063,7 @@ typedef struct dns_rdata_loc { #ifndef GENERIC_NXT_30_H #define GENERIC_NXT_30_H 1 -/* $Id: nxt_30.h,v 1.18.12.3 2004/03/08 09:04:41 marka Exp $ */ +/* $Id: nxt_30.h,v 1.18.12.6 2007/08/28 07:19:15 tbox Exp $ */ /* RFC 2535 */ @@ -1336,10 +1336,10 @@ dns_rdata_opt_current(dns_rdata_opt_t *, #endif /* GENERIC_OPT_41_H */ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 2002 Internet Software Consortium. + * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2002, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -1355,7 +1355,7 @@ dns_rdata_opt_current(dns_rdata_opt_t *, #ifndef IN_1_APL_42_H #define IN_1_APL_42_H 1 -/* $Id: apl_42.h,v 1.1.202.3 2004/03/08 09:04:44 marka Exp $ */ +/* $Id: apl_42.h,v 1.1.202.6 2007/08/28 07:19:15 tbox Exp $ */ typedef struct dns_rdata_apl_ent { isc_boolean_t negative; @@ -1499,10 +1499,10 @@ typedef struct dns_rdata_rrsig { #endif /* GENERIC_DNSSIG_46_H */ /* - * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -1518,9 +1518,10 @@ typedef struct dns_rdata_rrsig { #ifndef GENERIC_NSEC_47_H #define GENERIC_NSEC_47_H 1 -/* $Id: nsec_47.h,v 1.4.2.1 2004/03/08 02:08:03 marka Exp $ */ +/* $Id: nsec_47.h,v 1.4.2.3 2008/07/15 23:45:44 tbox Exp $ */ -/* draft-ietf-dnsext-nsec-rdata-01.txt */ +/*! + * \brief Per RFC 3845 */ typedef struct dns_rdata_nsec { dns_rdatacommon_t common; Modified: stable/6/lib/bind/lwres/lwres/platform.h ============================================================================== --- stable/6/lib/bind/lwres/lwres/platform.h Fri Jan 9 22:35:25 2009 (r186984) +++ stable/6/lib/bind/lwres/lwres/platform.h Fri Jan 9 23:54:15 2009 (r186985) @@ -1,10 +1,10 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") - * Copyright (C) 2000, 2001 Internet Software Consortium. + * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2000, 2001, 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.12.2.1.10.5 2005/06/08 02:08:32 marka Exp $ */ +/* $Id: platform.h.in,v 1.12.2.1.10.8 2007/08/28 07:19:18 tbox Exp $ */ #ifndef LWRES_PLATFORM_H #define LWRES_PLATFORM_H 1 From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 23:58:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A946106566B; Fri, 9 Jan 2009 23:58:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 29BB58FC14; Fri, 9 Jan 2009 23:58:00 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n09Nw0KW072762; Fri, 9 Jan 2009 23:58:00 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n09Nw0Ar072761; Fri, 9 Jan 2009 23:58:00 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901092358.n09Nw0Ar072761@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 9 Jan 2009 23:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186986 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 23:58:00 -0000 Author: bz Date: Fri Jan 9 23:57:59 2009 New Revision: 186986 URL: http://svn.freebsd.org/changeset/base/186986 Log: Rather than using the cred from curthread, take it from the thread referenced in the sysctl req argument. Reviewed by: rwatson MFC after: 2 weeks Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Fri Jan 9 23:54:15 2009 (r186985) +++ head/sys/net/rtsock.c Fri Jan 9 23:57:59 2009 (r186986) @@ -1326,8 +1326,8 @@ sysctl_iflist(int af, struct walkarg *w) while ((ifa = TAILQ_NEXT(ifa, ifa_link)) != NULL) { if (af && af != ifa->ifa_addr->sa_family) continue; - if (jailed(curthread->td_ucred) && - !prison_if(curthread->td_ucred, ifa->ifa_addr)) + if (jailed(w->w_req->td->td_ucred) && + !prison_if(w->w_req->td->td_ucred, ifa->ifa_addr)) continue; info.rti_info[RTAX_IFA] = ifa->ifa_addr; info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask; @@ -1375,8 +1375,8 @@ sysctl_ifmalist(int af, struct walkarg * TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (af && af != ifma->ifma_addr->sa_family) continue; - if (jailed(curthread->td_ucred) && - !prison_if(curthread->td_ucred, ifma->ifma_addr)) + if (jailed(w->w_req->td->td_ucred) && + !prison_if(w->w_req->td->td_ucred, ifma->ifma_addr)) continue; info.rti_info[RTAX_IFA] = ifma->ifma_addr; info.rti_info[RTAX_GATEWAY] = @@ -1457,7 +1457,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) * take care of routing entries */ for (error = 0; error == 0 && i <= lim; i++) - if ((rnh = V_rt_tables[curthread->td_proc->p_fibnum][i]) != NULL) { + if ((rnh = V_rt_tables[req->td->td_proc->p_fibnum][i]) != NULL) { RADIX_NODE_HEAD_LOCK(rnh); error = rnh->rnh_walktree(rnh, sysctl_dumpentry, &w); From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 00:14:03 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B528A1065672 for ; Sat, 10 Jan 2009 00:14:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 4C86C8FC13 for ; Sat, 10 Jan 2009 00:14:03 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 5027 invoked by uid 399); 10 Jan 2009 00:14:02 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2009 00:14:02 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4967E849.8070100@FreeBSD.org> Date: Fri, 09 Jan 2009 16:14:01 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: Alexander Motin References: <200901092210.n09MA7Xb070527@svn.freebsd.org> <4967DE41.20109@FreeBSD.org> In-Reply-To: <4967DE41.20109@FreeBSD.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-stable-7@freebsd.org, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186982 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 00:14:04 -0000 Alexander Motin wrote: > Robert Watson wrote: >> >> On Fri, 9 Jan 2009, Alexander Motin wrote: >> >>> Modified: >>> stable/7/usr.sbin/powerd/powerd.8 >>> stable/7/usr.sbin/powerd/powerd.c >> >> I notice that you didn't use svn merge for this MFC, so there's no >> tracking of what revs were merged. Was it just everything to date? > > I just copied files completely, so everything is merged now. > > AFAIK it was decided that merge info is not mandatory before 9.x > branching. I'm just not very good with this merge stuff yet. For something like this it's quite simple, just do the merge in usr.sbin/powerd. Let's say you want to merge all the changes starting with r185050: Set REPO to something useful like svn+ssh://svn.freebsd.org/base/ svn merge -r 185050:186476 $REPO/head/usr.sbin/powerd . If you want to cherry-pick individual changes, use for example '-c 185050' instead of the -r option above. And the good news is that it's not too late to record your merge info. Figure out the range of changes that you have incorporated into the latest update, and use -r and the --record only option to merge. hth, Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 00:41:31 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E9BB1065670; Sat, 10 Jan 2009 00:41:31 +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 E7D2D8FC16; Sat, 10 Jan 2009 00:41:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A0fUeL074000; Sat, 10 Jan 2009 00:41:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A0fUp3073999; Sat, 10 Jan 2009 00:41:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901100041.n0A0fUp3073999@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 00:41:30 +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: r186991 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 00:41:31 -0000 Author: mav Date: Sat Jan 10 00:41:30 2009 New Revision: 186991 URL: http://svn.freebsd.org/changeset/base/186991 Log: Mark that powerd is completely merged. Modified: stable/7/usr.sbin/powerd/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 01:22:24 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56A1B106564A; Sat, 10 Jan 2009 01:22:24 +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 2ACAE8FC08; Sat, 10 Jan 2009 01:22:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A1MOIQ075372; Sat, 10 Jan 2009 01:22:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A1MOhc075371; Sat, 10 Jan 2009 01:22:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901100122.n0A1MOhc075371@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 01:22:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186992 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 01:22:25 -0000 Author: mav Date: Sat Jan 10 01:22:23 2009 New Revision: 186992 URL: http://svn.freebsd.org/changeset/base/186992 Log: Mark all snd_hda commits up to 186511 as merged. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 03:00:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40B8B106564A; Sat, 10 Jan 2009 03:00:22 +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 294D48FC19; Sat, 10 Jan 2009 03:00:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A30MXi077531; Sat, 10 Jan 2009 03:00:22 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A30M5b077529; Sat, 10 Jan 2009 03:00:22 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100300.n0A30M5b077529@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 03:00:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186996 - in stable/7/contrib/bind9: . bin/check bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:00:23 -0000 Author: dougb Date: Sat Jan 10 03:00:21 2009 New Revision: 186996 URL: http://svn.freebsd.org/changeset/base/186996 Log: MFC the BIND 9.4.3 and 9.4.3-P1 updates Added: stable/7/contrib/bind9/aclocal.m4 - copied unchanged from r186462, head/contrib/bind9/aclocal.m4 stable/7/contrib/bind9/bin/nsupdate/nsupdate.1 - copied unchanged from r186462, head/contrib/bind9/bin/nsupdate/nsupdate.1 stable/7/contrib/bind9/config.h.in - copied unchanged from r186462, head/contrib/bind9/config.h.in stable/7/contrib/bind9/doc/misc/sort-options.pl - copied unchanged from r186462, head/contrib/bind9/doc/misc/sort-options.pl stable/7/contrib/bind9/doc/rfc/rfc4648.txt - copied unchanged from r186462, head/contrib/bind9/doc/rfc/rfc4648.txt stable/7/contrib/bind9/doc/rfc/rfc4701.txt - copied unchanged from r186462, head/contrib/bind9/doc/rfc/rfc4701.txt stable/7/contrib/bind9/doc/rfc/rfc5155.txt - copied unchanged from r186462, head/contrib/bind9/doc/rfc/rfc5155.txt stable/7/contrib/bind9/lib/bind/aclocal.m4 - copied unchanged from r186462, head/contrib/bind9/lib/bind/aclocal.m4 stable/7/contrib/bind9/lib/bind/config.h.in - copied unchanged from r186462, head/contrib/bind9/lib/bind/config.h.in stable/7/contrib/bind9/lib/bind/include/isc/platform.h.in - copied unchanged from r186462, head/contrib/bind9/lib/bind/include/isc/platform.h.in stable/7/contrib/bind9/lib/isc/include/isc/portset.h - copied unchanged from r186462, head/contrib/bind9/lib/isc/include/isc/portset.h stable/7/contrib/bind9/lib/isc/portset.c - copied unchanged from r186462, head/contrib/bind9/lib/isc/portset.c Deleted: stable/7/contrib/bind9/bin/nsupdate/nsupdate.8 Modified: stable/7/contrib/bind9/ (props changed) stable/7/contrib/bind9/CHANGES stable/7/contrib/bind9/COPYRIGHT stable/7/contrib/bind9/FAQ stable/7/contrib/bind9/FAQ.xml stable/7/contrib/bind9/README stable/7/contrib/bind9/bin/check/check-tool.c stable/7/contrib/bind9/bin/check/named-checkconf.c stable/7/contrib/bind9/bin/check/named-checkzone.c stable/7/contrib/bind9/bin/dig/dig.1 stable/7/contrib/bind9/bin/dig/dig.c stable/7/contrib/bind9/bin/dig/dig.docbook stable/7/contrib/bind9/bin/dig/dig.html stable/7/contrib/bind9/bin/dig/dighost.c stable/7/contrib/bind9/bin/dig/host.1 stable/7/contrib/bind9/bin/dig/host.docbook stable/7/contrib/bind9/bin/dig/host.html stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/7/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/7/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/7/contrib/bind9/bin/named/client.c stable/7/contrib/bind9/bin/named/config.c stable/7/contrib/bind9/bin/named/controlconf.c stable/7/contrib/bind9/bin/named/include/named/globals.h stable/7/contrib/bind9/bin/named/interfacemgr.c stable/7/contrib/bind9/bin/named/lwaddr.c stable/7/contrib/bind9/bin/named/lwdgnba.c stable/7/contrib/bind9/bin/named/lwdnoop.c stable/7/contrib/bind9/bin/named/lwresd.8 stable/7/contrib/bind9/bin/named/lwresd.c stable/7/contrib/bind9/bin/named/lwresd.docbook stable/7/contrib/bind9/bin/named/lwresd.html stable/7/contrib/bind9/bin/named/main.c stable/7/contrib/bind9/bin/named/named.8 stable/7/contrib/bind9/bin/named/named.conf.5 stable/7/contrib/bind9/bin/named/named.conf.docbook stable/7/contrib/bind9/bin/named/named.conf.html stable/7/contrib/bind9/bin/named/named.docbook stable/7/contrib/bind9/bin/named/named.html stable/7/contrib/bind9/bin/named/query.c stable/7/contrib/bind9/bin/named/server.c stable/7/contrib/bind9/bin/named/unix/include/named/os.h stable/7/contrib/bind9/bin/named/unix/os.c stable/7/contrib/bind9/bin/named/update.c stable/7/contrib/bind9/bin/nsupdate/Makefile.in stable/7/contrib/bind9/bin/nsupdate/nsupdate.c stable/7/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/7/contrib/bind9/bin/nsupdate/nsupdate.html stable/7/contrib/bind9/bin/rndc/rndc-confgen.c stable/7/contrib/bind9/bin/rndc/rndc.8 stable/7/contrib/bind9/bin/rndc/rndc.c stable/7/contrib/bind9/bin/rndc/rndc.docbook stable/7/contrib/bind9/bin/rndc/rndc.html stable/7/contrib/bind9/configure.in stable/7/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/7/contrib/bind9/doc/arm/Bv9ARM.ch01.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch03.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch05.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/7/contrib/bind9/doc/arm/Bv9ARM.ch10.html stable/7/contrib/bind9/doc/arm/Bv9ARM.html stable/7/contrib/bind9/doc/arm/Bv9ARM.pdf stable/7/contrib/bind9/doc/arm/man.dig.html stable/7/contrib/bind9/doc/arm/man.dnssec-keygen.html stable/7/contrib/bind9/doc/arm/man.dnssec-signzone.html stable/7/contrib/bind9/doc/arm/man.host.html stable/7/contrib/bind9/doc/arm/man.named-checkconf.html stable/7/contrib/bind9/doc/arm/man.named-checkzone.html stable/7/contrib/bind9/doc/arm/man.named.html stable/7/contrib/bind9/doc/arm/man.rndc-confgen.html stable/7/contrib/bind9/doc/arm/man.rndc.conf.html stable/7/contrib/bind9/doc/arm/man.rndc.html stable/7/contrib/bind9/doc/misc/Makefile.in stable/7/contrib/bind9/doc/misc/format-options.pl stable/7/contrib/bind9/doc/misc/migration stable/7/contrib/bind9/doc/misc/options stable/7/contrib/bind9/doc/rfc/index stable/7/contrib/bind9/lib/bind/api stable/7/contrib/bind9/lib/bind/bsd/Makefile.in stable/7/contrib/bind9/lib/bind/bsd/strerror.c stable/7/contrib/bind9/lib/bind/bsd/strtoul.c stable/7/contrib/bind9/lib/bind/configure.in stable/7/contrib/bind9/lib/bind/dst/Makefile.in stable/7/contrib/bind9/lib/bind/dst/dst_api.c stable/7/contrib/bind9/lib/bind/dst/hmac_link.c stable/7/contrib/bind9/lib/bind/dst/support.c stable/7/contrib/bind9/lib/bind/include/Makefile.in stable/7/contrib/bind9/lib/bind/include/arpa/nameser.h stable/7/contrib/bind9/lib/bind/include/isc/assertions.h stable/7/contrib/bind9/lib/bind/include/isc/eventlib.h stable/7/contrib/bind9/lib/bind/include/isc/misc.h stable/7/contrib/bind9/lib/bind/include/netdb.h stable/7/contrib/bind9/lib/bind/include/resolv.h stable/7/contrib/bind9/lib/bind/inet/Makefile.in stable/7/contrib/bind9/lib/bind/inet/inet_net_pton.c stable/7/contrib/bind9/lib/bind/inet/inet_network.c stable/7/contrib/bind9/lib/bind/irs/Makefile.in stable/7/contrib/bind9/lib/bind/irs/dns_ho.c stable/7/contrib/bind9/lib/bind/irs/getnetgrent.c stable/7/contrib/bind9/lib/bind/irs/getnetgrent_r.c stable/7/contrib/bind9/lib/bind/irs/irp.c stable/7/contrib/bind9/lib/bind/isc/Makefile.in stable/7/contrib/bind9/lib/bind/isc/assertions.c stable/7/contrib/bind9/lib/bind/isc/bitncmp.c stable/7/contrib/bind9/lib/bind/isc/ctl_clnt.c stable/7/contrib/bind9/lib/bind/isc/ctl_srvr.c stable/7/contrib/bind9/lib/bind/isc/logging.c stable/7/contrib/bind9/lib/bind/nameser/Makefile.in stable/7/contrib/bind9/lib/bind/port_after.h.in stable/7/contrib/bind9/lib/bind/port_before.h.in stable/7/contrib/bind9/lib/bind/resolv/Makefile.in stable/7/contrib/bind9/lib/bind/resolv/res_debug.c stable/7/contrib/bind9/lib/bind/resolv/res_mkquery.c stable/7/contrib/bind9/lib/bind/resolv/res_query.c stable/7/contrib/bind9/lib/bind/resolv/res_send.c stable/7/contrib/bind9/lib/bind9/api stable/7/contrib/bind9/lib/bind9/check.c stable/7/contrib/bind9/lib/dns/acache.c stable/7/contrib/bind9/lib/dns/adb.c stable/7/contrib/bind9/lib/dns/api stable/7/contrib/bind9/lib/dns/cache.c stable/7/contrib/bind9/lib/dns/dispatch.c stable/7/contrib/bind9/lib/dns/dst_parse.c stable/7/contrib/bind9/lib/dns/dst_parse.h stable/7/contrib/bind9/lib/dns/include/dns/dispatch.h stable/7/contrib/bind9/lib/dns/journal.c stable/7/contrib/bind9/lib/dns/master.c stable/7/contrib/bind9/lib/dns/masterdump.c stable/7/contrib/bind9/lib/dns/message.c stable/7/contrib/bind9/lib/dns/openssldsa_link.c stable/7/contrib/bind9/lib/dns/opensslrsa_link.c stable/7/contrib/bind9/lib/dns/rbt.c stable/7/contrib/bind9/lib/dns/rbtdb.c stable/7/contrib/bind9/lib/dns/rdata/generic/nsec_47.c stable/7/contrib/bind9/lib/dns/rdata/generic/nsec_47.h stable/7/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/7/contrib/bind9/lib/dns/rdata/in_1/apl_42.c stable/7/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/7/contrib/bind9/lib/dns/request.c stable/7/contrib/bind9/lib/dns/resolver.c stable/7/contrib/bind9/lib/dns/rootns.c stable/7/contrib/bind9/lib/dns/sdb.c stable/7/contrib/bind9/lib/dns/tkey.c stable/7/contrib/bind9/lib/dns/tsig.c stable/7/contrib/bind9/lib/dns/validator.c stable/7/contrib/bind9/lib/dns/view.c stable/7/contrib/bind9/lib/dns/xfrin.c stable/7/contrib/bind9/lib/dns/zone.c stable/7/contrib/bind9/lib/isc/Makefile.in stable/7/contrib/bind9/lib/isc/api stable/7/contrib/bind9/lib/isc/assertions.c stable/7/contrib/bind9/lib/isc/include/isc/assertions.h stable/7/contrib/bind9/lib/isc/include/isc/lex.h stable/7/contrib/bind9/lib/isc/include/isc/mem.h stable/7/contrib/bind9/lib/isc/include/isc/msgs.h stable/7/contrib/bind9/lib/isc/include/isc/platform.h.in stable/7/contrib/bind9/lib/isc/include/isc/resource.h stable/7/contrib/bind9/lib/isc/include/isc/socket.h stable/7/contrib/bind9/lib/isc/include/isc/timer.h stable/7/contrib/bind9/lib/isc/include/isc/types.h stable/7/contrib/bind9/lib/isc/mem.c stable/7/contrib/bind9/lib/isc/print.c stable/7/contrib/bind9/lib/isc/pthreads/mutex.c stable/7/contrib/bind9/lib/isc/timer.c stable/7/contrib/bind9/lib/isc/unix/app.c stable/7/contrib/bind9/lib/isc/unix/include/isc/net.h stable/7/contrib/bind9/lib/isc/unix/net.c stable/7/contrib/bind9/lib/isc/unix/resource.c stable/7/contrib/bind9/lib/isc/unix/socket.c stable/7/contrib/bind9/lib/isc/unix/socket_p.h stable/7/contrib/bind9/lib/isc/unix/time.c stable/7/contrib/bind9/lib/isccfg/api stable/7/contrib/bind9/lib/isccfg/namedconf.c stable/7/contrib/bind9/lib/lwres/api stable/7/contrib/bind9/make/rules.in stable/7/contrib/bind9/version Modified: stable/7/contrib/bind9/CHANGES ============================================================================== --- stable/7/contrib/bind9/CHANGES Sat Jan 10 02:33:31 2009 (r186995) +++ stable/7/contrib/bind9/CHANGES Sat Jan 10 03:00:21 2009 (r186996) @@ -1,14 +1,166 @@ - --- 9.4.2-P2 released --- + --- 9.4.3-P1 released --- -2406. [bug] Some operating systems have FD_SETSIZE set to a - low value by default, which can cause resource - exhaustion when many simultaneous connections are - open. Linux in particular makes it difficult to - increase this value. To use more sockets with - select(), set ISC_SOCKET_FDSETSIZE. Example: - STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure - (This should not be necessary in most cases, and - never for an authoritative-only server.) [RT #18328] +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] + + --- 9.4.3 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.4.3rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2471. [bug] named-checkzone was not reporting missing manditory + glue when sibling checks were disabled. [RT #18768] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2466. [doc] ARM: explain max-cache-ttl 0 SERVFAIL issue. + [RT #18302] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2445. [doc] ARM out-of-date on empty reverse zones (list includes + RFC1918 address, but these are not yet compiled in). + [RT #18578] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.4.3b3 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2433. [tuning] Set initial timeout to 800ms. + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] 2404. [port] hpux: files unlimited support. @@ -39,15 +191,271 @@ 2392. [bug] remove 'grep -q' from acl test script, some platforms don't support it. [RT #18253] +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + + --- 9.4.3b2 released --- + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add descriptions of IPSECKEY, SPF and SSHFP to ARM. + +2381. [port] dlz/mysql: support multiple install layouts for + mysql. /include/{,mysql/}mysql.h and + /lib/{,mysql/}. [RT #18152] + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] + +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve + forgery resilience. [RT #17949] + +2372. [bug] fixed incorrect TAG_HMACSHA256_BITS value [RT #18047] + +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger a assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + + --- 9.4.3b1 released --- + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2339. [port] tru64: support for libbind. [RT #17589] + +2338. [bug] check_ds() could be called with a non DS rdataset. + [RT #17598] + +2337. [bug] BUILD_LDFLAGS was not being correctly set. [RT #17614] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2328. [maint] Add AAAA addresses for A.ROOT-SERVERS.NET, + F.ROOT-SERVERS.NET, H.ROOT-SERVERS.NET, + J.ROOT-SERVERS.NET, K.ROOT-SERVERS.NET and + M.ROOT-SERVERS.NET. + +2326. [bug] It was possible to trigger a INSIST in the acache + processing. + +2325. [port] Linux: use capset() function if available. [RT #17557] + +2323. [port] tru64: namespace clash. [RT #17547] + 2322. [port] MacOS: work around the limitation of setrlimit() for RLIMIT_NOFILE. [RT #17526] - --- 9.4.2-P1 released --- +2319. [bug] Silence Coverity warnings in + lib/dns/rdata/in_1/apl_42.c. [RT #17469] -2375. [security] Fully randomize UDP query ports to improve - forgery resilience. [RT #17949] +2318. [port] sunos fixes for libbind. [RT #17514] + +2314. [bug] Uninitialized memory use on error path in + bin/named/lwdnoop.c. [RT #17476] + +2313. [cleanup] Silence Coverity warnings. Handle private stacks. + [RT #17447] [RT #17478] + +2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. + [RT #17458] + +2311. [func] Update ACL regression test. [RT #17462] + +2310. [bug] dig, host, nslookup: flush stdout before emitting + debug/fatal messages. [RT #17501] + +2308. [cleanup] Silence Coverity warning in bin/named/controlconf.c. + [RT #17495] + +2307. [bug] Remove infinite loop from lib/dns/sdb.c. [RT #17496] + +2306. [bug] Remove potential race from lib/dns/resolver.c. + [RT #17470] + +2305. [security] inet_network() buffer overflow. CVE-2008-0122. + +2304. [bug] Check returns from all dns_rdata_tostruct() calls. + [RT #17460] + +2303. [bug] Remove unnecessary code from bin/named/lwdgnba.c. + [RT #17471] + +2302. [bug] Fix memset() calls in lib/tests/t_api.c. [RT #17472] + +2301. [bug] Remove resource leak and fix error messages in + bin/tests/system/lwresd/lwtest.c. [RT #17474] + +2300. [bug] Fixed failure to close open file in + bin/tests/names/t_names.c. [RT #17473] + +2299. [bug] Remove unnecessary NULL check in + bin/nsupdate/nsupdate.c. [RT #17475] + +2298. [bug] isc_mutex_lock() failure not caught in + bin/tests/timers/t_timers.c. [RT #17468] + +2297. [bug] isc_entropy_createfilesource() failure not caught in + bin/tests/dst/t_dst.c. [RT #17467] + +2296. [port] Allow docbook stylesheet location to be specified to + configure. [RT #17457] + +2295. [bug] Silence static overrun error in bin/named/lwaddr.c. + [RT #17459] + +2293. [func] Add ACL regression test. [RT #17375] + +2292. [bug] Log if the working directory is not writable. + [RT #17312] + +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report + failure to set PR_SET_DUMPABLE. [RT #17312] + +2290. [bug] Let AD in the query signal that the client wants AD + set in the response. [RT #17301] + +2288. [port] win32: mark service as running when we have finished + loading. [RT #17441] + +2287. [bug] Use 'volatile' if the compiler supports it. [RT #17413] + +2284. [bug] Memory leak in UPDATE prerequisite processing. + [RT #17377] + +2283. [bug] TSIG keys were not attaching to the memory + context. TSIG keys should use the rings + memory context rather than the clients memory + context. [RT #17377] + +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, + to protect applications from receiving spurious + SIGPIPE signals when using the resolver. + +2278. [bug] win32: handle the case where Windows returns no + search list or DNS suffix. [RT #17354] + +2277. [bug] Empty zone names were not correctly being caught at + in the post parse checks. [RT #17357] + +2273. [bug] Adjust log level to WARNING when saving inconsistent + stub/slave master and journal files. [RT# 17279] + +2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. + [RT #17262] + +2270. [bug] dns_db_closeversion() version->writer could be reset + before it is tested. [RT #17290] + +2269. [contrib] dbus memory leaks and missing va_end calls. [RT #17232] + +2268. [bug] 0.IN-ADDR.ARPA was missing from the empty zones + list. + +2266. [bug] client.c:get_clientmctx() returned the same mctx + once the pool of mctx's was filled. [RT #17218] + +2265. [bug] Test that the memory context's basic_table is non NULL + before freeing. [RT #17265] + +2264. [bug] Server prefix length was being ignored. [RT #17308] + +2263. [bug] "named-checkconf -z" failed to set default value + for "check-integrity". [RT #17306] + +2262. [bug] Error status from all but the last view could be + lost. [RT #17292] + +2260. [bug] Reported wrong clients-per-query when increasing the + value. [RT #17236] + +2247. [doc] Sort doc/misc/options. [RT #17067] + +2246. [bug] Make the startup of test servers (ans.pl) more + robust. [RT #17147] --- 9.4.2 released --- + --- 9.4.2rc2 released --- 2259. [bug] Reverse incorrect LIBINTERFACE bump of libisc @@ -63,7 +471,7 @@ 2256. [bug] win32: Correctly register the installation location of bindevt.dll. [RT #17159] -2255. [bug] L.ROOT-SERVERS.NET is now 199.7.83.42. +2255. [maint] L.ROOT-SERVERS.NET is now 199.7.83.42. 2254. [bug] timer.c:dispatch() failed to lock timer->lock when reading timer->idle allowing it to see @@ -76,16 +484,16 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested +2249. [bug] Only set Authentic Data bit if client requested DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2245. [bug] Validating lack of DS records at trust anchors wasn't working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] @@ -94,8 +502,8 @@ 2235. [bug] was not being installed. [RT #17135] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -110,7 +518,7 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -124,15 +532,15 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - -2219. [bug] Apply zone consistancy checks to additions, not + +2219. [bug] Apply zone consistency checks to additions, not removals, when updating. [RT #17049] 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2215. [bug] Bad REQUIRE check isc_hmacsha1_verify(). [RT #17094] @@ -175,13 +583,13 @@ localhost;) is used. [RT #16987] - + 2205. [bug] libbind: change #2119 broke thread support. [RT #16982] 2203. [security] Query id generation was cryptographically weak. [RT # 16915] -2202. [security] The default acls for allow-query-cache and +2202. [security] The default acls for allow-query-cache and allow-recursion were not being applied. [RT #16960] 2200. [bug] The search for cached NSEC records was stopping to @@ -216,7 +624,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -243,7 +651,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -274,7 +682,7 @@ a server address as a name to be looked up, causing unexpected output. [RT #16743] -2164. [bug] The code to determine how named-checkzone / +2164. [bug] The code to determine how named-checkzone / named-compilezone was called failed under windows. [RT #16764] @@ -288,7 +696,7 @@ 2159. [bug] Array bounds overrun in acache processing. [RT #16710] -2158. [bug] ns_client_isself() failed to initialise key +2158. [bug] ns_client_isself() failed to initialize key leading to a REQUIRE failure. [RT #16688] 2156. [bug] Fix node reference leaks in lookup.c:lookup_find(), @@ -363,7 +771,7 @@ 2136. [bug] nslookup/host looped if there was no search list and the host didn't exist. [RT #16657] -2135. [bug] Uninitialised rdataset in sdlz.c. [RT# 16656] +2135. [bug] Uninitialized rdataset in sdlz.c. [RT# 16656] 2133. [port] powerpc: Support both IBM and MacOS Power PC assembler syntaxes. [RT #16647] @@ -379,7 +787,7 @@ 2127. [port] Improved OpenSSL 0.9.8 support. [RT #16563] -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2125. [bug] dns_zone_getzeronosoattl() REQUIRE failure if DLZ was defined. [RT #16574] @@ -419,7 +827,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -431,7 +839,7 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. --- 9.4.0b4 released --- @@ -441,7 +849,7 @@ 2100. [port] win32: copy libeay32.dll to Build\Debug. Copy Debug\named-checkzone to Debug\named-compilezone. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. 2098. [bug] Race in rbtdb.c:no_references(), which occasionally triggered an INSIST failure about the node lock @@ -457,14 +865,14 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2093. [bug] named-checkzone -s was broken. 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -507,7 +915,7 @@ 2078. [bug] dnssec-checkzone output style "default" was badly named. It is now called "relative". [RT #16326] -2077. [bug] 'dnssec-signzone -O raw' wasn't outputing the +2077. [bug] 'dnssec-signzone -O raw' wasn't outputting the complete signed zone. [RT #16326] 2076. [bug] Several files were missing #include @@ -592,7 +1000,7 @@ [RT #16287] 2049. [bug] Restore SOA before AXFR when falling back from - a attempted IXFR when transfering in a zone. + a attempted IXFR when transferring in a zone. Allow a initial SOA query before attempting a AXFR to be requested. [RT #16156] @@ -601,7 +1009,7 @@ the OS always returned the same local port. [RT #16182] -2047. [bug] Failed to initialise the interface flags to zero. +2047. [bug] Failed to initialize the interface flags to zero. [RT #16245] 2046. [bug] rbtdb.c:rdataset_setadditional() could cause duplicate @@ -641,7 +1049,7 @@ 2034. [bug] gcc: set -fno-strict-aliasing. [RT #16124] -2033. [bug] We wern't creating multiple client memory contexts +2033. [bug] We weren't creating multiple client memory contexts on demand as expected. [RT #16095] --- 9.4.0a6 released --- @@ -657,7 +1065,7 @@ 2029. [bug] host printed out the server multiple times when specified on the command line. [RT #15992] -2028. [port] linux: socket.c compatability for old systems. +2028. [port] linux: socket.c compatibility for old systems. [RT #16015] 2027. [port] libbind: Solaris x86 support. [RT #16020] @@ -667,7 +1075,7 @@ 2025. [func] Update "zone serial unchanged" message. [RT #16026] -2024. [bug] named emited spurious "zone serial unchanged" +2024. [bug] named emitted spurious "zone serial unchanged" messages on reload. [RT #16027] 2023. [bug] "make install" should create ${localstatedir}/run and @@ -695,7 +1103,7 @@ --- 9.4.0a5 released --- 2015. [cleanup] use-additional-cache is now acache-enable for - consistancy. Default acache-enable off in BIND 9.4 + consistency. Default acache-enable off in BIND 9.4 as it requires memory usage to be configured. It may be enabled by default in BIND 9.5 once we have more experience with it. @@ -715,9 +1123,9 @@ --- 9.4.0a4 released --- -2009. [bug] libbind: coverity fixes. [RT #15808] +2009. [bug] libbind: Coverity fixes. [RT #15808] -2008. [func] It is now posssible to enable/disable DNSSEC +2008. [func] It is now possible to enable/disable DNSSEC validation from rndc. This is useful for the mobile hosts where the current connection point breaks DNSSEC (firewall/proxy). [RT #15592] @@ -729,7 +1137,7 @@ be changed to yes in 9.5.0. [RT #15674] 2006. [security] Allow-query-cache and allow-recursion now default - to the builtin acls "localnets" and "localhost". + to the built in acls "localnets" and "localhost". This is being done to make caching servers less attractive as reflective amplifying targets for @@ -777,7 +1185,7 @@ 1994. [port] OpenSSL 0.9.8 support. [RT #15694] -1993. [bug] Log messsage, via syslog, were missing the space +1993. [bug] Log messages, via syslog, were missing the space after the timestamp if "print-time yes" was specified. [RT #15844] @@ -785,11 +1193,11 @@ view. [RT #15825] 1991. [cleanup] The configuration data, once read, should be treated - as readonly. Expand the use of const to enforce this + as read only. Expand the use of const to enforce this at compile time. [RT #15813] 1990. [bug] libbind: isc's override of broken gettimeofday() - implementions was not always effective. + implementations was not always effective. [RT #15709] 1989. [bug] win32: don't check the service password when @@ -811,7 +1219,7 @@ server for the zone. Also any zones that contain DLV records should be removed when upgrading a slave zone. You do not however have to upgrade all - servers for a zone with DLV records simultaniously. + servers for a zone with DLV records simultaneously. 1984. [func] dig, nslookup and host now advertise a 4096 byte EDNS UDP buffer size by default. [RT #15855] @@ -848,7 +1256,7 @@ 1973. [func] TSIG HMACSHA1, HMACSHA224, HMACSHA256, HMACSHA384 and HMACSHA512 support. [RT #13606] -1972. [contrib] DBUS dynamic forwarders integation from +1972. [contrib] DBUS dynamic forwarders integration from Jason Vas Dias . 1971. [port] linux: make detection of missing IF_NAMESIZE more @@ -872,7 +1280,7 @@ 1964. [func] Separate out MX and SRV to CNAME checks. [RT #15723] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -898,7 +1306,7 @@ by native compiler. See README for additional cross compile support information. [RT #15148] -1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998] +1955. [bug] Pre-allocate the cache cleaning iterator. [RT #14998] 1954. [func] Named now falls back to advertising EDNS with a 512 byte receive buffer if the initial EDNS queries @@ -915,7 +1323,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -934,10 +1342,10 @@ 1946. [bug] resume_dslookup() could trigger a REQUIRE failure when using forwarders. [RT #15549] -1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is nolonger recommended. +1945. [cleanup] dnssec-keygen: RSA (RSAMD5) is no longer recommended. To generate a RSAMD5 key you must explicitly request RSAMD5. [RT #13780] - + 1944. [cleanup] isc_hash_create() does not need a read/write lock. [RT #15522] @@ -1028,15 +1436,15 @@ 1917. [doc] funcsynopsisinfo wasn't being treated as verbatim when generating man pages. [RT #15385] -1916. [func] Integrate contibuted IDN code from JPNIC. [RT #15383] +1916. [func] Integrate contributed IDN code from JPNIC. [RT #15383] 1915. [bug] dig +ndots was broken. [RT #15215] 1914. [protocol] DS is required to accept mnemonic algorithms (RFC 4034). Still emit numeric algorithms for - compatability with RFC 3658. [RT #15354] + compatibility with RFC 3658. [RT #15354] -1913. [func] Integrate contibuted DLZ code into named. [RT #11382] +1913. [func] Integrate contributed DLZ code into named. [RT #11382] 1912. [port] aix: atomic locking for powerpc. [RT #15020] @@ -1059,7 +1467,7 @@ [RT #15034] 1905. [bug] Strings returned from cfg_obj_asstring() should be - treated as read-only. The prototype for + treated as read-only. The prototype for cfg_obj_asstring() has been updated to reflect this. [RT #15256] @@ -1108,7 +1516,7 @@ 1891. [port] freebsd: pthread_mutex_init can fail if it runs out of memory. [RT #14995] -1890. [func] Raise the UDP recieve buffer size to 32k if it is +1890. [func] Raise the UDP receive buffer size to 32k if it is less than 32k. [RT #14953] 1889. [port] sunos: non blocking i/o support. [RT #14951] @@ -1148,7 +1556,7 @@ [RT #2471] 1877. [bug] Fix unreasonably low quantum on call to - dns_rbt_destroy2(). Remove unnecessay unhash_node() + dns_rbt_destroy2(). Remove unnecessary unhash_node() call. [RT #14919] 1876. [func] Additional memory debugging support to track size @@ -1189,10 +1597,10 @@ 1863. [bug] rrset-order "fixed" error messages not complete. 1862. [func] Add additional zone data constancy checks. - named-checkzone has extended checking of NS, MX and + named-checkzone has extended checking of NS, MX and SRV record and the hosts they reference. named has extended post zone load checks. - New zone options: check-mx and integrity-check. + New zone options: check-mx and integrity-check. [RT #4940] 1861. [bug] dig could trigger a INSIST on certain malformed @@ -1230,24 +1638,24 @@ 1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591] 1849. [doc] All forms of the man pages (docbook, man, html) should - have consistant copyright dates. + have consistent copyright dates. 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . -1845. [bug] Improve error reporting to distingish between +1845. [bug] Improve error reporting to distinguish between accept()/fcntl() and socket()/fcntl() errors. [RT #13745] 1844. [bug] inet_pton() accepted more that 4 hexadecimal digits for each 16 bit piece of the IPv6 address. The text - representation of a IPv6 address has been tighted + representation of a IPv6 address has been tightened to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt). [RT #5662] @@ -1475,7 +1883,7 @@ 1765. [bug] configure --with-openssl=auto failed. [RT #12937] 1764. [bug] dns_zone_replacedb failed to emit a error message - if there was no SOA record in the replacment db. + if there was no SOA record in the replacement db. [RT #13016] 1763. [func] Perform sanity checks on NS records which refer to @@ -1503,7 +1911,7 @@ 1755. [func] allow-update is now settable at the options / view level. [RT #6636] -1754. [bug] We wern't always attempting to query the parent +1754. [bug] We weren't always attempting to query the parent server for the DS records at the zone cut. [RT #12774] @@ -1523,8 +1931,8 @@ [RT #12866] 1748. [func] dig now returns the byte count for axfr/ixfr. - -1747. [bug] BIND 8 compatability: named/named-checkconf failed + +1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. 1746. [func] Make public the function to read a key file, @@ -1541,7 +1949,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -1552,7 +1960,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -1567,7 +1975,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -1607,7 +2015,7 @@ [RT #12519] 1721. [bug] Error message from the journal processing were not - always identifing the relevent journal. [RT #12519] + always identifying the relevant journal. [RT #12519] 1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1 negative response. [RT #12506] @@ -1664,7 +2072,7 @@ 1703. [bug] named would loop sending NOTIFY messages when it failed to receive a response. [RT #12322] -1702. [bug] also-notify should not be applied to builtin zones. +1702. [bug] also-notify should not be applied to built in zones. [RT #12323] 1701. [doc] A minimal named.conf man page. @@ -1744,7 +2152,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -1816,7 +2224,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -1829,7 +2237,7 @@ masters with keys are specified. 1644. [bug] Update the journal modification time after a - sucessfull refresh query. [RT #11436] + successful refresh query. [RT #11436] 1643. [bug] dns_db_closeversion() could leak memory / node references. [RT #11163] @@ -1846,11 +2254,11 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 03:01:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65CD31065673; Sat, 10 Jan 2009 03:01:19 +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 5082B8FC1B; Sat, 10 Jan 2009 03:01:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A31Jp8077711; Sat, 10 Jan 2009 03:01:19 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A31IwY077698; Sat, 10 Jan 2009 03:01:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100301.n0A31IwY077698@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 03:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186997 - in stable/7: lib/bind lib/bind/bind lib/bind/dns lib/bind/dns/dns lib/bind/isc lib/bind/isc/isc share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:01:20 -0000 Author: dougb Date: Sat Jan 10 03:01:18 2009 New Revision: 186997 URL: http://svn.freebsd.org/changeset/base/186997 Log: MFC the BIND 9.4.3 and 9.4.3-P1 updates Modified: stable/7/lib/bind/ (props changed) stable/7/lib/bind/bind/config.h stable/7/lib/bind/bind/port_after.h stable/7/lib/bind/bind/port_before.h stable/7/lib/bind/config.h stable/7/lib/bind/dns/code.h stable/7/lib/bind/dns/dns/enumclass.h stable/7/lib/bind/dns/dns/enumtype.h stable/7/lib/bind/dns/dns/rdatastruct.h stable/7/lib/bind/isc/Makefile stable/7/lib/bind/isc/isc/platform.h stable/7/share/doc/bind9/Makefile stable/7/usr.bin/nsupdate/Makefile Modified: stable/7/lib/bind/bind/config.h ============================================================================== --- stable/7/lib/bind/bind/config.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/bind/config.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* #undef _SOCKADDR_LEN */ #define HAVE_FCNTL_H 1 #define HAVE_PATHS_H 1 @@ -8,6 +8,7 @@ /* #undef HAVE_STROPTS_H */ #define HAVE_SYS_TIMERS_H 1 #define HAVE_SYS_SELECT_H 1 +#define HAVE_MEMORY_H 1 /* #undef SYS_CDEFS_H */ /* #undef _POSIX_PTHREAD_SEMANTICS */ /* #undef POSIX_GETPWUID_R */ @@ -16,14 +17,20 @@ /* #undef POSIX_GETGRNAM_R */ #define HAVE_MEMMOVE 1 #define HAVE_MEMCHR 1 +/* #undef SPRINTF_CHAR */ +/* #undef VSPRINTF_CHAR */ +#define USE_SYSERROR_LIST 1 +/* #undef NEED_STRTOUL */ +/* #undef NEED_SUN4PROTOS */ +/* #undef REENABLE_SEND */ /* #undef NEED_SETGROUPENT */ /* #undef NEED_GETGROUPLIST */ /* define if prototype for getgrnam_r() is required */ -/* #undef NEED_GETGRNAM_R */ -/* #undef NEED_GETGRGID_R */ -/* #undef NEED_GETGRENT_R */ +/* #undef NEED_GETGRNAM_R */ +/* #undef NEED_GETGRGID_R */ +/* #undef NEED_GETGRENT_R */ #define NEED_SETGRENT_R 1 #define NEED_ENDGRENT_R 1 @@ -46,7 +53,7 @@ /* #undef ssize_t */ /* #undef uintptr_t */ -/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ /* #undef SHUTUP_SPUTAUX */ #ifdef SHUTUP_SPUTAUX struct __sFILE; Modified: stable/7/lib/bind/bind/port_after.h ============================================================================== --- stable/7/lib/bind/bind/port_after.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/bind/port_after.h Sat Jan 10 03:01:18 2009 (r186997) @@ -18,12 +18,20 @@ #include #endif /* HAVE_SYS_SELECT_H */ +#ifdef REENABLE_SEND +#undef send +#endif + #undef NEED_PSELECT #define HAVE_SA_LEN 1 #define HAVE_MINIMUM_IFREQ 1 #undef NEED_DAEMON #undef NEED_STRSEP #undef NEED_STRERROR +#ifdef NEED_STRERROR +const char *isc_strerror(int); +#define strerror isc_strerror +#endif #define HAS_INET6_STRUCTS 1 #define HAVE_SIN6_SCOPE_ID 1 #undef NEED_IN6ADDR_ANY @@ -32,12 +40,18 @@ #undef NEED_GETTIMEOFDAY #define HAVE_STRNDUP 1 #undef USE_FIONBIO_IOCTL -#undef USE_SYSERROR_LIST #undef INNETGR_ARGS #undef SETNETGRENT_ARGS #define USE_IFNAMELINKID 1 #define PORT_NONBLOCK O_NONBLOCK +#ifndef _POSIX_PATH_MAX +#define _POSIX_PATH_MAX 255 +#endif +#ifndef PATH_MAX +#define PATH_MAX _POSIX_PATH_MAX +#endif + /* * We need to know the IPv6 address family number even on IPv4-only systems. * Note that this is NOT a protocol constant, and that if the system has its @@ -311,16 +325,16 @@ innetgr_r(const char *, const char *, co #endif #ifdef NEED_SETNETGRENT_R -#ifdef NGR_R_ENT_ARGS -NGR_R_SET_RETURN setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS); +#ifdef NGR_R_SET_ARGS +NGR_R_SET_RETURN setnetgrent_r(NGR_R_SET_CONST char *netgroup, NGR_R_SET_ARGS); #else -NGR_R_SET_RETURN setnetgrent_r(const char *netgroup); +NGR_R_SET_RETURN setnetgrent_r(NGR_R_SET_CONST char *netgroup); #endif #endif #ifdef NEED_ENDNETGRENT_R -#ifdef NGR_R_ENT_ARGS -NGR_R_END_RETURN endnetgrent_r(NGR_R_ENT_ARGS); +#ifdef NGR_R_END_ARGS +NGR_R_END_RETURN endnetgrent_r(NGR_R_END_ARGS); #else NGR_R_END_RETURN endnetgrent_r(void); #endif @@ -386,10 +400,12 @@ int isc__gettimeofday(struct timeval *tv int isc__gettimeofday(struct timeval *tp, struct timezone *tzp); #endif -int getnetgrent(char **machinep, char **userp, char **domainp); +int getnetgrent(NGR_R_CONST char **machinep, NGR_R_CONST char **userp, + NGR_R_CONST char **domainp); #ifdef NGR_R_ARGS -int getnetgrent_r(char **machinep, char **userp, char **domainp, NGR_R_ARGS); +int getnetgrent_r(NGR_R_CONST char **machinep, NGR_R_CONST char **userp, + NGR_R_CONST char **domainp, NGR_R_ARGS); #endif #ifdef SETNETGRENT_ARGS @@ -407,11 +423,87 @@ int innetgr(const char *netgroup, const const char *user, const char *domain); #endif -#ifdef NGR_R_ENT_ARGS +#ifdef NGR_R_SET_ARGS NGR_R_SET_RETURN -setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS); +setnetgrent_r(NGR_R_SET_CONST char *netgroup, NGR_R_SET_ARGS); #else NGR_R_SET_RETURN -setnetgrent_r(const char *netgroup); +setnetgrent_r(NGR_R_SET_CONST char *netgroup); +#endif + +#ifdef NEED_STRTOUL +unsigned long strtoul(const char *, char **, int); #endif + +#ifdef NEED_SUN4PROTOS +#include +#ifndef __SIZE_TYPE__ +#define __SIZE_TYPE__ int +#endif +struct sockaddr; +struct iovec; +struct timeval; +struct timezone; +int fprintf(FILE *, const char *, ...); +int getsockname(int, struct sockaddr *, int *); +int getpeername(int, struct sockaddr *, int *); +int socket(int, int, int); +int connect(int, const struct sockaddr *, int); +int writev(int, struct iovec *, int); +int readv(int, struct iovec *, int); +int send(int, const char *, int, int); +void bzero(char *, int); +int recvfrom(int, char *, int, int, struct sockaddr *, int *); +int syslog(int, const char *, ... ); +int printf(const char *, ...); +__SIZE_TYPE__ fread(void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +__SIZE_TYPE__ fwrite(const void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +int fclose(FILE *); +int ungetc(int, FILE *); +int scanf(const char *, ...); +int sscanf(const char *, const char *, ... ); +int tolower(int); +int toupper(int); +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, int); +int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +#ifdef gettimeofday +#undef gettimeofday +int gettimeofday(struct timeval *, struct timezone *); +#define gettimeofday isc__gettimeofday +#else +int gettimeofday(struct timeval *, struct timezone *); +#endif +long strtol(const char*, char **, int); +int fseek(FILE *, long, int); +int setsockopt(int, int, int, const char *, int); +int bind(int, const struct sockaddr *, int); +void bcopy(char *, char *, int); +int fputc(char, FILE *); +int listen(int, int); +int accept(int, struct sockaddr *, int *); +int getsockopt(int, int, int, char *, int *); +int vfprintf(FILE *, const char *, va_list); +int fflush(FILE *); +int fgetc(FILE *); +int fputs(const char *, FILE *); +int fchown(int, int, int); +void setbuf(FILE *, char *); +int gethostname(char *, int); +int rename(const char *, const char *); +time_t time(time_t *); +int fscanf(FILE *, const char *, ...); +int sscanf(const char *, const char *, ...); +int ioctl(int, int, caddr_t); +void perror(const char *); + +#if !defined(__USE_FIXED_PROTOTYPES__) && !defined(__cplusplus) && !defined(__STRICT_ANSI__) +/* + * 'gcc -ansi' changes the prototype for vsprintf(). + * Use this prototype when 'gcc -ansi' is not in effect. + */ +char *vsprintf(char *, const char *, va_list); +#endif +#endif + #endif Modified: stable/7/lib/bind/bind/port_before.h ============================================================================== --- stable/7/lib/bind/bind/port_before.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/bind/port_before.h Sat Jan 10 03:01:18 2009 (r186997) @@ -4,6 +4,10 @@ #define port_before_h #include +#ifdef NEED_SUN4PROTOS +#define _PARAMS(x) x +#endif + struct group; /* silence warning */ struct passwd; /* silence warning */ struct timeval; /* silence warning */ @@ -83,15 +87,22 @@ struct timespec { #define NGR_R_BAD (0) #define NGR_R_COPY buf, buflen #define NGR_R_COPY_ARGS NGR_R_ARGS +#define NGR_R_CONST #define NGR_R_END_RESULT(x) /*empty*/ #define NGR_R_END_RETURN void -#undef NGR_R_ENT_ARGS /*empty*/ +#undef NGR_R_END_ARGS /*empty*/ #define NGR_R_OK 1 #define NGR_R_RETURN int +#define NGR_R_SET_CONST const #undef NGR_R_SET_RESULT /*empty*/ #define NGR_R_SET_RETURN void +#undef NGR_R_SET_ARGS +#if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS) +#define NGR_R_SET_ARGS NGR_R_END_ARGS +#endif + #define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp #define PROTO_R_BAD ERANGE #define PROTO_R_COPY buf, buflen Modified: stable/7/lib/bind/config.h ============================================================================== --- stable/7/lib/bind/config.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/config.h Sat Jan 10 03:01:18 2009 (r186997) @@ -160,6 +160,12 @@ int sigwait(const unsigned int *set, int /* Define if you cannot bind() before connect() for TCP sockets. */ /* #undef BROKEN_TCP_BIND_BEFORE_CONNECT */ +/* Solaris hack to get select_large_fdset. */ +/* #undef FD_SETSIZE */ + +/* Define to 1 if you have the `capset' function. */ +/* #undef HAVE_CAPSET */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -217,6 +223,15 @@ int sigwait(const unsigned int *set, int /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CAPABILITY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DEVPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DYNTUNE_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 @@ -303,7 +318,7 @@ int sigwait(const unsigned int *set, int /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus -#define inline +#define inline /**/ #endif /* Define to `unsigned int' if does not define. */ @@ -314,3 +329,7 @@ int sigwait(const unsigned int *set, int /* Define to `unsigned long' if does not define. */ /* #undef uintptr_t */ + +/* Define to empty if the keyword `volatile' does not work. Warning: valid + code using `volatile' can become incorrect without. Disable with care. */ +/* #undef volatile */ Modified: stable/7/lib/bind/dns/code.h ============================================================================== --- stable/7/lib/bind/dns/code.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/code.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/7/lib/bind/dns/dns/enumclass.h ============================================================================== --- stable/7/lib/bind/dns/dns/enumclass.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/dns/enumclass.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/7/lib/bind/dns/dns/enumtype.h ============================================================================== --- stable/7/lib/bind/dns/dns/enumtype.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/dns/enumtype.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any Modified: stable/7/lib/bind/dns/dns/rdatastruct.h ============================================================================== --- stable/7/lib/bind/dns/dns/rdatastruct.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/dns/dns/rdatastruct.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004-2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004-2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1998-2003 Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any @@ -1608,10 +1608,10 @@ typedef struct dns_rdata_rrsig { #endif /* GENERIC_DNSSIG_46_H */ /* - * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2003 Internet Software Consortium. * - * Permission to use, copy, modify, and distribute this software for any + * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * @@ -1627,10 +1627,10 @@ typedef struct dns_rdata_rrsig { #ifndef GENERIC_NSEC_47_H #define GENERIC_NSEC_47_H 1 -/* $Id: nsec_47.h,v 1.4.20.2 2005/04/29 00:16:37 marka Exp $ */ +/* $Id: nsec_47.h,v 1.4.20.4 2008/07/15 23:46:14 tbox Exp $ */ /*! - * \brief Per draft-ietf-dnsext-nsec-rdata-01.txt */ + * \brief Per RFC 3845 */ typedef struct dns_rdata_nsec { dns_rdatacommon_t common; Modified: stable/7/lib/bind/isc/Makefile ============================================================================== --- stable/7/lib/bind/isc/Makefile Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/isc/Makefile Sat Jan 10 03:01:18 2009 (r186997) @@ -32,7 +32,7 @@ SRCS+= inet_pton.c \ hash.c heap.c hex.c hmacmd5.c hmacsha.c \ lex.c lfsr.c lib.c log.c md5.c \ mem.c mutexblock.c netaddr.c netscope.c ondestroy.c \ - parseint.c print.c quota.c random.c \ + parseint.c portset.c print.c quota.c random.c \ ratelimiter.c refcount.c region.c result.c rwlock.c \ serial.c sha1.c sha2.c sockaddr.c string.c strtoul.c \ symtab.c task.c taskpool.c timer.c version.c @@ -84,6 +84,7 @@ INCS= ${SRCDIR}/include/isc/app.h \ ${SRCDIR}/include/isc/ondestroy.h \ ${SRCDIR}/include/isc/os.h \ ${SRCDIR}/include/isc/parseint.h \ + ${SRCDIR}/include/isc/portset.h \ ${SRCDIR}/include/isc/print.h \ ${SRCDIR}/include/isc/quota.h \ ${SRCDIR}/include/isc/random.h \ Modified: stable/7/lib/bind/isc/isc/platform.h ============================================================================== --- stable/7/lib/bind/isc/isc/platform.h Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/lib/bind/isc/isc/platform.h Sat Jan 10 03:01:18 2009 (r186997) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2005, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.34.18.9 2007/09/13 05:04:01 each Exp $ */ +/* $Id: platform.h.in,v 1.34.18.11 2008/06/24 23:45:55 tbox Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -142,6 +142,21 @@ */ #undef ISC_PLATFORM_FIXIN6ISADDR +/*! \brief + * Define if the system supports kqueue multiplexing + */ +#define ISC_PLATFORM_HAVEKQUEUE 1 + +/*! \brief + * Define if the system supports epoll multiplexing + */ +#undef ISC_PLATFORM_HAVEEPOLL + +/*! \brief + * Define if the system supports /dev/poll multiplexing + */ +#undef ISC_PLATFORM_HAVEDEVPOLL + /* *** Printing. ***/ @@ -226,19 +241,19 @@ /* * If the "xadd" operation is available on this architecture, - * ISC_PLATFORM_HAVEXADD will be defined. + * ISC_PLATFORM_HAVEXADD will be defined. */ #define ISC_PLATFORM_HAVEXADD 1 /* * If the "atomic swap" operation is available on this architecture, - * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. + * ISC_PLATFORM_HAVEATOMICSTORE" will be defined. */ #define ISC_PLATFORM_HAVEATOMICSTORE 1 /* * If the "compare-and-exchange" operation is available on this architecture, - * ISC_PLATFORM_HAVECMPXCHG will be defined. + * ISC_PLATFORM_HAVECMPXCHG will be defined. */ #define ISC_PLATFORM_HAVECMPXCHG 1 Modified: stable/7/share/doc/bind9/Makefile ============================================================================== --- stable/7/share/doc/bind9/Makefile Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/share/doc/bind9/Makefile Sat Jan 10 03:01:18 2009 (r186997) @@ -20,7 +20,7 @@ ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html man.rndc.html ARMDIR= ${TOPDIR}/arm MISC= dnssec format-options.pl ipv6 migration migration-4to9 \ - options rfc-compliance roadmap sdb + options rfc-compliance roadmap sdb sort-options.pl MISCDIR= ${TOPDIR}/misc .include Modified: stable/7/usr.bin/nsupdate/Makefile ============================================================================== --- stable/7/usr.bin/nsupdate/Makefile Sat Jan 10 03:00:21 2009 (r186996) +++ stable/7/usr.bin/nsupdate/Makefile Sat Jan 10 03:01:18 2009 (r186997) @@ -18,7 +18,7 @@ CFLAGS+= -I${BIND_DIR}/lib/isc/${ISC_ATO DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} ${PTHREAD_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} ${PTHREAD_LDADD} -MAN= nsupdate.8 +MAN= nsupdate.1 MANFILTER= sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" \ -e "s@^\.HP [0-9]* @@" From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 03:04:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4911106566C; Sat, 10 Jan 2009 03:04:21 +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 B89CB8FC08; Sat, 10 Jan 2009 03:04:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A34Lpw077819; Sat, 10 Jan 2009 03:04:21 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A34LDl077818; Sat, 10 Jan 2009 03:04:21 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100304.n0A34LDl077818@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 03:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186998 - in stable/7: share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:04:22 -0000 Author: dougb Date: Sat Jan 10 03:04:21 2009 New Revision: 186998 URL: http://svn.freebsd.org/changeset/base/186998 Log: MFC the BIND 9.4.3 and 9.4.3-P1 updates Modified: stable/7/share/doc/bind9/ (props changed) stable/7/usr.bin/nsupdate/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 03:07:25 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C12D106566B for ; Sat, 10 Jan 2009 03:07:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 145338FC08 for ; Sat, 10 Jan 2009 03:07:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 4341 invoked by uid 399); 10 Jan 2009 03:07:23 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2009 03:07:23 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <496810EA.9080508@FreeBSD.org> Date: Fri, 09 Jan 2009 19:07:22 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org References: <200901100304.n0A34LDl077818@svn.freebsd.org> In-Reply-To: <200901100304.n0A34LDl077818@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r186998 - in stable/7: share/doc/bind9 usr.bin/nsupdate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:07:26 -0000 Doug Barton wrote: > Author: dougb > Date: Sat Jan 10 03:04:21 2009 > New Revision: 186998 > URL: http://svn.freebsd.org/changeset/base/186998 > > Log: > MFC the BIND 9.4.3 and 9.4.3-P1 updates > > Modified: > stable/7/share/doc/bind9/ (props changed) > stable/7/usr.bin/nsupdate/ (props changed) In case someone is curious, when I listed the non-contrib changes on the command line I inadvertently left out these mergeinfo updates on the directories. Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 03:11:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E293106566C for ; Sat, 10 Jan 2009 03:11:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id BBDB08FC17 for ; Sat, 10 Jan 2009 03:11:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 8154 invoked by uid 399); 10 Jan 2009 03:11:19 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 10 Jan 2009 03:11:19 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <496811D6.5010700@FreeBSD.org> Date: Fri, 09 Jan 2009 19:11:18 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.19 (X11/20090102) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org References: <200901100300.n0A30M5b077529@svn.freebsd.org> In-Reply-To: <200901100300.n0A30M5b077529@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r186996 - in stable/7/contrib/bind9: . bin/check bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 03:11:20 -0000 Doug Barton wrote: > Author: dougb > Date: Sat Jan 10 03:00:21 2009 > New Revision: 186996 > URL: http://svn.freebsd.org/changeset/base/186996 > > Log: > MFC the BIND 9.4.3 and 9.4.3-P1 updates In case anyone is curious, 9.4.3 has been in HEAD for > 2 weeks. The changes for -P1 only touch a few files in contrib/bind9, are only relevant to those who verify signatures with DNSSEC, and have been requested by the security team. Thus the uncustomarily short MFC. Doug -- This .signature sanitized for your protection From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 04:30:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1597E106566B; Sat, 10 Jan 2009 04:30:28 +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 F25258FC0A; Sat, 10 Jan 2009 04:30:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4URN7079554; Sat, 10 Jan 2009 04:30:27 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4UR2c079552; Sat, 10 Jan 2009 04:30:27 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100430.n0A4UR2c079552@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186999 - in stable/6/contrib/bind9: . bin/dig bin/dnssec bin/named bin/named/include/named bin/named/unix bin/named/unix/include/named bin/nsupdate bin/rndc doc/arm doc/misc doc/rfc li... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:30:28 -0000 Author: dougb Date: Sat Jan 10 04:30:27 2009 New Revision: 186999 URL: http://svn.freebsd.org/changeset/base/186999 Log: Merge from vendor/bind9/dist-9.3 as of the 9.3.6-P1 import Added: stable/6/contrib/bind9/aclocal.m4 - copied unchanged from r186989, vendor/bind9/dist-9.3/aclocal.m4 stable/6/contrib/bind9/bin/nsupdate/nsupdate.1 - copied unchanged from r186989, vendor/bind9/dist-9.3/bin/nsupdate/nsupdate.1 stable/6/contrib/bind9/config.h.in - copied unchanged from r186989, vendor/bind9/dist-9.3/config.h.in stable/6/contrib/bind9/doc/rfc/rfc4648.txt - copied unchanged from r186989, vendor/bind9/dist-9.3/doc/rfc/rfc4648.txt stable/6/contrib/bind9/doc/rfc/rfc4701.txt - copied unchanged from r186989, vendor/bind9/dist-9.3/doc/rfc/rfc4701.txt stable/6/contrib/bind9/doc/rfc/rfc5155.txt - copied unchanged from r186989, vendor/bind9/dist-9.3/doc/rfc/rfc5155.txt stable/6/contrib/bind9/lib/bind/aclocal.m4 - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/bind/aclocal.m4 stable/6/contrib/bind9/lib/bind/config.h.in - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/bind/config.h.in stable/6/contrib/bind9/lib/isc/include/isc/portset.h - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/isc/include/isc/portset.h stable/6/contrib/bind9/lib/isc/portset.c - copied unchanged from r186989, vendor/bind9/dist-9.3/lib/isc/portset.c Deleted: stable/6/contrib/bind9/bin/nsupdate/nsupdate.8 Modified: stable/6/contrib/bind9/ (props changed) stable/6/contrib/bind9/CHANGES stable/6/contrib/bind9/FAQ stable/6/contrib/bind9/FAQ.xml stable/6/contrib/bind9/README stable/6/contrib/bind9/bin/dig/dig.1 stable/6/contrib/bind9/bin/dig/dig.c stable/6/contrib/bind9/bin/dig/dig.docbook stable/6/contrib/bind9/bin/dig/dig.html stable/6/contrib/bind9/bin/dig/dighost.c stable/6/contrib/bind9/bin/dig/host.1 stable/6/contrib/bind9/bin/dig/host.docbook stable/6/contrib/bind9/bin/dig/host.html stable/6/contrib/bind9/bin/dnssec/dnssec-keygen.8 stable/6/contrib/bind9/bin/dnssec/dnssec-keygen.docbook stable/6/contrib/bind9/bin/dnssec/dnssec-keygen.html stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.8 stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.c stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.docbook stable/6/contrib/bind9/bin/dnssec/dnssec-signzone.html stable/6/contrib/bind9/bin/named/client.c stable/6/contrib/bind9/bin/named/config.c stable/6/contrib/bind9/bin/named/controlconf.c stable/6/contrib/bind9/bin/named/include/named/globals.h stable/6/contrib/bind9/bin/named/interfacemgr.c stable/6/contrib/bind9/bin/named/lwresd.8 stable/6/contrib/bind9/bin/named/lwresd.c stable/6/contrib/bind9/bin/named/lwresd.docbook stable/6/contrib/bind9/bin/named/lwresd.html stable/6/contrib/bind9/bin/named/main.c stable/6/contrib/bind9/bin/named/named.8 stable/6/contrib/bind9/bin/named/named.conf.5 stable/6/contrib/bind9/bin/named/named.conf.docbook stable/6/contrib/bind9/bin/named/named.conf.html stable/6/contrib/bind9/bin/named/named.docbook stable/6/contrib/bind9/bin/named/named.html stable/6/contrib/bind9/bin/named/query.c stable/6/contrib/bind9/bin/named/server.c stable/6/contrib/bind9/bin/named/unix/include/named/os.h stable/6/contrib/bind9/bin/named/unix/os.c stable/6/contrib/bind9/bin/named/update.c stable/6/contrib/bind9/bin/nsupdate/Makefile.in stable/6/contrib/bind9/bin/nsupdate/nsupdate.docbook stable/6/contrib/bind9/bin/nsupdate/nsupdate.html stable/6/contrib/bind9/bin/rndc/rndc-confgen.c stable/6/contrib/bind9/bin/rndc/rndc.c stable/6/contrib/bind9/configure.in stable/6/contrib/bind9/doc/arm/Bv9ARM-book.xml stable/6/contrib/bind9/doc/arm/Bv9ARM.ch02.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch04.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch06.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch07.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch08.html stable/6/contrib/bind9/doc/arm/Bv9ARM.ch09.html stable/6/contrib/bind9/doc/arm/Bv9ARM.html stable/6/contrib/bind9/doc/arm/Bv9ARM.pdf stable/6/contrib/bind9/doc/misc/options stable/6/contrib/bind9/doc/rfc/index stable/6/contrib/bind9/lib/bind/api stable/6/contrib/bind9/lib/bind/bsd/Makefile.in stable/6/contrib/bind9/lib/bind/bsd/strerror.c stable/6/contrib/bind9/lib/bind/bsd/strtoul.c stable/6/contrib/bind9/lib/bind/configure.in stable/6/contrib/bind9/lib/bind/dst/Makefile.in stable/6/contrib/bind9/lib/bind/dst/dst_api.c stable/6/contrib/bind9/lib/bind/dst/hmac_link.c stable/6/contrib/bind9/lib/bind/dst/support.c stable/6/contrib/bind9/lib/bind/include/arpa/nameser.h stable/6/contrib/bind9/lib/bind/include/isc/assertions.h stable/6/contrib/bind9/lib/bind/include/isc/misc.h stable/6/contrib/bind9/lib/bind/include/resolv.h stable/6/contrib/bind9/lib/bind/inet/Makefile.in stable/6/contrib/bind9/lib/bind/inet/inet_net_pton.c stable/6/contrib/bind9/lib/bind/irs/Makefile.in stable/6/contrib/bind9/lib/bind/irs/dns_ho.c stable/6/contrib/bind9/lib/bind/irs/irp.c stable/6/contrib/bind9/lib/bind/isc/Makefile.in stable/6/contrib/bind9/lib/bind/isc/assertions.c stable/6/contrib/bind9/lib/bind/isc/bitncmp.c stable/6/contrib/bind9/lib/bind/isc/ctl_clnt.c stable/6/contrib/bind9/lib/bind/isc/ctl_srvr.c stable/6/contrib/bind9/lib/bind/nameser/Makefile.in stable/6/contrib/bind9/lib/bind/port_after.h.in stable/6/contrib/bind9/lib/bind/resolv/Makefile.in stable/6/contrib/bind9/lib/bind/resolv/res_debug.c stable/6/contrib/bind9/lib/bind/resolv/res_mkquery.c stable/6/contrib/bind9/lib/bind/resolv/res_query.c stable/6/contrib/bind9/lib/bind9/api stable/6/contrib/bind9/lib/bind9/check.c stable/6/contrib/bind9/lib/dns/adb.c stable/6/contrib/bind9/lib/dns/api stable/6/contrib/bind9/lib/dns/cache.c stable/6/contrib/bind9/lib/dns/dispatch.c stable/6/contrib/bind9/lib/dns/include/dns/dispatch.h stable/6/contrib/bind9/lib/dns/journal.c stable/6/contrib/bind9/lib/dns/masterdump.c stable/6/contrib/bind9/lib/dns/message.c stable/6/contrib/bind9/lib/dns/openssldsa_link.c stable/6/contrib/bind9/lib/dns/opensslrsa_link.c stable/6/contrib/bind9/lib/dns/rbt.c stable/6/contrib/bind9/lib/dns/rdata/generic/nsec_47.c stable/6/contrib/bind9/lib/dns/rdata/generic/nsec_47.h stable/6/contrib/bind9/lib/dns/rdata/generic/txt_16.c stable/6/contrib/bind9/lib/dns/rdata/in_1/naptr_35.c stable/6/contrib/bind9/lib/dns/request.c stable/6/contrib/bind9/lib/dns/resolver.c stable/6/contrib/bind9/lib/dns/validator.c stable/6/contrib/bind9/lib/dns/view.c stable/6/contrib/bind9/lib/dns/xfrin.c stable/6/contrib/bind9/lib/isc/Makefile.in stable/6/contrib/bind9/lib/isc/api stable/6/contrib/bind9/lib/isc/assertions.c stable/6/contrib/bind9/lib/isc/include/isc/assertions.h stable/6/contrib/bind9/lib/isc/include/isc/mem.h stable/6/contrib/bind9/lib/isc/include/isc/msgs.h stable/6/contrib/bind9/lib/isc/include/isc/platform.h.in stable/6/contrib/bind9/lib/isc/include/isc/resource.h stable/6/contrib/bind9/lib/isc/include/isc/socket.h stable/6/contrib/bind9/lib/isc/include/isc/timer.h stable/6/contrib/bind9/lib/isc/include/isc/types.h stable/6/contrib/bind9/lib/isc/mem.c stable/6/contrib/bind9/lib/isc/print.c stable/6/contrib/bind9/lib/isc/pthreads/mutex.c stable/6/contrib/bind9/lib/isc/timer.c stable/6/contrib/bind9/lib/isc/unix/app.c stable/6/contrib/bind9/lib/isc/unix/include/isc/net.h stable/6/contrib/bind9/lib/isc/unix/net.c stable/6/contrib/bind9/lib/isc/unix/resource.c stable/6/contrib/bind9/lib/isc/unix/socket.c stable/6/contrib/bind9/lib/isc/unix/socket_p.h stable/6/contrib/bind9/lib/isc/unix/time.c stable/6/contrib/bind9/lib/isccfg/api stable/6/contrib/bind9/lib/isccfg/namedconf.c stable/6/contrib/bind9/version Modified: stable/6/contrib/bind9/CHANGES ============================================================================== --- stable/6/contrib/bind9/CHANGES Sat Jan 10 03:04:21 2009 (r186998) +++ stable/6/contrib/bind9/CHANGES Sat Jan 10 04:30:27 2009 (r186999) @@ -1,14 +1,154 @@ - --- 9.3.5-P2 released --- + --- 9.3.6-P1 released --- -2406. [bug] Some operating systems have FD_SETSIZE set to a - low value by default, which can cause resource - exhaustion when many simultaneous connections are - open. Linux in particular makes it difficult to - increase this value. To use more sockets with - select(), set ISC_SOCKET_FDSETSIZE. Example: - STD_CDEFINES="-DISC_SOCKET_FDSETSIZE=4096" ./configure - (This should not be necessary in most cases, and - never for an authoritative-only server.) [RT #18328] +2522. [security] Handle -1 from DSA_do_verify(). + +2498. [bug] Removed a bogus function argument used with + ISC_SOCKET_USE_POLLWATCH: it could cause compiler + warning or crash named with the debug 1 level + of logging. [RT #18917] + + --- 9.3.6 released --- + +2490. [port] aix: work around a kernel bug where IPV6_RECVPKTINFO + is cleared when IPV6_V6ONLY is set. [RT #18785] + +2489. [port] solaris: Workaround Solaris's kernel bug about + /dev/poll: + http://bugs.opensolaris.org/view_bug.do?bug_id=6724237 + Define ISC_SOCKET_USE_POLLWATCH at build time to enable + this workaround. [RT #18870] + + --- 9.3.6rc1 released --- + +2473. [port] linux: raise the limit on open files to the possible + maximum value before spawning threads; 'files' + specified in named.conf doesn't seem to work with + threads as expected. [RT #18784] + +2472. [port] linux: check the number of available cpu's before + calling chroot as it depends on "/proc". [RT #16923] + +2469. [port] solaris: Work around Solaris's select() limitations. + [RT #18769] + +2468. [bug] Resolver could try unreachable servers multiple times. + [RT #18739] + +2467. [bug] Failure of fcntl(F_DUPFD) wasn't logged. [RT #18740] + +2465. [bug] Adb's handling of lame addresses was different + for IPv4 and IPv6. [RT #18738] + +2463. [port] linux: POSIX doesn't include the IPv6 Advanced Socket + API and glibc hides parts of the IPv6 Advanced Socket + API as a result. This is stupid as it breaks how the + two halves (Basic and Advanced) of the IPv6 Socket API were designed to be used but we have to live with it. + Define _GNU_SOURCE to pull in the IPv6 Advanced Socket + API. [RT #18388] + +2462. [doc] Document -m (enable memory usage debugging) + option for dig. [RT #18757] + +2461. [port] sunos: Change #2363 was not complete. [RT #17513] + +2458. [doc] ARM: update and correction for max-cache-size. + [RT #18294] + +2455. [bug] Stop metadata being transfered via axfr/ixfr. + [RT #18639] + +2453. [bug] Remove NULL pointer dereference in dns_journal_print(). + [RT #18316] + +2449. [bug] libbind: Out of bounds reference in dns_ho.c:addrsort. + [RT #18044] + +2444. [port] Linux, FreeBSD, AIX: Turn off path mtu discovery + (clear DF) for UDP responses and requests. + + --- 9.3.6b1 released --- + +2443. [bug] win32: UDP connect() would not generate an event, + and so connected UDP sockets would never clean up. + Fix this by doing an immediate WSAConnect() rather + than an io completion port type for UDP. + +2438. [bug] Timeouts could be logged incorrectly under win32. + [RT #18617] + +2437. [bug] Sockets could be closed too early, leading to + inconsistent states in the socket module. [RT #18298] + +2436. [security] win32: UDP client handler can be shutdown. [RT #18576] + +2432. [bug] More Windows socket handling improvements. Stop + using I/O events and use IO Completion Ports + throughout. Rewrite the receive path logic to make + it easier to support multiple simultaneous + requestrs in the future. Add stricter consistency + checking as a compile-time option (define + ISC_SOCKET_CONSISTENCY_CHECKS; defaults to off). + +2430. [bug] win32: isc_interval_set() could round down to + zero if the input was less than NS_INTERVAL + nanoseconds. Round up instead. [RT #18549] + +2429. [doc] nsupdate should be in section 1 of the man pages. + [RT #18283] + +2426. [bug] libbind: inet_net_pton() can sometimes return the + wrong value if excessively large netmasks are + supplied. [RT #18512] + +2425. [bug] named didn't detect unavailable query source addresses + at load time. [RT #18536] + +2424. [port] configure now probes for a working epoll + implementation. Allow the use of kqueue, + epoll and /dev/poll to be selected at compile + time. [RT #18277] + +2422. [bug] Handle the special return value of a empty node as + if it was a NXRRSET in the validator. [RT #18447] + +2421. [func] Add new command line option '-S' for named to specify + the max number of sockets. [RT #18493] + Use caution: this option may not work for some + operating systems without rebuilding named. + +2420. [bug] Windows socket handling cleanup. Let the io + completion event send out cancelled read/write + done events, which keeps us from writing to memeory + we no longer have ownership of. Add debugging + socket_log() function. Rework TCP socket handling + to not leak sockets. + +2417. [bug] Connecting UDP sockets for outgoing queries could + unexpectedly fail with an 'address already in use' + error. [RT #18411] + +2416. [func] Log file descriptors that cause exceeding the + internal maximum. [RT #18460] + +2414. [bug] A masterdump context held the database lock too long, + causing various troubles such as dead lock and + recursive lock acquisition. [RT #18311, #18456] + +2413. [bug] Fixed an unreachable code path in socket.c. [RT #18442] + +2412. [bug] win32: address a resourse leak. [RT #18374] + +2411. [bug] Allow using a larger number of sockets than FD_SETSIZE + for select(). To enable this, set ISC_SOCKET_MAXSOCKETS + at compilation time. [RT #18433] + +2410. [bug] Correctly delete m_versionInfo. [RT #18432] + +2408. [bug] A duplicate TCP dispatch event could be sent, which + could then trigger an assertion failure in + resquery_response(). [RT #18275] + +2407. [port] hpux: test for sys/dyntune.h. [RT #18421] 2404. [port] hpux: files unlimited support. @@ -22,7 +162,7 @@ 2399. [bug] Abort timeout queries to reduce the number of open UDP sockets. [RT #18367] -2398. [bug] Improve file descriptor management. New, +2398. [bug] Improve file descriptor management. New, temporary, named.conf option reserved-sockets, default 512. [RT #18344] @@ -39,11 +179,111 @@ 2392. [bug] remove 'grep -q' from acl test script, some platforms don't support it. [RT #18253] - --- 9.3.5-P1 released --- +2391 [port] hpux: cover additional recvmsg() error codes. + [RT #18301] + +2390 [bug] dispatch.c could make a false warning on 'odd socket'. + [RT #18301]. + +2389 [bug] Move the "working directory writable" check to after + the ns_os_changeuser() call. [RT #18326] + +2386. [func] Add warning about too small 'open files' limit. + [RT #18269] + +2385. [bug] A condition variable in socket.c could leak in + rare error handling [RT #17968]. + +2384. [security] Additional support for query port randomization (change + #2375) including performance improvement and port range + specification. [RT #17949, #18098] + +2383. [bug] named could double queries when they resulted in + SERVFAIL due to overkilling EDNS0 failure detection. + [RT #18182] + +2382. [doc] Add a description SSHFP to ARM. + +2380. [bug] dns_view_find() was not returning NXDOMAIN/NXRRSET + proofs which, in turn, caused validation failures + for insecure zones immediately below a secure zone + the server was authoritative for. [RT #18112] -2375. [security] Fully randomize UDP query ports to improve +2379. [contrib] queryperf/gen-data-queryperf.py: removed redundant + TLDs and supported RRs with TTLs [RT #17972] + +2377. [bug] Address race condition in dnssec-signzone. [RT #18142] + +2376. [bug] Change #2144 was not complete. + +2375. [security] Fully randomize UDP query ports to improve forgery resilience. [RT #17949] +2369. [bug] libbind: Array bounds overrun on read in bitncmp(). + [RT #18054] + +2364. [bug] named could trigger an assertion when serving a + malformed signed zone. [RT #17828] + +2363. [port] sunos: pre-set "lt_cv_sys_max_cmd_len=4096;". + [RT #17513] + +2361. [bug] "recursion" statistics counter could be counted + multiple times for a single query. [RT #17990] + +2358. [doc] Update host's default query description. [RT #17934] + +2356. [bug] Built in mutex profiler was not scalable enough. + [RT #17436] + +2353. [func] libbind: nsid support. [RT #17091] + +2350. [port] win32: IPv6 support. [RT #17797] + +2347. [bug] Delete now traverses the RB tree in the canonical + order. [RT #17451] + +2345. [bug] named-checkconf failed to detect when forwarders + were set at both the options/view level and in + a root zone. [RT #17671] + +2344. [bug] Improve "logging{ file ...; };" documentation. + [RT #17888] + +2343. [bug] (Seemingly) duplicate IPv6 entries could be + created in ADB. [RT #17837] + +2341. [bug] libbind: add missing -I../include for off source + tree builds. [RT #17606] + +2340. [port] openbsd: interface configuration. [RT #17700] + +2335. [port] sunos: libbind and *printf() support for long long. + [RT #17513] + +2334. [bug] Bad REQUIRES in fromstruct_in_naptr(), off by one + bug in fromstruct_txt(). [RT #17609] + +2333. [bug] Fix off by one error in isc_time_nowplusinterval(). + [RT #17608] + +2332. [contrib] query-loc-0.4.0. [RT #17602] + +2331. [bug] Failure to regenerate any signatures was not being + reported nor being past back to the UPDATE client. + [RT #17570] + +2330. [bug] Remove potential race condition when handling + over memory events. [RT #17572] + + WARNING: API CHANGE: over memory callback + function now needs to call isc_mem_waterack(). + See for details. + +2329. [bug] Clearer help text for dig's '-x' and '-i' options. + +2325. [port] Linux: use capset() function if available. [RT #17557] + --- 9.3.5 released --- --- 9.3.5rc2 released --- @@ -65,11 +305,11 @@ 2322. [port] MacOS: work around the limitation of setrlimit() for RLIMIT_NOFILE. [RT #17526] -2321. [bug] Silence Coverity warnings in lib/dns/master.c, +2321. [bug] Silence Coverity warnings in lib/dns/master.c, lib/dns/rbtdb.c, lib/isccfg/namedconf.c, lib/dns/tsig.c and bin/dnssec/dnssec-signzone.c. -2319. [bug] Silence Coverity warnings in +2319. [bug] Silence Coverity warnings in lib/dns/rdata/in_1/apl_42.c. [RT #17469] 2318. [port] sunos fixes for libbind. [RT #17514] @@ -83,7 +323,7 @@ 2312. [cleanup] Silence Coverity warning in lib/isc/unix/socket.c. [RT #17458] -2311. [func] Update ACL regression test. [RT #17462] +2311. [func] Update ACL regression test. [RT #17462] 2310. [bug] dig, host, nslookup: flush stdout before emitting debug/fatal messages. [RT #17501] @@ -106,7 +346,7 @@ 2301. [bug] Remove resource leak and fix error messages in bin/tests/system/lwresd/lwtest.c. [RT #17474] -2300. [bug] Fixed failure to close open file in +2300. [bug] Fixed failure to close open file in bin/tests/names/t_names.c. [RT #17473] 2299. [bug] Remove unnecessary NULL check in @@ -129,7 +369,7 @@ 2292. [bug] Log if the working directory is not writable. [RT #17312] -2291. [bug] PR_SET_DUMPABLE may be set too late. Also report +2291. [bug] PR_SET_DUMPABLE may be set too late. Also report failure to set PR_SET_DUMPABLE. [RT #17312] 2290. [bug] Let AD in the query signal that the client wants AD @@ -148,7 +388,7 @@ memory context rather than the clients memory context. [RT #17377] -2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, +2279. [bug] Use setsockopt(SO_NOSIGPIPE), when available, to protect applications from receiving spurious SIGPIPE signals when using the resolver. @@ -157,7 +397,7 @@ --- 9.3.5b1 released --- -2273. [bug] Adjust log level to WARNING when saving inconsistant +2273. [bug] Adjust log level to WARNING when saving inconsistent stub/slave master and journal files. [RT# 17279] 2272. [bug] Handle illegal dnssec-lookaside trust-anchor names. @@ -194,10 +434,10 @@ reality. Note there is behaviour change for BIND 9.5. [RT #17113] -2249. [bug] Only set Authentic Data bit if client requested +2249. [bug] Only set Authentic Data bit if client requested DNSSEC, per RFC 3655 [RT #17175] -2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] +2248. [cleanup] Fix several errors reported by Coverity. [RT #17160] 2247. [doc] Sort doc/misc/options. [RT #17067] @@ -208,18 +448,18 @@ working. [RT #17151] 2238. [bug] It was possible to trigger a REQUIRE when a - validation was cancelled. [RT #17106] + validation was canceled. [RT #17106] 2237. [bug] libbind: res_init() was not thread aware. [RT #17123] 2236. [bug] dnssec-signzone failed to preserve the case of of wildcard owner names. [RT #17085] -2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] - +2234. [port] Correct some compiler warnings on SCO OSr5 [RT #17134] + 2229. [bug] Null pointer dereference on query pool creation - failure. [RT #17133] - + failure. [RT #17133] + 2232. [bug] dns_adb_findaddrinfo() could fail and return ISC_R_SUCCESS. [RT #17137] @@ -230,10 +470,10 @@ 2227. [cleanup] Tidied up the FAQ. [RT #17121] -2226. [bug] Fix build error. [RT #17124] +2226. [bug] Fix build error. [RT #17124] 2225. [bug] More support for systems with no IPv4 addresses. - [RT #17111] + [RT #17111] 2224. [bug] Defer journal compaction if a xfrin is in progress. [RT #17119] @@ -247,12 +487,12 @@ 2220. [bug] win32: Address a race condition in final shutdown of the Windows socket code. [RT #17028] - + 2218. [bug] Remove unnecessary REQUIRE from dns_validator_create(). [RT #16976] 2216. [cleanup] Fix a number of errors reported by Coverity. - [RT #17094] + [RT #17094] 2214. [bug] Deregister OpenSSL lock callback when cleaning up. [RT #17098] @@ -297,7 +537,7 @@ 2187. [bug] query_addds(), query_addwildcardproof() and query_addnxrrsetnsec() should take a version - arguement. [RT #16368] + argument. [RT #16368] 2186. [port] cygwin: libbind: check for struct sockaddr_storage independently of IPv6. [RT #16482] @@ -324,7 +564,7 @@ debug level 10+. [RT #16798] 2176. [contrib] dbus update to handle race condition during - initialisation (Bugzilla 235809). [RT #16842] + initialization (Bugzilla 235809). [RT #16842] 2175. [bug] win32: windows broadcast condition variable support was broken. [RT #16592] @@ -444,7 +684,7 @@ 2111. [bug] Fix a number of errors reported by Coverity. [RT #16507] -2110. [bug] "minimal-response yes;" interacted badly with BIND 8 +2110. [bug] "minimal-responses yes;" interacted badly with BIND 8 priming queries. [RT #16491] 2109. [port] libbind: silence aix 5.3 compiler warnings. [RT #16502] @@ -453,7 +693,7 @@ 2203. [security] Query id generation was cryptographically weak. [RT # 16915] - + 2193. [port] win32: BINDInstall.exe is now linked statically. [RT #16906] @@ -463,7 +703,7 @@ --- 9.3.4 released --- -2126. [security] Serialise validation of type ANY responses. [RT #16555] +2126. [security] Serialize validation of type ANY responses. [RT #16555] 2124. [security] It was possible to dereference a freed fetch context. [RT #16584] @@ -477,14 +717,14 @@ 2103. [port] Add /usr/sfw to list of locations for OpenSSL under Solaris. -2102. [port] Silence solaris 10 warnings. +2102. [port] Silence Solaris 10 warnings. 2101. [bug] OpenSSL version checks were not quite right. [RT #16476] 2100. [port] win32: copy libeay32.dll to Build\Debug. -2099. [port] win32: more manifiest issues. +2099. [port] win32: more manifest issues. --- 9.3.3rc3 released --- @@ -493,12 +733,12 @@ 2095. [port] libbind: alway prototype inet_cidr_ntop_ipv6() and net_cidr_ntop_ipv6(). [RT #16388] - + 2094. [contrib] Update named-bootconf. [RT# 16404] 2092. [bug] win32: dig, host, nslookup. Use registry config if resolv.conf does not exist or no nameservers - listed. [RT #15877] + listed. [RT #15877] 2091. [port] dighost.c: race condition on cleanup. [RT #16417] @@ -588,7 +828,7 @@ [RT #16287] 2049. [bug] Restore SOA before AXFR when falling back from - a attempted IXFR when transfering in a zone. + a attempted IXFR when transferring in a zone. Allow a initial SOA query before attempting a AXFR to be requested. [RT #16156] @@ -597,7 +837,7 @@ the OS always returned the same local port. [RT #16182] -2047. [bug] Failed to initialise the interface flags to zero. +2047. [bug] Failed to initialize the interface flags to zero. [RT #16245] 2043. [port] nsupdate/nslookup: Force the flushing of the prompt @@ -626,7 +866,7 @@ 2029. [bug] host printed out the server multiple times when specified on the command line. [RT #15992] -2028. [port] linux: socket.c compatability for old systems. +2028. [port] linux: socket.c compatibility for old systems. [RT #16015] 2027. [port] libbind: Solaris x86 support. [RT #16020] @@ -634,7 +874,7 @@ 2026. [bug] Rate limit the two recursive client exceeded messages. [RT #16044] -2024. [bug] named emited spurious "zone serial unchanged" +2024. [bug] named emitted spurious "zone serial unchanged" messages on reload. [RT #16027] 2023. [bug] "make install" should create ${localstatedir}/run and @@ -647,7 +887,7 @@ 2013. [bug] Handle unexpected TSIGs on unsigned AXFR/IXFR responses more gracefully. [RT #15941] -2009. [bug] libbind: coverity fixes. [RT #15808] +2009. [bug] libbind: Coverity fixes. [RT #15808] 2005. [bug] libbind: Retransmission timeouts should be based on which attempt it is to the nameserver @@ -679,16 +919,16 @@ 1994. [port] OpenSSL 0.9.8 support. [RT #15694] -1993. [bug] Log messsage, via syslog, were missing the space +1993. [bug] Log messages, via syslog, were missing the space after the timestamp if "print-time yes" was specified. [RT #15844] 1991. [cleanup] The configuration data, once read, should be treated - as readonly. Expand the use of const to enforce this + as read only. Expand the use of const to enforce this at compile time. [RT #15813] 1990. [bug] libbind: isc's override of broken gettimeofday() - implementions was not always effective. + implementations was not always effective. [RT #15709] 1989. [bug] win32: don't check the service password when @@ -703,7 +943,7 @@ server for the zone. Also any zones that contain DLV records should be removed when upgrading a slave zone. You do not however have to upgrade all - servers for a zone with DLV records simultaniously. + servers for a zone with DLV records simultaneously. 1982. [bug] DNSKEY was being accepted on the parent side of a delegation. KEY is still accepted there for @@ -728,7 +968,7 @@ 1974. [doc] List each of the zone types and associated zone options separately in the ARM. -1972. [contrib] DBUS dynamic forwarders integation from +1972. [contrib] DBUS dynamic forwarders integration from Jason Vas Dias . 1971. [port] linux: make detection of missing IF_NAMESIZE more @@ -745,7 +985,7 @@ 1966. [bug] Don't set CD when we have fallen back to plain DNS. [RT #15727] -1963. [port] Tru64 4.0E doesn't support send() and recv(). +1963. [port] Tru64 4.0E doesn't support send() and recv(). [RT #15586] 1962. [bug] Named failed to clear old update-policy when it @@ -767,7 +1007,7 @@ by native compiler. See README for additional cross compile support information. [RT #15148] -1955. [bug] Pre-allocate the cache cleaning interator. [RT #14998] +1955. [bug] Pre-allocate the cache cleaning iterator. [RT #14998] 1952. [port] hpux: tell the linker to build a runtime link path "-Wl,+b:". [RT #14816]. @@ -775,7 +1015,7 @@ 1951. [security] Drop queries from particular well known ports. Don't return FORMERR to queries from particular well known ports. [RT #15636] - + 1950. [port] Solaris 2.5.1 and earlier cannot bind() then connect() a TCP socket. This prevents the source address being set for TCP connections. [RT #15628] @@ -803,7 +1043,7 @@ 1940. [bug] Fixed a number of error conditions reported by Coverity. -1939. [bug] The resolver could dereference a null pointer after +1939. [bug] The resolver could dereference a null pointer after validation if all the queries have timed out. [RT #15528] @@ -848,7 +1088,7 @@ 1914. [protocol] DS is required to accept mnemonic algorithms (RFC 4034). Still emit numeric algorithms for - compatability with RFC 3658. [RT #15354] + compatibility with RFC 3658. [RT #15354] 1911. [bug] Update windows socket code. [RT #14965] @@ -892,7 +1132,7 @@ 1881. [func] Add a system test for named-checkconf. [RT #14931] 1877. [bug] Fix unreasonably low quantum on call to - dns_rbt_destroy2(). Remove unnecessay unhash_node() + dns_rbt_destroy2(). Remove unnecessary unhash_node() call. [RT #14919] 1875. [bug] process_dhtkey() was using the wrong memory context @@ -951,24 +1191,24 @@ 1850. [bug] Memory leak in lwres_getipnodebyaddr(). [RT #14591] 1849. [doc] All forms of the man pages (docbook, man, html) should - have consistant copyright dates. + have consistent copyright dates. 1848. [bug] Improve SMF integration. [RT #13238] 1847. [bug] isc_ondestroy_init() is called too late in - dns_rbtdb_create()/dns_rbtdb64_create(). + dns_rbtdb_create()/dns_rbtdb64_create(). [RT #13661] - + 1846. [contrib] query-loc-0.3.0 from Stephane Bortzmeyer . -1845. [bug] Improve error reporting to distingish between +1845. [bug] Improve error reporting to distinguish between accept()/fcntl() and socket()/fcntl() errors. [RT #13745] 1844. [bug] inet_pton() accepted more that 4 hexadecimal digits for each 16 bit piece of the IPv6 address. The text - representation of a IPv6 address has been tighted + representation of a IPv6 address has been tightened to disallow this (draft-ietf-ipv6-addr-arch-v4-02.txt). [RT #5662] @@ -1026,7 +1266,7 @@ 1822. [bug] check-names test for RT was reversed. [RT #13382] -1821. [doc] acls definitions are no longer required to be +1821. [doc] acls definitions are no longer required to be in named.conf prior to reference. They can be defined after being referenced. @@ -1052,7 +1292,7 @@ 1807. [bug] When forwarding (forward only) set the active domain from the forward zone name. [RT #13526] - + 1804. [bug] Ensure that if we are queried for glue that it fits in the additional section or TC is set to tell the client to retry using TCP. [RT #10114] @@ -1165,7 +1405,7 @@ 1765. [bug] configure --with-openssl=auto failed. [RT #12937] 1764. [bug] dns_zone_replacedb failed to emit a error message - if there was no SOA record in the replacment db. + if there was no SOA record in the replacement db. [RT #13016] 1762. [bug] isc_interfaceiter_create() could return ISC_R_SUCCESS @@ -1180,7 +1420,7 @@ 1759. [bug] Named failed to startup if the OS supported IPv6 but had no IPv6 interfaces configured. [RT #12942] -1754. [bug] We wern't always attempting to query the parent +1754. [bug] We weren't always attempting to query the parent server for the DS records at the zone cut. [RT #12774] @@ -1199,7 +1439,7 @@ 1749. [bug] 'check-names response ignore;' failed to ignore. [RT #12866] -1747. [bug] BIND 8 compatability: named/named-checkconf failed +1747. [bug] BIND 8 compatibility: named/named-checkconf failed to parse "host-statistics-max" in named.conf. 1745. [bug] Dig/host/nslookup accept replies from link locals @@ -1213,7 +1453,7 @@ requested number of worker threads then destruction of the manager would trigger an INSIST() failure. [RT #12790] - + 1742. [bug] Deleting all records at a node then adding a previously existing record, in a single UPDATE transaction, failed to leave / regenerate the @@ -1224,7 +1464,7 @@ 1740. [bug] Replace rbt's hash algorithm as it performed badly with certain zones. [RT #12729] - + NOTE: a hash context now needs to be established via isc_hash_create() if the application was not already doing this. @@ -1239,7 +1479,7 @@ 1736. [bug] dst_key_fromnamedfile() could fail to read a public key. [RT #12687] - + 1735. [bug] 'dig +sigtrace' could die with a REQUIRE failure. [RE #12688] @@ -1277,7 +1517,7 @@ [RT #12519] 1721. [bug] Error message from the journal processing were not - always identifing the relevent journal. [RT #12519] + always identifying the relevant journal. [RT #12519] 1720. [bug] 'dig +chase' did not terminate on a RFC 2308 Type 1 negative response. [RT #12506] @@ -1330,7 +1570,7 @@ 1703. [bug] named would loop sending NOTIFY messages when it failed to receive a response. [RT #12322] -1702. [bug] also-notify should not be applied to builtin zones. +1702. [bug] also-notify should not be applied to built in zones. [RT #12323] 1701. [doc] A minimal named.conf man page. @@ -1402,7 +1642,7 @@ 1675. [bug] named would sometimes add extra NSEC records to the authority section. - + 1674. [port] linux: increase buffer size used to scan /proc/net/if_inet6. @@ -1473,7 +1713,7 @@ 1648. [func] Update dnssec-lookaside named.conf syntax to support multiple dnssec-lookaside namespaces (not yet - implemented). + implemented). 1647. [bug] It was possible trigger a INSIST when chasing a DS record that required walking back over a empty node. @@ -1486,7 +1726,7 @@ masters with keys are specified. 1644. [bug] Update the journal modification time after a - sucessfull refresh query. [RT #11436] + successful refresh query. [RT #11436] 1643. [bug] dns_db_closeversion() could leak memory / node references. [RT #11163] @@ -1505,11 +1745,11 @@ 1638. [bug] "ixfr-from-differences" could generate a REQUIRE failure if the journal open failed. [RT #11347] - + 1637. [bug] Node reference leak on error in addnoqname(). 1636. [bug] The dump done callback could get ISC_R_SUCCESS even if - a error had occured. The database version no longer + a error had occurred. The database version no longer matched the version of the database that was dumped. 1635. [bug] Memory leak on error in query_addds(). @@ -1542,7 +1782,7 @@ 1625. [bug] named failed to load/transfer RFC2535 signed zones which contained CNAMES. [RT# 11237] -1606. [bug] DLV insecurity proof was failing. +1606. [bug] DLV insecurity proof was failing. 1605. [func] New dns_db_find() option DNS_DBFIND_COVERINGNSEC. @@ -1618,14 +1858,14 @@ 1604. [bug] A xfrout_ctx_create() failure would result in xfrout_ctx_destroy() being called with a partially initialized structure. - + 1603. [bug] nsupdate: set interactive based on isatty(). [RT# 10929] 1602. [bug] Logging to a file failed unless a size was specified. [RT# 10925] -1601. [bug] Silence spurious warning 'both "recursion no;" and +1601. [bug] Silence spurious warning 'both "recursion no;" and "allow-recursion" active' warning from view "_bind". [RT# 10920] @@ -1860,7 +2100,7 @@ type, class and responding nameserver. 1511. [bug] delegation-only was generating false positives - on negative answers from subzones. + on negative answers from sub-zones. 1510. [func] New view option "root-delegation-only". Apply delegation-only check to all TLDs and root. @@ -3568,7 +3808,7 @@ 954. [bug] When requesting AXFRs or IXFRs using dig, host, or nslookup, the RD bit should not be set as zone - transfers are inherently nonrecursive. [RT #1575] + transfers are inherently non-recursive. [RT #1575] 953. [func] The /var/run/named.key file from change #843 has been replaced by /etc/rndc.key. Both @@ -3841,7 +4081,7 @@ 860. [func] Drop cross class glue in zone transfers. 859. [bug] Cache cleaning now won't swamp the CPU if there - is a persistent overlimit condition. + is a persistent over limit condition. 858. [func] isc_mem_setwater() no longer requires that when the callback function is non-NULL then its hi_water @@ -4017,7 +4257,7 @@ 811. [bug] Parentheses were not quoted in zone dumps. [RT #1194] 810. [bug] The signer name in SIG records was not properly - downcased when signing/verifying records. [RT #1186] + down-cased when signing/verifying records. [RT #1186] 809. [bug] Configuring a non-local address as a transfer-source could cause an assertion failure during load. @@ -4029,9 +4269,9 @@ ignored like it should be. 806. [bug] DNS_R_SEENINCLUDE was failing to propagate back up - the calling stack to the zone maintence level, causing - zones to not reload when an included file was touched - but the top-level zone file was not. + the calling stack to the zone maintenance level, + causing zones to not reload when an included file was + touched but the top-level zone file was not. 805. [bug] When using "forward only", missing root hints should not cause queries to fail. [RT #1143] @@ -4071,7 +4311,7 @@ in rndc.conf. 793. [cleanup] The DNSSEC tools could create filenames that were - illegal or contained shell metacharacters. They + illegal or contained shell meta-characters. They now use a different text encoding of names that doesn't have these problems. [RT #1101] @@ -4095,7 +4335,7 @@ names when mapping them into file names. 786. [bug] When DNSSEC signing/verifying data, owner names were - not properly downcased. + not properly down-cased. 785. [bug] A race condition in the resolver could cause an assertion failure. [RT #673, #872, #1048] @@ -4114,7 +4354,7 @@ 780. [bug] Error handling code dealing with out of memory or other rare errors could lead to assertion failures - by calling functions on unitialized names. [RT #1065] + by calling functions on uninitialized names. [RT #1065] 779. [func] Added the "minimal-responses" option. @@ -4257,7 +4497,7 @@ 735. [doc] Add BIND 4 migration notes. 734. [bug] An attempt to re-lock the zone lock could occur if - the server was shutdown during a zone tranfer. + the server was shutdown during a zone transfer. [RT #830] 733. [bug] Reference counts of dns_acl_t objects need to be @@ -4397,7 +4637,7 @@ 688. [func] "make tags" now works on systems with the "Exuberant Ctags" etags. - 687. [bug] Only say we have IPv6, with sufficent functionality, + 687. [bug] Only say we have IPv6, with sufficient functionality, if it has actually been tested. [RT #586] 686. [bug] dig and nslookup can now be properly aborted during @@ -4713,7 +4953,7 @@ --- 9.1.0b1 released --- 591. [bug] Work around non-reentrancy in openssl by disabling - precomputation in keys. + pre-computation in keys. 590. [doc] There are now man pages for the lwres library in doc/man/lwres. @@ -4762,7 +5002,7 @@ source address for notify messages. 577. [func] Log illegal RDATA combinations. e.g. multiple - singlton types, cname and other data. + singleton types, cname and other data. 576. [doc] isc_log_create() description did not match reality. @@ -4773,7 +5013,7 @@ have their responses validated and would leak memory. 573. [bug] The journal files of IXFRed slave zones were - inadvertantly discarded on server reload, causing + inadvertently discarded on server reload, causing "journal out of sync with zone" errors on subsequent reloads. [RT #482] @@ -4938,7 +5178,7 @@ others). 519. [bug] dns_name_split() would improperly split some bitstring - labels, zeroing a few of the least signficant bits in + labels, zeroing a few of the least significant bits in the prefix part. When such an improperly created prefix was returned to the RBT database, the bogus label was dutifully stored, corrupting the tree. @@ -4966,7 +5206,7 @@ 513. [func] New functionality added to rdnc and server to allow individual zones to be refreshed or reloaded. - 512. [bug] The zone transfer code could throw an execption with + 512. [bug] The zone transfer code could throw an exception with an invalid IXFR stream. 511. [bug] The message code could throw an assertion on an @@ -5157,7 +5397,7 @@ 452. [bug] Warn if the unimplemented option "statistics-file" is specified in named.conf. [RT #301] - 451. [func] Update forwarding implememted. + 451. [func] Update forwarding implemented. 450. [func] New function ns_client_sendraw(). @@ -5258,7 +5498,7 @@ e.g. due to corrupt zones with multiple SOA records. [RT #279] - 423. [bug] When responding to a recusive query, errors that occur + 423. [bug] When responding to a recursive query, errors that occur after following a CNAME should cause the query to fail. [RT #274] @@ -5303,7 +5543,7 @@ 409. [bug] If named was shut down early in the startup process, ns_omapi_shutdown() would attempt to lock - an unintialized mutex. [RT #262] + an uninitialized mutex. [RT #262] 408. [bug] stub zones could leak memory and reference counts if all the masters were unreachable. @@ -5370,7 +5610,7 @@ making the functions dns_zone_adddbarg() and dns_zone_cleardbargs() unnecessary. - 389. [bug] Attempting to send a reqeust over IPv6 using + 389. [bug] Attempting to send a request over IPv6 using dns_request_create() on a system without IPv6 support caused an assertion failure [RT #235]. @@ -5427,7 +5667,7 @@ of a very large RRset could cause an assertion failure during logging. - 370. [bug] The error messages for rollforward failures were + 370. [bug] The error messages for roll-forward failures were overly terse. 369. [func] Support new named.conf options, view and zone @@ -5569,7 +5809,7 @@ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 04:33:33 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEA7A106566B; Sat, 10 Jan 2009 04:33:33 +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 CCC9B8FC08; Sat, 10 Jan 2009 04:33:33 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4XXjV079661; Sat, 10 Jan 2009 04:33:33 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4XXgI079660; Sat, 10 Jan 2009 04:33:33 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100433.n0A4XXgI079660@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187000 - stable/6/lib/bind/isc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:33:34 -0000 Author: dougb Date: Sat Jan 10 04:33:33 2009 New Revision: 187000 URL: http://svn.freebsd.org/changeset/base/187000 Log: Add the relevant object and include files for the update to 9.3.6-P1 Modified: stable/6/lib/bind/isc/Makefile Modified: stable/6/lib/bind/isc/Makefile ============================================================================== --- stable/6/lib/bind/isc/Makefile Sat Jan 10 04:30:27 2009 (r186999) +++ stable/6/lib/bind/isc/Makefile Sat Jan 10 04:33:33 2009 (r187000) @@ -30,7 +30,7 @@ SRCS+= inet_pton.c \ hash.c heap.c hex.c hmacmd5.c \ lex.c lfsr.c lib.c log.c md5.c \ mem.c mutexblock.c netaddr.c netscope.c ondestroy.c \ - parseint.c print.c quota.c random.c \ + parseint.c portset.c print.c quota.c random.c \ ratelimiter.c region.c result.c rwlock.c \ serial.c sha1.c sockaddr.c string.c strtoul.c \ symtab.c task.c taskpool.c timer.c version.c @@ -77,6 +77,7 @@ INCS= ${SRCDIR}/include/isc/app.h \ ${SRCDIR}/include/isc/ondestroy.h \ ${SRCDIR}/include/isc/os.h \ ${SRCDIR}/include/isc/parseint.h \ + ${SRCDIR}/include/isc/portset.h \ ${SRCDIR}/include/isc/print.h \ ${SRCDIR}/include/isc/quota.h \ ${SRCDIR}/include/isc/random.h \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 04:34:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 508961065673; Sat, 10 Jan 2009 04:34:20 +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 3D2BB8FC1D; Sat, 10 Jan 2009 04:34:20 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4YKto079715; Sat, 10 Jan 2009 04:34:20 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4YJYQ079711; Sat, 10 Jan 2009 04:34:19 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100434.n0A4YJYQ079711@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:34:19 +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: r187001 - in stable/6/lib/bind: . bind isc/isc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:34:21 -0000 Author: dougb Date: Sat Jan 10 04:34:19 2009 New Revision: 187001 URL: http://svn.freebsd.org/changeset/base/187001 Log: Substantive updates to generated files for 9.3.6-P1 Modified: stable/6/lib/bind/bind/config.h stable/6/lib/bind/bind/port_after.h stable/6/lib/bind/config.h stable/6/lib/bind/isc/isc/platform.h Modified: stable/6/lib/bind/bind/config.h ============================================================================== --- stable/6/lib/bind/bind/config.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/bind/config.h Sat Jan 10 04:34:19 2009 (r187001) @@ -1,6 +1,6 @@ /* $FreeBSD$ */ -/* config.h. Generated by configure. */ +/* config.h. Generated from config.h.in by configure. */ /* #undef _SOCKADDR_LEN */ #define HAVE_FCNTL_H 1 #define HAVE_PATHS_H 1 @@ -8,6 +8,7 @@ /* #undef HAVE_STROPTS_H */ #define HAVE_SYS_TIMERS_H 1 #define HAVE_SYS_SELECT_H 1 +#define HAVE_MEMORY_H 1 /* #undef SYS_CDEFS_H */ /* #undef _POSIX_PTHREAD_SEMANTICS */ /* #undef POSIX_GETPWUID_R */ @@ -16,14 +17,19 @@ /* #undef POSIX_GETGRNAM_R */ #define HAVE_MEMMOVE 1 #define HAVE_MEMCHR 1 +/* #undef SPRINTF_CHAR */ +/* #undef VSPRINTF_CHAR */ +#define USE_SYSERROR_LIST 1 +/* #undef NEED_STRTOUL */ +/* #undef NEED_SUN4PROTOS */ /* #undef NEED_SETGROUPENT */ /* #undef NEED_GETGROUPLIST */ /* define if prototype for getgrnam_r() is required */ -/* #undef NEED_GETGRNAM_R */ -/* #undef NEED_GETGRGID_R */ -/* #undef NEED_GETGRENT_R */ +/* #undef NEED_GETGRNAM_R */ +/* #undef NEED_GETGRGID_R */ +/* #undef NEED_GETGRENT_R */ #define NEED_SETGRENT_R 1 #define NEED_ENDGRENT_R 1 @@ -43,9 +49,10 @@ #define HAS_PW_CLASS 1 +/* #undef ssize_t */ /* #undef uintptr_t */ -/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ +/* Shut up warnings about sputaux in stdio.h on BSD/OS pre-4.1 */ /* #undef SHUTUP_SPUTAUX */ #ifdef SHUTUP_SPUTAUX struct __sFILE; Modified: stable/6/lib/bind/bind/port_after.h ============================================================================== --- stable/6/lib/bind/bind/port_after.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/bind/port_after.h Sat Jan 10 04:34:19 2009 (r187001) @@ -24,6 +24,10 @@ #undef NEED_DAEMON #undef NEED_STRSEP #undef NEED_STRERROR +#ifdef NEED_STRERROR +const char *isc_strerror(int); +#define strerror isc_strerror +#endif #define HAS_INET6_STRUCTS 1 #define HAVE_SIN6_SCOPE_ID 1 #undef NEED_IN6ADDR_ANY @@ -32,7 +36,6 @@ #undef NEED_GETTIMEOFDAY #undef HAVE_STRNDUP #undef USE_FIONBIO_IOCTL -#undef USE_SYSERROR_LIST #undef INNETGR_ARGS #undef SETNETGRENT_ARGS #define USE_IFNAMELINKID 1 @@ -421,4 +424,80 @@ setnetgrent_r(const char *netgroup, NGR_ NGR_R_SET_RETURN setnetgrent_r(const char *netgroup); #endif + +#ifdef NEED_STRTOUL +unsigned long strtoul(const char *, char **, int); +#endif + +#ifdef NEED_SUN4PROTOS +#include +#ifndef __SIZE_TYPE__ +#define __SIZE_TYPE__ int +#endif +struct sockaddr; +struct iovec; +struct timeval; +struct timezone; +int fprintf(FILE *, const char *, ...); +int getsockname(int, struct sockaddr *, int *); +int getpeername(int, struct sockaddr *, int *); +int socket(int, int, int); +int connect(int, const struct sockaddr *, int); +int writev(int, struct iovec *, int); +int readv(int, struct iovec *, int); +int send(int, const char *, int, int); +void bzero(char *, int); +int recvfrom(int, char *, int, int, struct sockaddr *, int *); +int syslog(int, const char *, ... ); +int printf(const char *, ...); +__SIZE_TYPE__ fread(void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +__SIZE_TYPE__ fwrite(const void *, __SIZE_TYPE__, __SIZE_TYPE__, FILE *); +int fclose(FILE *); +int ungetc(int, FILE *); +int scanf(const char *, ...); +int sscanf(const char *, const char *, ... ); +int tolower(int); +int toupper(int); +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, int); +int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +#ifdef gettimeofday +#undef gettimeofday +int gettimeofday(struct timeval *, struct timezone *); +#define gettimeofday isc__gettimeofday +#else +int gettimeofday(struct timeval *, struct timezone *); +#endif +long strtol(const char*, char **, int); +int fseek(FILE *, long, int); +int setsockopt(int, int, int, const char *, int); +int bind(int, const struct sockaddr *, int); +void bcopy(char *, char *, int); +int fputc(char, FILE *); +int listen(int, int); +int accept(int, struct sockaddr *, int *); +int getsockopt(int, int, int, char *, int *); +int vfprintf(FILE *, const char *, va_list); +int fflush(FILE *); +int fgetc(FILE *); +int fputs(const char *, FILE *); +int fchown(int, int, int); +void setbuf(FILE *, char *); +int gethostname(char *, int); +int rename(const char *, const char *); +time_t time(time_t *); +int fscanf(FILE *, const char *, ...); +int sscanf(const char *, const char *, ...); +int ioctl(int, int, caddr_t); +void perror(const char *); + +#if !defined(__USE_FIXED_PROTOTYPES__) && !defined(__cplusplus) && !defined(__STRICT_ANSI__) +/* + * 'gcc -ansi' changes the prototype for vsprintf(). + * Use this prototype when 'gcc -ansi' is not in effect. + */ +char *vsprintf(char *, const char *, va_list); +#endif +#endif + #endif Modified: stable/6/lib/bind/config.h ============================================================================== --- stable/6/lib/bind/config.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/config.h Sat Jan 10 04:34:19 2009 (r187001) @@ -156,6 +156,12 @@ int sigwait(const unsigned int *set, int /* Define if you cannot bind() before connect() for TCP sockets. */ /* #undef BROKEN_TCP_BIND_BEFORE_CONNECT */ +/* Solaris hack to get select_large_fdset. */ +/* #undef FD_SETSIZE */ + +/* Define to 1 if you have the `capset' function. */ +/* #undef HAVE_CAPSET */ + /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ @@ -207,6 +213,15 @@ int sigwait(const unsigned int *set, int /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_CAPABILITY_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DEVPOLL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_DYNTUNE_H */ + /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 @@ -283,7 +298,7 @@ int sigwait(const unsigned int *set, int /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus -#define inline +/* #undef inline */ #endif /* Define to `unsigned int' if does not define. */ Modified: stable/6/lib/bind/isc/isc/platform.h ============================================================================== --- stable/6/lib/bind/isc/isc/platform.h Sat Jan 10 04:33:33 2009 (r187000) +++ stable/6/lib/bind/isc/isc/platform.h Sat Jan 10 04:34:19 2009 (r187001) @@ -1,7 +1,7 @@ /* $FreeBSD$ */ /* - * Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC") + * Copyright (C) 2004, 2007, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1999-2003 Internet Software Consortium. * * Permission to use, copy, modify, and/or distribute this software for any @@ -17,7 +17,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: platform.h.in,v 1.24.2.1.10.13 2007/09/13 23:45:58 tbox Exp $ */ +/* $Id: platform.h.in,v 1.24.2.1.10.15 2008/06/25 23:45:37 tbox Exp $ */ #ifndef ISC_PLATFORM_H #define ISC_PLATFORM_H 1 @@ -144,6 +144,21 @@ *** Printing. ***/ +/*! \brief + * Define if the system supports kqueue multiplexing + */ +#define ISC_PLATFORM_HAVEKQUEUE 1 + +/*! \brief + * Define if the system supports epoll multiplexing + */ +#undef ISC_PLATFORM_HAVEEPOLL + +/*! \brief + * Define if the system supports /dev/poll multiplexing + */ +#undef ISC_PLATFORM_HAVEDEVPOLL + /* * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF * will be defined. From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 04:35:07 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A0C4E1065679; Sat, 10 Jan 2009 04:35:07 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 822638FC08; Sat, 10 Jan 2009 04:35:07 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 09 Jan 2009 20:06:33 -0800 Message-ID: <49681EC8.2040408@elischer.org> Date: Fri, 09 Jan 2009 20:06:32 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:35:08 -0000 Adrian Chadd wrote: > I wasn't even aware of the existance of this interface. I'll check it out. > > Thing is, this is a socket layer option, rather than what I've > committed which is a netinet layer option. > > Anyway, I'll check it out. I'm happy to fiddle with things if others' > would like it. > remember that the behaviour needs to last longer than the socket does.. once the socket is removed you should still be sending RSTs or whatever until the fin-wait2 (and other) states have wrapped up. so that is why I keep the info in teh inp. > > > Adrian > > 2009/1/9 Attila Nagy : >> Hello, >> >> Adrian Chadd wrote: >>> Author: adrian >>> Date: Fri Jan 9 16:02:19 2009 >>> New Revision: 186955 >>> URL: http://svn.freebsd.org/changeset/base/186955 >>> >>> Log: >>> Implement a new IP option (not compiled/enabled by default) to allow >>> applications to specify a non-local IP address when bind()'ing a socket >>> to a local endpoint. >>> This allows applications to spoof the client IP address of connections >>> if (obviously!) they somehow are able to receive the traffic normally >>> destined to said clients. >>> This patch doesn't include any changes to ipfw or the bridging code to >>> redirect the client traffic through the PCB checks so TCP gets a shot >>> at it. The normal behaviour is that packets with a non-local destination >>> IP address are not handled locally. This can be dealth with some IPFW >>> hackery; >>> modifications to IPFW to make this less hacky will occur in subsequent >>> commmits. >>> Thanks to Julian Elischer and others at Ironport. This work was >>> approved >>> and donated before Cisco acquired them. >>> Obtained from: Julian Elischer and others >>> MFC after: 2 weeks >>> >> Wouldn't it be better to implement existing interfaces for that? >> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b >> >> From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 04:35:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 015B91065674; Sat, 10 Jan 2009 04:35:13 +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 E36AE8FC14; Sat, 10 Jan 2009 04:35:12 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A4ZC6Z079773; Sat, 10 Jan 2009 04:35:12 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A4ZCLr079772; Sat, 10 Jan 2009 04:35:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901100435.n0A4ZCLr079772@svn.freebsd.org> From: Doug Barton Date: Sat, 10 Jan 2009 04:35:12 +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: r187002 - stable/6/usr.bin/nsupdate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 04:35:14 -0000 Author: dougb Date: Sat Jan 10 04:35:12 2009 New Revision: 187002 URL: http://svn.freebsd.org/changeset/base/187002 Log: In 9.3.6-P1 the man page has moved to section 1 Modified: stable/6/usr.bin/nsupdate/Makefile Modified: stable/6/usr.bin/nsupdate/Makefile ============================================================================== --- stable/6/usr.bin/nsupdate/Makefile Sat Jan 10 04:34:19 2009 (r187001) +++ stable/6/usr.bin/nsupdate/Makefile Sat Jan 10 04:35:12 2009 (r187002) @@ -17,7 +17,7 @@ CFLAGS+= -I${SRCDIR}/include DPADD+= ${BIND_DPADD} ${CRYPTO_DPADD} LDADD+= ${BIND_LDADD} ${CRYPTO_LDADD} -MAN= nsupdate.8 +MAN= nsupdate.1 MANFILTER= sed -e "s@/etc/named\.conf@/etc/namedb/named.conf@g" \ -e "s@^\.HP [0-9]* @@" From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 09:17:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2675D1065673; Sat, 10 Jan 2009 09:17:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 142288FC13; Sat, 10 Jan 2009 09:17:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0A9HGEc085307; Sat, 10 Jan 2009 09:17:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0A9HGVD085301; Sat, 10 Jan 2009 09:17:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901100917.n0A9HGVD085301@svn.freebsd.org> From: Robert Watson Date: Sat, 10 Jan 2009 09:17:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187014 - in head/sys/security: mac mac_biba mac_lomac mac_mls mac_stub mac_test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 09:17:17 -0000 Author: rwatson Date: Sat Jan 10 09:17:16 2009 New Revision: 187014 URL: http://svn.freebsd.org/changeset/base/187014 Log: Use MPC_OBJECT_IP6Q to indicate labeling of struct ip6q rather than MPC_OBJECT_IPQ; it was already defined, just not used. Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/security/mac/mac_inet6.c head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_mls/mac_mls.c head/sys/security/mac_stub/mac_stub.c head/sys/security/mac_test/mac_test.c Modified: head/sys/security/mac/mac_inet6.c ============================================================================== --- head/sys/security/mac/mac_inet6.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac/mac_inet6.c Sat Jan 10 09:17:16 2009 (r187014) @@ -80,7 +80,7 @@ int mac_ip6q_init(struct ip6q *q6, int flag) { - if (mac_labeled & MPC_OBJECT_IPQ) { + if (mac_labeled & MPC_OBJECT_IP6Q) { q6->ip6q_label = mac_ip6q_label_alloc(flag); if (q6->ip6q_label == NULL) return (ENOMEM); Modified: head/sys/security/mac_biba/mac_biba.c ============================================================================== --- head/sys/security/mac_biba/mac_biba.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_biba/mac_biba.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3553,6 +3553,7 @@ static struct mac_policy_ops mac_biba_op MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3060,6 +3060,7 @@ static struct mac_policy_ops lomac_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_mls/mac_mls.c ============================================================================== --- head/sys/security/mac_mls/mac_mls.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_mls/mac_mls.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3170,6 +3170,7 @@ static struct mac_policy_ops mls_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_stub/mac_stub.c ============================================================================== --- head/sys/security/mac_stub/mac_stub.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_stub/mac_stub.c Sat Jan 10 09:17:16 2009 (r187014) @@ -1808,6 +1808,7 @@ static struct mac_policy_ops stub_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ Modified: head/sys/security/mac_test/mac_test.c ============================================================================== --- head/sys/security/mac_test/mac_test.c Sat Jan 10 06:55:37 2009 (r187013) +++ head/sys/security/mac_test/mac_test.c Sat Jan 10 09:17:16 2009 (r187014) @@ -3147,6 +3147,7 @@ static struct mac_policy_ops test_ops = MPC_OBJECT_DEVFS | \ MPC_OBJECT_MBUF | \ MPC_OBJECT_IPQ | \ + MPC_OBJECT_IP6Q | \ MPC_OBJECT_IFNET | \ MPC_OBJECT_BPFDESC | \ MPC_OBJECT_PIPE | \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 09:28:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C34F0106566C; Sat, 10 Jan 2009 09:28:23 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id E57FA8FC0C; Sat, 10 Jan 2009 09:28:21 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 7F2FDA6E31; Sat, 10 Jan 2009 10:28:18 +0100 (CET) Message-ID: <49686A30.4000205@fsn.hu> Date: Sat, 10 Jan 2009 10:28:16 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> In-Reply-To: X-Stationery: 0.4.8.12 X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Sat, 10 Jan 2009 10:28:20 +0100 (CET) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 09:28:24 -0000 Hello, pf and relayd changes... http://marc.info/?l=openbsd-cvs&m=121030115209292&w=2 http://marc.info/?l=openbsd-cvs&m=121320866832670&w=2 (sorry, I don't know a better way to link to these changes, the commit logs contain the affected files and their log message, so they can be looked up in the cvsweb, or in the CVS via the dates) ...and divert-* in the pf.conf manual: http://www.openbsd.org/cgi-bin/man.cgi?query=pf.conf /divert-to/ /port/ Used to redirect packets to a local socket bound to /host/ and /port/. The packets will not be modified, so getsockname(2) on the socket will return the original destination address of the packet. /divert-reply/ Used to receive replies for sockets that are bound to addresses which are not local to the machine. See setsockopt(2) for informa- tion on how to bind these sockets. Adrian Chadd wrote: > Well, they can be used mostly interchangably - they socket option is > just implemented at a different layer. > > Porting should be a case of a simple #ifdef. :) > > I wonder what pf changes are needed.. > > > Adrian > > 2009/1/9 Attila Nagy : > >> Julian Elischer wrote: >> >>> Attila Nagy wrote: >>> >>>> Hello, >>>> >>>> Adrian Chadd wrote: >>>> >>>>> Author: adrian >>>>> Date: Fri Jan 9 16:02:19 2009 >>>>> New Revision: 186955 >>>>> URL: http://svn.freebsd.org/changeset/base/186955 >>>>> >>>>> Log: >>>>> Implement a new IP option (not compiled/enabled by default) to allow >>>>> applications to specify a non-local IP address when bind()'ing a socket >>>>> to a local endpoint. >>>>> This allows applications to spoof the client IP address of >>>>> connections >>>>> if (obviously!) they somehow are able to receive the traffic normally >>>>> destined to said clients. >>>>> This patch doesn't include any changes to ipfw or the bridging code >>>>> to >>>>> redirect the client traffic through the PCB checks so TCP gets a shot >>>>> at it. The normal behaviour is that packets with a non-local >>>>> destination >>>>> IP address are not handled locally. This can be dealth with some IPFW >>>>> hackery; >>>>> modifications to IPFW to make this less hacky will occur in subsequent >>>>> commmits. >>>>> Thanks to Julian Elischer and others at Ironport. This work was >>>>> approved >>>>> and donated before Cisco acquired them. >>>>> Obtained from: Julian Elischer and others >>>>> MFC after: 2 weeks >>>>> >>>>> >>>> Wouldn't it be better to implement existing interfaces for that? >>>> OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: >>>> http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b >>>> >>> good point >>> >> BTW, it also makes easier to port OpenBSD's relayd (and of course other >> applications relying on this). pf has some related changes there too, which >> helps programs to use this feature. >> >> > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 10:25:26 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27AB5106566C; Sat, 10 Jan 2009 10:25:26 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14F3E8FC0A; Sat, 10 Jan 2009 10:25:26 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AAPPVt086549; Sat, 10 Jan 2009 10:25:25 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AAPP5b086546; Sat, 10 Jan 2009 10:25:25 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101025.n0AAPP5b086546@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 10:25:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187015 - in stable/7: . tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:25:26 -0000 Author: antoine Date: Sat Jan 10 10:25:25 2009 New Revision: 187015 URL: http://svn.freebsd.org/changeset/base/187015 Log: MFC r183002 to stable/7: Add files to remove when WITHOUT_HESIOD is set. This fixes "make check-old" when WITH_HESIOD is set. PR: 122406 MFC after: 1 month Modified: stable/7/ObsoleteFiles.inc stable/7/tools/build/mk/OptionalObsoleteFiles.inc Modified: stable/7/ObsoleteFiles.inc ============================================================================== --- stable/7/ObsoleteFiles.inc Sat Jan 10 09:17:16 2009 (r187014) +++ stable/7/ObsoleteFiles.inc Sat Jan 10 10:25:25 2009 (r187015) @@ -3531,7 +3531,6 @@ OLD_FILES+=usr/games/worm OLD_FILES+=usr/games/worms OLD_FILES+=usr/games/wump OLD_FILES+=sbin/mount_reiserfs -OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/c++/3.4/ext/demangle.h OLD_FILES+=usr/include/cam/cam_extend.h OLD_FILES+=usr/include/dev/wi/wi_hostap.h @@ -3941,10 +3940,8 @@ OLD_FILES+=usr/share/doc/ntp/release.htm OLD_FILES+=usr/share/doc/ntp/tickadj.htm OLD_FILES+=usr/share/doc/papers/nqnfs.ascii.gz OLD_FILES+=usr/share/doc/papers/px.ascii.gz -OLD_FILES+=usr/share/man/man1/hesinfo.1.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -3959,7 +3956,6 @@ OLD_FILES+=usr/share/man/man3/setruneloc OLD_FILES+=usr/share/man/man3/setinvalidrune.3.gz OLD_FILES+=usr/share/man/man3/mbrune.3.gz OLD_FILES+=usr/share/man/man3/rune.3.gz -OLD_FILES+=usr/share/man/man3/hesiod.3.gz OLD_FILES+=usr/share/man/man3/mac_is_present_np.3.gz OLD_FILES+=usr/share/man/man3/fpsetsticky.3.gz OLD_FILES+=usr/share/man/man3/gss_krb5_copy_ccache.3.gz @@ -3975,7 +3971,6 @@ OLD_FILES+=usr/share/man/man3/setinvalid OLD_FILES+=usr/share/man/man3/fungetrune.3.gz OLD_FILES+=usr/share/man/man3/fputrune.3.gz OLD_FILES+=usr/share/man/man3/fgetrune.3.gz -OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz OLD_FILES+=usr/share/man/man5/usbd.conf.5.gz .if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64" OLD_FILES+=usr/share/man/man8/boot_i386.8.gz Modified: stable/7/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/7/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 10 09:17:16 2009 (r187014) +++ stable/7/tools/build/mk/OptionalObsoleteFiles.inc Sat Jan 10 10:25:25 2009 (r187015) @@ -402,9 +402,13 @@ OLD_FILES+=usr/share/man/man1/gcov.1.gz # to be filled in #.endif -#.if ${MK_HESIOD} == no -# to be filled in -#.endif +.if ${MK_HESIOD} == no +OLD_FILES+=usr/bin/hesinfo +OLD_FILES+=usr/include/hesiod.h +OLD_FILES+=usr/share/man/man1/hesinfo.1.gz +OLD_FILES+=usr/share/man/man3/hesiod.3.gz +OLD_FILES+=usr/share/man/man5/hesiod.conf.5.gz +.endif #.if ${MK_HTML} == no # to be filled in From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 10:28:43 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7B92106564A; Sat, 10 Jan 2009 10:28:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B03CC8FC13; Sat, 10 Jan 2009 10:28:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 4E6FD46B23; Sat, 10 Jan 2009 05:28:43 -0500 (EST) Date: Sat, 10 Jan 2009 10:28:43 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attila Nagy In-Reply-To: <49686A30.4000205@fsn.hu> Message-ID: References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:28:44 -0000 On Sat, 10 Jan 2009, Attila Nagy wrote: >> Well, they can be used mostly interchangably - they socket option is just >> implemented at a different layer. >> >> Porting should be a case of a simple #ifdef. :) > > I wonder what pf changes are needed.. I think Julian's analysis, that this is more of an inet option than a socket-layer option, seems more appropriate to me, the benefits of portability in adopting the API used by OpenBSD/BSDI/etc seem more compelling. We should make sure that, if we move to the socket option used on those systems, we block setting it on non-supporting protocols, or confusion will result. In particular, Adrian's change only modified IPv4, not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set the option. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 10:30:01 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11FE6106566C; Sat, 10 Jan 2009 10:30:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E00C78FC08; Sat, 10 Jan 2009 10:30:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 843AE46B32; Sat, 10 Jan 2009 05:30:00 -0500 (EST) Date: Sat, 10 Jan 2009 10:30:00 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <200901100041.n0A0fUp3073999@svn.freebsd.org> Message-ID: References: <200901100041.n0A0fUp3073999@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed 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: r186991 - stable/7/usr.sbin/powerd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:30:01 -0000 On Sat, 10 Jan 2009, Alexander Motin wrote: > Author: mav > Date: Sat Jan 10 00:41:30 2009 > New Revision: 186991 > URL: http://svn.freebsd.org/changeset/base/186991 > > Log: > Mark that powerd is completely merged. Thanks! This does make it a lot easier to inspect the merge history and look for missing merges. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 10:58:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E80A1065672; Sat, 10 Jan 2009 10:58:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDF3A8FC18; Sat, 10 Jan 2009 10:58:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AAwf7V095572; Sat, 10 Jan 2009 10:58:41 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AAwfVB095558; Sat, 10 Jan 2009 10:58:41 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901101058.n0AAwfVB095558@svn.freebsd.org> From: Robert Watson Date: Sat, 10 Jan 2009 10:58:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187016 - in head/sys/security: mac mac_biba mac_bsdextended mac_ifoff mac_lomac mac_mls mac_none mac_partition mac_portacl mac_seeotheruids mac_stub mac_test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 10:58:42 -0000 Author: rwatson Date: Sat Jan 10 10:58:41 2009 New Revision: 187016 URL: http://svn.freebsd.org/changeset/base/187016 Log: Rather than having MAC policies explicitly declare what object types they label, derive that information implicitly from the set of label initializers in their policy operations set. This avoids a possible class of programmer errors, while retaining the structure that allows us to avoid allocating labels for objects that don't need them. As before, we regenerate a global mask of labeled objects each time a policy is loaded or unloaded, stored in mac_labeled. Discussed with: csjp Suggested by: Jacques Vidrine Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Modified: head/sys/security/mac/mac_framework.c head/sys/security/mac/mac_internal.h head/sys/security/mac/mac_policy.h head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_ifoff/mac_ifoff.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_mls/mac_mls.c head/sys/security/mac_none/mac_none.c head/sys/security/mac_partition/mac_partition.c head/sys/security/mac_portacl/mac_portacl.c head/sys/security/mac_seeotheruids/mac_seeotheruids.c head/sys/security/mac_stub/mac_stub.c head/sys/security/mac_test/mac_test.c Modified: head/sys/security/mac/mac_framework.c ============================================================================== --- head/sys/security/mac/mac_framework.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac/mac_framework.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3,7 +3,7 @@ * Copyright (c) 2001 Ilmar S. Habibulin * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2005-2006 SPARTA, Inc. - * Copyright (c) 2008 Apple Inc. + * Copyright (c) 2008-2009 Apple Inc. * All rights reserved. * * This software was developed by Robert Watson and Ilmar Habibulin for the @@ -329,10 +329,48 @@ mac_late_init(void) } /* - * After the policy list has changed, walk the list to update any global - * flags. Currently, we support only one flag, and it's conditionally - * defined; as a result, the entire function is conditional. Eventually, the - * #else case might also iterate across the policies. + * Given a policy, derive from its set of non-NULL label init methods what + * object types the policy is interested in. + */ +static uint64_t +mac_policy_getlabeled(struct mac_policy_conf *mpc) +{ + uint64_t labeled; + +#define MPC_FLAG(method, flag) \ + if (mpc->mpc_ops->mpo_ ## method != NULL) \ + labeled |= (flag); \ + + labeled = 0; + MPC_FLAG(cred_init_label, MPC_OBJECT_CRED); + MPC_FLAG(proc_init_label, MPC_OBJECT_PROC); + MPC_FLAG(vnode_init_label, MPC_OBJECT_VNODE); + MPC_FLAG(inpcb_init_label, MPC_OBJECT_INPCB); + MPC_FLAG(socket_init_label, MPC_OBJECT_SOCKET); + MPC_FLAG(devfs_init_label, MPC_OBJECT_DEVFS); + MPC_FLAG(mbuf_init_label, MPC_OBJECT_MBUF); + MPC_FLAG(ipq_init_label, MPC_OBJECT_IPQ); + MPC_FLAG(ifnet_init_label, MPC_OBJECT_IFNET); + MPC_FLAG(bpfdesc_init_label, MPC_OBJECT_BPFDESC); + MPC_FLAG(pipe_init_label, MPC_OBJECT_PIPE); + MPC_FLAG(mount_init_label, MPC_OBJECT_MOUNT); + MPC_FLAG(posixsem_init_label, MPC_OBJECT_POSIXSEM); + MPC_FLAG(posixshm_init_label, MPC_OBJECT_POSIXSHM); + MPC_FLAG(sysvmsg_init_label, MPC_OBJECT_SYSVMSG); + MPC_FLAG(sysvmsq_init_label, MPC_OBJECT_SYSVMSQ); + MPC_FLAG(sysvsem_init_label, MPC_OBJECT_SYSVSEM); + MPC_FLAG(sysvshm_init_label, MPC_OBJECT_SYSVSHM); + MPC_FLAG(syncache_init_label, MPC_OBJECT_SYNCACHE); + MPC_FLAG(ip6q_init_label, MPC_OBJECT_IP6Q); + +#undef MPC_FLAG + return (labeled); +} + +/* + * When policies are loaded or unloaded, walk the list of registered policies + * and built mac_labeled, a bitmask representing the union of all objects + * requiring labels across all policies. */ static void mac_policy_updateflags(void) @@ -343,9 +381,9 @@ mac_policy_updateflags(void) mac_labeled = 0; LIST_FOREACH(mpc, &mac_static_policy_list, mpc_list) - mac_labeled |= mpc->mpc_labeled; + mac_labeled |= mac_policy_getlabeled(mpc); LIST_FOREACH(mpc, &mac_policy_list, mpc_list) - mac_labeled |= mpc->mpc_labeled; + mac_labeled |= mac_policy_getlabeled(mpc); } static int Modified: head/sys/security/mac/mac_internal.h ============================================================================== --- head/sys/security/mac/mac_internal.h Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac/mac_internal.h Sat Jan 10 10:58:41 2009 (r187016) @@ -4,6 +4,7 @@ * Copyright (c) 2001-2004 Networks Associates Technology, Inc. * Copyright (c) 2006 nCircle Network Security, Inc. * Copyright (c) 2006 SPARTA, Inc. + * Copyright (c) 2009 Apple, Inc. * All rights reserved. * * This software was developed by Robert Watson and Ilmar Habibulin for the @@ -83,6 +84,34 @@ struct label { intptr_t l_perpolicy[MAC_MAX_SLOTS]; }; + +/* + * Flags for mac_labeled, a bitmask of object types need across the union of + * all policies currently registered with the MAC Framework, used to key + * whether or not labels are allocated and constructors for the type are + * invoked. + */ +#define MPC_OBJECT_CRED 0x0000000000000001 +#define MPC_OBJECT_PROC 0x0000000000000002 +#define MPC_OBJECT_VNODE 0x0000000000000004 +#define MPC_OBJECT_INPCB 0x0000000000000008 +#define MPC_OBJECT_SOCKET 0x0000000000000010 +#define MPC_OBJECT_DEVFS 0x0000000000000020 +#define MPC_OBJECT_MBUF 0x0000000000000040 +#define MPC_OBJECT_IPQ 0x0000000000000080 +#define MPC_OBJECT_IFNET 0x0000000000000100 +#define MPC_OBJECT_BPFDESC 0x0000000000000200 +#define MPC_OBJECT_PIPE 0x0000000000000400 +#define MPC_OBJECT_MOUNT 0x0000000000000800 +#define MPC_OBJECT_POSIXSEM 0x0000000000001000 +#define MPC_OBJECT_POSIXSHM 0x0000000000002000 +#define MPC_OBJECT_SYSVMSG 0x0000000000004000 +#define MPC_OBJECT_SYSVMSQ 0x0000000000008000 +#define MPC_OBJECT_SYSVSEM 0x0000000000010000 +#define MPC_OBJECT_SYSVSHM 0x0000000000020000 +#define MPC_OBJECT_SYNCACHE 0x0000000000040000 +#define MPC_OBJECT_IP6Q 0x0000000000080000 + /* * MAC Framework global variables. */ Modified: head/sys/security/mac/mac_policy.h ============================================================================== --- head/sys/security/mac/mac_policy.h Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac/mac_policy.h Sat Jan 10 10:58:41 2009 (r187016) @@ -956,9 +956,9 @@ struct mac_policy_conf { int *mpc_field_off; /* security field */ int mpc_runtime_flags; /* flags */ int _mpc_spare1; /* Spare. */ - uint64_t mpc_labeled; /* Labeled objects. */ uint64_t _mpc_spare2; /* Spare. */ - void *_mpc_spare3; /* Spare. */ + uint64_t _mpc_spare3; /* Spare. */ + void *_mpc_spare4; /* Spare. */ LIST_ENTRY(mac_policy_conf) mpc_list; /* global list */ }; @@ -969,31 +969,6 @@ struct mac_policy_conf { /* Flags for the mpc_runtime_flags field. */ #define MPC_RUNTIME_FLAG_REGISTERED 0x00000001 -/* - * Flags for mpc_labeled declaring which objects should have labels allocated - * for them by the MAC Framework. - */ -#define MPC_OBJECT_CRED 0x0000000000000001 -#define MPC_OBJECT_PROC 0x0000000000000002 -#define MPC_OBJECT_VNODE 0x0000000000000004 -#define MPC_OBJECT_INPCB 0x0000000000000008 -#define MPC_OBJECT_SOCKET 0x0000000000000010 -#define MPC_OBJECT_DEVFS 0x0000000000000020 -#define MPC_OBJECT_MBUF 0x0000000000000040 -#define MPC_OBJECT_IPQ 0x0000000000000080 -#define MPC_OBJECT_IFNET 0x0000000000000100 -#define MPC_OBJECT_BPFDESC 0x0000000000000200 -#define MPC_OBJECT_PIPE 0x0000000000000400 -#define MPC_OBJECT_MOUNT 0x0000000000000800 -#define MPC_OBJECT_POSIXSEM 0x0000000000001000 -#define MPC_OBJECT_POSIXSHM 0x0000000000002000 -#define MPC_OBJECT_SYSVMSG 0x0000000000004000 -#define MPC_OBJECT_SYSVMSQ 0x0000000000008000 -#define MPC_OBJECT_SYSVSEM 0x0000000000010000 -#define MPC_OBJECT_SYSVSHM 0x0000000000020000 -#define MPC_OBJECT_SYNCACHE 0x0000000000040000 -#define MPC_OBJECT_IP6Q 0x0000000000080000 - /*- * The TrustedBSD MAC Framework has a major version number, MAC_VERSION, * which defines the ABI of the Framework present in the kernel (and depended @@ -1009,15 +984,13 @@ struct mac_policy_conf { */ #define MAC_VERSION 4 -#define MAC_POLICY_SET(mpops, mpname, mpfullname, mpflags, privdata_wanted, \ - labeled) \ +#define MAC_POLICY_SET(mpops, mpname, mpfullname, mpflags, privdata_wanted) \ static struct mac_policy_conf mpname##_mac_policy_conf = { \ .mpc_name = #mpname, \ .mpc_fullname = mpfullname, \ .mpc_ops = mpops, \ .mpc_loadtime_flags = mpflags, \ .mpc_field_off = privdata_wanted, \ - .mpc_labeled = labeled, \ }; \ static moduledata_t mpname##_mod = { \ #mpname, \ Modified: head/sys/security/mac_biba/mac_biba.c ============================================================================== --- head/sys/security/mac_biba/mac_biba.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_biba/mac_biba.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3545,26 +3545,5 @@ static struct mac_policy_ops mac_biba_op .mpo_vnode_setlabel_extattr = biba_vnode_setlabel_extattr, }; -#define BIBA_OBJECTS (MPC_OBJECT_CRED | \ - /* MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - /* MPC_OBJECT_POSIXSHM | */ \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&mac_biba_ops, mac_biba, "TrustedBSD MAC/Biba", - MPC_LOADTIME_FLAG_NOTLATE, &biba_slot, BIBA_OBJECTS); + MPC_LOADTIME_FLAG_NOTLATE, &biba_slot); Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- head/sys/security/mac_bsdextended/mac_bsdextended.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_bsdextended/mac_bsdextended.c Sat Jan 10 10:58:41 2009 (r187016) @@ -523,4 +523,4 @@ static struct mac_policy_ops ugidfw_ops }; MAC_POLICY_SET(&ugidfw_ops, mac_bsdextended, "TrustedBSD MAC/BSD Extended", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_ifoff/mac_ifoff.c ============================================================================== --- head/sys/security/mac_ifoff/mac_ifoff.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_ifoff/mac_ifoff.c Sat Jan 10 10:58:41 2009 (r187016) @@ -170,4 +170,4 @@ static struct mac_policy_ops ifoff_ops = }; MAC_POLICY_SET(&ifoff_ops, mac_ifoff, "TrustedBSD MAC/ifoff", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_lomac/mac_lomac.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3052,26 +3052,5 @@ static struct mac_policy_ops lomac_ops = .mpo_vnode_setlabel_extattr = lomac_vnode_setlabel_extattr, }; -#define LOMAC_OBJECTS (MPC_OBJECT_CRED | \ - /* MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - /* MPC_OBJECT_POSIXSEM | */ \ - /* MPC_OBJECT_POSIXSHM | */ \ - /* MPC_OBJECT_SYSVMSG | */ \ - /* MPC_OBJECT_SYSVMSQ | */ \ - /* MPC_OBJECT_SYSVSEM | */ \ - /* MPC_OBJECT_SYSVSHM | */ \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&lomac_ops, mac_lomac, "TrustedBSD MAC/LOMAC", - MPC_LOADTIME_FLAG_NOTLATE, &lomac_slot, LOMAC_OBJECTS); + MPC_LOADTIME_FLAG_NOTLATE, &lomac_slot); Modified: head/sys/security/mac_mls/mac_mls.c ============================================================================== --- head/sys/security/mac_mls/mac_mls.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_mls/mac_mls.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3162,26 +3162,5 @@ static struct mac_policy_ops mls_ops = .mpo_vnode_setlabel_extattr = mls_vnode_setlabel_extattr, }; -#define MLS_OBJECTS (MPC_OBJECT_CRED | \ - /* MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - /* MPC_OBJECT_POSIXSHM | */ \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&mls_ops, mac_mls, "TrustedBSD MAC/MLS", - MPC_LOADTIME_FLAG_NOTLATE, &mls_slot, MLS_OBJECTS); + MPC_LOADTIME_FLAG_NOTLATE, &mls_slot); Modified: head/sys/security/mac_none/mac_none.c ============================================================================== --- head/sys/security/mac_none/mac_none.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_none/mac_none.c Sat Jan 10 10:58:41 2009 (r187016) @@ -53,4 +53,4 @@ static struct mac_policy_ops none_ops = }; MAC_POLICY_SET(&none_ops, mac_none, "TrustedBSD MAC/None", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_partition/mac_partition.c ============================================================================== --- head/sys/security/mac_partition/mac_partition.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_partition/mac_partition.c Sat Jan 10 10:58:41 2009 (r187016) @@ -316,4 +316,4 @@ static struct mac_policy_ops partition_o }; MAC_POLICY_SET(&partition_ops, mac_partition, "TrustedBSD MAC/Partition", - MPC_LOADTIME_FLAG_UNLOADOK, &partition_slot, MPC_OBJECT_CRED); + MPC_LOADTIME_FLAG_UNLOADOK, &partition_slot); Modified: head/sys/security/mac_portacl/mac_portacl.c ============================================================================== --- head/sys/security/mac_portacl/mac_portacl.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_portacl/mac_portacl.c Sat Jan 10 10:58:41 2009 (r187016) @@ -490,4 +490,4 @@ static struct mac_policy_ops portacl_ops }; MAC_POLICY_SET(&portacl_ops, mac_portacl, "TrustedBSD MAC/portacl", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_seeotheruids/mac_seeotheruids.c ============================================================================== --- head/sys/security/mac_seeotheruids/mac_seeotheruids.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_seeotheruids/mac_seeotheruids.c Sat Jan 10 10:58:41 2009 (r187016) @@ -186,4 +186,4 @@ static struct mac_policy_ops seeotheruid }; MAC_POLICY_SET(&seeotheruids_ops, mac_seeotheruids, - "TrustedBSD MAC/seeotheruids", MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); + "TrustedBSD MAC/seeotheruids", MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_stub/mac_stub.c ============================================================================== --- head/sys/security/mac_stub/mac_stub.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_stub/mac_stub.c Sat Jan 10 10:58:41 2009 (r187016) @@ -1800,26 +1800,5 @@ static struct mac_policy_ops stub_ops = .mpo_vnode_setlabel_extattr = stub_vnode_setlabel_extattr, }; -#define STUB_OBJECTS (MPC_OBJECT_CRED | \ - /* XXX: MPC_OBJECT_PROC | */ \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - MPC_OBJECT_POSIXSHM | \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&stub_ops, mac_stub, "TrustedBSD MAC/Stub", - MPC_LOADTIME_FLAG_UNLOADOK, NULL, STUB_OBJECTS); + MPC_LOADTIME_FLAG_UNLOADOK, NULL); Modified: head/sys/security/mac_test/mac_test.c ============================================================================== --- head/sys/security/mac_test/mac_test.c Sat Jan 10 10:25:25 2009 (r187015) +++ head/sys/security/mac_test/mac_test.c Sat Jan 10 10:58:41 2009 (r187016) @@ -3139,26 +3139,5 @@ static struct mac_policy_ops test_ops = .mpo_vnode_setlabel_extattr = test_vnode_setlabel_extattr, }; -#define TEST_OBJECTS (MPC_OBJECT_CRED | \ - MPC_OBJECT_PROC | \ - MPC_OBJECT_VNODE | \ - MPC_OBJECT_INPCB | \ - MPC_OBJECT_SOCKET | \ - MPC_OBJECT_DEVFS | \ - MPC_OBJECT_MBUF | \ - MPC_OBJECT_IPQ | \ - MPC_OBJECT_IP6Q | \ - MPC_OBJECT_IFNET | \ - MPC_OBJECT_BPFDESC | \ - MPC_OBJECT_PIPE | \ - MPC_OBJECT_MOUNT | \ - MPC_OBJECT_POSIXSEM | \ - MPC_OBJECT_POSIXSHM | \ - MPC_OBJECT_SYSVMSG | \ - MPC_OBJECT_SYSVMSQ | \ - MPC_OBJECT_SYSVSEM | \ - MPC_OBJECT_SYSVSHM | \ - MPC_OBJECT_SYNCACHE) - MAC_POLICY_SET(&test_ops, mac_test, "TrustedBSD MAC/Test", - MPC_LOADTIME_FLAG_UNLOADOK, &test_slot, TEST_OBJECTS); + MPC_LOADTIME_FLAG_UNLOADOK, &test_slot); From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 11:45:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5C7D1065678; Sat, 10 Jan 2009 11:45:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91F2E8FC19; Sat, 10 Jan 2009 11:45:47 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ABjl10096428; Sat, 10 Jan 2009 11:45:47 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ABjlKg096426; Sat, 10 Jan 2009 11:45:47 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101145.n0ABjlKg096426@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 11:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187017 - in stable/7: contrib/telnet contrib/telnet/arpa include include/arpa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 11:45:48 -0000 Author: antoine Date: Sat Jan 10 11:45:47 2009 New Revision: 187017 URL: http://svn.freebsd.org/changeset/base/187017 Log: MFC r183004 to stable/7: Fix TELOPT(opt) when opt > TELOPT_TN3270E. PR: 127194 Submitted by: Joost Bekkers MFC after: 1 month Modified: stable/7/contrib/telnet/ (props changed) stable/7/contrib/telnet/arpa/telnet.h stable/7/include/ (props changed) stable/7/include/arpa/telnet.h Modified: stable/7/contrib/telnet/arpa/telnet.h ============================================================================== --- stable/7/contrib/telnet/arpa/telnet.h Sat Jan 10 10:58:41 2009 (r187016) +++ stable/7/contrib/telnet/arpa/telnet.h Sat Jan 10 11:45:47 2009 (r187017) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY Modified: stable/7/include/arpa/telnet.h ============================================================================== --- stable/7/include/arpa/telnet.h Sat Jan 10 10:58:41 2009 (r187016) +++ stable/7/include/arpa/telnet.h Sat Jan 10 11:45:47 2009 (r187017) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 12:39:13 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21277106573D; Sat, 10 Jan 2009 12:39:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0368FC1A; Sat, 10 Jan 2009 12:39:13 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ACdCCb097480; Sat, 10 Jan 2009 12:39:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ACdCDx097479; Sat, 10 Jan 2009 12:39:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901101239.n0ACdCDx097479@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 10 Jan 2009 12:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187018 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 12:39:14 -0000 Author: ru Date: Sat Jan 10 12:39:12 2009 New Revision: 187018 URL: http://svn.freebsd.org/changeset/base/187018 Log: Fix crash with "netstat -m -N foo". PR: bin/124724 MFC after: 3 days Modified: head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Sat Jan 10 11:45:47 2009 (r187017) +++ head/usr.bin/netstat/main.c Sat Jan 10 12:39:12 2009 (r187018) @@ -507,7 +507,7 @@ main(int argc, char *argv[]) exit(0); } if (mflag) { - if (memf != NULL) { + if (!live) { if (kread(0, NULL, 0) == 0) mbpr(kvmd, nl[N_MBSTAT].n_value); } else From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 12:47:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B333E1065675; Sat, 10 Jan 2009 12:47:22 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A15EE8FC08; Sat, 10 Jan 2009 12:47:22 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AClMBn097689; Sat, 10 Jan 2009 12:47:22 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AClMtO097688; Sat, 10 Jan 2009 12:47:22 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200901101247.n0AClMtO097688@svn.freebsd.org> From: Tom Rhodes Date: Sat, 10 Jan 2009 12:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187019 - head/usr.bin/csplit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 12:47:23 -0000 Author: trhodes Date: Sat Jan 10 12:47:22 2009 New Revision: 187019 URL: http://svn.freebsd.org/changeset/base/187019 Log: A bit of rewording for clarity, taken from OpenBSD. Submitted by: jmc@OpenBSD.org Modified: head/usr.bin/csplit/csplit.1 Modified: head/usr.bin/csplit/csplit.1 ============================================================================== --- head/usr.bin/csplit/csplit.1 Sat Jan 10 12:39:12 2009 (r187018) +++ head/usr.bin/csplit/csplit.1 Sat Jan 10 12:47:22 2009 (r187019) @@ -51,22 +51,39 @@ a dash .Nm reads from standard input. .Pp +Files are created with a prefix of +.Dq xx +and two decimal digits. +The size of each file is written to standard output +as it is created. +If an error occurs whilst files are being created, +or a +.Dv HUP , +.Dv INT , +or +.Dv TERM +signal is received, +all files previously written are removed. +.Pp The options are as follows: .Bl -tag -width indent .It Fl f Ar prefix -Give created files names beginning with -.Ar prefix . -The default is +Create file names beginning with +.Ar prefix , +instead of .Dq Pa xx . .It Fl k -Do not remove output files. +Do not remove previously created files if an error occurs or a +.Dv HUP , +.Dv INT , +or +.Dv TERM +signal is received. .It Fl n Ar number -Use +Create file names beginning with .Ar number -of decimal digits after the -.Ar prefix -to form the file name. -The default is 2. +of decimal digits after the prefix, +instead of 2. .It Fl s Do not write the size of each output file to standard output as it is created. From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 14:14:00 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5E31106564A; Sat, 10 Jan 2009 14:14:00 +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 C2D3F8FC17; Sat, 10 Jan 2009 14:14:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AEE0P8099375; Sat, 10 Jan 2009 14:14:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AEE0J3099373; Sat, 10 Jan 2009 14:14:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901101414.n0AEE0J3099373@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 14:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187020 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 14:14:01 -0000 Author: mav Date: Sat Jan 10 14:14:00 2009 New Revision: 187020 URL: http://svn.freebsd.org/changeset/base/187020 Log: Add one more bunch of controller and codec IDs. Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Sat Jan 10 12:47:22 2009 (r187019) +++ head/sys/dev/sound/pci/hda/hdac.c Sat Jan 10 14:14:00 2009 (r187020) @@ -149,6 +149,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) #define HDA_INTEL_82801J HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) +#define HDA_INTEL_PCH HDA_MODEL_CONSTRUCT(INTEL, 0x3b56) #define HDA_INTEL_SCH HDA_MODEL_CONSTRUCT(INTEL, 0x811b) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) @@ -178,6 +179,19 @@ SND_DECLARE_FILE("$FreeBSD$"); #define ATI_VENDORID 0x1002 #define HDA_ATI_SB450 HDA_MODEL_CONSTRUCT(ATI, 0x437b) #define HDA_ATI_SB600 HDA_MODEL_CONSTRUCT(ATI, 0x4383) +#define HDA_ATI_RS600 HDA_MODEL_CONSTRUCT(ATI, 0x793b) +#define HDA_ATI_RS690 HDA_MODEL_CONSTRUCT(ATI, 0x7919) +#define HDA_ATI_RS780 HDA_MODEL_CONSTRUCT(ATI, 0x960f) +#define HDA_ATI_R600 HDA_MODEL_CONSTRUCT(ATI, 0xaa00) +#define HDA_ATI_RV630 HDA_MODEL_CONSTRUCT(ATI, 0xaa08) +#define HDA_ATI_RV610 HDA_MODEL_CONSTRUCT(ATI, 0xaa10) +#define HDA_ATI_RV670 HDA_MODEL_CONSTRUCT(ATI, 0xaa18) +#define HDA_ATI_RV635 HDA_MODEL_CONSTRUCT(ATI, 0xaa20) +#define HDA_ATI_RV620 HDA_MODEL_CONSTRUCT(ATI, 0xaa28) +#define HDA_ATI_RV770 HDA_MODEL_CONSTRUCT(ATI, 0xaa30) +#define HDA_ATI_RV730 HDA_MODEL_CONSTRUCT(ATI, 0xaa38) +#define HDA_ATI_RV710 HDA_MODEL_CONSTRUCT(ATI, 0xaa40) +#define HDA_ATI_RV740 HDA_MODEL_CONSTRUCT(ATI, 0xaa48) #define HDA_ATI_ALL HDA_MODEL_CONSTRUCT(ATI, 0xffff) /* VIA */ @@ -469,6 +483,7 @@ static const struct { { HDA_INTEL_82801H, "Intel 82801H" }, { HDA_INTEL_82801I, "Intel 82801I" }, { HDA_INTEL_82801J, "Intel 82801J" }, + { HDA_INTEL_PCH, "Intel PCH" }, { HDA_INTEL_SCH, "Intel SCH" }, { HDA_NVIDIA_MCP51, "NVidia MCP51" }, { HDA_NVIDIA_MCP55, "NVidia MCP55" }, @@ -488,8 +503,20 @@ static const struct { { HDA_NVIDIA_MCP79_2, "NVidia MCP79" }, { HDA_NVIDIA_MCP79_3, "NVidia MCP79" }, { HDA_NVIDIA_MCP79_4, "NVidia MCP79" }, - { HDA_ATI_SB450, "ATI SB450" }, - { HDA_ATI_SB600, "ATI SB600" }, + { HDA_ATI_SB450, "ATI SB450" }, + { HDA_ATI_SB600, "ATI SB600" }, + { HDA_ATI_RS600, "ATI RS600" }, + { HDA_ATI_RS690, "ATI RS690" }, + { HDA_ATI_RS780, "ATI RS780" }, + { HDA_ATI_R600, "ATI R600" }, + { HDA_ATI_RV610, "ATI RV610" }, + { HDA_ATI_RV620, "ATI RV620" }, + { HDA_ATI_RV630, "ATI RV630" }, + { HDA_ATI_RV635, "ATI RV635" }, + { HDA_ATI_RV710, "ATI RV710" }, + { HDA_ATI_RV730, "ATI RV730" }, + { HDA_ATI_RV740, "ATI RV740" }, + { HDA_ATI_RV770, "ATI RV770" }, { HDA_VIA_VT82XX, "VIA VT8251/8237A" }, { HDA_SIS_966, "SiS 966" }, { HDA_ULI_M5461, "ULI M5461" }, @@ -671,6 +698,7 @@ static const struct { /* Silicon Image */ #define SII_VENDORID 0x1095 +#define HDA_CODEC_SII1390 HDA_CODEC_CONSTRUCT(SII, 0x1390) #define HDA_CODEC_SII1392 HDA_CODEC_CONSTRUCT(SII, 0x1392) #define HDA_CODEC_SIIXXXX HDA_CODEC_CONSTRUCT(SII, 0xffff) @@ -706,6 +734,22 @@ static const struct { #define HDA_CODEC_VT1708B_5 HDA_CODEC_CONSTRUCT(VIA, 0xe725) #define HDA_CODEC_VT1708B_6 HDA_CODEC_CONSTRUCT(VIA, 0xe726) #define HDA_CODEC_VT1708B_7 HDA_CODEC_CONSTRUCT(VIA, 0xe727) +#define HDA_CODEC_VT1708S_0 HDA_CODEC_CONSTRUCT(VIA, 0x0397) +#define HDA_CODEC_VT1708S_1 HDA_CODEC_CONSTRUCT(VIA, 0x1397) +#define HDA_CODEC_VT1708S_2 HDA_CODEC_CONSTRUCT(VIA, 0x2397) +#define HDA_CODEC_VT1708S_3 HDA_CODEC_CONSTRUCT(VIA, 0x3397) +#define HDA_CODEC_VT1708S_4 HDA_CODEC_CONSTRUCT(VIA, 0x4397) +#define HDA_CODEC_VT1708S_5 HDA_CODEC_CONSTRUCT(VIA, 0x5397) +#define HDA_CODEC_VT1708S_6 HDA_CODEC_CONSTRUCT(VIA, 0x6397) +#define HDA_CODEC_VT1708S_7 HDA_CODEC_CONSTRUCT(VIA, 0x7397) +#define HDA_CODEC_VT1702_0 HDA_CODEC_CONSTRUCT(VIA, 0x0398) +#define HDA_CODEC_VT1702_1 HDA_CODEC_CONSTRUCT(VIA, 0x1398) +#define HDA_CODEC_VT1702_2 HDA_CODEC_CONSTRUCT(VIA, 0x2398) +#define HDA_CODEC_VT1702_3 HDA_CODEC_CONSTRUCT(VIA, 0x3398) +#define HDA_CODEC_VT1702_4 HDA_CODEC_CONSTRUCT(VIA, 0x4398) +#define HDA_CODEC_VT1702_5 HDA_CODEC_CONSTRUCT(VIA, 0x5398) +#define HDA_CODEC_VT1702_6 HDA_CODEC_CONSTRUCT(VIA, 0x6398) +#define HDA_CODEC_VT1702_7 HDA_CODEC_CONSTRUCT(VIA, 0x7398) #define HDA_CODEC_VTXXXX HDA_CODEC_CONSTRUCT(VIA, 0xffff) /* ATI */ @@ -716,9 +760,16 @@ static const struct { #define HDA_CODEC_ATIXXXX HDA_CODEC_CONSTRUCT(ATI, 0xffff) /* NVIDIA */ +#define HDA_CODEC_NVIDIAMCP78 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0002) +#define HDA_CODEC_NVIDIAMCP7A HDA_CODEC_CONSTRUCT(NVIDIA, 0x0007) +#define HDA_CODEC_NVIDIAMCP67 HDA_CODEC_CONSTRUCT(NVIDIA, 0x0067) #define HDA_CODEC_NVIDIAXXXX HDA_CODEC_CONSTRUCT(NVIDIA, 0xffff) /* INTEL */ +#define HDA_CODEC_INTELG45_1 HDA_CODEC_CONSTRUCT(INTEL, 0x2801) +#define HDA_CODEC_INTELG45_2 HDA_CODEC_CONSTRUCT(INTEL, 0x2802) +#define HDA_CODEC_INTELG45_3 HDA_CODEC_CONSTRUCT(INTEL, 0x2803) +#define HDA_CODEC_INTELG45_4 HDA_CODEC_CONSTRUCT(INTEL, 0x29fb) #define HDA_CODEC_INTELXXXX HDA_CODEC_CONSTRUCT(INTEL, 0xffff) /* Codecs */ @@ -833,10 +884,34 @@ static const struct { { HDA_CODEC_VT1708B_5, "VIA VT1708B_5" }, { HDA_CODEC_VT1708B_6, "VIA VT1708B_6" }, { HDA_CODEC_VT1708B_7, "VIA VT1708B_7" }, + { HDA_CODEC_VT1708S_0, "VIA VT1708S_0" }, + { HDA_CODEC_VT1708S_1, "VIA VT1708S_1" }, + { HDA_CODEC_VT1708S_2, "VIA VT1708S_2" }, + { HDA_CODEC_VT1708S_3, "VIA VT1708S_3" }, + { HDA_CODEC_VT1708S_4, "VIA VT1708S_4" }, + { HDA_CODEC_VT1708S_5, "VIA VT1708S_5" }, + { HDA_CODEC_VT1708S_6, "VIA VT1708S_6" }, + { HDA_CODEC_VT1708S_7, "VIA VT1708S_7" }, + { HDA_CODEC_VT1702_0, "VIA VT1702_0" }, + { HDA_CODEC_VT1702_1, "VIA VT1702_1" }, + { HDA_CODEC_VT1702_2, "VIA VT1702_2" }, + { HDA_CODEC_VT1702_3, "VIA VT1702_3" }, + { HDA_CODEC_VT1702_4, "VIA VT1702_4" }, + { HDA_CODEC_VT1702_5, "VIA VT1702_5" }, + { HDA_CODEC_VT1702_6, "VIA VT1702_6" }, + { HDA_CODEC_VT1702_7, "VIA VT1702_7" }, { HDA_CODEC_ATIRS600_1,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS600_2,"ATI RS600 HDMI" }, { HDA_CODEC_ATIRS690, "ATI RS690/780 HDMI" }, { HDA_CODEC_ATIR6XX, "ATI R6xx HDMI" }, + { HDA_CODEC_NVIDIAMCP67, "NVidia MCP67 HDMI" }, + { HDA_CODEC_NVIDIAMCP78, "NVidia MCP78 HDMI" }, + { HDA_CODEC_NVIDIAMCP7A, "NVidia MCP7A HDMI" }, + { HDA_CODEC_INTELG45_1, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_2, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_3, "Intel G45 HDMI" }, + { HDA_CODEC_INTELG45_4, "Intel G45 HDMI" }, + { HDA_CODEC_SII1390, "Silicon Image SiI1390 HDMI" }, { HDA_CODEC_SII1392, "Silicon Image SiI1392 HDMI" }, /* Unknown codec */ { HDA_CODEC_ALCXXXX, "Realtek (Unknown)" }, From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 14:53:48 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F541065676; Sat, 10 Jan 2009 14:53:48 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F9DF8FC13; Sat, 10 Jan 2009 14:53:48 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AErmh1000266; Sat, 10 Jan 2009 14:53:48 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AErmLq000261; Sat, 10 Jan 2009 14:53:48 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200901101453.n0AErmLq000261@svn.freebsd.org> From: Robert Noland Date: Sat, 10 Jan 2009 14:53: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: r187021 - in stable/7/sys: . conf dev/drm modules/drm/i915 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 14:53:49 -0000 Author: rnoland Date: Sat Jan 10 14:53:47 2009 New Revision: 187021 URL: http://svn.freebsd.org/changeset/base/187021 Log: MFC most all of drm from HEAD. This brings in the following: Merged /head/sys:r182080,182467-182469,182883-182884,183573, 183603-183605,183828,183830-183834,184212-184213,184263, 184373-184375 - Support for latest Intel chips - Support and fixes for many AMD/ATI chips r500 and below - Support AMD/ATI IGP based chips (rs690/rs485) - Lots of code cleanups - Lots of other fixes and changes since the existing drm is 2+ years old Approved by: kib Added: stable/7/sys/dev/drm/drm_internal.h - copied unchanged from r182080, head/sys/dev/drm/drm_internal.h stable/7/sys/dev/drm/i915_suspend.c - copied, changed from r182080, head/sys/dev/drm/i915_suspend.c stable/7/sys/dev/drm/radeon_microcode.h - copied unchanged from r182080, head/sys/dev/drm/radeon_microcode.h Modified: stable/7/sys/ (props changed) stable/7/sys/conf/files stable/7/sys/dev/drm/ati_pcigart.c stable/7/sys/dev/drm/drm-subprocess.pl stable/7/sys/dev/drm/drm.h stable/7/sys/dev/drm/drmP.h stable/7/sys/dev/drm/drm_agpsupport.c stable/7/sys/dev/drm/drm_atomic.h stable/7/sys/dev/drm/drm_auth.c stable/7/sys/dev/drm/drm_bufs.c stable/7/sys/dev/drm/drm_context.c stable/7/sys/dev/drm/drm_dma.c stable/7/sys/dev/drm/drm_drawable.c stable/7/sys/dev/drm/drm_drv.c stable/7/sys/dev/drm/drm_fops.c stable/7/sys/dev/drm/drm_ioctl.c stable/7/sys/dev/drm/drm_irq.c stable/7/sys/dev/drm/drm_linux_list.h stable/7/sys/dev/drm/drm_lock.c stable/7/sys/dev/drm/drm_memory.c stable/7/sys/dev/drm/drm_pci.c stable/7/sys/dev/drm/drm_pciids.h stable/7/sys/dev/drm/drm_sarea.h stable/7/sys/dev/drm/drm_scatter.c stable/7/sys/dev/drm/drm_sysctl.c stable/7/sys/dev/drm/drm_vm.c stable/7/sys/dev/drm/i915_dma.c stable/7/sys/dev/drm/i915_drm.h stable/7/sys/dev/drm/i915_drv.c stable/7/sys/dev/drm/i915_drv.h stable/7/sys/dev/drm/i915_irq.c stable/7/sys/dev/drm/i915_mem.c stable/7/sys/dev/drm/mach64_dma.c stable/7/sys/dev/drm/mach64_drm.h stable/7/sys/dev/drm/mach64_drv.c stable/7/sys/dev/drm/mach64_drv.h stable/7/sys/dev/drm/mach64_irq.c stable/7/sys/dev/drm/mach64_state.c stable/7/sys/dev/drm/mga_dma.c stable/7/sys/dev/drm/mga_drm.h stable/7/sys/dev/drm/mga_drv.c stable/7/sys/dev/drm/mga_drv.h stable/7/sys/dev/drm/mga_irq.c stable/7/sys/dev/drm/mga_state.c stable/7/sys/dev/drm/mga_warp.c stable/7/sys/dev/drm/r128_cce.c stable/7/sys/dev/drm/r128_drm.h stable/7/sys/dev/drm/r128_drv.c stable/7/sys/dev/drm/r128_drv.h stable/7/sys/dev/drm/r128_irq.c stable/7/sys/dev/drm/r128_state.c stable/7/sys/dev/drm/r300_cmdbuf.c stable/7/sys/dev/drm/r300_reg.h stable/7/sys/dev/drm/radeon_cp.c stable/7/sys/dev/drm/radeon_drm.h stable/7/sys/dev/drm/radeon_drv.c stable/7/sys/dev/drm/radeon_drv.h stable/7/sys/dev/drm/radeon_irq.c stable/7/sys/dev/drm/radeon_mem.c stable/7/sys/dev/drm/radeon_state.c stable/7/sys/dev/drm/savage_bci.c stable/7/sys/dev/drm/savage_drm.h stable/7/sys/dev/drm/savage_drv.c stable/7/sys/dev/drm/savage_drv.h stable/7/sys/dev/drm/savage_state.c stable/7/sys/dev/drm/sis_drv.c stable/7/sys/dev/drm/sis_drv.h stable/7/sys/dev/drm/sis_mm.c stable/7/sys/dev/drm/tdfx_drv.c stable/7/sys/modules/drm/i915/Makefile Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/conf/files Sat Jan 10 14:53:47 2009 (r187021) @@ -576,6 +576,7 @@ dev/drm/i915_dma.c optional i915drm dev/drm/i915_drv.c optional i915drm dev/drm/i915_irq.c optional i915drm dev/drm/i915_mem.c optional i915drm +dev/drm/i915_suspend.c optional i915drm dev/drm/mach64_dma.c optional mach64drm dev/drm/mach64_drv.c optional mach64drm dev/drm/mach64_irq.c optional mach64drm Modified: stable/7/sys/dev/drm/ati_pcigart.c ============================================================================== --- stable/7/sys/dev/drm/ati_pcigart.c Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/dev/drm/ati_pcigart.c Sat Jan 10 14:53:47 2009 (r187021) @@ -1,6 +1,3 @@ -/* ati_pcigart.h -- ATI PCI GART support -*- linux-c -*- - * Created: Wed Dec 13 21:52:19 2000 by gareth@valinux.com - */ /*- * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. @@ -32,72 +29,194 @@ #include __FBSDID("$FreeBSD$"); +/** @file ati_pcigart.c + * Implementation of ATI's PCIGART, which provides an aperture in card virtual + * address space with addresses remapped to system memory. + */ + #include "dev/drm/drmP.h" #define ATI_PCIGART_PAGE_SIZE 4096 /* PCI GART page size */ -#define ATI_MAX_PCIGART_PAGES 8192 /* 32 MB aperture, 4K pages */ -#define ATI_PCIGART_TABLE_SIZE 32768 +#define ATI_PCIGART_PAGE_MASK (~(ATI_PCIGART_PAGE_SIZE-1)) + +#define ATI_PCIE_WRITE 0x4 +#define ATI_PCIE_READ 0x8 -int drm_ati_pcigart_init(drm_device_t *dev, drm_ati_pcigart_info *gart_info) +static void +drm_ati_alloc_pcigart_table_cb(void *arg, bus_dma_segment_t *segs, + int nsegs, int error) { - unsigned long pages; - u32 *pci_gart = NULL, page_base; - int i, j; + struct drm_dma_handle *dmah = arg; - if (dev->sg == NULL) { - DRM_ERROR( "no scatter/gather memory!\n" ); - return 0; + if (error != 0) + return; + + KASSERT(nsegs == 1, + ("drm_ati_alloc_pcigart_table_cb: bad dma segment count")); + + dmah->busaddr = segs[0].ds_addr; +} + +static int +drm_ati_alloc_pcigart_table(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) +{ + struct drm_dma_handle *dmah; + int flags, ret; + + dmah = malloc(sizeof(struct drm_dma_handle), DRM_MEM_DMA, + M_ZERO | M_NOWAIT); + if (dmah == NULL) + return ENOMEM; + + DRM_UNLOCK(); + ret = bus_dma_tag_create(NULL, PAGE_SIZE, 0, /* tag, align, boundary */ + gart_info->table_mask, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ + NULL, NULL, /* filtfunc, filtfuncargs */ + gart_info->table_size, 1, /* maxsize, nsegs */ + gart_info->table_size, /* maxsegsize */ + BUS_DMA_ALLOCNOW, NULL, NULL, /* flags, lockfunc, lockfuncargs */ + &dmah->tag); + if (ret != 0) { + free(dmah, DRM_MEM_DMA); + return ENOMEM; } - if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { - /* GART table in system memory */ - dev->sg->dmah = drm_pci_alloc(dev, ATI_PCIGART_TABLE_SIZE, 0, - 0xfffffffful); - if (dev->sg->dmah == NULL) { - DRM_ERROR("cannot allocate PCI GART table!\n"); - return 0; - } + flags = BUS_DMA_NOWAIT | BUS_DMA_ZERO; + if (gart_info->gart_reg_if == DRM_ATI_GART_IGP) + flags |= BUS_DMA_NOCACHE; - gart_info->addr = (void *)dev->sg->dmah->vaddr; - gart_info->bus_addr = dev->sg->dmah->busaddr; - pci_gart = (u32 *)dev->sg->dmah->vaddr; - } else { - /* GART table in framebuffer memory */ - pci_gart = gart_info->addr; + ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, flags, &dmah->map); + if (ret != 0) { + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + return ENOMEM; } - - pages = DRM_MIN(dev->sg->pages, ATI_MAX_PCIGART_PAGES); + DRM_LOCK(); - bzero(pci_gart, ATI_PCIGART_TABLE_SIZE); + ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, + gart_info->table_size, drm_ati_alloc_pcigart_table_cb, dmah, 0); + if (ret != 0) { + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + return ENOMEM; + } - KASSERT(PAGE_SIZE >= ATI_PCIGART_PAGE_SIZE, ("page size too small")); + dev->sg->dmah = dmah; - for ( i = 0 ; i < pages ; i++ ) { - page_base = (u32) dev->sg->busaddr[i]; + return 0; +} - for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { - if (gart_info->is_pcie) - *pci_gart = (cpu_to_le32(page_base) >> 8) | 0xc; - else - *pci_gart = cpu_to_le32(page_base); - pci_gart++; - page_base += ATI_PCIGART_PAGE_SIZE; - } +static void +drm_ati_free_pcigart_table(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) +{ + struct drm_dma_handle *dmah = dev->sg->dmah; + + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + dev->sg->dmah = NULL; +} + +int +drm_ati_pcigart_cleanup(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) +{ + /* we need to support large memory configurations */ + if (dev->sg == NULL) { + DRM_ERROR("no scatter/gather memory!\n"); + return 0; } - DRM_MEMORYBARRIER(); + if (gart_info->bus_addr) { + if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { + gart_info->bus_addr = 0; + if (dev->sg->dmah) + drm_ati_free_pcigart_table(dev, gart_info); + } + } return 1; } -int drm_ati_pcigart_cleanup(drm_device_t *dev, drm_ati_pcigart_info *gart_info) +int +drm_ati_pcigart_init(struct drm_device *dev, + struct drm_ati_pcigart_info *gart_info) { + void *address = NULL; + unsigned long pages; + u32 *pci_gart, page_base; + dma_addr_t bus_address = 0; + dma_addr_t entry_addr; + int i, j, ret = 0; + int max_pages; + + /* we need to support large memory configurations */ if (dev->sg == NULL) { - DRM_ERROR( "no scatter/gather memory!\n" ); - return 0; + DRM_ERROR("no scatter/gather memory!\n"); + goto done; } - drm_pci_free(dev, dev->sg->dmah); + if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { + DRM_DEBUG("PCI: no table in VRAM: using normal RAM\n"); - return 1; + ret = drm_ati_alloc_pcigart_table(dev, gart_info); + if (ret) { + DRM_ERROR("cannot allocate PCI GART page!\n"); + goto done; + } + + address = (void *)dev->sg->dmah->vaddr; + bus_address = dev->sg->dmah->busaddr; + } else { + address = gart_info->addr; + bus_address = gart_info->bus_addr; + DRM_DEBUG("PCI: Gart Table: VRAM %08X mapped at %08lX\n", + (unsigned int)bus_address, (unsigned long)address); + } + + pci_gart = (u32 *) address; + + max_pages = (gart_info->table_size / sizeof(u32)); + pages = (dev->sg->pages <= max_pages) + ? dev->sg->pages : max_pages; + + memset(pci_gart, 0, max_pages * sizeof(u32)); + + KASSERT(PAGE_SIZE >= ATI_PCIGART_PAGE_SIZE, ("page size too small")); + + for (i = 0; i < pages; i++) { + entry_addr = dev->sg->busaddr[i]; + for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) { + page_base = (u32) entry_addr & ATI_PCIGART_PAGE_MASK; + switch(gart_info->gart_reg_if) { + case DRM_ATI_GART_IGP: + page_base |= + (upper_32_bits(entry_addr) & 0xff) << 4; + page_base |= 0xc; + break; + case DRM_ATI_GART_PCIE: + page_base >>= 8; + page_base |= + (upper_32_bits(entry_addr) & 0xff) << 24; + page_base |= ATI_PCIE_READ | ATI_PCIE_WRITE; + break; + default: + case DRM_ATI_GART_PCI: + break; + } + *pci_gart = cpu_to_le32(page_base); + pci_gart++; + entry_addr += ATI_PCIGART_PAGE_SIZE; + } + } + + ret = 1; + + done: + gart_info->addr = address; + gart_info->bus_addr = bus_address; + return ret; } Modified: stable/7/sys/dev/drm/drm-subprocess.pl ============================================================================== --- stable/7/sys/dev/drm/drm-subprocess.pl Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/dev/drm/drm-subprocess.pl Sat Jan 10 14:53:47 2009 (r187021) @@ -37,6 +37,7 @@ while (<>) { s/#include "(.*)_drm.h/#include "dev\/drm\/\1_drm.h/; s/#include "mga_ucode.h/#include "dev\/drm\/mga_ucode.h/; s/#include "r300_reg.h/#include "dev\/drm\/r300_reg.h/; + s/#include "radeon_microcode.h/#include "dev\/drm\/radeon_microcode.h/; s/#include "sis_ds.h/#include "dev\/drm\/sis_ds.h/; s/#include "drm/#include "dev\/drm\/drm/; print; @@ -47,4 +48,4 @@ while (<>) { # if we never found the copyright header, then we're still a line behind. if (!$foundopening) { print $lastline; -} \ No newline at end of file +} Modified: stable/7/sys/dev/drm/drm.h ============================================================================== --- stable/7/sys/dev/drm/drm.h Sat Jan 10 14:14:00 2009 (r187020) +++ stable/7/sys/dev/drm/drm.h Sat Jan 10 14:53:47 2009 (r187021) @@ -64,6 +64,9 @@ __FBSDID("$FreeBSD$"); #ifndef __user #define __user #endif +#ifndef __iomem +#define __iomem +#endif #ifdef __GNUC__ # define DEPRECATED __attribute__ ((deprecated)) @@ -72,9 +75,6 @@ __FBSDID("$FreeBSD$"); #endif #if defined(__linux__) -#if defined(__KERNEL__) -#include -#endif #include /* For _IO* macros */ #define DRM_IOCTL_NR(n) _IOC_NR(n) #define DRM_IOC_VOID _IOC_NONE @@ -83,14 +83,7 @@ __FBSDID("$FreeBSD$"); #define DRM_IOC_READWRITE _IOC_READ|_IOC_WRITE #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(IN_MODULE) -/* Prevent name collision when including sys/ioccom.h */ -#undef ioctl -#include -#define ioctl(a,b,c) xf86ioctl(a,b,c) -#else #include -#endif /* __FreeBSD__ && xf86ioctl */ #define DRM_IOCTL_NR(n) ((n) & 0xff) #define DRM_IOC_VOID IOC_VOID #define DRM_IOC_READ IOC_OUT @@ -99,24 +92,6 @@ __FBSDID("$FreeBSD$"); #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size) #endif -#define XFREE86_VERSION(major,minor,patch,snap) \ - ((major << 16) | (minor << 8) | patch) - -#ifndef CONFIG_XFREE86_VERSION -#define CONFIG_XFREE86_VERSION XFREE86_VERSION(4,1,0,0) -#endif - -#if CONFIG_XFREE86_VERSION < XFREE86_VERSION(4,1,0,0) -#define DRM_PROC_DEVICES "/proc/devices" -#define DRM_PROC_MISC "/proc/misc" -#define DRM_PROC_DRM "/proc/drm" -#define DRM_DEV_DRM "/dev/drm" -#define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP) -#define DRM_DEV_UID 0 -#define DRM_DEV_GID 0 -#endif - -#if CONFIG_XFREE86_VERSION >= XFREE86_VERSION(4,1,0,0) #ifdef __OpenBSD__ #define DRM_MAJOR 81 #endif @@ -124,7 +99,7 @@ __FBSDID("$FreeBSD$"); #define DRM_MAJOR 226 #endif #define DRM_MAX_MINOR 15 -#endif + #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ #define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ @@ -139,6 +114,7 @@ __FBSDID("$FreeBSD$"); #if defined(__linux__) typedef unsigned int drm_handle_t; #else +#include typedef unsigned long drm_handle_t; /**< To mapped regions */ #endif typedef unsigned int drm_context_t; /**< GLXContext handle */ @@ -154,23 +130,23 @@ typedef unsigned int drm_magic_t; /**< M * \note KW: Actually it's illegal to change either for * backwards-compatibility reasons. */ -typedef struct drm_clip_rect { +struct drm_clip_rect { unsigned short x1; unsigned short y1; unsigned short x2; unsigned short y2; -} drm_clip_rect_t; +}; /** * Texture region, */ -typedef struct drm_tex_region { +struct drm_tex_region { unsigned char next; unsigned char prev; unsigned char in_use; unsigned char padding; unsigned int age; -} drm_tex_region_t; +}; /** * Hardware lock. @@ -179,10 +155,10 @@ typedef struct drm_tex_region { * processor bus contention on a multiprocessor system, there should not be any * other data stored in the same cache line. */ -typedef struct drm_hw_lock { +struct drm_hw_lock { __volatile__ unsigned int lock; /**< lock variable */ char padding[60]; /**< Pad to cache line */ -} drm_hw_lock_t; +}; /* This is beyond ugly, and only works on GCC. However, it allows me to use * drm.h in places (i.e., in the X-server) where I can't use size_t. The real @@ -205,7 +181,7 @@ typedef struct drm_hw_lock { * * \sa drmGetVersion(). */ -typedef struct drm_version { +struct drm_version { int version_major; /**< Major version */ int version_minor; /**< Minor version */ int version_patchlevel; /**< Patch level */ @@ -215,35 +191,35 @@ typedef struct drm_version { char __user *date; /**< User-space buffer to hold date */ DRM_SIZE_T desc_len; /**< Length of desc buffer */ char __user *desc; /**< User-space buffer to hold desc */ -} drm_version_t; +}; /** * DRM_IOCTL_GET_UNIQUE ioctl argument type. * * \sa drmGetBusid() and drmSetBusId(). */ -typedef struct drm_unique { +struct drm_unique { DRM_SIZE_T unique_len; /**< Length of unique */ char __user *unique; /**< Unique name for driver instantiation */ -} drm_unique_t; +}; #undef DRM_SIZE_T -typedef struct drm_list { +struct drm_list { int count; /**< Length of user-space structures */ - drm_version_t __user *version; -} drm_list_t; + struct drm_version __user *version; +}; -typedef struct drm_block { +struct drm_block { int unused; -} drm_block_t; +}; /** * DRM_IOCTL_CONTROL ioctl argument type. * * \sa drmCtlInstHandler() and drmCtlUninstHandler(). */ -typedef struct drm_control { +struct drm_control { enum { DRM_ADD_COMMAND, DRM_RM_COMMAND, @@ -251,37 +227,39 @@ typedef struct drm_control { DRM_UNINST_HANDLER } func; int irq; -} drm_control_t; +}; /** * Type of memory to map. */ -typedef enum drm_map_type { +enum drm_map_type { _DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */ _DRM_REGISTERS = 1, /**< no caching, no core dump */ _DRM_SHM = 2, /**< shared, cached */ _DRM_AGP = 3, /**< AGP/GART */ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ - _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ -} drm_map_type_t; + _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */ + _DRM_TTM = 6 +}; /** * Memory mapping flags. */ -typedef enum drm_map_flags { +enum drm_map_flags { _DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */ _DRM_READ_ONLY = 0x02, _DRM_LOCKED = 0x04, /**< shared, cached, locked */ _DRM_KERNEL = 0x08, /**< kernel requires access */ _DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */ _DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */ - _DRM_REMOVABLE = 0x40 /**< Removable mapping */ -} drm_map_flags_t; + _DRM_REMOVABLE = 0x40, /**< Removable mapping */ + _DRM_DRIVER = 0x80 /**< Managed by driver */ +}; -typedef struct drm_ctx_priv_map { +struct drm_ctx_priv_map { unsigned int ctx_id; /**< Context requesting private mapping */ void *handle; /**< Handle of map */ -} drm_ctx_priv_map_t; +}; /** * DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls @@ -289,30 +267,30 @@ typedef struct drm_ctx_priv_map { * * \sa drmAddMap(). */ -typedef struct drm_map { +struct drm_map { unsigned long offset; /**< Requested physical address (0 for SAREA)*/ unsigned long size; /**< Requested physical size (bytes) */ - drm_map_type_t type; /**< Type of memory to map */ - drm_map_flags_t flags; /**< Flags */ + enum drm_map_type type; /**< Type of memory to map */ + enum drm_map_flags flags; /**< Flags */ void *handle; /**< User-space: "Handle" to pass to mmap() */ /**< Kernel-space: kernel-virtual address */ int mtrr; /**< MTRR slot used */ /* Private data */ -} drm_map_t; +}; /** * DRM_IOCTL_GET_CLIENT ioctl argument type. */ -typedef struct drm_client { +struct drm_client { int idx; /**< Which client desired? */ int auth; /**< Is client authenticated? */ unsigned long pid; /**< Process ID */ unsigned long uid; /**< User ID */ unsigned long magic; /**< Magic */ unsigned long iocs; /**< Ioctl count */ -} drm_client_t; +}; -typedef enum { +enum drm_stat_type { _DRM_STAT_LOCK, _DRM_STAT_OPENS, _DRM_STAT_CLOSES, @@ -330,23 +308,23 @@ typedef enum { _DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */ _DRM_STAT_MISSED /**< Missed DMA opportunity */ /* Add to the *END* of the list */ -} drm_stat_type_t; +}; /** * DRM_IOCTL_GET_STATS ioctl argument type. */ -typedef struct drm_stats { +struct drm_stats { unsigned long count; struct { unsigned long value; - drm_stat_type_t type; + enum drm_stat_type type; } data[15]; -} drm_stats_t; +}; /** * Hardware locking flags. */ -typedef enum drm_lock_flags { +enum drm_lock_flags { _DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */ _DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */ _DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */ @@ -356,17 +334,17 @@ typedef enum drm_lock_flags { full-screen DGA-like mode. */ _DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */ _DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */ -} drm_lock_flags_t; +}; /** * DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type. * * \sa drmGetLock() and drmUnlock(). */ -typedef struct drm_lock { +struct drm_lock { int context; - drm_lock_flags_t flags; -} drm_lock_t; + enum drm_lock_flags flags; +}; /** * DMA flags @@ -376,7 +354,7 @@ typedef struct drm_lock { * * \sa drm_dma. */ -typedef enum drm_dma_flags { +enum drm_dma_flags { /* Flags for DMA buffer dispatch */ _DRM_DMA_BLOCK = 0x01, /**< * Block until buffer dispatched. @@ -395,14 +373,14 @@ typedef enum drm_dma_flags { _DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */ _DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */ _DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */ -} drm_dma_flags_t; +}; /** * DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type. * * \sa drmAddBufs(). */ -typedef struct drm_buf_desc { +struct drm_buf_desc { int count; /**< Number of buffers of this size */ int size; /**< Size in bytes */ int low_mark; /**< Low water mark */ @@ -411,54 +389,55 @@ typedef struct drm_buf_desc { _DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */ _DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */ _DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */ - _DRM_FB_BUFFER = 0x08 /**< Buffer is in frame buffer */ + _DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */ + _DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */ } flags; unsigned long agp_start; /**< * Start address of where the AGP buffers are * in the AGP aperture */ -} drm_buf_desc_t; +}; /** * DRM_IOCTL_INFO_BUFS ioctl argument type. */ -typedef struct drm_buf_info { +struct drm_buf_info { int count; /**< Number of buffers described in list */ - drm_buf_desc_t __user *list; /**< List of buffer descriptions */ -} drm_buf_info_t; + struct drm_buf_desc __user *list; /**< List of buffer descriptions */ +}; /** * DRM_IOCTL_FREE_BUFS ioctl argument type. */ -typedef struct drm_buf_free { +struct drm_buf_free { int count; int __user *list; -} drm_buf_free_t; +}; /** * Buffer information * * \sa drm_buf_map. */ -typedef struct drm_buf_pub { +struct drm_buf_pub { int idx; /**< Index into the master buffer list */ int total; /**< Buffer size */ int used; /**< Amount of buffer in use (for DMA) */ void __user *address; /**< Address of buffer */ -} drm_buf_pub_t; +}; /** * DRM_IOCTL_MAP_BUFS ioctl argument type. */ -typedef struct drm_buf_map { +struct drm_buf_map { int count; /**< Length of the buffer list */ #if defined(__cplusplus) void __user *c_virtual; #else void __user *virtual; /**< Mmap'd area in user-virtual */ #endif - drm_buf_pub_t __user *list; /**< Buffer information */ -} drm_buf_map_t; + struct drm_buf_pub __user *list; /**< Buffer information */ +}; /** * DRM_IOCTL_DMA ioctl argument type. @@ -467,84 +446,103 @@ typedef struct drm_buf_map { * * \sa drmDMA(). */ -typedef struct drm_dma { +struct drm_dma { int context; /**< Context handle */ int send_count; /**< Number of buffers to send */ int __user *send_indices; /**< List of handles to buffers */ int __user *send_sizes; /**< Lengths of data to send */ - drm_dma_flags_t flags; /**< Flags */ + enum drm_dma_flags flags; /**< Flags */ int request_count; /**< Number of buffers requested */ int request_size; /**< Desired size for buffers */ int __user *request_indices; /**< Buffer information */ int __user *request_sizes; int granted_count; /**< Number of buffers granted */ -} drm_dma_t; +}; -typedef enum { +enum drm_ctx_flags { _DRM_CONTEXT_PRESERVED = 0x01, _DRM_CONTEXT_2DONLY = 0x02 -} drm_ctx_flags_t; +}; /** * DRM_IOCTL_ADD_CTX ioctl argument type. * * \sa drmCreateContext() and drmDestroyContext(). */ -typedef struct drm_ctx { +struct drm_ctx { drm_context_t handle; - drm_ctx_flags_t flags; -} drm_ctx_t; + enum drm_ctx_flags flags; +}; /** * DRM_IOCTL_RES_CTX ioctl argument type. */ -typedef struct drm_ctx_res { +struct drm_ctx_res { int count; - drm_ctx_t __user *contexts; -} drm_ctx_res_t; + struct drm_ctx __user *contexts; +}; /** * DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type. */ -typedef struct drm_draw { +struct drm_draw { drm_drawable_t handle; -} drm_draw_t; +}; + +/** + * DRM_IOCTL_UPDATE_DRAW ioctl argument type. + */ +typedef enum { + DRM_DRAWABLE_CLIPRECTS, +} drm_drawable_info_type_t; + +struct drm_update_draw { + drm_drawable_t handle; + unsigned int type; + unsigned int num; + unsigned long long data; +}; /** * DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type. */ -typedef struct drm_auth { +struct drm_auth { drm_magic_t magic; -} drm_auth_t; +}; /** * DRM_IOCTL_IRQ_BUSID ioctl argument type. * * \sa drmGetInterruptFromBusID(). */ -typedef struct drm_irq_busid { +struct drm_irq_busid { int irq; /**< IRQ number */ int busnum; /**< bus number */ int devnum; /**< device number */ int funcnum; /**< function number */ -} drm_irq_busid_t; +}; -typedef enum { +enum drm_vblank_seq_type { _DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */ _DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */ + _DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */ + _DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */ + _DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */ _DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking */ -} drm_vblank_seq_type_t; +}; -#define _DRM_VBLANK_FLAGS_MASK _DRM_VBLANK_SIGNAL +#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) +#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | \ + _DRM_VBLANK_NEXTONMISS) struct drm_wait_vblank_request { - drm_vblank_seq_type_t type; + enum drm_vblank_seq_type type; unsigned int sequence; unsigned long signal; }; struct drm_wait_vblank_reply { - drm_vblank_seq_type_t type; + enum drm_vblank_seq_type type; unsigned int sequence; long tval_sec; long tval_usec; @@ -555,41 +553,55 @@ struct drm_wait_vblank_reply { * * \sa drmWaitVBlank(). */ -typedef union drm_wait_vblank { +union drm_wait_vblank { struct drm_wait_vblank_request request; struct drm_wait_vblank_reply reply; -} drm_wait_vblank_t; +}; + + +#define _DRM_PRE_MODESET 1 +#define _DRM_POST_MODESET 2 + +/** + * DRM_IOCTL_MODESET_CTL ioctl argument type + * + * \sa drmModesetCtl(). + */ +struct drm_modeset_ctl { + uint32_t crtc; + uint32_t cmd; +}; /** * DRM_IOCTL_AGP_ENABLE ioctl argument type. * * \sa drmAgpEnable(). */ -typedef struct drm_agp_mode { +struct drm_agp_mode { unsigned long mode; /**< AGP mode */ -} drm_agp_mode_t; +}; /** * DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type. * * \sa drmAgpAlloc() and drmAgpFree(). */ -typedef struct drm_agp_buffer { +struct drm_agp_buffer { unsigned long size; /**< In bytes -- will round to page boundary */ unsigned long handle; /**< Used for binding / unbinding */ unsigned long type; /**< Type of memory to allocate */ unsigned long physical; /**< Physical used by i810 */ -} drm_agp_buffer_t; +}; /** * DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type. * * \sa drmAgpBind() and drmAgpUnbind(). */ -typedef struct drm_agp_binding { +struct drm_agp_binding { unsigned long handle; /**< From drm_agp_buffer */ unsigned long offset; /**< In bytes -- will round to page boundary */ -} drm_agp_binding_t; +}; /** * DRM_IOCTL_AGP_INFO ioctl argument type. @@ -598,7 +610,7 @@ typedef struct drm_agp_binding { * drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(), * drmAgpVendorId() and drmAgpDeviceId(). */ -typedef struct drm_agp_info { +struct drm_agp_info { int agp_version_major; int agp_version_minor; unsigned long mode; @@ -612,25 +624,368 @@ typedef struct drm_agp_info { unsigned short id_vendor; unsigned short id_device; /*@} */ -} drm_agp_info_t; +}; /** * DRM_IOCTL_SG_ALLOC ioctl argument type. */ -typedef struct drm_scatter_gather { +struct drm_scatter_gather { unsigned long size; /**< In bytes -- will round to page boundary */ unsigned long handle; /**< Used for mapping / unmapping */ -} drm_scatter_gather_t; +}; /** * DRM_IOCTL_SET_VERSION ioctl argument type. */ -typedef struct drm_set_version { +struct drm_set_version { int drm_di_major; int drm_di_minor; int drm_dd_major; int drm_dd_minor; -} drm_set_version_t; +}; + + +#define DRM_FENCE_FLAG_EMIT 0x00000001 +#define DRM_FENCE_FLAG_SHAREABLE 0x00000002 +/** + * On hardware with no interrupt events for operation completion, + * indicates that the kernel should sleep while waiting for any blocking + * operation to complete rather than spinning. + * + * Has no effect otherwise. + */ +#define DRM_FENCE_FLAG_WAIT_LAZY 0x00000004 +#define DRM_FENCE_FLAG_NO_USER 0x00000010 + +/* Reserved for driver use */ +#define DRM_FENCE_MASK_DRIVER 0xFF000000 + +#define DRM_FENCE_TYPE_EXE 0x00000001 + +struct drm_fence_arg { + unsigned int handle; + unsigned int fence_class; + unsigned int type; + unsigned int flags; + unsigned int signaled; + unsigned int error; + unsigned int sequence; + unsigned int pad64; + uint64_t expand_pad[2]; /*Future expansion */ +}; + +/* Buffer permissions, referring to how the GPU uses the buffers. + * these translate to fence types used for the buffers. + * Typically a texture buffer is read, A destination buffer is write and + * a command (batch-) buffer is exe. Can be or-ed together. + */ + +#define DRM_BO_FLAG_READ (1ULL << 0) +#define DRM_BO_FLAG_WRITE (1ULL << 1) +#define DRM_BO_FLAG_EXE (1ULL << 2) + +/* + * All of the bits related to access mode + */ +#define DRM_BO_MASK_ACCESS (DRM_BO_FLAG_READ | DRM_BO_FLAG_WRITE | DRM_BO_FLAG_EXE) +/* + * Status flags. Can be read to determine the actual state of a buffer. + * Can also be set in the buffer mask before validation. + */ + +/* + * Mask: Never evict this buffer. Not even with force. This type of buffer is only + * available to root and must be manually removed before buffer manager shutdown + * or lock. + * Flags: Acknowledge + */ +#define DRM_BO_FLAG_NO_EVICT (1ULL << 4) + +/* + * Mask: Require that the buffer is placed in mappable memory when validated. + * If not set the buffer may or may not be in mappable memory when validated. + * Flags: If set, the buffer is in mappable memory. + */ +#define DRM_BO_FLAG_MAPPABLE (1ULL << 5) + +/* Mask: The buffer should be shareable with other processes. + * Flags: The buffer is shareable with other processes. + */ +#define DRM_BO_FLAG_SHAREABLE (1ULL << 6) + +/* Mask: If set, place the buffer in cache-coherent memory if available. + * If clear, never place the buffer in cache coherent memory if validated. + * Flags: The buffer is currently in cache-coherent memory. + */ +#define DRM_BO_FLAG_CACHED (1ULL << 7) + +/* Mask: Make sure that every time this buffer is validated, + * it ends up on the same location provided that the memory mask is the same. + * The buffer will also not be evicted when claiming space for + * other buffers. Basically a pinned buffer but it may be thrown out as + * part of buffer manager shutdown or locking. + * Flags: Acknowledge. + */ +#define DRM_BO_FLAG_NO_MOVE (1ULL << 8) + +/* Mask: Make sure the buffer is in cached memory when mapped. In conjunction + * with DRM_BO_FLAG_CACHED it also allows the buffer to be bound into the GART + * with unsnooped PTEs instead of snooped, by using chipset-specific cache + * flushing at bind time. A better name might be DRM_BO_FLAG_TT_UNSNOOPED, + * as the eviction to local memory (TTM unbind) on map is just a side effect + * to prevent aggressive cache prefetch from the GPU disturbing the cache + * management that the DRM is doing. + * *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 16:01:21 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5443A1065673; Sat, 10 Jan 2009 16:01:21 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D5838FC20; Sat, 10 Jan 2009 16:01:21 +0000 (UTC) (envelope-from danger@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AG1LDd002522; Sat, 10 Jan 2009 16:01:21 GMT (envelope-from danger@svn.freebsd.org) Received: (from danger@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AG1KkC002515; Sat, 10 Jan 2009 16:01:20 GMT (envelope-from danger@svn.freebsd.org) Message-Id: <200901101601.n0AG1KkC002515@svn.freebsd.org> From: Daniel Gerzo Date: Sat, 10 Jan 2009 16:01:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187022 - in stable/7: bin bin/chio bin/cp bin/sh bin/test sbin sbin/atacontrol sbin/ddb sbin/devfs sbin/dhclient sbin/fdisk sbin/fsck_ffs sbin/geom sbin/geom/class/part sbin/geom/misc ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:01:22 -0000 Author: danger (doc committer) Date: Sat Jan 10 16:01:20 2009 New Revision: 187022 URL: http://svn.freebsd.org/changeset/base/187022 Log: MFC r186843 - r186849 - rename the RETURN VALUES section to EXIT STATUS - convert to .Ex macro Modified: stable/7/bin/ (props changed) stable/7/bin/chio/ (props changed) stable/7/bin/cp/ (props changed) stable/7/bin/sh/ (props changed) stable/7/bin/test/test.1 stable/7/sbin/ (props changed) stable/7/sbin/atacontrol/ (props changed) stable/7/sbin/ddb/ (props changed) stable/7/sbin/devfs/ (props changed) stable/7/sbin/dhclient/ (props changed) stable/7/sbin/fdisk/ (props changed) stable/7/sbin/fsck_ffs/ (props changed) stable/7/sbin/geom/ (props changed) stable/7/sbin/geom/class/part/ (props changed) stable/7/sbin/geom/misc/ (props changed) stable/7/sbin/ifconfig/ (props changed) stable/7/sbin/init/ (props changed) stable/7/sbin/ipfw/ (props changed) stable/7/sbin/md5/ (props changed) stable/7/sbin/mdconfig/ (props changed) stable/7/sbin/mksnap_ffs/ (props changed) stable/7/sbin/mount/ (props changed) stable/7/sbin/natd/ (props changed) stable/7/sbin/ping/ping.8 stable/7/sbin/ping6/ (props changed) stable/7/sbin/sconfig/ (props changed) stable/7/usr.sbin/ (props changed) stable/7/usr.sbin/adduser/ (props changed) stable/7/usr.sbin/bsnmpd/modules/snmp_pf/ (props changed) stable/7/usr.sbin/cdcontrol/ (props changed) stable/7/usr.sbin/config/ (props changed) stable/7/usr.sbin/cron/ (props changed) stable/7/usr.sbin/cron/cron/ (props changed) stable/7/usr.sbin/extattr/ (props changed) stable/7/usr.sbin/freebsd-update/ (props changed) stable/7/usr.sbin/fwcontrol/ (props changed) stable/7/usr.sbin/iostat/ (props changed) stable/7/usr.sbin/mergemaster/ (props changed) stable/7/usr.sbin/mld6query/mld6query.8 stable/7/usr.sbin/mountd/ (props changed) stable/7/usr.sbin/mtree/ (props changed) stable/7/usr.sbin/ndiscvt/ (props changed) stable/7/usr.sbin/newsyslog/newsyslog.conf.5 (props changed) stable/7/usr.sbin/nscd/ (props changed) stable/7/usr.sbin/ntp/ (props changed) stable/7/usr.sbin/pciconf/ (props changed) stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pmcstat/ (props changed) stable/7/usr.sbin/portsnap/ (props changed) stable/7/usr.sbin/powerd/ (props changed) stable/7/usr.sbin/pw/ (props changed) stable/7/usr.sbin/rpc.lockd/ (props changed) stable/7/usr.sbin/rpc.statd/ (props changed) stable/7/usr.sbin/rpc.yppasswdd/ (props changed) stable/7/usr.sbin/rrenumd/rrenumd.8 stable/7/usr.sbin/rtadvd/rtadvd.8 stable/7/usr.sbin/rtsold/rtsold.8 stable/7/usr.sbin/setfib/ (props changed) stable/7/usr.sbin/sysinstall/ (props changed) stable/7/usr.sbin/syslogd/ (props changed) stable/7/usr.sbin/traceroute/ (props changed) stable/7/usr.sbin/traceroute6/traceroute6.8 stable/7/usr.sbin/tzsetup/ (props changed) stable/7/usr.sbin/wpa/wpa_supplicant/ (props changed) Modified: stable/7/bin/test/test.1 ============================================================================== --- stable/7/bin/test/test.1 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/bin/test/test.1 Sat Jan 10 16:01:20 2009 (r187022) @@ -310,7 +310,7 @@ are evaluated consistently according to standards document. All other cases are subject to the ambiguity in the command semantics. -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility exits with one of the following values: Modified: stable/7/sbin/ping/ping.8 ============================================================================== --- stable/7/sbin/ping/ping.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/sbin/ping/ping.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -503,7 +503,7 @@ packets that they use for packets, for example either 30 or 60. Others may use completely wild values. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility returns an exit status of zero if at least one response was Modified: stable/7/usr.sbin/mld6query/mld6query.8 ============================================================================== --- stable/7/usr.sbin/mld6query/mld6query.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/mld6query/mld6query.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -75,7 +75,7 @@ similarly, MLD report packet will be tra .Fl dr options are for debugging purposes only. .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, non-zero on failures. .\" .\" .Sh SEE ALSO Modified: stable/7/usr.sbin/rrenumd/rrenumd.8 ============================================================================== --- stable/7/usr.sbin/rrenumd/rrenumd.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/rrenumd/rrenumd.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -82,7 +82,7 @@ Configuration information is obtained fr .It Fl c Ar conf_file Specify a configuration file where configuration information is kept. .El -.Sh RETURN VALUES +.Sh EXIT STATUS The program exits with 0 on success, and non-zero on failures. .Sh SEE ALSO .Xr rrenumd.conf 5 , Modified: stable/7/usr.sbin/rtadvd/rtadvd.8 ============================================================================== --- stable/7/usr.sbin/rtadvd/rtadvd.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/rtadvd/rtadvd.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -162,10 +162,8 @@ In this case, will transmit router advertisement with router lifetime 0 to all the interfaces .Pq in accordance with RFC2461 6.2.5 . -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .Sh FILES .Bl -tag -width Pa -compact .It Pa /etc/rtadvd.conf Modified: stable/7/usr.sbin/rtsold/rtsold.8 ============================================================================== --- stable/7/usr.sbin/rtsold/rtsold.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/rtsold/rtsold.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -220,10 +220,8 @@ must be the absolute path from root to t file, and be created by the same owner who runs .Nm . .El -.Sh RETURN VALUES -The -.Nm -program exits 0 on success, and >0 on failures. +.Sh EXIT STATUS +.Ex -std .\" .Sh FILES .Bl -tag -width /var/run/rtsold.dump -compact Modified: stable/7/usr.sbin/traceroute6/traceroute6.8 ============================================================================== --- stable/7/usr.sbin/traceroute6/traceroute6.8 Sat Jan 10 14:53:47 2009 (r187021) +++ stable/7/usr.sbin/traceroute6/traceroute6.8 Sat Jan 10 16:01:20 2009 (r187022) @@ -162,7 +162,7 @@ This was more interesting in the IPv4 ca where some IP stack bugs could be identified by this behaviour. .El .\" -.Sh RETURN VALUES +.Sh EXIT STATUS The .Nm utility will exit with 0 on success, and non-zero on errors. From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 16:19:39 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81A291065678; Sat, 10 Jan 2009 16:19:39 +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 7C11E8FC2A; Sat, 10 Jan 2009 16:19:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGJcii002928; Sat, 10 Jan 2009 16:19:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGJcU7002927; Sat, 10 Jan 2009 16:19:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901101619.n0AGJcU7002927@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Jan 2009 16:19:38 +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: r187023 - stable/7/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:19:40 -0000 Author: kib Date: Sat Jan 10 16:19:38 2009 New Revision: 187023 URL: http://svn.freebsd.org/changeset/base/187023 Log: Bump __FreeBSD_version after the strndup() merge to stable/7. Requested by: Florian Smeets Modified: stable/7/sys/sys/param.h Modified: stable/7/sys/sys/param.h ============================================================================== --- stable/7/sys/sys/param.h Sat Jan 10 16:01:20 2009 (r187022) +++ stable/7/sys/sys/param.h Sat Jan 10 16:19:38 2009 (r187023) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 701100 /* Master, propagated to newvers */ +#define __FreeBSD_version 701101 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 16:24:58 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96554106566B; Sat, 10 Jan 2009 16:24:58 +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 71F908FC16; Sat, 10 Jan 2009 16:24:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGOwK2003082; Sat, 10 Jan 2009 16:24:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGOwUW003080; Sat, 10 Jan 2009 16:24:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901101624.n0AGOwUW003080@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 10 Jan 2009 16:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:25:00 -0000 Author: kib Date: Sat Jan 10 16:24:58 2009 New Revision: 187024 URL: http://svn.freebsd.org/changeset/base/187024 Log: Correct description for the Marvell 88SE6101. Submitted by: Andriy Gapon MFC after: 3 days Modified: head/share/misc/pci_vendors Modified: head/share/misc/pci_vendors ============================================================================== --- head/share/misc/pci_vendors Sat Jan 10 16:19:38 2009 (r187023) +++ head/share/misc/pci_vendors Sat Jan 10 16:24:58 2009 (r187024) @@ -4606,7 +4606,7 @@ 6041 MV88SX6041 Marvell Technology Group Ltd. MV88SX6041 4-port SATA II PCI-X Controller (rev 03) 6042 MV88SX6042 4-port SATA II PCI-X Controller 6081 MV88SX6081 8-port SATA II PCI-X Controller - 6101 6101 SATA2 Controller + 6101 MV88SX6101 1-port UltraATA/133 Controller 6111 6111 SATA2 Controller 6120 6120 SATA2 Controller 6121 6121 SATA2 Controller From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 16:42:14 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5100D106566B; Sat, 10 Jan 2009 16:42:14 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4F08FC13; Sat, 10 Jan 2009 16:42:14 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGgE5b003433; Sat, 10 Jan 2009 16:42:14 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGgD02003429; Sat, 10 Jan 2009 16:42:13 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200901101642.n0AGgD02003429@svn.freebsd.org> From: Robert Noland Date: Sat, 10 Jan 2009 16:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187025 - in stable/7/sys: . contrib/pf dev/cxgb dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:42:15 -0000 Author: rnoland Date: Sat Jan 10 16:42:13 2009 New Revision: 187025 URL: http://svn.freebsd.org/changeset/base/187025 Log: MFC - Sync drm to HEAD Merged /head/sys:r186295,186299-186300,186386,186465 This brings 7 up to date with HEAD. - Use bus_dma to allocate scatter/gather pages for pci GART. This fixes "garbled" screen issues on pci based radeons. - Prevent drm from attaching to secondary devices even if they have the the same pci id. - Attempt at making DRM_DEBUG c99 compliant (needs more work) Approved by: kib Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/drmP.h stable/7/sys/dev/drm/drm_drv.c stable/7/sys/dev/drm/drm_scatter.c stable/7/sys/dev/drm/radeon_irq.c Modified: stable/7/sys/dev/drm/drmP.h ============================================================================== --- stable/7/sys/dev/drm/drmP.h Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/drmP.h Sat Jan 10 16:42:13 2009 (r187025) @@ -87,6 +87,7 @@ struct drm_file; #include #include #include +#include #include #include @@ -211,15 +212,6 @@ enum { #define DRM_MTRR_WC MDF_WRITECOMBINE #define jiffies ticks -/* Capabilities taken from src/sys/dev/pci/pcireg.h. */ -#ifndef PCIY_AGP -#define PCIY_AGP 0x02 -#endif - -#ifndef PCIY_EXPRESS -#define PCIY_EXPRESS 0x10 -#endif - typedef unsigned long dma_addr_t; typedef u_int64_t u64; typedef u_int32_t u32; @@ -308,16 +300,16 @@ for ( ret = 0 ; !ret && !(condition) ; ) DRM_LOCK(); \ } -#define DRM_ERROR(fmt, arg...) \ +#define DRM_ERROR(fmt, ...) \ printf("error: [" DRM_NAME ":pid%d:%s] *ERROR* " fmt, \ - DRM_CURRENTPID, __func__ , ## arg) + DRM_CURRENTPID, __func__ , ##__VA_ARGS__) -#define DRM_INFO(fmt, arg...) printf("info: [" DRM_NAME "] " fmt , ## arg) +#define DRM_INFO(fmt, ...) printf("info: [" DRM_NAME "] " fmt , ##__VA_ARGS__) -#define DRM_DEBUG(fmt, arg...) do { \ +#define DRM_DEBUG(fmt, ...) do { \ if (drm_debug_flag) \ printf("[" DRM_NAME ":pid%d:%s] " fmt, DRM_CURRENTPID, \ - __func__ , ## arg); \ + __func__ , ##__VA_ARGS__); \ } while (0) typedef struct drm_pci_id_list @@ -473,11 +465,13 @@ typedef struct drm_agp_head { } drm_agp_head_t; typedef struct drm_sg_mem { - unsigned long handle; - void *virtual; - int pages; - dma_addr_t *busaddr; - drm_dma_handle_t *dmah; /* Handle to PCI memory for ATI PCIGART table */ + unsigned long handle; + void *virtual; + int pages; + dma_addr_t *busaddr; + struct drm_dma_handle *sg_dmah; /* Handle for sg_pages */ + struct drm_dma_handle *dmah; /* Handle to PCI memory */ + /* for ATI PCIGART table */ } drm_sg_mem_t; typedef TAILQ_HEAD(drm_map_list, drm_local_map) drm_map_list_t; Modified: stable/7/sys/dev/drm/drm_drv.c ============================================================================== --- stable/7/sys/dev/drm/drm_drv.c Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/drm_drv.c Sat Jan 10 16:42:13 2009 (r187025) @@ -152,6 +152,10 @@ int drm_probe(device_t dev, drm_pci_id_l device = pci_get_device(dev); #endif + if (pci_get_class(dev) != PCIC_DISPLAY + || pci_get_subclass(dev) != PCIS_DISPLAY_VGA) + return ENXIO; + id_entry = drm_find_description(vendor, device, idlist); if (id_entry != NULL) { device_set_desc(dev, id_entry->name); Modified: stable/7/sys/dev/drm/drm_scatter.c ============================================================================== --- stable/7/sys/dev/drm/drm_scatter.c Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/drm_scatter.c Sat Jan 10 16:42:13 2009 (r187025) @@ -39,20 +39,16 @@ __FBSDID("$FreeBSD$"); #include "dev/drm/drmP.h" -#define DEBUG_SCATTER 0 +static void drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, + int nsegs, int error); -void drm_sg_cleanup(drm_sg_mem_t *entry) +int +drm_sg_alloc(struct drm_device *dev, struct drm_scatter_gather *request) { - free((void *)entry->handle, DRM_MEM_PAGES); - free(entry->busaddr, DRM_MEM_PAGES); - free(entry, DRM_MEM_SGLISTS); -} - -int drm_sg_alloc(struct drm_device * dev, struct drm_scatter_gather * request) -{ - drm_sg_mem_t *entry; + struct drm_sg_mem *entry; + struct drm_dma_handle *dmah; unsigned long pages; - int i; + int ret; if (dev->sg) return EINVAL; @@ -69,21 +65,56 @@ int drm_sg_alloc(struct drm_device * dev entry->busaddr = malloc(pages * sizeof(*entry->busaddr), DRM_MEM_PAGES, M_WAITOK | M_ZERO); if (!entry->busaddr) { - drm_sg_cleanup(entry); + free(entry, DRM_MEM_SGLISTS); return ENOMEM; } - entry->handle = (long)malloc(pages << PAGE_SHIFT, DRM_MEM_PAGES, - M_WAITOK | M_ZERO); - if (entry->handle == 0) { - drm_sg_cleanup(entry); + dmah = malloc(sizeof(struct drm_dma_handle), DRM_MEM_DMA, + M_ZERO | M_NOWAIT); + if (dmah == NULL) { + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); + return ENOMEM; + } + + ret = bus_dma_tag_create(NULL, PAGE_SIZE, 0, /* tag, align, boundary */ + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ + NULL, NULL, /* filtfunc, filtfuncargs */ + request->size, pages, /* maxsize, nsegs */ + PAGE_SIZE, 0, /* maxsegsize, flags */ + NULL, NULL, /* lockfunc, lockfuncargs */ + &dmah->tag); + if (ret != 0) { + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); return ENOMEM; } - for (i = 0; i < pages; i++) { - entry->busaddr[i] = vtophys(entry->handle + i * PAGE_SIZE); + ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_NOCACHE, &dmah->map); + if (ret != 0) { + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); + return ENOMEM; } + ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, + request->size, drm_sg_alloc_cb, entry, 0); + if (ret != 0) { + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); + return ENOMEM; + } + + entry->sg_dmah = dmah; + entry->handle = (unsigned long)dmah->vaddr; + DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); entry->virtual = (void *)entry->handle; @@ -101,22 +132,49 @@ int drm_sg_alloc(struct drm_device * dev return 0; } -int drm_sg_alloc_ioctl(struct drm_device *dev, void *data, - struct drm_file *file_priv) +static void +drm_sg_alloc_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int error) +{ + struct drm_sg_mem *entry = arg; + int i; + + if (error != 0) + return; + + for(i = 0 ; i < nsegs ; i++) { + entry->busaddr[i] = segs[i].ds_addr; + } +} + +int +drm_sg_alloc_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) { struct drm_scatter_gather *request = data; - int ret; - DRM_DEBUG("%s\n", __FUNCTION__); + DRM_DEBUG("\n"); + + return drm_sg_alloc(dev, request); +} - ret = drm_sg_alloc(dev, request); - return ret; +void +drm_sg_cleanup(struct drm_sg_mem *entry) +{ + struct drm_dma_handle *dmah = entry->sg_dmah; + + bus_dmamap_unload(dmah->tag, dmah->map); + bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); + bus_dma_tag_destroy(dmah->tag); + free(dmah, DRM_MEM_DMA); + free(entry->busaddr, DRM_MEM_PAGES); + free(entry, DRM_MEM_SGLISTS); } -int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) +int +drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_scatter_gather *request = data; - drm_sg_mem_t *entry; + struct drm_sg_mem *entry; DRM_LOCK(); entry = dev->sg; Modified: stable/7/sys/dev/drm/radeon_irq.c ============================================================================== --- stable/7/sys/dev/drm/radeon_irq.c Sat Jan 10 16:24:58 2009 (r187024) +++ stable/7/sys/dev/drm/radeon_irq.c Sat Jan 10 16:42:13 2009 (r187025) @@ -47,7 +47,8 @@ void radeon_irq_set_state(struct drm_dev else dev_priv->irq_enable_reg &= ~mask; - RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); + if (dev->irq_enabled) + RADEON_WRITE(RADEON_GEN_INT_CNTL, dev_priv->irq_enable_reg); } static void r500_vbl_irq_set_state(struct drm_device *dev, u32 mask, int state) @@ -59,7 +60,8 @@ static void r500_vbl_irq_set_state(struc else dev_priv->r500_disp_irq_reg &= ~mask; - RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); + if (dev->irq_enabled) + RADEON_WRITE(R500_DxMODE_INT_MASK, dev_priv->r500_disp_irq_reg); } int radeon_enable_vblank(struct drm_device *dev, int crtc) From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 16:57:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F85C1065677; Sat, 10 Jan 2009 16:57:23 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B5C88FC12; Sat, 10 Jan 2009 16:57:23 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AGvMmx003743; Sat, 10 Jan 2009 16:57:22 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AGvMMk003741; Sat, 10 Jan 2009 16:57:22 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101657.n0AGvMMk003741@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 16:57:22 +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: r187026 - in stable/6: contrib/telnet contrib/telnet/arpa include include/arpa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 16:57:23 -0000 Author: antoine Date: Sat Jan 10 16:57:22 2009 New Revision: 187026 URL: http://svn.freebsd.org/changeset/base/187026 Log: MFC r183004 to stable/6: Fix TELOPT(opt) when opt > TELOPT_TN3270E. PR: 127194 Submitted by: Joost Bekkers MFC after: 1 month Modified: stable/6/contrib/telnet/ (props changed) stable/6/contrib/telnet/arpa/telnet.h stable/6/include/ (props changed) stable/6/include/arpa/telnet.h Modified: stable/6/contrib/telnet/arpa/telnet.h ============================================================================== --- stable/6/contrib/telnet/arpa/telnet.h Sat Jan 10 16:42:13 2009 (r187025) +++ stable/6/contrib/telnet/arpa/telnet.h Sat Jan 10 16:57:22 2009 (r187026) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY Modified: stable/6/include/arpa/telnet.h ============================================================================== --- stable/6/include/arpa/telnet.h Sat Jan 10 16:42:13 2009 (r187025) +++ stable/6/include/arpa/telnet.h Sat Jan 10 16:57:22 2009 (r187026) @@ -140,8 +140,8 @@ const char *telopts[NTELOPTS+1] = { "TACACS UID", "OUTPUT MARKING", "TTYLOC", "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", - "ENCRYPT", "NEW-ENVIRON", "TN3270E", "CHARSET", "COM-PORT", - "KERMIT", + "ENCRYPT", "NEW-ENVIRON", "TN3270E", "XAUTH", "CHARSET", + "RSP", "COM-PORT", "SLE", "STARTTLS", "KERMIT", 0 }; #define TELOPT_FIRST TELOPT_BINARY From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 17:17:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 234F610656C7; Sat, 10 Jan 2009 17:17:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 103C98FC16; Sat, 10 Jan 2009 17:17:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AHHIA5004168; Sat, 10 Jan 2009 17:17:18 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AHHIMM004165; Sat, 10 Jan 2009 17:17:18 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901101717.n0AHHIMM004165@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 10 Jan 2009 17:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187027 - in head: sbin/mdconfig sys/dev/md X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 17:17:20 -0000 Author: trasz Date: Sat Jan 10 17:17:18 2009 New Revision: 187027 URL: http://svn.freebsd.org/changeset/base/187027 Log: Add the possibility to specify "-o force" with "mdconfig -du". Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Modified: head/sbin/mdconfig/mdconfig.8 head/sbin/mdconfig/mdconfig.c head/sys/dev/md/md.c Modified: head/sbin/mdconfig/mdconfig.8 ============================================================================== --- head/sbin/mdconfig/mdconfig.8 Sat Jan 10 16:57:22 2009 (r187026) +++ head/sbin/mdconfig/mdconfig.8 Sat Jan 10 17:17:18 2009 (r187027) @@ -62,6 +62,7 @@ .Nm .Fl d .Fl u Ar unit +.Op Fl o Oo Cm no Oc Ns Ar force .Nm .Fl l .Op Fl n Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Sat Jan 10 16:57:22 2009 (r187026) +++ head/sbin/mdconfig/mdconfig.c Sat Jan 10 17:17:18 2009 (r187027) @@ -58,7 +58,7 @@ usage() "usage: mdconfig -a -t type [-n] [-o [no]option] ... [-f file]\n" " [-s size] [-S sectorsize] [-u unit]\n" " [-x sectors/track] [-y heads/cyl]\n" -" mdconfig -d -u unit\n" +" mdconfig -d -u unit [-o [no]force]\n" " mdconfig -l [-v] [-n] [-u unit]\n"); fprintf(stderr, "\t\ttype = {malloc, preload, vnode, swap}\n"); fprintf(stderr, "\t\toption = {cluster, compress, reserve}\n"); @@ -160,6 +160,16 @@ main(int argc, char **argv) close(fd); break; case 'o': + if (action == DETACH) { + if (!strcmp(optarg, "force")) + mdio.md_options |= MD_FORCE; + else if (!strcmp(optarg, "noforce")) + mdio.md_options &= ~MD_FORCE; + else + errx(1, "Unknown option: %s.", optarg); + break; + } + if (cmdline != 2) usage(); if (!strcmp(optarg, "async")) Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Sat Jan 10 16:57:22 2009 (r187026) +++ head/sys/dev/md/md.c Sat Jan 10 17:17:18 2009 (r187027) @@ -1133,13 +1133,15 @@ xmdctlioctl(struct cdev *dev, u_long cmd mdinit(sc); return (0); case MDIOCDETACH: - if (mdio->md_mediasize != 0 || mdio->md_options != 0) + if (mdio->md_mediasize != 0 || + (mdio->md_options & ~MD_FORCE) != 0) return (EINVAL); sc = mdfind(mdio->md_unit); if (sc == NULL) return (ENOENT); - if (sc->opencount != 0 && !(sc->flags & MD_FORCE)) + if (sc->opencount != 0 && !(sc->flags & MD_FORCE) && + !(mdio->md_options & MD_FORCE)) return (EBUSY); return (mddestroy(sc, td)); case MDIOCQUERY: From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 17:22:50 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61ECF106564A; Sat, 10 Jan 2009 17:22:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED398FC08; Sat, 10 Jan 2009 17:22:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AHMoAK004333; Sat, 10 Jan 2009 17:22:50 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AHMngQ004327; Sat, 10 Jan 2009 17:22:49 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200901101722.n0AHMngQ004327@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 10 Jan 2009 17:22:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187028 - head/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 17:22:51 -0000 Author: trasz Date: Sat Jan 10 17:22:49 2009 New Revision: 187028 URL: http://svn.freebsd.org/changeset/base/187028 Log: Don't call destroy_dev(9) with a mutex held. While here, shuffle things around so the periph destructors look alike. Based on a patch by Jaakko Heinonen. Submitted by: Jaakko Heinonen Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Modified: head/sys/cam/scsi/scsi_ch.c head/sys/cam/scsi/scsi_pass.c head/sys/cam/scsi/scsi_pt.c head/sys/cam/scsi/scsi_sa.c head/sys/cam/scsi/scsi_ses.c head/sys/cam/scsi/scsi_sg.c Modified: head/sys/cam/scsi/scsi_ch.c ============================================================================== --- head/sys/cam/scsi/scsi_ch.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_ch.c Sat Jan 10 17:22:49 2009 (r187028) @@ -262,9 +262,11 @@ chcleanup(struct cam_periph *periph) softc = (struct ch_softc *)periph->softc; + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); + cam_periph_unlock(periph); destroy_dev(softc->dev); - xpt_print(periph->path, "removing device entry\n"); + cam_periph_lock(periph); free(softc, M_DEVBUF); } Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_pass.c Sat Jan 10 17:22:49 2009 (r187028) @@ -165,13 +165,12 @@ passcleanup(struct cam_periph *periph) softc = (struct pass_softc *)periph->softc; + if (bootverbose) + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); - + cam_periph_unlock(periph); destroy_dev(softc->dev); - - if (bootverbose) { - xpt_print(periph->path, "removing device entry\n"); - } + cam_periph_lock(periph); free(softc, M_DEVBUF); } Modified: head/sys/cam/scsi/scsi_pt.c ============================================================================== --- head/sys/cam/scsi/scsi_pt.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_pt.c Sat Jan 10 17:22:49 2009 (r187028) @@ -342,11 +342,11 @@ ptdtor(struct cam_periph *periph) softc = (struct pt_softc *)periph->softc; + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); - + cam_periph_unlock(periph); destroy_dev(softc->dev); - - xpt_print(periph->path, "removing device entry\n"); + cam_periph_lock(periph); free(softc, M_DEVBUF); } Modified: head/sys/cam/scsi/scsi_sa.c ============================================================================== --- head/sys/cam/scsi/scsi_sa.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_sa.c Sat Jan 10 17:22:49 2009 (r187028) @@ -1377,17 +1377,16 @@ sacleanup(struct cam_periph *periph) softc = (struct sa_softc *)periph->softc; + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); - + cam_periph_unlock(periph); destroy_dev(softc->devs.ctl_dev); - for (i = 0; i < SA_NUM_MODES; i++) { destroy_dev(softc->devs.mode_devs[i].r_dev); destroy_dev(softc->devs.mode_devs[i].nr_dev); destroy_dev(softc->devs.mode_devs[i].er_dev); } - - xpt_print(periph->path, "removing device entry\n"); + cam_periph_lock(periph); free(softc, M_SCSISA); } Modified: head/sys/cam/scsi/scsi_ses.c ============================================================================== --- head/sys/cam/scsi/scsi_ses.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_ses.c Sat Jan 10 17:22:49 2009 (r187028) @@ -227,9 +227,10 @@ sescleanup(struct cam_periph *periph) softc = (struct ses_softc *)periph->softc; - destroy_dev(softc->ses_dev); - xpt_print(periph->path, "removing device entry\n"); + cam_periph_unlock(periph); + destroy_dev(softc->ses_dev); + cam_periph_lock(periph); free(softc, M_SCSISES); } Modified: head/sys/cam/scsi/scsi_sg.c ============================================================================== --- head/sys/cam/scsi/scsi_sg.c Sat Jan 10 17:17:18 2009 (r187027) +++ head/sys/cam/scsi/scsi_sg.c Sat Jan 10 17:22:49 2009 (r187028) @@ -200,11 +200,12 @@ sgcleanup(struct cam_periph *periph) struct sg_softc *softc; softc = (struct sg_softc *)periph->softc; + if (bootverbose) + xpt_print(periph->path, "removing device entry\n"); devstat_remove_entry(softc->device_stats); + cam_periph_unlock(periph); destroy_dev(softc->dev); - if (bootverbose) { - xpt_print(periph->path, "removing device entry\n"); - } + cam_periph_lock(periph); free(softc, M_DEVBUF); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 17:56:51 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D1771065688; Sat, 10 Jan 2009 17:56:51 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17ED48FC26; Sat, 10 Jan 2009 17:56:51 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AHuovw005003; Sat, 10 Jan 2009 17:56:50 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AHuof9005002; Sat, 10 Jan 2009 17:56:50 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101756.n0AHuof9005002@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 17:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187029 - in stable/7/sys: . conf contrib/pf dev/ath/ath_hal dev/cxgb dev/hptiop X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 17:56:53 -0000 Author: antoine Date: Sat Jan 10 17:56:50 2009 New Revision: 187029 URL: http://svn.freebsd.org/changeset/base/187029 Log: MFC r183590 to stable/7: - Spell cam correctly (scbus), this makes it possible to compile hptiop in GENERIC and LINT. [1] - Rename hpt_dbg_level to hpt_iop_dbg_level to avoid multiple definition of hpt_dbg_level (hptmv also has hpt_dbg_level). PR: 127551 [1] Reviewed by: scottl@ MFC after: 1 month Modified: stable/7/sys/ (props changed) stable/7/sys/conf/files stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/hptiop/hptiop.h Modified: stable/7/sys/conf/files ============================================================================== --- stable/7/sys/conf/files Sat Jan 10 17:22:49 2009 (r187028) +++ stable/7/sys/conf/files Sat Jan 10 17:56:50 2009 (r187029) @@ -685,7 +685,7 @@ dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hme/if_hme_sbus.c optional hme sbus -dev/hptiop/hptiop.c optional hptiop cam +dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/ichsmb/ichsmb.c optional ichsmb Modified: stable/7/sys/dev/hptiop/hptiop.h ============================================================================== --- stable/7/sys/dev/hptiop/hptiop.h Sat Jan 10 17:22:49 2009 (r187028) +++ stable/7/sys/dev/hptiop/hptiop.h Sat Jan 10 17:56:50 2009 (r187029) @@ -32,8 +32,8 @@ __FBSDID("$FreeBSD$"); #define DBG 0 #ifdef DBG -int hpt_dbg_level = 0; -#define KdPrint(x) do { if (hpt_dbg_level) printf x; } while (0) +int hpt_iop_dbg_level = 0; +#define KdPrint(x) do { if (hpt_iop_dbg_level) printf x; } while (0) #define HPT_ASSERT(x) assert(x) #else #define KdPrint(x) From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 18:12:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85F65106566B; Sat, 10 Jan 2009 18:12:30 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id E7AD28FC1A; Sat, 10 Jan 2009 18:12:29 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5819166qwb.7 for ; Sat, 10 Jan 2009 10:12:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=MkeSfbO1IvA5SXEriz6h6E2zm02957qp66teFbzS1Rw=; b=ehz91Bh1SY0mVNBEoundjxkSREbZkl82zOP5gLHkVYv3rJQ0GwXIfYm13b0oGu3Ybu GnwzR/vil9S/W7e5Ncr4zNVf0cY3ODAH78nTtEI/YuExuhjgQqw292y5viPy83v0hXxF Fx8IWWJuwFis1uwY5yIFTiHoHkbLx1MzL4l8Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=R0ynSkoMwz4FgVrEU6ErO11pjPP7k0vVmFqgnecWnpraX3iFDAcSKoOuIQiOFLGwYo A8a/8FJ1XBmBBHWFvWORSbMVmeiZ9fqzYtsy/Fs2MESlP5V4BM/CyFa0DQm5TKVMFoXV WcoknsJIOczAw7Ula9vkQfKcNrpLhmHci+yow= Received: by 10.214.150.19 with SMTP id x19mr8462387qad.172.1231611149300; Sat, 10 Jan 2009 10:12:29 -0800 (PST) Received: by 10.214.81.13 with HTTP; Sat, 10 Jan 2009 10:12:29 -0800 (PST) Message-ID: Date: Sat, 10 Jan 2009 13:12:29 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Robert Watson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> X-Google-Sender-Auth: 1b56d306f2eb726c Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:12:31 -0000 2009/1/10 Robert Watson : > I think Julian's analysis, that this is more of an inet option than a > socket-layer option, seems more appropriate to me, the benefits of > portability in adopting the API used by OpenBSD/BSDI/etc seem more > compelling. We should make sure that, if we move to the socket option used > on those systems, we block setting it on non-supporting protocols, or > confusion will result. In particular, Adrian's change only modified IPv4, > not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set > the option. I'm happy to (eventually) also implement the BSDI API once I actually spend time looking at what the difference in behaviours are. If we're lucky, the only difference is where the socket option hooks in and the actual network behaviour is the same. (Meanwhile, I think I have to go off and implement this particular behaviour in Squid, and see if the OpenBSD support indeed does function as advertised.) Adrian From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 18:19:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 425621065672; Sat, 10 Jan 2009 18:19:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F4C28FC08; Sat, 10 Jan 2009 18:19:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AIJNfT005441; Sat, 10 Jan 2009 18:19:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AIJMsP005436; Sat, 10 Jan 2009 18:19:22 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901101819.n0AIJMsP005436@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 18:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187030 - in head/sys: dev/sound/pcm sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:19:23 -0000 Author: mav Date: Sat Jan 10 18:19:22 2009 New Revision: 187030 URL: http://svn.freebsd.org/changeset/base/187030 Log: Import some new constants and structures fields from OSSv4. Implement some OSSv4 ioctls to make ossinfo tool work and print something reasonable. Modified: head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/sound.h head/sys/sys/soundcard.h Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/dsp.c Sat Jan 10 18:19:22 2009 (r187030) @@ -814,7 +814,12 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd case SNDCTL_SYSINFO: sound_oss_sysinfo((oss_sysinfo *)arg); break; + case SNDCTL_CARDINFO: + ret = sound_oss_card_info((oss_card_info *)arg); + break; case SNDCTL_AUDIOINFO: + case SNDCTL_AUDIOINFO_EX: + case SNDCTL_ENGINEINFO: ret = dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg); break; case SNDCTL_MIXERINFO: @@ -1370,9 +1375,9 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd case SNDCTL_DSP_GETCAPS: pcm_lock(d); - *arg_i = DSP_CAP_REALTIME | DSP_CAP_MMAP | DSP_CAP_TRIGGER; + *arg_i = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; if (rdch && wrch && !(dsp_get_flags(i_dev) & SD_F_SIMPLEX)) - *arg_i |= DSP_CAP_DUPLEX; + *arg_i |= PCM_CAP_DUPLEX; pcm_unlock(d); break; @@ -1770,18 +1775,6 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd break; #if 0 /** - * @note The SNDCTL_CARDINFO ioctl was omitted per 4Front developer - * documentation. "The usability of this call is very limited. It's - * provided only for completeness of the API. OSS API doesn't have - * any concept of card. Any information returned by this ioctl calld - * is reserved exclusively for the utility programs included in the - * OSS package. Applications should not try to use for this - * information in any ways." - */ - case SNDCTL_CARDINFO: - ret = EINVAL; - break; - /** * @note The S/PDIF interface ioctls, @c SNDCTL_DSP_READCTL and * @c SNDCTL_DSP_WRITECTL have been omitted at the suggestion of * 4Front Technologies. @@ -2282,13 +2275,14 @@ dsp_oss_audioinfo(struct cdev *i_dev, os /* * These flags stolen from SNDCTL_DSP_GETCAPS handler. * Note, however, that a single channel operates in - * only one direction, so DSP_CAP_DUPLEX is out. + * only one direction, so PCM_CAP_DUPLEX is out. */ /** * @todo @c SNDCTL_AUDIOINFO::caps - Make drivers keep * these in pcmchan::caps? */ - ai->caps = DSP_CAP_REALTIME | DSP_CAP_MMAP | DSP_CAP_TRIGGER; + ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER | + ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : PCM_CAP_INPUT); /* * Collect formats supported @b natively by the @@ -2369,7 +2363,11 @@ dsp_oss_audioinfo(struct cdev *i_dev, os for (i = 0; i < ai->nrates; i++) ai->rates[i] = rates[i]; + + ai->next_play_engine = 0; + ai->next_rec_engine = 0; +printf("flags: %08x %d\n", ch->flags, ai->busy); CHN_UNLOCK(ch); } Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/mixer.c Sat Jan 10 18:19:22 2009 (r187030) @@ -1022,6 +1022,27 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo int ret, *arg_i = (int *)arg; int v = -1, j = cmd & 0xff; + /* + * Certain ioctls may be made on any type of device (audio, mixer, + * and MIDI). Handle those special cases here. + */ + if (IOCGROUP(cmd) == 'X') { + switch (cmd) { + case SNDCTL_SYSINFO: + sound_oss_sysinfo((oss_sysinfo *)arg); + return (0); + case SNDCTL_CARDINFO: + return (sound_oss_card_info((oss_card_info *)arg)); + case SNDCTL_AUDIOINFO: + case SNDCTL_AUDIOINFO_EX: + case SNDCTL_ENGINEINFO: + return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); + case SNDCTL_MIXERINFO: + return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); + } + return (ENXIO); + } + m = i_dev->si_drv1; if (m == NULL) @@ -1033,11 +1054,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo return (EBADF); } - if (cmd == SNDCTL_MIXERINFO) { - snd_mtxunlock(m->lock); - return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); - } - if ((cmd & MIXER_WRITE(0)) == MIXER_WRITE(0)) { if (j == SOUND_MIXER_RECSRC) ret = mixer_setrecsrc(m, *arg_i); @@ -1075,15 +1091,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo switch (cmd) { /** @todo Double check return values, error codes. */ - case SNDCTL_SYSINFO: - snd_mtxunlock(m->lock); - sound_oss_sysinfo((oss_sysinfo *)arg); - return (ret); - break; - case SNDCTL_AUDIOINFO: - snd_mtxunlock(m->lock); - return (dsp_oss_audioinfo(i_dev, (oss_audioinfo *)arg)); - break; case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); break; Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/sound.c Sat Jan 10 18:19:22 2009 (r187030) @@ -1493,6 +1493,38 @@ sound_oss_sysinfo(oss_sysinfo *si) si->filler[i] = -1; } +int +sound_oss_card_info(oss_card_info *si) +{ + struct snddev_info *d; + int i, ncards; + + ncards = 0; + + for (i = 0; pcm_devclass != NULL && + i < devclass_get_maxunit(pcm_devclass); i++) { + d = devclass_get_softc(pcm_devclass, i); + if (!PCM_REGISTERED(d)) + continue; + + if (ncards++ != si->card) + continue; + + mtx_assert(d->lock, MA_NOTOWNED); + pcm_lock(d); + + strlcpy(si->shortname, device_get_nameunit(d->dev), + sizeof(si->shortname)); + strlcpy(si->longname, device_get_desc(d->dev), + sizeof(si->longname)); + strlcpy(si->hw_info, d->status, sizeof(si->hw_info)); + si->intr_count = si->ack_count = 0; + pcm_unlock(d); + return (0); + } + return (ENXIO); +} + /************************************************************************/ static int Modified: head/sys/dev/sound/pcm/sound.h ============================================================================== --- head/sys/dev/sound/pcm/sound.h Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/dev/sound/pcm/sound.h Sat Jan 10 18:19:22 2009 (r187030) @@ -601,6 +601,7 @@ struct snddev_info { }; void sound_oss_sysinfo(oss_sysinfo *); +int sound_oss_card_info(oss_card_info *); #ifdef PCM_DEBUG_MTX #define pcm_lock(d) mtx_lock(((struct snddev_info *)(d))->lock) Modified: head/sys/sys/soundcard.h ============================================================================== --- head/sys/sys/soundcard.h Sat Jan 10 17:56:50 2009 (r187029) +++ head/sys/sys/soundcard.h Sat Jan 10 18:19:22 2009 (r187030) @@ -801,18 +801,91 @@ typedef struct audio_buf_info { #define SNDCTL_DSP_NONBLOCK _IO ('P',14) #define SNDCTL_DSP_GETCAPS _IOR ('P',15, int) -#define DSP_CAP_REVISION 0x000000ff /* revision level (0 to 255) */ -#define DSP_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */ -#define DSP_CAP_REALTIME 0x00000200 /* Real time capability */ -#define DSP_CAP_BATCH 0x00000400 - /* - * Device has some kind of internal buffers which may - * cause some delays and decrease precision of timing - */ -#define DSP_CAP_COPROC 0x00000800 - /* Has a coprocessor, sometimes it's a DSP but usually not */ -#define DSP_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ -#define DSP_CAP_MMAP 0x00002000 /* Supports mmap() */ +# define PCM_CAP_REVISION 0x000000ff /* Bits for revision level (0 to 255) */ +# define PCM_CAP_DUPLEX 0x00000100 /* Full duplex record/playback */ +# define PCM_CAP_REALTIME 0x00000200 /* Not in use */ +# define PCM_CAP_BATCH 0x00000400 /* Device has some kind of */ + /* internal buffers which may */ + /* cause some delays and */ + /* decrease precision of timing */ +# define PCM_CAP_COPROC 0x00000800 /* Has a coprocessor */ + /* Sometimes it's a DSP */ + /* but usually not */ +# define PCM_CAP_TRIGGER 0x00001000 /* Supports SETTRIGGER */ +# define PCM_CAP_MMAP 0x00002000 /* Supports mmap() */ +# define PCM_CAP_MULTI 0x00004000 /* Supports multiple open */ +# define PCM_CAP_BIND 0x00008000 /* Supports binding to front/rear/center/lfe */ +# define PCM_CAP_INPUT 0x00010000 /* Supports recording */ +# define PCM_CAP_OUTPUT 0x00020000 /* Supports playback */ +# define PCM_CAP_VIRTUAL 0x00040000 /* Virtual device */ +/* 0x00040000 and 0x00080000 reserved for future use */ + +/* Analog/digital control capabilities */ +# define PCM_CAP_ANALOGOUT 0x00100000 +# define PCM_CAP_ANALOGIN 0x00200000 +# define PCM_CAP_DIGITALOUT 0x00400000 +# define PCM_CAP_DIGITALIN 0x00800000 +# define PCM_CAP_ADMASK 0x00f00000 +/* + * NOTE! (capabilities & PCM_CAP_ADMASK)==0 means just that the + * digital/analog interface control features are not supported by the + * device/driver. However the device still supports analog, digital or + * both inputs/outputs (depending on the device). See the OSS Programmer's + * Guide for full details. + */ +# define PCM_CAP_SPECIAL 0x01000000 /* Not for ordinary "multimedia" use */ +# define PCM_CAP_SHADOW 0x00000000 /* OBSOLETE */ + +/* + * Preferred channel usage. These bits can be used to + * give recommendations to the application. Used by few drivers. + * For example if ((caps & DSP_CH_MASK) == DSP_CH_MONO) means that + * the device works best in mono mode. However it doesn't necessarily mean + * that the device cannot be used in stereo. These bits should only be used + * by special applications such as multi track hard disk recorders to find + * out the initial setup. However the user should be able to override this + * selection. + * + * To find out which modes are actually supported the application should + * try to select them using SNDCTL_DSP_CHANNELS. + */ +# define DSP_CH_MASK 0x06000000 /* Mask */ +# define DSP_CH_ANY 0x00000000 /* No preferred mode */ +# define DSP_CH_MONO 0x02000000 +# define DSP_CH_STEREO 0x04000000 +# define DSP_CH_MULTI 0x06000000 /* More than two channels */ + +# define PCM_CAP_HIDDEN 0x08000000 /* Hidden device */ +# define PCM_CAP_FREERATE 0x10000000 +# define PCM_CAP_MODEM 0x20000000 /* Modem device */ +# define PCM_CAP_DEFAULT 0x40000000 /* "Default" device */ + +/* + * The PCM_CAP_* capability names were known as DSP_CAP_* prior OSS 4.0 + * so it's necessary to define the older names too. + */ +#define DSP_CAP_ADMASK PCM_CAP_ADMASK +#define DSP_CAP_ANALOGIN PCM_CAP_ANALOGIN +#define DSP_CAP_ANALOGOUT PCM_CAP_ANALOGOUT +#define DSP_CAP_BATCH PCM_CAP_BATCH +#define DSP_CAP_BIND PCM_CAP_BIND +#define DSP_CAP_COPROC PCM_CAP_COPROC +#define DSP_CAP_DEFAULT PCM_CAP_DEFAULT +#define DSP_CAP_DIGITALIN PCM_CAP_DIGITALIN +#define DSP_CAP_DIGITALOUT PCM_CAP_DIGITALOUT +#define DSP_CAP_DUPLEX PCM_CAP_DUPLEX +#define DSP_CAP_FREERATE PCM_CAP_FREERATE +#define DSP_CAP_HIDDEN PCM_CAP_HIDDEN +#define DSP_CAP_INPUT PCM_CAP_INPUT +#define DSP_CAP_MMAP PCM_CAP_MMAP +#define DSP_CAP_MODEM PCM_CAP_MODEM +#define DSP_CAP_MULTI PCM_CAP_MULTI +#define DSP_CAP_OUTPUT PCM_CAP_OUTPUT +#define DSP_CAP_REALTIME PCM_CAP_REALTIME +#define DSP_CAP_REVISION PCM_CAP_REVISION +#define DSP_CAP_SHADOW PCM_CAP_SHADOW +#define DSP_CAP_TRIGGER PCM_CAP_TRIGGER +#define DSP_CAP_VIRTUAL PCM_CAP_VIRTUAL /* * What do these function do ? @@ -1785,7 +1858,9 @@ typedef struct oss_audioinfo int latency; /* In usecs, -1=unknown */ oss_devnode_t devnode; /* Device special file name (inside /dev) */ - int filler[186]; + int next_play_engine; + int next_rec_engine; + int filler[184]; } oss_audioinfo; typedef struct oss_mixerinfo @@ -1851,7 +1926,9 @@ typedef struct oss_card_info char shortname[16]; char longname[128]; int flags; - int filler[256]; + char hw_info[400]; + int intr_count, ack_count; + int filler[154]; } oss_card_info; #define SNDCTL_SYSINFO _IOR ('X', 1, oss_sysinfo) @@ -1868,6 +1945,8 @@ typedef struct oss_card_info #define SNDCTL_MIDIINFO _IOWR('X', 9, oss_midi_info) #define SNDCTL_MIXERINFO _IOWR('X',10, oss_mixerinfo) #define SNDCTL_CARDINFO _IOWR('X',11, oss_card_info) +#define SNDCTL_ENGINEINFO _IOWR('X',12, oss_audioinfo) +#define SNDCTL_AUDIOINFO_EX _IOWR('X',13, oss_audioinfo) /* * Few more "globally" available ioctl calls. From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 18:28:11 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64EF41065674; Sat, 10 Jan 2009 18:28:11 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from people.fsn.hu (people.fsn.hu [195.228.252.137]) by mx1.freebsd.org (Postfix) with ESMTP id 6A2EE8FC18; Sat, 10 Jan 2009 18:28:08 +0000 (UTC) (envelope-from bra@fsn.hu) Received: from [172.27.51.2] (fw.axelero.hu [195.228.243.120]) by people.fsn.hu (Postfix) with ESMTP id 02028A7A01; Sat, 10 Jan 2009 19:28:05 +0100 (CET) Message-ID: <4968E8B4.9090309@fsn.hu> Date: Sat, 10 Jan 2009 19:28:04 +0100 From: Attila Nagy User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> In-Reply-To: X-Stationery: 0.4.8.12 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (people.fsn.hu [0.0.0.0]); Sat, 10 Jan 2009 19:28:07 +0100 (CET) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:28:11 -0000 Adrian Chadd wrote: > 2009/1/10 Robert Watson : > > >> I think Julian's analysis, that this is more of an inet option than a >> socket-layer option, seems more appropriate to me, the benefits of >> portability in adopting the API used by OpenBSD/BSDI/etc seem more >> compelling. We should make sure that, if we move to the socket option used >> on those systems, we block setting it on non-supporting protocols, or >> confusion will result. In particular, Adrian's change only modified IPv4, >> not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set >> the option. >> > > I'm happy to (eventually) also implement the BSDI API once I actually > spend time looking at what the difference in behaviours are. If we're > lucky, the only difference is where the socket option hooks in and the > actual network behaviour is the same. > > (Meanwhile, I think I have to go off and implement this particular > behaviour in Squid, and see if the OpenBSD support indeed does > function as advertised.) > BTW, I'm eagerly waiting for somebody to implement this transparency into nginx, which can act as a reverse proxy with built-in perl logic. :) That way FreeBSD could be used as a highly flexible transparent reverse HTTP proxy. Do you know anything else which can do that now with an easy API (accessible from high level languages like perl or python)? From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 18:51:09 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B9A01065674; Sat, 10 Jan 2009 18:51:09 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.29]) by mx1.freebsd.org (Postfix) with ESMTP id D19BF8FC19; Sat, 10 Jan 2009 18:51:08 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so4158724yxb.13 for ; Sat, 10 Jan 2009 10:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:x-mailer :mime-version:subject:date:cc; bh=e2yHQ7zaohB8oOHZUhQExktsITTV6eK6PmANAjTOltk=; b=HFvj3vF8GBzkZLzlQ4r9C3edE5sCvd359Gx7AaolvaBOPcN0X3768f3T9rEypZAsk2 yqCSjhhJ8KkJNGc3C5UTwKO18BdYjcA7HyfD4gCiGqYiaWEaRQ0HaQ8EryLowYEPGdqA pxT8j5SZzDnac5oMYmcKVbl9g373wXCbo1J6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:x-mailer:mime-version:subject:date:cc; b=bZDr7jl5tLhYbbQm3tHpJBJ8qmXllRj8dOme9cQNO7PrFcudYwpLOHOf3V2y6nRUK/ JFcmuHA1wYy8CBJ+fofypwSZsW0JiSvVeFoCHTH8kpn8Mor7HcF/B/3MftgjMj0zYi2h 6Lgx8pv7dKh6SMcZJA/f24BHSbkrDPBjfI5bc= Received: by 10.100.105.9 with SMTP id d9mr14387129anc.142.1231613467867; Sat, 10 Jan 2009 10:51:07 -0800 (PST) Received: from ?10.98.171.71? ([32.157.62.101]) by mx.google.com with ESMTPS id b32sm1542208ana.14.2009.01.10.10.51.03 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 10 Jan 2009 10:51:06 -0800 (PST) References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> <4968E8B4.9090309@fsn.hu> Message-Id: From: Garrett Cooper To: Attila Nagy In-Reply-To: <4968E8B4.9090309@fsn.hu> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Mailer: iPhone Mail (5G77) Mime-Version: 1.0 (iPhone Mail 5G77) Date: Sat, 10 Jan 2009 10:50:57 -0800 Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Robert Watson , Julian Elischer , "svn-src-head@freebsd.org" Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 18:51:10 -0000 On Jan 10, 2009, at 10:28, Attila Nagy wrote: > Adrian Chadd wrote: >> 2009/1/10 Robert Watson : >> >> >>> I think Julian's analysis, that this is more of an inet option >>> than a >>> socket-layer option, seems more appropriate to me, the benefits of >>> portability in adopting the API used by OpenBSD/BSDI/etc seem more >>> compelling. We should make sure that, if we move to the socket >>> option used >>> on those systems, we block setting it on non-supporting protocols, >>> or >>> confusion will result. In particular, Adrian's change only >>> modified IPv4, >>> not IPv6, so until it's implemented on IPv6 it shouldn't be >>> possible to set >>> the option. >>> >> >> I'm happy to (eventually) also implement the BSDI API once I actually >> spend time looking at what the difference in behaviours are. If we're >> lucky, the only difference is where the socket option hooks in and >> the >> actual network behaviour is the same. >> >> (Meanwhile, I think I have to go off and implement this particular >> behaviour in Squid, and see if the OpenBSD support indeed does >> function as advertised.) >> > BTW, I'm eagerly waiting for somebody to implement this transparency > into nginx, which can act as a reverse proxy with built-in perl > logic. :) > That way FreeBSD could be used as a highly flexible transparent > reverse HTTP proxy. > > Do you know anything else which can do that now with an easy API > (accessible from high level languages like perl or python)? I'm not sure why something like an extension with swig wouldn't be the best avenue to solve the high-level language support problem... -Garrett From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 19:00:18 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 326DC10656FD; Sat, 10 Jan 2009 19:00:18 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 718A98FC08; Sat, 10 Jan 2009 19:00:17 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AJ0H6B006282; Sat, 10 Jan 2009 19:00:17 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AJ0Hv1006281; Sat, 10 Jan 2009 19:00:17 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101900.n0AJ0Hv1006281@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 19:00:17 +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: r187031 - in stable/7/etc: . periodic/security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:00:20 -0000 Author: antoine Date: Sat Jan 10 19:00:17 2009 New Revision: 187031 URL: http://svn.freebsd.org/changeset/base/187031 Log: MFC r181531 to stable/7: Improve periodic/security/550.ipfwlimit a bit: - don't run it if net.inet.ip.fw.verbose = 0 as it is pointless - handle rules without logging limit correctly [1] (those rules show up without logamount in "ipfw -a list") PR: conf/126060 [1] MFC after: 1 month Modified: stable/7/etc/ (props changed) stable/7/etc/periodic/security/550.ipfwlimit Modified: stable/7/etc/periodic/security/550.ipfwlimit ============================================================================== --- stable/7/etc/periodic/security/550.ipfwlimit Sat Jan 10 18:19:22 2009 (r187030) +++ stable/7/etc/periodic/security/550.ipfwlimit Sat Jan 10 19:00:17 2009 (r187031) @@ -42,19 +42,16 @@ rc=0 case "$daily_status_security_ipfwlimit_enable" in [Yy][Ee][Ss]) - IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null` - if [ $? -ne 0 ]; then + IPFW_VERBOSE=`sysctl -n net.inet.ip.fw.verbose 2> /dev/null` + if [ $? -ne 0 ] || [ "$IPFW_VERBOSE" -eq 0 ]; then exit 0 fi TMP=`mktemp -t security` ipfw -a list | grep " log " | \ grep '^[[:digit:]]\+[[:space:]]\+[[:digit:]]\+' | \ - awk -v limit="$IPFW_LOG_LIMIT" \ + awk \ '{if ($6 == "logamount") { if ($2 > $7) - {print $0} - } else { - if ($2 > limit) {print $0}} }' > ${TMP} From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 19:01:30 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161DC1065670; Sat, 10 Jan 2009 19:01:30 +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 04D358FC19; Sat, 10 Jan 2009 19:01:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AJ1T4X006339; Sat, 10 Jan 2009 19:01:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AJ1TKs006338; Sat, 10 Jan 2009 19:01:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901101901.n0AJ1TKs006338@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 19:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187032 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:01:30 -0000 Author: mav Date: Sat Jan 10 19:01:29 2009 New Revision: 187032 URL: http://svn.freebsd.org/changeset/base/187032 Log: Remove debug slipped with the previous commit. Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sat Jan 10 19:00:17 2009 (r187031) +++ head/sys/dev/sound/pcm/dsp.c Sat Jan 10 19:01:29 2009 (r187032) @@ -2367,7 +2367,6 @@ dsp_oss_audioinfo(struct cdev *i_dev, os ai->next_play_engine = 0; ai->next_rec_engine = 0; -printf("flags: %08x %d\n", ch->flags, ai->busy); CHN_UNLOCK(ch); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 19:03:35 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D41F7106567C; Sat, 10 Jan 2009 19:03:35 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C14798FC14; Sat, 10 Jan 2009 19:03:35 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AJ3Zch006411; Sat, 10 Jan 2009 19:03:35 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AJ3ZGS006410; Sat, 10 Jan 2009 19:03:35 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901101903.n0AJ3ZGS006410@svn.freebsd.org> From: Antoine Brodin Date: Sat, 10 Jan 2009 19:03:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187033 - in stable/6/etc: . periodic/security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:03:36 -0000 Author: antoine Date: Sat Jan 10 19:03:35 2009 New Revision: 187033 URL: http://svn.freebsd.org/changeset/base/187033 Log: MFC r181531 to stable/6: Improve periodic/security/550.ipfwlimit a bit: - don't run it if net.inet.ip.fw.verbose = 0 as it is pointless - handle rules without logging limit correctly [1] (those rules show up without logamount in "ipfw -a list") PR: conf/126060 [1] MFC after: 1 month Modified: stable/6/etc/ (props changed) stable/6/etc/periodic/security/550.ipfwlimit Modified: stable/6/etc/periodic/security/550.ipfwlimit ============================================================================== --- stable/6/etc/periodic/security/550.ipfwlimit Sat Jan 10 19:01:29 2009 (r187032) +++ stable/6/etc/periodic/security/550.ipfwlimit Sat Jan 10 19:03:35 2009 (r187033) @@ -42,19 +42,16 @@ rc=0 case "$daily_status_security_ipfwlimit_enable" in [Yy][Ee][Ss]) - IPFW_LOG_LIMIT=`sysctl -n net.inet.ip.fw.verbose_limit 2> /dev/null` - if [ $? -ne 0 ]; then + IPFW_VERBOSE=`sysctl -n net.inet.ip.fw.verbose 2> /dev/null` + if [ $? -ne 0 ] || [ "$IPFW_VERBOSE" -eq 0 ]; then exit 0 fi TMP=`mktemp -t security` ipfw -a list | grep " log " | \ grep '^[[:digit:]]\+[[:space:]]\+[[:digit:]]\+' | \ - awk -v limit="$IPFW_LOG_LIMIT" \ + awk \ '{if ($6 == "logamount") { if ($2 > $7) - {print $0} - } else { - if ($2 > limit) {print $0}} }' > ${TMP} From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 19:38:19 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60B0E1065673; Sat, 10 Jan 2009 19:38:19 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 3BA0A8FC1C; Sat, 10 Jan 2009 19:38:18 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 10 Jan 2009 11:38:16 -0800 Message-ID: <4968F927.1010206@elischer.org> Date: Sat, 10 Jan 2009 11:38:15 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:38:19 -0000 Adrian Chadd wrote: > 2009/1/10 Robert Watson : > >> I think Julian's analysis, that this is more of an inet option than a >> socket-layer option, seems more appropriate to me, the benefits of >> portability in adopting the API used by OpenBSD/BSDI/etc seem more >> compelling. We should make sure that, if we move to the socket option used >> on those systems, we block setting it on non-supporting protocols, or >> confusion will result. In particular, Adrian's change only modified IPv4, >> not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set >> the option. actually I think i'm wrong in one way.. (I had been up 2 days) I was mixing in my mind two things.. the action of 'bind' whiuch this patch is about, and the action of accepting packets destined for other addresses, which is what the as yet unchecked in part.. the 'for-me' ipfw option is about. bind() of course can not be done after the socket has gone away so I don't know what I was thinking when I said that. However the protocol has the code that makes the decision as to whether the address is bindable or not, which is why I did it the way I did.. so in hte end it is still a toss up as to whether this should be a protocol or socket layer option, as ultimately the protocol has to (not) do the work. > > I'm happy to (eventually) also implement the BSDI API once I actually > spend time looking at what the difference in behaviours are. If we're > lucky, the only difference is where the socket option hooks in and the > actual network behaviour is the same. > > (Meanwhile, I think I have to go off and implement this particular > behaviour in Squid, and see if the OpenBSD support indeed does > function as advertised.) > > > > Adrian From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 19:40:20 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B539A1065670; Sat, 10 Jan 2009 19:40:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mx1.freebsd.org (Postfix) with ESMTP id 1945F8FC0A; Sat, 10 Jan 2009 19:40:19 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5836407qwb.7 for ; Sat, 10 Jan 2009 11:40:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=EU2Ia1C9O/cqIGmSXDS2eqWl9ldqvwWkAmUtJDmit3k=; b=MiimVvbYEj5GpIAaEaXIX9jiY3S6Qs9vAbF/g29fdnDQxxAgSe/qrsbVVxCbKnM8Ko bSGxQ1HgW8VVAh0q390wqfCCFwYFowFTgMyhKC3vxTMZ+ZqdY4i5sU+oy3G+Jhi376Br 68mBnpdEjV7euuH3Mrbp58cNFmJ+iekZ5nIsg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=dDqq4p3QOQKy8Yc1bDhzNCpMfG7Ehd3ul53RHdAkZb7FyiC5GXX7NO8a/35REHYFKT iExyL0ect+oli4UOMabPATu4nbGuVfcI+n/cJSCUjZiV+UnAJGVu6XF2/i9Iuq+cgS4w IQtAFP6pGX80rD/BSfij12n57vAl0abdpYkIk= Received: by 10.214.80.20 with SMTP id d20mr7292151qab.62.1231616419316; Sat, 10 Jan 2009 11:40:19 -0800 (PST) Received: by 10.214.81.13 with HTTP; Sat, 10 Jan 2009 11:40:19 -0800 (PST) Message-ID: Date: Sat, 10 Jan 2009 14:40:19 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4968E8B4.9090309@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> <4968E8B4.9090309@fsn.hu> X-Google-Sender-Auth: 54ced42e2eb0b001 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson , Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 19:40:21 -0000 2009/1/10 Attila Nagy : > BTW, I'm eagerly waiting for somebody to implement this transparency into > nginx, which can act as a reverse proxy with built-in perl logic. :) > That way FreeBSD could be used as a highly flexible transparent reverse HTTP > proxy. > > Do you know anything else which can do that now with an easy API (accessible > from high level languages like perl or python)? Heh. Well, my -eventual- aim with Squid/Cacheboy may make this sort of stuff possible, but with lua and not perl. Lots of work to do before that happens though. Of course, the problem with transparency is doing it -right-, and this patch is about 1% of the total work required to solve all the problems so people don't "notice broken stuff".. Adrian From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 20:33:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AEA91065672; Sat, 10 Jan 2009 20:33:02 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 45EB68FC13; Sat, 10 Jan 2009 20:33:02 +0000 (UTC) (envelope-from prvs=julian=254810458@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.87]) by smtp-outbound.ironport.com with ESMTP; 10 Jan 2009 12:33:02 -0800 Message-ID: <496905FC.2030706@elischer.org> Date: Sat, 10 Jan 2009 12:33:00 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 To: Adrian Chadd References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> <4968E8B4.9090309@fsn.hu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Robert Watson Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:33:02 -0000 Adrian Chadd wrote: > 2009/1/10 Attila Nagy : > > >> BTW, I'm eagerly waiting for somebody to implement this transparency into >> nginx, which can act as a reverse proxy with built-in perl logic. :) >> That way FreeBSD could be used as a highly flexible transparent reverse HTTP >> proxy. >> >> Do you know anything else which can do that now with an easy API (accessible >> from high level languages like perl or python)? > > Heh. Well, my -eventual- aim with Squid/Cacheboy may make this sort of > stuff possible, but with lua and not perl. Lots of work to do before > that happens though. > > Of course, the problem with transparency is doing it -right-, and this > patch is about 1% of the total work required to solve all the problems > so people don't "notice broken stuff".. > ah, but it's the FIRST 1% :-) > > > Adrian From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 20:49:16 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 000D3106566C; Sat, 10 Jan 2009 20:49:15 +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 E2FBC8FC0A; Sat, 10 Jan 2009 20:49:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AKnFMV008428; Sat, 10 Jan 2009 20:49:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AKnFP6008427; Sat, 10 Jan 2009 20:49:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901102049.n0AKnFP6008427@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 20:49:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187034 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:49:16 -0000 Author: mav Date: Sat Jan 10 20:49:15 2009 New Revision: 187034 URL: http://svn.freebsd.org/changeset/base/187034 Log: Make devnode include full device path. This makes OSSv4 osstest tool work. Modified: head/sys/dev/sound/pcm/dsp.c Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Sat Jan 10 19:03:35 2009 (r187033) +++ head/sys/dev/sound/pcm/dsp.c Sat Jan 10 20:49:15 2009 (r187034) @@ -2339,7 +2339,8 @@ dsp_oss_audioinfo(struct cdev *i_dev, os * @c real_device - OSSv4 docs: "Obsolete." */ ai->real_device = -1; - strlcpy(ai->devnode, devname, sizeof(ai->devnode)); + strlcpy(ai->devnode, "/dev/", sizeof(ai->devnode)); + strlcat(ai->devnode, devname, sizeof(ai->devnode)); ai->enabled = device_is_attached(d->dev) ? 1 : 0; /** * @note From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 20:54:47 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77890106566B; Sat, 10 Jan 2009 20:54:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6597F8FC0A; Sat, 10 Jan 2009 20:54:47 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AKsl0e008553; Sat, 10 Jan 2009 20:54:47 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AKslsw008552; Sat, 10 Jan 2009 20:54:47 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901102054.n0AKslsw008552@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 10 Jan 2009 20:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187035 - head/sbin/mount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 20:54:48 -0000 Author: obrien Date: Sat Jan 10 20:54:47 2009 New Revision: 187035 URL: http://svn.freebsd.org/changeset/base/187035 Log: Explicitly check each mount argv building assignment for buffer over flowing. Reviewed by: imp (earlier version of patch) Modified: head/sbin/mount/mount.c Modified: head/sbin/mount/mount.c ============================================================================== --- head/sbin/mount/mount.c Sat Jan 10 20:49:15 2009 (r187034) +++ head/sbin/mount/mount.c Sat Jan 10 20:54:47 2009 (r187035) @@ -68,16 +68,21 @@ static const char rcsid[] = #define MOUNT_META_OPTION_FSTAB "fstab" #define MOUNT_META_OPTION_CURRENT "current" -#define MAX_ARGS 100 - int debug, fstab_style, verbose; +#define MAX_ARGS 100 +struct cpa { + char *a[MAX_ARGS]; + ssize_t m; + int c; +}; + char *catopt(char *, const char *); struct statfs *getmntpt(const char *); int hasopt(const char *, const char *); int ismounted(struct fstab *, struct statfs *, int); int isremountable(const char *); -void mangle(char *, int *, char *[]); +void mangle(char *, struct cpa *); char *update_options(char *, char *, int); int mountfs(const char *, const char *, const char *, int, const char *, const char *); @@ -499,12 +504,20 @@ hasopt(const char *mntopts, const char * return (found); } +static void +append_arg(struct cpa *sa, char *arg) +{ + if (sa->c >= sa->m) + errx(1, "Cannot process more than %zd mount arguments", sa->m); + + sa->a[++sa->c] = arg; +} + int mountfs(const char *vfstype, const char *spec, const char *name, int flags, const char *options, const char *mntopts) { - static int argc; - char *argv[MAX_ARGS]; + struct cpa mnt_argv; struct statfs sf; int i, ret; char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX]; @@ -542,32 +555,29 @@ mountfs(const char *vfstype, const char /* Construct the name of the appropriate mount command */ (void)snprintf(execname, sizeof(execname), "mount_%s", vfstype); - argc = 0; - argv[argc++] = execname; - mangle(optbuf, &argc, argv); - argv[argc++] = strdup(spec); - argv[argc++] = strdup(name); - argv[argc] = NULL; - - if (MAX_ARGS <= argc ) - errx(1, "Cannot process more than %d mount arguments", - MAX_ARGS); + mnt_argv.m = MAX_ARGS; + mnt_argv.c = -1; + append_arg(&mnt_argv, execname); + mangle(optbuf, &mnt_argv); + append_arg(&mnt_argv, strdup(spec)); + append_arg(&mnt_argv, strdup(name)); + append_arg(&mnt_argv, NULL); if (debug) { if (use_mountprog(vfstype)) printf("exec: mount_%s", vfstype); else printf("mount -t %s", vfstype); - for (i = 1; i < argc; i++) - (void)printf(" %s", argv[i]); + for (i = 1; i < mnt_argv.c; i++) + (void)printf(" %s", mnt_argv.a[i]); (void)printf("\n"); return (0); } if (use_mountprog(vfstype)) { - ret = exec_mountprog(name, execname, argv); + ret = exec_mountprog(name, execname, mnt_argv.a); } else { - ret = mount_fs(vfstype, argc, argv); + ret = mount_fs(vfstype, mnt_argv.c, mnt_argv.a); } free(optbuf); @@ -670,12 +680,10 @@ catopt(char *s0, const char *s1) } void -mangle(char *options, int *argcp, char *argv[]) +mangle(char *options, struct cpa *a) { char *p, *s; - int argc; - argc = *argcp; for (s = options; (p = strsep(&s, ",")) != NULL;) if (*p != '\0') { if (strcmp(p, "noauto") == 0) { @@ -707,19 +715,17 @@ mangle(char *options, int *argcp, char * sizeof(groupquotaeq) - 1) == 0) { continue; } else if (*p == '-') { - argv[argc++] = p; + append_arg(a, p); p = strchr(p, '='); if (p != NULL) { *p = '\0'; - argv[argc++] = p+1; + append_arg(a, p + 1); } } else { - argv[argc++] = strdup("-o"); - argv[argc++] = p; + append_arg(a, strdup("-o")); + append_arg(a, p); } } - - *argcp = argc; } From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 21:38:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB3C4106567E for ; Sat, 10 Jan 2009 21:38:23 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: from mail-bw0-f20.google.com (mail-bw0-f20.google.com [209.85.218.20]) by mx1.freebsd.org (Postfix) with ESMTP id 546078FC17 for ; Sat, 10 Jan 2009 21:38:23 +0000 (UTC) (envelope-from joao.barros@gmail.com) Received: by bwz13 with SMTP id 13so4229614bwz.19 for ; Sat, 10 Jan 2009 13:38:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=s9AweqxWM7uW+9xVm7JhANGZenJdHE5qwqm6YPjXSNY=; b=bYMQNHrvGxgAgOdmvkmtLgNwpNI6+7m/KegzY+QCQKEyO4Msb7sEVRHMvA4RAqSlQ/ pn5o+3n/GAORa4LJzwlB68fxzKIATnKZnHLAMNzbMcT7foq5Opd8UT0BuERlfBEawq28 be3+pzYVZQY7JfgtTAD1mt0lGaQhkPcffRBaA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=K3IjCuzh8iGxS+aGJXXJlqGKcyBkKFejath9tgOhuQT9uHQb9jFR+9UWPR8OJHsAxA E/7PuzlrdgtdbnuH4QaXAmFj47epD9ALNoPoiS63HZQjkcGMpeFhySZzLogsYZvX5aJF KRhGqMnhMV+dwkA3EhdFr384W0n78yO4caZhk= Received: by 10.181.208.11 with SMTP id k11mr10282063bkq.180.1231621649580; Sat, 10 Jan 2009 13:07:29 -0800 (PST) Received: by 10.180.234.7 with HTTP; Sat, 10 Jan 2009 13:07:29 -0800 (PST) Message-ID: <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> Date: Sat, 10 Jan 2009 21:07:29 +0000 From: "=?ISO-8859-1?Q?Jo=E3o_Barros?=" To: "Konstantin Belousov" In-Reply-To: <200901101624.n0AGOwUW003080@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901101624.n0AGOwUW003080@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:38:24 -0000 On Sat, Jan 10, 2009 at 4:24 PM, Konstantin Belousov wrote: > Author: kib > Date: Sat Jan 10 16:24:58 2009 > New Revision: 187024 > URL: http://svn.freebsd.org/changeset/base/187024 > > Log: > Correct description for the Marvell 88SE6101. > > Submitted by: Andriy Gapon > MFC after: 3 days > > Modified: > head/share/misc/pci_vendors > > Modified: head/share/misc/pci_vendors > ============================================================================== > --- head/share/misc/pci_vendors Sat Jan 10 16:19:38 2009 (r187023) > +++ head/share/misc/pci_vendors Sat Jan 10 16:24:58 2009 (r187024) > @@ -4606,7 +4606,7 @@ > 6041 MV88SX6041 Marvell Technology Group Ltd. MV88SX6041 4-port SATA II PCI-X Controller (rev 03) > 6042 MV88SX6042 4-port SATA II PCI-X Controller > 6081 MV88SX6081 8-port SATA II PCI-X Controller > - 6101 6101 SATA2 Controller > + 6101 MV88SX6101 1-port UltraATA/133 Controller > 6111 6111 SATA2 Controller > 6120 6120 SATA2 Controller > 6121 6121 SATA2 Controller Could you please do the same for the 6121? Please see http://svn.freebsd.org/viewvc/base?view=revision&revision=185268 Thank you :-) -- Joao Barros From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 21:38:38 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0256D1065677; Sat, 10 Jan 2009 21:38:38 +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 E52EE8FC1B; Sat, 10 Jan 2009 21:38:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ALcbAa009422; Sat, 10 Jan 2009 21:38:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ALcbRe009421; Sat, 10 Jan 2009 21:38:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200901102138.n0ALcbRe009421@svn.freebsd.org> From: Alexander Motin Date: Sat, 10 Jan 2009 21:38:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187036 - head/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:38:38 -0000 Author: mav Date: Sat Jan 10 21:38:37 2009 New Revision: 187036 URL: http://svn.freebsd.org/changeset/base/187036 Log: OSS tools expect EINVAL for unsupported ioctls, but not ENXIO. Modified: head/sys/dev/sound/pcm/mixer.c Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Sat Jan 10 20:54:47 2009 (r187035) +++ head/sys/dev/sound/pcm/mixer.c Sat Jan 10 21:38:37 2009 (r187036) @@ -1040,7 +1040,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo case SNDCTL_MIXERINFO: return (mixer_oss_mixerinfo(i_dev, (oss_mixerinfo *)arg)); } - return (ENXIO); + return (EINVAL); } m = i_dev->si_drv1; @@ -1090,7 +1090,6 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo ret = 0; switch (cmd) { - /** @todo Double check return values, error codes. */ case SNDCTL_DSP_GET_RECSRC_NAMES: bcopy((void *)&m->enuminfo, arg, sizeof(oss_mixer_enuminfo)); break; @@ -1104,7 +1103,7 @@ mixer_ioctl_cmd(struct cdev *i_dev, u_lo *arg_i = SOUND_VERSION; break; default: - ret = ENXIO; + ret = EINVAL; break; } From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 21:50:28 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 144BF1065674; Sat, 10 Jan 2009 21:50:28 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id AB8938FC1F; Sat, 10 Jan 2009 21:50:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1LLlir-000BiY-MZ; Sat, 10 Jan 2009 23:50:25 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n0ALoMpo021797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 10 Jan 2009 23:50:23 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n0ALoMdX025326; Sat, 10 Jan 2009 23:50:22 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n0ALoMM8025305; Sat, 10 Jan 2009 23:50:22 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 10 Jan 2009 23:50:22 +0200 From: Kostik Belousov To: Jo?o Barros Message-ID: <20090110215022.GO93900@deviant.kiev.zoral.com.ua> References: <200901101624.n0AGOwUW003080@svn.freebsd.org> <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PxiMezDaJQClLw92" Content-Disposition: inline In-Reply-To: <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1LLlir-000BiY-MZ 3d5b7d4cb3531042b12544e6db5b6093 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:50:28 -0000 --PxiMezDaJQClLw92 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jan 10, 2009 at 09:07:29PM +0000, Jo?o Barros wrote: > Could you please do the same for the 6121? > Please see http://svn.freebsd.org/viewvc/base?view=revision&revision=185268 If you provide the patch for the pci_vendors, I will commit it. I have no idea what is the proper descriptive line for the device, and I do not want to interpret our ATA tables to compile the line. --PxiMezDaJQClLw92 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAklpGB0ACgkQC3+MBN1Mb4h5IQCfVwxtHd8KcOsGCJV588wYkMlj ZgcAnA2/yyTW685fyXyeCjgHVJU7hGGX =oqDk -----END PGP SIGNATURE----- --PxiMezDaJQClLw92-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 21:53:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62F04106566B; Sat, 10 Jan 2009 21:53:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6C91F8FC19; Sat, 10 Jan 2009 21:53:22 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 231321349; Sat, 10 Jan 2009 23:53:21 +0200 Message-ID: <496918D5.4080905@FreeBSD.org> Date: Sat, 10 Jan 2009 23:53:25 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.17 (X11/20081029) MIME-Version: 1.0 To: Kostik Belousov References: <200901101624.n0AGOwUW003080@svn.freebsd.org> <70e8236f0901101307i39d4aacfr254b079f15d3e84a@mail.gmail.com> <20090110215022.GO93900@deviant.kiev.zoral.com.ua> In-Reply-To: <20090110215022.GO93900@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Jo?o Barros , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r187024 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 21:53:24 -0000 Kostik Belousov wrote: > On Sat, Jan 10, 2009 at 09:07:29PM +0000, Jo?o Barros wrote: >> Could you please do the same for the 6121? >> Please see http://svn.freebsd.org/viewvc/base?view=revision&revision=185268 > > If you provide the patch for the pci_vendors, I will commit it. I have > no idea what is the proper descriptive line for the device, and I do > not want to interpret our ATA tables to compile the line. This is autogenerated file. It is bad idea to touch it by hands. I would better submit fixes to the sites from which it is generated. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 22:48:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60DC7106564A; Sat, 10 Jan 2009 22:48:12 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F6AF8FC08; Sat, 10 Jan 2009 22:48:12 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AMmCFJ010722; Sat, 10 Jan 2009 22:48:12 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AMmC0D010721; Sat, 10 Jan 2009 22:48:12 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901102248.n0AMmC0D010721@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 10 Jan 2009 22:48:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187037 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 22:48:12 -0000 Author: ru Date: Sat Jan 10 22:48:12 2009 New Revision: 187037 URL: http://svn.freebsd.org/changeset/base/187037 Log: Fix markup and spelling. Modified: head/usr.bin/netstat/netstat.1 Modified: head/usr.bin/netstat/netstat.1 ============================================================================== --- head/usr.bin/netstat/netstat.1 Sat Jan 10 21:38:37 2009 (r187036) +++ head/usr.bin/netstat/netstat.1 Sat Jan 10 22:48:12 2009 (r187037) @@ -32,7 +32,7 @@ .\" @(#)netstat.1 8.8 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd June 10, 2007 +.Dd May 16, 2008 .Dt NETSTAT 1 .Os .Sh NAME @@ -460,12 +460,15 @@ For more information about these flags, .Pp The .Fl x -flag causes netstat to output all the information recorded about data -stored in the socket buffers. The fields are: +flag causes +.Nm +to output all the information recorded about data +stored in the socket buffers. +The fields are: .Bl -column ".Li R-MBUF" .It Li R-MBUF Ta Number of mbufs in the receive queue. .It Li S-MBUF Ta Number of mbufs in the send queue. -.It Li R-CLUS Ta Number of clusters, of any type, in the recieve +.It Li R-CLUS Ta Number of clusters, of any type, in the receive queue. .It Li S-CLUS Ta Number of clusters, of any type, in the send queue. .It Li R-HIWA Ta Receive buffer high water mark, in bytes. From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 22:49:02 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61C74106566C; Sat, 10 Jan 2009 22:49:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 509708FC14; Sat, 10 Jan 2009 22:49:02 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0AMn2EF010778; Sat, 10 Jan 2009 22:49:02 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0AMn2rv010777; Sat, 10 Jan 2009 22:49:02 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200901102249.n0AMn2rv010777@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 10 Jan 2009 22:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187038 - head/usr.bin/netstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 22:49:03 -0000 Author: ru Date: Sat Jan 10 22:49:02 2009 New Revision: 187038 URL: http://svn.freebsd.org/changeset/base/187038 Log: Fix usage() with SYNOPSIS. Modified: head/usr.bin/netstat/main.c Modified: head/usr.bin/netstat/main.c ============================================================================== --- head/usr.bin/netstat/main.c Sat Jan 10 22:48:12 2009 (r187037) +++ head/usr.bin/netstat/main.c Sat Jan 10 22:49:02 2009 (r187038) @@ -770,17 +770,18 @@ static void usage(void) { (void)fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: netstat [-AaLnSW] [-f protocol_family | -p protocol]\n" +"usage: netstat [-AaLnSWx] [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", -" netstat -i | -I interface [-abdhnt] [-f address_family]\n" +" netstat -i | -I interface [-abdhntW] [-f address_family]\n" " [-M core] [-N system]", " netstat -w wait [-I interface] [-d] [-M core] [-N system]", -" netstat -s [-s] [-z] [-f protocol_family | -p protocol] [-M core]", +" netstat -s [-s] [-z] [-f protocol_family | -p protocol]\n" +" [-M core] [-N system]", " netstat -i | -I interface -s [-f protocol_family | -p protocol]\n" " [-M core] [-N system]", " netstat -m [-M core] [-N system]", -" netstat -B [ -I interface]", -" netstat -r [-AenW] [-f address_family] [-M core] [-N system]", +" netstat -B [-I interface]", +" netstat -r [-AanW] [-f address_family] [-M core] [-N system]", " netstat -rs [-s] [-M core] [-N system]", " netstat -g [-W] [-f address_family] [-M core] [-N system]", " netstat -gs [-s] [-f address_family] [-M core] [-N system]"); From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 23:33:17 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D923F106566C; Sat, 10 Jan 2009 23:33:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id AF6A58FC16; Sat, 10 Jan 2009 23:33:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 5009846B32; Sat, 10 Jan 2009 18:33:17 -0500 (EST) Date: Sat, 10 Jan 2009 23:33:17 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Adrian Chadd In-Reply-To: Message-ID: References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 23:33:18 -0000 On Sat, 10 Jan 2009, Adrian Chadd wrote: > 2009/1/10 Robert Watson : > >> I think Julian's analysis, that this is more of an inet option than a >> socket-layer option, seems more appropriate to me, the benefits of >> portability in adopting the API used by OpenBSD/BSDI/etc seem more >> compelling. We should make sure that, if we move to the socket option used >> on those systems, we block setting it on non-supporting protocols, or >> confusion will result. In particular, Adrian's change only modified IPv4, >> not IPv6, so until it's implemented on IPv6 it shouldn't be possible to set >> the option. > > I'm happy to (eventually) also implement the BSDI API once I actually spend > time looking at what the difference in behaviours are. If we're lucky, the > only difference is where the socket option hooks in and the actual network > behaviour is the same. > > (Meanwhile, I think I have to go off and implement this particular behaviour > in Squid, and see if the OpenBSD support indeed does function as > advertised.) If the API turns out to be effectly semantically the same, or better, then I think the suggestion is to entirely replace, rather than supplement, the socket option you just added with it. There's no point in having pointlessly divergent APIs where it can be avoided. Robert N M Watson Computer Laboratory University of Cambridge From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 23:35:12 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0D92106564A; Sat, 10 Jan 2009 23:35:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 50B868FC16; Sat, 10 Jan 2009 23:35:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5870981qwb.7 for ; Sat, 10 Jan 2009 15:35:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=WF8TFPwZEnW+k9ggWM3TCO8IZUsVYGVwv/Ukdugkqs4=; b=bdg1zrEfPck6ReovNsr6yTl6r+I4wXnfnE2VBPFYeWV3us+ikuj3RXlBFQzyJh+jPL WDZjQXNr83IrlnrsTwQ+bPAzFD6NhysATY9buzlJeg7FomWGU2k+54p4lbgE3ZbJSnLS nqqoyTD2e3KmNun0wTbc4SgSPj4OtJULPOpDk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=T328oSKWGLtWUW7WZdKpXCXxSBv7hMZCBySUvdU5AiYgarIywwut0hgjEtZDq+JJj2 BuJQkn7YugSCkwfBwWp1YQzfTiTGz4VeQhmXL/z7jzoGx6XQ7SGj+PQFVLfVgti16NfM Wh3KvlpUTX11KF6LWqAeTrN1v13qeXsBzaon8= Received: by 10.214.11.11 with SMTP id 11mr24086563qak.308.1231630511767; Sat, 10 Jan 2009 15:35:11 -0800 (PST) Received: by 10.214.81.13 with HTTP; Sat, 10 Jan 2009 15:35:11 -0800 (PST) Message-ID: Date: Sat, 10 Jan 2009 18:35:11 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Robert Watson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> <4967B6D9.90001@elischer.org> <4967C539.2060803@fsn.hu> <49686A30.4000205@fsn.hu> X-Google-Sender-Auth: 148f1030c9c29b9d Cc: svn-src-head@freebsd.org, Attila Nagy , svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 23:35:13 -0000 2009/1/10 Robert Watson : > If the API turns out to be effectly semantically the same, or better, then I > think the suggestion is to entirely replace, rather than supplement, the > socket option you just added with it. There's no point in having > pointlessly divergent APIs where it can be avoided. I'll look into it. Adrian From owner-svn-src-all@FreeBSD.ORG Sat Jan 10 23:50:23 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C5E01065670; Sat, 10 Jan 2009 23:50:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A6AF8FC19; Sat, 10 Jan 2009 23:50:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0ANoNgs011966; Sat, 10 Jan 2009 23:50:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0ANoN3F011965; Sat, 10 Jan 2009 23:50:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901102350.n0ANoN3F011965@svn.freebsd.org> From: Robert Watson Date: Sat, 10 Jan 2009 23:50:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187039 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jan 2009 23:50:23 -0000 Author: rwatson Date: Sat Jan 10 23:50:23 2009 New Revision: 187039 URL: http://svn.freebsd.org/changeset/base/187039 Log: Do invoke mac_ifnet_check_transmit() and mac_ifnet_create_mbuf() in the loopback and synthetic loopback code so that packets are access control checked and relabeled. Previously, the MAC Framework enforced that packets sent over the loopback weren't relabeled, but this will allow policies to make explicit choices about how and whether to relabel packets on the loopback. Also, for SIMPLEX devices, this produces more consistent behavior for looped back packets to the local MAC address by labeling those packets as coming from the interface. Discussed with: csjp Obtained from: TrustedBSD Project Modified: head/sys/net/if_loop.c Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Sat Jan 10 22:49:02 2009 (r187038) +++ head/sys/net/if_loop.c Sat Jan 10 23:50:23 2009 (r187039) @@ -38,6 +38,7 @@ #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipx.h" +#include "opt_mac.h" #include #include @@ -82,6 +83,8 @@ #include #endif +#include + #ifdef TINY_LOMTU #define LOMTU (1024+512) #elif defined(LARGE_LOMTU) @@ -176,9 +179,20 @@ looutput(struct ifnet *ifp, struct mbuf struct rtentry *rt) { u_int32_t af; +#ifdef MAC + int error; +#endif M_ASSERTPKTHDR(m); /* check if we have the packet header */ +#ifdef MAC + error = mac_ifnet_check_transmit(ifp, m); + if (error) { + m_freem(m); + return (error); + } +#endif + if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) { m_freem(m); return (rt->rt_flags & RTF_BLACKHOLE ? 0 : @@ -230,6 +244,10 @@ if_simloop(struct ifnet *ifp, struct mbu m_tag_delete_nonpersistent(m); m->m_pkthdr.rcvif = ifp; +#ifdef MAC + mac_ifnet_create_mbuf(ifp, m); +#endif + /* * Let BPF see incoming packet in the following manner: * - Emulated packet loopback for a simplex interface