From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 01:12:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3D4457AD; Sun, 7 Jul 2013 01:12:30 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2DE641BC4; Sun, 7 Jul 2013 01:12:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r671CTGX081792; Sun, 7 Jul 2013 01:12:29 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r671CTJ2081791; Sun, 7 Jul 2013 01:12:29 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201307070112.r671CTJ2081791@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 7 Jul 2013 01:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252906 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 01:12:30 -0000 Author: pfg Date: Sun Jul 7 01:12:29 2013 New Revision: 252906 URL: http://svnweb.freebsd.org/changeset/base/252906 Log: Add files related to ext2 HTree implementation These should've been added along with r252890 Reported by: gonzo PointyHat: pfg MFC after: 1 week Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jul 6 23:56:58 2013 (r252905) +++ head/sys/conf/files Sun Jul 7 01:12:29 2013 (r252906) @@ -2666,6 +2666,8 @@ fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs +fs/ext2fs/ext2_hash.c optional ext2fs +fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 01:32:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B875AC33; Sun, 7 Jul 2013 01:32:52 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AB16B1C23; Sun, 7 Jul 2013 01:32:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r671WqLl087663; Sun, 7 Jul 2013 01:32:52 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r671Wq20087662; Sun, 7 Jul 2013 01:32:52 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201307070132.r671Wq20087662@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 7 Jul 2013 01:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252907 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 01:32:52 -0000 Author: pfg Date: Sun Jul 7 01:32:52 2013 New Revision: 252907 URL: http://svnweb.freebsd.org/changeset/base/252907 Log: Fix some typos. MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_htree.c Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Sun Jul 7 01:12:29 2013 (r252906) +++ head/sys/fs/ext2fs/ext2_htree.c Sun Jul 7 01:32:52 2013 (r252907) @@ -313,7 +313,7 @@ error: } /* - * Try to lookup an directory entry in HTree index + * Try to lookup a directory entry in HTree index */ int ext2_htree_lookup(struct inode *ip, const char *name, int namelen, @@ -458,7 +458,7 @@ ext2_htree_insert_entry(struct ext2fs_ht } /* - * Compare two entry sort descriptiors by name hash value. + * Compare two entry sort descriptors by name hash value. * This is used together with qsort. */ static int @@ -584,7 +584,7 @@ ext2_htree_split_dirblock(char *block1, ep = (struct ext2fs_direct_2 *)(block1 + offset); offset += ep->e2d_reclen; if (last->e2d_ino) { - /* trim the existing slot */ + /* Trim the existing slot */ last->e2d_reclen = entry_len; last = (struct ext2fs_direct_2 *) ((char *)last + entry_len); From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 02:59:30 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 055955F6; Sun, 7 Jul 2013 02:59:30 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 7649F1D74; Sun, 7 Jul 2013 02:59:28 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id B4B88104117D; Sun, 7 Jul 2013 12:26:11 +1000 (EST) Date: Sun, 7 Jul 2013 12:26:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol In-Reply-To: <20130706195108.GA34684@stack.nl> Message-ID: <20130707114237.L897@besplex.bde.org> References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org> <20130706184249.GD25842@garage.freebsd.pl> <20130706195108.GA34684@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Q6eKePKa c=1 sm=1 a=RvpeemXtX5oA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=X2rCv88ZkwkA:10 a=juNRyV-Y17vnxQsPYmkA:9 a=CjuIK1q_8ugA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 Cc: Jim Harris , src-committers@FreeBSD.org, Pawel Jakub Dawidek , svn-src-all@FreeBSD.org, Bruce Evans , svn-src-head@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 02:59:30 -0000 On Sat, 6 Jul 2013, Jilles Tjoelker wrote: > On Sat, Jul 06, 2013 at 08:42:49PM +0200, Pawel Jakub Dawidek wrote: >> On Thu, Jul 04, 2013 at 11:44:28AM +1000, Bruce Evans wrote: >>> Many style bugs are visible in this patch: >> [...] >>> - sysexits.h is used >> [...] > >> Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used, >> please stop calling this a bug, because you are just confusing people. >> At this point sysexits(3) actually even suggests it is blessed by >> style(9). This is how it starts: > >> According to style(9), it is not a good practice to call exit(3) >> with arbitrary values to indicate a failure condition when >> ending a program. Instead, the pre-defined exit codes from >> sysexits should be used, so the caller of the process can get a >> rough estimation about the failure class without looking up the >> source code. This is just another bug in sysexits(3). This is not according to style(9), since style(9) was fixed to not say that after I complained previously :-). It has never been normal practice to use sysexits(3), but someone who likes it added recommendations to use it to style(9) when they added the man pages for sysexits(3). Before that, it was so rarely used that it had no man page. >> In my personal opinion it doesn't hurt to use sysexits(3) - if you don't >> want to interpret exit status then treat every value != 0 as an error. >> In HAST (IIRC) I do interpret exit status - if I get EX_TEMPFAIL, I know >> I can try to restart the process, if I get something else I don't >> restart it, as I risk an infinite loop. That's fine for suites of programs that agree on exit codes. You can't depend on this for anything else. >> Apart from my personal opinion, if you want to call it a bug and not >> confuse people, then start discussion and change the manual page to >> recommend avoiding sysexits(3). As of now we are just sending mixed >> signals and create confusion. > > This is indeed confusing, because style(9) itself does not recommend > sysexits at all. This was changed in 2008 but sysexits(3) was not > adjusted along with that. > > The text in style(9) that only allows 0 or 1 is not universally valid > either. Firstly, in some application areas like mail delivery, it is > conventional and documented to use and interpret sysexits codes. (So if > HAST uses sysexits, it should document that fact.) Secondly, some other > utilities such as test, cmp and diff use 0 for a "true" condition, 1 for > a "false" condition and greater than 1 (usually 2) for failures. 0 and 1 are all that are universally valid. Programs shouldn't generate more than these unless they have special requirements/protocols. But nonzero meaning "failed" should be accepted by all POSIX programs. This is even more implementation-defined than I remembered in plain C programs. In C99, EXIT_SUCCESS (0) is mapped to success in some implementation-defined way; EXIT_FAILURE (1) is mapped to failure in some implementation-defined way; for all other exit() args, the whole mapping is implementation-defined, so 2 and everything in sysexits.h may be mapped to success. Therefore, portable C programs must not use anythying except 0 or 1 (preferably spelled using the C99 macros). Not using sysexits.h also keeps the sources portable. sysexits.h is in neither C99 nor POSIX. style(9) isn't the place to give portability lessons like the above. I think we discussed using EXIT_SUCCESS and EXIT_FAILURE when we changed it to not mention sysexits, but for some reason it hard code 0 and 1. The original style rule against using cryptic error codes hasn't been restored. From the 4.4BSD style guide: % /* % * Exits should be 0 on success, and 1 on failure. Don't denote % * all the possible exit points, using the integers 1 through 300. % */ % exit(0); /* Avoid obvious comments such as "Exit 0 on success." */ (Here 300 is off by 45. Exit statuses less than 0 and greater than 255 give implementation-defined behaviour that is worse than usual.) I think this rule is to limit cryptic undocumented exit codes. I don't like sysexits because it gives cryptic documented exit codes instead. All that can be safeley done (except in prgram suites) is map all nonzero exit codes to "failed" (or killed by a signal). In another thread involving Pawel, phk campaigns against errno and asks for error strings (even if they are only in English). Using perror() did this long ago for program termination, and using the err() family does it better. Except possibly for program suites -- translating a single numeric error is easier for programs than translating an unstructured string. I actually prefer using binary representations for programs. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 04:18:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A3BCBE70; Sun, 7 Jul 2013 04:18:35 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86425101E; Sun, 7 Jul 2013 04:18:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r674IZC6036439; Sun, 7 Jul 2013 04:18:35 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r674IZZg036437; Sun, 7 Jul 2013 04:18:35 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201307070418.r674IZZg036437@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 7 Jul 2013 04:18:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252912 - head/sys/dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 04:18:35 -0000 Author: gonzo Date: Sun Jul 7 04:18:35 2013 New Revision: 252912 URL: http://svnweb.freebsd.org/changeset/base/252912 Log: - Add initial host mode support for Mentor Graphics USB OTG controller - Sync musb_otg_atmelarm with new core logic API Modified: head/sys/dev/usb/controller/musb_otg.c head/sys/dev/usb/controller/musb_otg.h head/sys/dev/usb/controller/musb_otg_atmelarm.c Modified: head/sys/dev/usb/controller/musb_otg.c ============================================================================== --- head/sys/dev/usb/controller/musb_otg.c Sun Jul 7 04:16:31 2013 (r252911) +++ head/sys/dev/usb/controller/musb_otg.c Sun Jul 7 04:18:35 2013 (r252912) @@ -95,6 +95,8 @@ SYSCTL_INT(_hw_usb_musbotg, OID_AUTO, de &musbotgdebug, 0, "Debug level"); #endif +#define MAX_NAK_TO 16 + /* prototypes */ struct usb_bus_methods musbotg_bus_methods; @@ -103,17 +105,35 @@ struct usb_pipe_methods musbotg_device_c struct usb_pipe_methods musbotg_device_intr_methods; struct usb_pipe_methods musbotg_device_isoc_methods; -static musbotg_cmd_t musbotg_setup_rx; -static musbotg_cmd_t musbotg_setup_data_rx; -static musbotg_cmd_t musbotg_setup_data_tx; -static musbotg_cmd_t musbotg_setup_status; -static musbotg_cmd_t musbotg_data_rx; -static musbotg_cmd_t musbotg_data_tx; +/* Control transfers: Device mode */ +static musbotg_cmd_t musbotg_dev_ctrl_setup_rx; +static musbotg_cmd_t musbotg_dev_ctrl_data_rx; +static musbotg_cmd_t musbotg_dev_ctrl_data_tx; +static musbotg_cmd_t musbotg_dev_ctrl_status; + +/* Control transfers: Host mode */ +static musbotg_cmd_t musbotg_host_ctrl_setup_tx; +static musbotg_cmd_t musbotg_host_ctrl_data_rx; +static musbotg_cmd_t musbotg_host_ctrl_data_tx; +static musbotg_cmd_t musbotg_host_ctrl_status_rx; +static musbotg_cmd_t musbotg_host_ctrl_status_tx; + +/* Bulk, Interrupt, Isochronous: Device mode */ +static musbotg_cmd_t musbotg_dev_data_rx; +static musbotg_cmd_t musbotg_dev_data_tx; + +/* Bulk, Interrupt, Isochronous: Host mode */ +static musbotg_cmd_t musbotg_host_data_rx; +static musbotg_cmd_t musbotg_host_data_tx; + static void musbotg_device_done(struct usb_xfer *, usb_error_t); static void musbotg_do_poll(struct usb_bus *); static void musbotg_standard_done(struct usb_xfer *); static void musbotg_interrupt_poll(struct musbotg_softc *); static void musbotg_root_intr(struct musbotg_softc *); +static int musbotg_channel_alloc(struct musbotg_softc *, struct musbotg_td *td); +static void musbotg_channel_free(struct musbotg_softc *, struct musbotg_td *td); +static void musbotg_ep_int_set(struct musbotg_softc *sc, int channel, int on); /* * Here is a configuration that the chip supports. @@ -128,6 +148,64 @@ static const struct usb_hw_ep_profile mu } }; +static int +musbotg_channel_alloc(struct musbotg_softc *sc, struct musbotg_td *td) +{ + int ch; + int ep; + + ep = td->ep_no; + + /* In device mode each EP got its own channel */ + if (sc->sc_mode == MUSB2_DEVICE_MODE) { + musbotg_ep_int_set(sc, ep, 1); + return (ep); + } + + /* + * All control transactions go through EP0 + */ + if (ep == 0) { + if (sc->sc_channel_mask & (1 << 0)) + return (-1); + sc->sc_channel_mask |= (1 << 0); + musbotg_ep_int_set(sc, ep, 1); + return (0); + } + + for (ch = 1; ch < MUSB2_EP_MAX; ch++) { + if (!(sc->sc_channel_mask & (1 << ch))) { + sc->sc_channel_mask |= (1 << ch); + musbotg_ep_int_set(sc, ch, 1); + return (ch); + } + } + + DPRINTFN(-1, "No available channels. Mask: %04x\n", sc->sc_channel_mask); + + return (-1); +} + +static void +musbotg_channel_free(struct musbotg_softc *sc, struct musbotg_td *td) +{ + + DPRINTFN(1, "ep_no=%d\n", td->channel); + + if (sc->sc_mode == MUSB2_DEVICE_MODE) + return; + + if (td == NULL) + return; + if (td->channel == -1) + return; + + musbotg_ep_int_set(sc, td->channel, 0); + sc->sc_channel_mask &= ~(1 << td->channel); + + td->channel = -1; +} + static void musbotg_get_hw_ep_profile(struct usb_device *udev, const struct usb_hw_ep_profile **ppf, uint8_t ep_addr) @@ -218,6 +296,46 @@ musbotg_pull_down(struct musbotg_softc * } static void +musbotg_suspend_host(struct musbotg_softc *sc) +{ + uint8_t temp; + + if (sc->sc_flags.status_suspend) { + return; + } + + temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); + temp |= MUSB2_MASK_SUSPMODE; + MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); + sc->sc_flags.status_suspend = 1; +} + +static void +musbotg_wakeup_host(struct musbotg_softc *sc) +{ + uint8_t temp; + + if (!(sc->sc_flags.status_suspend)) { + return; + } + + temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); + temp &= ~MUSB2_MASK_SUSPMODE; + temp |= MUSB2_MASK_RESUME; + MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); + + /* wait 20 milliseconds */ + /* Wait for reset to complete. */ + usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 50); + + temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); + temp &= ~MUSB2_MASK_RESUME; + MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); + + sc->sc_flags.status_suspend = 0; +} + +static void musbotg_wakeup_peer(struct musbotg_softc *sc) { uint8_t temp; @@ -248,7 +366,7 @@ musbotg_set_address(struct musbotg_softc } static uint8_t -musbotg_setup_rx(struct musbotg_td *td) +musbotg_dev_ctrl_setup_rx(struct musbotg_td *td) { struct musbotg_softc *sc; struct usb_device_request req; @@ -258,6 +376,15 @@ musbotg_setup_rx(struct musbotg_td *td) /* get pointer to softc */ sc = MUSBOTG_PC2SC(td->pc); + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* EP0 is busy, wait */ + if (td->channel == -1) + return (1); + + DPRINTFN(1, "ep_no=%d\n", td->channel); + /* select endpoint 0 */ MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); @@ -274,8 +401,10 @@ musbotg_setup_rx(struct musbotg_td *td) /* do not stall at this point */ td->did_stall = 1; /* wait for interrupt */ + DPRINTFN(0, "CSR0 DATAEND\n"); goto not_complete; } + if (csr & MUSB2_MASK_CSR0L_SENTSTALL) { /* clear SENTSTALL */ MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, 0); @@ -294,6 +423,7 @@ musbotg_setup_rx(struct musbotg_td *td) sc->sc_ep0_busy = 0; } if (sc->sc_ep0_busy) { + DPRINTFN(0, "EP0 BUSY\n"); goto not_complete; } if (!(csr & MUSB2_MASK_CSR0L_RXPKTRDY)) { @@ -342,6 +472,8 @@ musbotg_setup_rx(struct musbotg_td *td) } else { sc->sc_dv_addr = 0xFF; } + + musbotg_channel_free(sc, td); return (0); /* complete */ not_complete: @@ -355,10 +487,117 @@ not_complete: return (1); /* not complete */ } +static uint8_t +musbotg_host_ctrl_setup_tx(struct musbotg_td *td) +{ + struct musbotg_softc *sc; + struct usb_device_request req; + uint8_t csr, csrh; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* EP0 is busy, wait */ + if (td->channel == -1) + return (1); + + DPRINTFN(1, "ep_no=%d\n", td->channel); + + /* select endpoint 0 */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); + + /* read out FIFO status */ + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + DPRINTFN(4, "csr=0x%02x\n", csr); + + /* Not ready yet yet */ + if (csr & MUSB2_MASK_CSR0L_TXPKTRDY) + return (1); + + /* Failed */ + if (csr & (MUSB2_MASK_CSR0L_RXSTALL | + MUSB2_MASK_CSR0L_ERROR)) + { + /* Clear status bit */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, 0); + DPRINTFN(1, "error bit set, csr=0x%02x\n", csr); + td->error = 1; + } + + if (csr & MUSB2_MASK_CSR0L_NAKTIMO) { + DPRINTFN(1, "NAK timeout\n"); + + if (csr & MUSB2_MASK_CSR0L_TXFIFONEMPTY) { + csrh = MUSB2_READ_1(sc, MUSB2_REG_TXCSRH); + csrh |= MUSB2_MASK_CSR0H_FFLUSH; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRH, csrh); + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + if (csr & MUSB2_MASK_CSR0L_TXFIFONEMPTY) { + csrh = MUSB2_READ_1(sc, MUSB2_REG_TXCSRH); + csrh |= MUSB2_MASK_CSR0H_FFLUSH; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRH, csrh); + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + } + } + + csr &= ~MUSB2_MASK_CSR0L_NAKTIMO; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + + td->error = 1; + } + + if (td->error) { + musbotg_channel_free(sc, td); + return (0); + } + + /* Fifo is not empty and there is no NAK timeout */ + if (csr & MUSB2_MASK_CSR0L_TXPKTRDY) + return (1); + + /* check if we are complete */ + if (td->remainder == 0) { + /* we are complete */ + musbotg_channel_free(sc, td); + return (0); + } + + /* copy data into real buffer */ + usbd_copy_out(td->pc, 0, &req, sizeof(req)); + + /* send data */ + bus_space_write_multi_1(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), (void *)&req, sizeof(req)); + + /* update offset and remainder */ + td->offset += sizeof(req); + td->remainder -= sizeof(req); + + + MUSB2_WRITE_1(sc, MUSB2_REG_TXNAKLIMIT, MAX_NAK_TO); + MUSB2_WRITE_1(sc, MUSB2_REG_TXFADDR(0), td->dev_addr); + MUSB2_WRITE_1(sc, MUSB2_REG_TXHADDR(0), td->haddr); + MUSB2_WRITE_1(sc, MUSB2_REG_TXHUBPORT(0), td->hport); + MUSB2_WRITE_1(sc, MUSB2_REG_TXTI, td->transfer_type); + + /* write command */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_TXPKTRDY | + MUSB2_MASK_CSR0L_SETUPPKT); + + /* Just to be consistent, not used above */ + td->transaction_started = 1; + + return (1); /* in progress */ +} + /* Control endpoint only data handling functions (RX/TX/SYNC) */ static uint8_t -musbotg_setup_data_rx(struct musbotg_td *td) +musbotg_dev_ctrl_data_rx(struct musbotg_td *td) { struct usb_page_search buf_res; struct musbotg_softc *sc; @@ -501,7 +740,7 @@ musbotg_setup_data_rx(struct musbotg_td } static uint8_t -musbotg_setup_data_tx(struct musbotg_td *td) +musbotg_dev_ctrl_data_tx(struct musbotg_td *td) { struct usb_page_search buf_res; struct musbotg_softc *sc; @@ -606,90 +845,953 @@ musbotg_setup_data_tx(struct musbotg_td /* check remainder */ if (td->remainder == 0) { if (td->short_pkt) { - sc->sc_ep0_cmd = MUSB2_MASK_CSR0L_TXPKTRDY; + sc->sc_ep0_cmd = MUSB2_MASK_CSR0L_TXPKTRDY; + return (0); /* complete */ + } + /* else we need to transmit a short packet */ + } + /* write command */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_TXPKTRDY); + + return (1); /* not complete */ +} + +static uint8_t +musbotg_host_ctrl_data_rx(struct musbotg_td *td) +{ + struct usb_page_search buf_res; + struct musbotg_softc *sc; + uint16_t count; + uint8_t csr; + uint8_t got_short; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* EP0 is busy, wait */ + if (td->channel == -1) + return (1); + + DPRINTFN(1, "ep_no=%d\n", td->channel); + + /* select endpoint 0 */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); + + /* read out FIFO status */ + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + + DPRINTFN(4, "csr=0x%02x\n", csr); + + got_short = 0; + if (!td->transaction_started) { + td->transaction_started = 1; + + MUSB2_WRITE_1(sc, MUSB2_REG_RXNAKLIMIT, MAX_NAK_TO); + + MUSB2_WRITE_1(sc, MUSB2_REG_RXFADDR(0), + td->dev_addr); + MUSB2_WRITE_1(sc, MUSB2_REG_RXHADDR(0), td->haddr); + MUSB2_WRITE_1(sc, MUSB2_REG_RXHUBPORT(0), td->hport); + MUSB2_WRITE_1(sc, MUSB2_REG_RXTI, td->transfer_type); + + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_REQPKT); + + return (1); + } + + if (csr & MUSB2_MASK_CSR0L_NAKTIMO) { + csr &= ~MUSB2_MASK_CSR0L_REQPKT; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + + csr &= ~MUSB2_MASK_CSR0L_NAKTIMO; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + + td->error = 1; + } + + /* Failed */ + if (csr & (MUSB2_MASK_CSR0L_RXSTALL | + MUSB2_MASK_CSR0L_ERROR)) + { + /* Clear status bit */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, 0); + DPRINTFN(1, "error bit set, csr=0x%02x\n", csr); + td->error = 1; + } + + if (td->error) { + musbotg_channel_free(sc, td); + return (0); /* we are complete */ + } + + if (!(csr & MUSB2_MASK_CSR0L_RXPKTRDY)) + return (1); /* not yet */ + + /* get the packet byte count */ + count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); + + /* verify the packet byte count */ + if (count != td->max_frame_size) { + if (count < td->max_frame_size) { + /* we have a short packet */ + td->short_pkt = 1; + got_short = 1; + } else { + /* invalid USB packet */ + td->error = 1; + musbotg_channel_free(sc, td); + return (0); /* we are complete */ + } + } + /* verify the packet byte count */ + if (count > td->remainder) { + /* invalid USB packet */ + td->error = 1; + musbotg_channel_free(sc, td); + return (0); /* we are complete */ + } + while (count > 0) { + uint32_t temp; + + usbd_get_page(td->pc, td->offset, &buf_res); + + /* get correct length */ + if (buf_res.length > count) { + buf_res.length = count; + } + /* check for unaligned memory address */ + if (USB_P2U(buf_res.buffer) & 3) { + + temp = count & ~3; + + if (temp) { + /* receive data 4 bytes at a time */ + bus_space_read_multi_4(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), sc->sc_bounce_buf, + temp / 4); + } + temp = count & 3; + if (temp) { + /* receive data 1 byte at a time */ + bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), + (void *)(&sc->sc_bounce_buf[count / 4]), temp); + } + usbd_copy_in(td->pc, td->offset, + sc->sc_bounce_buf, count); + + /* update offset and remainder */ + td->offset += count; + td->remainder -= count; + break; + } + /* check if we can optimise */ + if (buf_res.length >= 4) { + + /* receive data 4 bytes at a time */ + bus_space_read_multi_4(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), buf_res.buffer, + buf_res.length / 4); + + temp = buf_res.length & ~3; + + /* update counters */ + count -= temp; + td->offset += temp; + td->remainder -= temp; + continue; + } + /* receive data */ + bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), buf_res.buffer, buf_res.length); + + /* update counters */ + count -= buf_res.length; + td->offset += buf_res.length; + td->remainder -= buf_res.length; + } + + csr &= ~MUSB2_MASK_CSR0L_RXPKTRDY; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + + /* check if we are complete */ + if ((td->remainder == 0) || got_short) { + if (td->short_pkt) { + /* we are complete */ + + musbotg_channel_free(sc, td); + return (0); + } + /* else need to receive a zero length packet */ + } + + td->transaction_started = 1; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_REQPKT); + + return (1); /* not complete */ +} + +static uint8_t +musbotg_host_ctrl_data_tx(struct musbotg_td *td) +{ + struct usb_page_search buf_res; + struct musbotg_softc *sc; + uint16_t count; + uint8_t csr, csrh; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* No free EPs */ + if (td->channel == -1) + return (1); + + DPRINTFN(1, "ep_no=%d\n", td->channel); + + /* select endpoint */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); + + /* read out FIFO status */ + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + DPRINTFN(4, "csr=0x%02x\n", csr); + + if (csr & (MUSB2_MASK_CSR0L_RXSTALL | + MUSB2_MASK_CSR0L_ERROR)) { + /* clear status bits */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, 0); + td->error = 1; + } + + if (csr & MUSB2_MASK_CSR0L_NAKTIMO ) { + + if (csr & MUSB2_MASK_CSR0L_TXFIFONEMPTY) { + csrh = MUSB2_READ_1(sc, MUSB2_REG_TXCSRH); + csrh |= MUSB2_MASK_CSR0H_FFLUSH; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRH, csrh); + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + if (csr & MUSB2_MASK_CSR0L_TXFIFONEMPTY) { + csrh = MUSB2_READ_1(sc, MUSB2_REG_TXCSRH); + csrh |= MUSB2_MASK_CSR0H_FFLUSH; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRH, csrh); + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + } + } + + csr &= ~MUSB2_MASK_CSR0L_NAKTIMO; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + + td->error = 1; + } + + + if (td->error) { + musbotg_channel_free(sc, td); + return (0); /* complete */ + } + + /* + * Wait while FIFO is empty. + * Do not flush it because it will cause transactions + * with size more then packet size. It might upset + * some devices + */ + if (csr & MUSB2_MASK_CSR0L_TXFIFONEMPTY) + return (1); + + /* Packet still being processed */ + if (csr & MUSB2_MASK_CSR0L_TXPKTRDY) + return (1); + + if (td->transaction_started) { + /* check remainder */ + if (td->remainder == 0) { + if (td->short_pkt) { + musbotg_channel_free(sc, td); + return (0); /* complete */ + } + /* else we need to transmit a short packet */ + } + + /* We're not complete - more transactions required */ + td->transaction_started = 0; + } + + /* check for short packet */ + count = td->max_frame_size; + if (td->remainder < count) { + /* we have a short packet */ + td->short_pkt = 1; + count = td->remainder; + } + + while (count > 0) { + uint32_t temp; + + usbd_get_page(td->pc, td->offset, &buf_res); + + /* get correct length */ + if (buf_res.length > count) { + buf_res.length = count; + } + /* check for unaligned memory address */ + if (USB_P2U(buf_res.buffer) & 3) { + + usbd_copy_out(td->pc, td->offset, + sc->sc_bounce_buf, count); + + temp = count & ~3; + + if (temp) { + /* transmit data 4 bytes at a time */ + bus_space_write_multi_4(sc->sc_io_tag, + sc->sc_io_hdl, MUSB2_REG_EPFIFO(0), + sc->sc_bounce_buf, temp / 4); + } + temp = count & 3; + if (temp) { + /* receive data 1 byte at a time */ + bus_space_write_multi_1(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), + ((void *)&sc->sc_bounce_buf[count / 4]), temp); + } + /* update offset and remainder */ + td->offset += count; + td->remainder -= count; + break; + } + /* check if we can optimise */ + if (buf_res.length >= 4) { + + /* transmit data 4 bytes at a time */ + bus_space_write_multi_4(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), buf_res.buffer, + buf_res.length / 4); + + temp = buf_res.length & ~3; + + /* update counters */ + count -= temp; + td->offset += temp; + td->remainder -= temp; + continue; + } + /* transmit data */ + bus_space_write_multi_1(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(0), buf_res.buffer, + buf_res.length); + + /* update counters */ + count -= buf_res.length; + td->offset += buf_res.length; + td->remainder -= buf_res.length; + } + + /* Function address */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXFADDR(0), td->dev_addr); + MUSB2_WRITE_1(sc, MUSB2_REG_TXHADDR(0), td->haddr); + MUSB2_WRITE_1(sc, MUSB2_REG_TXHUBPORT(0), td->hport); + MUSB2_WRITE_1(sc, MUSB2_REG_TXTI, td->transfer_type); + + /* TX NAK timeout */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXNAKLIMIT, MAX_NAK_TO); + + /* write command */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_TXPKTRDY); + + td->transaction_started = 1; + + return (1); /* not complete */ +} + +static uint8_t +musbotg_dev_ctrl_status(struct musbotg_td *td) +{ + struct musbotg_softc *sc; + uint8_t csr; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + /* select endpoint 0 */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); + + if (sc->sc_ep0_busy) { + sc->sc_ep0_busy = 0; + sc->sc_ep0_cmd |= MUSB2_MASK_CSR0L_DATAEND; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, sc->sc_ep0_cmd); + sc->sc_ep0_cmd = 0; + } + /* read out FIFO status */ + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + + DPRINTFN(4, "csr=0x%02x\n", csr); + + if (csr & MUSB2_MASK_CSR0L_DATAEND) { + /* wait for interrupt */ + return (1); /* not complete */ + } + if (sc->sc_dv_addr != 0xFF) { + /* write function address */ + musbotg_set_address(sc, sc->sc_dv_addr); + } + + musbotg_channel_free(sc, td); + return (0); /* complete */ +} + +static uint8_t +musbotg_host_ctrl_status_rx(struct musbotg_td *td) +{ + struct musbotg_softc *sc; + uint8_t csr, csrh; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* EP0 is busy, wait */ + if (td->channel == -1) + return (1); + + DPRINTFN(1, "ep_no=%d\n", td->channel); + + /* select endpoint 0 */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); + + if (!td->transaction_started) { + MUSB2_WRITE_1(sc, MUSB2_REG_RXFADDR(0), + td->dev_addr); + + MUSB2_WRITE_1(sc, MUSB2_REG_RXHADDR(0), td->haddr); + MUSB2_WRITE_1(sc, MUSB2_REG_RXHUBPORT(0), td->hport); + MUSB2_WRITE_1(sc, MUSB2_REG_RXTI, td->transfer_type); + + /* RX NAK timeout */ + MUSB2_WRITE_1(sc, MUSB2_REG_RXNAKLIMIT, MAX_NAK_TO); + + td->transaction_started = 1; + + /* Disable PING */ + csrh = MUSB2_READ_1(sc, MUSB2_REG_RXCSRH); + csrh |= MUSB2_MASK_CSR0H_PING_DIS; + MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRH, csrh); + + /* write command */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_STATUSPKT | + MUSB2_MASK_CSR0L_REQPKT); + + return (1); /* Just started */ + + } + + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + + DPRINTFN(4, "IN STATUS csr=0x%02x\n", csr); + + if (csr & MUSB2_MASK_CSR0L_RXPKTRDY) { + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + musbotg_channel_free(sc, td); + return (0); /* complete */ + } + + if (csr & MUSB2_MASK_CSR0L_NAKTIMO) { + csr &= ~ (MUSB2_MASK_CSR0L_STATUSPKT | + MUSB2_MASK_CSR0L_REQPKT); + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + + csr &= ~MUSB2_MASK_CSR0L_NAKTIMO; + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, csr); + td->error = 1; + } + + /* Failed */ + if (csr & (MUSB2_MASK_CSR0L_RXSTALL | + MUSB2_MASK_CSR0L_ERROR)) + { + /* Clear status bit */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, 0); + DPRINTFN(1, "error bit set, csr=0x%02x\n", csr); + td->error = 1; + } + + if (td->error) { + musbotg_channel_free(sc, td); + return (0); + } + + return (1); /* Not ready yet */ +} + +static uint8_t +musbotg_host_ctrl_status_tx(struct musbotg_td *td) +{ + struct musbotg_softc *sc; + uint8_t csr; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* EP0 is busy, wait */ + if (td->channel == -1) + return (1); + + DPRINTFN(1, "ep_no=%d/%d [%d@%d.%d/%02x]\n", td->channel, td->transaction_started, + td->dev_addr,td->haddr,td->hport, td->transfer_type); + + /* select endpoint 0 */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, 0); + + csr = MUSB2_READ_1(sc, MUSB2_REG_TXCSRL); + DPRINTFN(4, "csr=0x%02x\n", csr); + + /* Not yet */ + if (csr & MUSB2_MASK_CSR0L_TXPKTRDY) + return (1); + + /* Failed */ + if (csr & (MUSB2_MASK_CSR0L_RXSTALL | + MUSB2_MASK_CSR0L_ERROR)) + { + /* Clear status bit */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, 0); + DPRINTFN(1, "error bit set, csr=0x%02x\n", csr); + td->error = 1; + musbotg_channel_free(sc, td); + return (0); /* complete */ + } + + if (td->transaction_started) { + musbotg_channel_free(sc, td); + return (0); /* complete */ + } + + MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRH, MUSB2_MASK_CSR0H_PING_DIS); + + MUSB2_WRITE_1(sc, MUSB2_REG_TXFADDR(0), td->dev_addr); + MUSB2_WRITE_1(sc, MUSB2_REG_TXHADDR(0), td->haddr); + MUSB2_WRITE_1(sc, MUSB2_REG_TXHUBPORT(0), td->hport); + MUSB2_WRITE_1(sc, MUSB2_REG_TXTI, td->transfer_type); + + /* TX NAK timeout */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXNAKLIMIT, MAX_NAK_TO); + + td->transaction_started = 1; + + /* write command */ + MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, + MUSB2_MASK_CSR0L_STATUSPKT | + MUSB2_MASK_CSR0L_TXPKTRDY); + + return (1); /* wait for interrupt */ +} + +static uint8_t +musbotg_dev_data_rx(struct musbotg_td *td) +{ + struct usb_page_search buf_res; + struct musbotg_softc *sc; + uint16_t count; + uint8_t csr; + uint8_t to; + uint8_t got_short; + + to = 8; /* don't loop forever! */ + got_short = 0; + + /* get pointer to softc */ + sc = MUSBOTG_PC2SC(td->pc); + + if (td->channel == -1) + td->channel = musbotg_channel_alloc(sc, td); + + /* EP0 is busy, wait */ + if (td->channel == -1) + return (1); + + /* select endpoint */ + MUSB2_WRITE_1(sc, MUSB2_REG_EPINDEX, td->channel); + +repeat: + /* read out FIFO status */ + csr = MUSB2_READ_1(sc, MUSB2_REG_RXCSRL); + + DPRINTFN(4, "csr=0x%02x\n", csr); + + /* clear overrun */ + if (csr & MUSB2_MASK_CSRL_RXOVERRUN) { + /* make sure we don't clear "RXPKTRDY" */ + MUSB2_WRITE_1(sc, MUSB2_REG_RXCSRL, + MUSB2_MASK_CSRL_RXPKTRDY); + } + + /* check status */ + if (!(csr & MUSB2_MASK_CSRL_RXPKTRDY)) + return (1); /* not complete */ + + /* get the packet byte count */ + count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); + + DPRINTFN(4, "count=0x%04x\n", count); + + /* + * Check for short or invalid packet: + */ + if (count != td->max_frame_size) { + if (count < td->max_frame_size) { + /* we have a short packet */ + td->short_pkt = 1; + got_short = 1; + } else { + /* invalid USB packet */ + td->error = 1; + musbotg_channel_free(sc, td); + return (0); /* we are complete */ + } + } + /* verify the packet byte count */ + if (count > td->remainder) { + /* invalid USB packet */ + td->error = 1; + musbotg_channel_free(sc, td); + return (0); /* we are complete */ + } + while (count > 0) { + uint32_t temp; + + usbd_get_page(td->pc, td->offset, &buf_res); + + /* get correct length */ + if (buf_res.length > count) { + buf_res.length = count; + } + /* check for unaligned memory address */ + if (USB_P2U(buf_res.buffer) & 3) { + + temp = count & ~3; + + if (temp) { + /* receive data 4 bytes at a time */ + bus_space_read_multi_4(sc->sc_io_tag, sc->sc_io_hdl, + MUSB2_REG_EPFIFO(td->channel), sc->sc_bounce_buf, + temp / 4); + } + temp = count & 3; + if (temp) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 04:22:09 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 90D24161; Sun, 7 Jul 2013 04:22:09 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 718DE1046; Sun, 7 Jul 2013 04:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r674M9uA038539; Sun, 7 Jul 2013 04:22:09 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r674M9HM038537; Sun, 7 Jul 2013 04:22:09 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201307070422.r674M9HM038537@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 7 Jul 2013 04:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252913 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 04:22:09 -0000 Author: gonzo Date: Sun Jul 7 04:22:08 2013 New Revision: 252913 URL: http://svnweb.freebsd.org/changeset/base/252913 Log: - Add USBSS driver for AM335x SoC. Driver is a wrapper around Mentors Graphic USB OTG core. Added: head/sys/arm/ti/am335x/am335x_usbss.c (contents, props changed) Modified: head/sys/arm/ti/am335x/files.am335x Added: head/sys/arm/ti/am335x/am335x_usbss.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_usbss.c Sun Jul 7 04:22:08 2013 (r252913) @@ -0,0 +1,481 @@ +/*- + * Copyright (c) 2013 Oleksandr Tymoshenko + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + +#define USB_DEBUG_VAR usbssdebug + +#include +#include +#include +#include + +#include + +#include +#include +#include + +#define AM335X_USB_PORTS 2 + +#define USBSS_REVREG 0x00 +#define USBSS_SYSCONFIG 0x10 +#define USBSS_SYSCONFIG_SRESET 1 + +#define USBCTRL_REV 0x00 +#define USBCTRL_CTRL 0x14 +#define USBCTRL_STAT 0x18 +#define USBCTRL_IRQ_STAT0 0x30 +#define IRQ_STAT0_RXSHIFT 16 +#define IRQ_STAT0_TXSHIFT 0 +#define USBCTRL_IRQ_STAT1 0x34 +#define IRQ_STAT1_DRVVBUS (1 << 8) +#define USBCTRL_INTEN_SET0 0x38 +#define USBCTRL_INTEN_SET1 0x3C +#define USBCTRL_INTEN_USB_ALL 0x1ff +#define USBCTRL_INTEN_USB_SOF (1 << 3) +#define USBCTRL_INTEN_CLR0 0x40 +#define USBCTRL_INTEN_CLR1 0x44 +#define USBCTRL_UTMI 0xE0 +#define USBCTRL_UTMI_FSDATAEXT (1 << 1) +#define USBCTRL_MODE 0xE8 +#define USBCTRL_MODE_IDDIG (1 << 8) +#define USBCTRL_MODE_IDDIGMUX (1 << 7) + +/* USBSS resource + 2 MUSB ports */ + +#define RES_USBSS 0 +#define RES_USBCTRL(i) (3*i+1) +#define RES_USBPHY(i) (3*i+2) +#define RES_USBCORE(i) (3*i+3) + +#define USB_WRITE4(sc, idx, reg, val) do { \ + bus_write_4((sc)->sc_mem_res[idx], (reg), (val)); \ +} while (0) + +#define USB_READ4(sc, idx, reg) bus_read_4((sc)->sc_mem_res[idx], (reg)) + +#define USBSS_WRITE4(sc, reg, val) \ + USB_WRITE4((sc), RES_USBSS, (reg), (val)) +#define USBSS_READ4(sc, reg) \ + USB_READ4((sc), RES_USBSS, (reg)) +#define USBCTRL_WRITE4(sc, unit, reg, val) \ + USB_WRITE4((sc), RES_USBCTRL(unit), (reg), (val)) +#define USBCTRL_READ4(sc, unit, reg) \ + USB_READ4((sc), RES_USBCTRL(unit), (reg)) +#define USBPHY_WRITE4(sc, unit, reg, val) \ + USB_WRITE4((sc), RES_USBPHY(unit), (reg), (val)) +#define USBPHY_READ4(sc, unit, reg) \ + USB_READ4((sc), RES_USBPHY(unit), (reg)) + +static struct resource_spec am335x_musbotg_mem_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_MEMORY, 1, RF_ACTIVE }, + { SYS_RES_MEMORY, 2, RF_ACTIVE }, + { SYS_RES_MEMORY, 3, RF_ACTIVE }, + { SYS_RES_MEMORY, 4, RF_ACTIVE }, + { SYS_RES_MEMORY, 5, RF_ACTIVE }, + { SYS_RES_MEMORY, 6, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static struct resource_spec am335x_musbotg_irq_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { SYS_RES_IRQ, 2, RF_ACTIVE }, + { -1, 0, 0 } +}; + +#ifdef USB_DEBUG +static int usbssdebug = 0; + +static SYSCTL_NODE(_hw_usb, OID_AUTO, am335x_usbss, CTLFLAG_RW, 0, "AM335x USBSS"); +SYSCTL_INT(_hw_usb_am335x_usbss, OID_AUTO, debug, CTLFLAG_RW, + &usbssdebug, 0, "Debug level"); +#endif + +static device_probe_t musbotg_probe; +static device_attach_t musbotg_attach; +static device_detach_t musbotg_detach; + +struct musbotg_super_softc { + struct musbotg_softc sc_otg[AM335X_USB_PORTS]; + struct resource *sc_mem_res[AM335X_USB_PORTS*3+1]; + struct resource *sc_irq_res[AM335X_USB_PORTS+1]; + void *sc_intr_hdl; +}; + +static void +musbotg_vbus_poll(struct musbotg_super_softc *sc, int port) +{ + uint32_t stat; + + if (sc->sc_otg[port].sc_mode == MUSB2_DEVICE_MODE) + musbotg_vbus_interrupt(&sc->sc_otg[port], 1); + else { + stat = USBCTRL_READ4(sc, port, USBCTRL_STAT); + musbotg_vbus_interrupt(&sc->sc_otg[port], stat & 1); + } +} + +/* + * Arg to musbotg_clocks_on and musbot_clocks_off is + * a uint32_t * pointing to the SCM register offset. + */ +static uint32_t USB_CTRL[] = {SCM_USB_CTRL0, SCM_USB_CTRL1}; + +static void +musbotg_clocks_on(void *arg) +{ + uint32_t c, reg = *(uint32_t *)arg; + + ti_scm_reg_read_4(reg, &c); + c &= ~3; /* Enable power */ + c |= 1 << 19; /* VBUS detect enable */ + c |= 1 << 20; /* Session end enable */ + ti_scm_reg_write_4(reg, c); +} + +static void +musbotg_clocks_off(void *arg) +{ + uint32_t c, reg = *(uint32_t *)arg; + + /* Disable power to PHY */ + ti_scm_reg_read_4(reg, &c); + ti_scm_reg_write_4(reg, c | 3); +} + +static void +musbotg_ep_int_set(struct musbotg_softc *sc, int ep, int on) +{ + struct musbotg_super_softc *ssc = sc->sc_platform_data; + uint32_t epmask; + + epmask = ((1 << ep) << IRQ_STAT0_RXSHIFT); + epmask |= ((1 << ep) << IRQ_STAT0_TXSHIFT); + if (on) + USBCTRL_WRITE4(ssc, sc->sc_id, + USBCTRL_INTEN_SET0, epmask); + else + USBCTRL_WRITE4(ssc, sc->sc_id, + USBCTRL_INTEN_CLR0, epmask); +} + +static void +musbotg_usbss_interrupt(void *arg) +{ + panic("USBSS real interrupt"); +} + +static void +musbotg_wrapper_interrupt(void *arg) +{ + struct musbotg_softc *sc = arg; + struct musbotg_super_softc *ssc = sc->sc_platform_data; + uint32_t stat, stat0, stat1; + stat = USBCTRL_READ4(ssc, sc->sc_id, USBCTRL_STAT); + stat0 = USBCTRL_READ4(ssc, sc->sc_id, USBCTRL_IRQ_STAT0); + stat1 = USBCTRL_READ4(ssc, sc->sc_id, USBCTRL_IRQ_STAT1); + if (stat0) + USBCTRL_WRITE4(ssc, sc->sc_id, USBCTRL_IRQ_STAT0, stat0); + if (stat1) + USBCTRL_WRITE4(ssc, sc->sc_id, USBCTRL_IRQ_STAT1, stat1); + + DPRINTFN(4, "port%d: stat0=%08x stat1=%08x, stat=%08x\n", + sc->sc_id, stat0, stat1, stat); + + if (stat1 & IRQ_STAT1_DRVVBUS) + musbotg_vbus_interrupt(sc, stat & 1); + + musbotg_interrupt(arg, ((stat0 >> 16) & 0xffff), + stat0 & 0xffff, stat1 & 0xff); +} + +static int +musbotg_probe(device_t dev) +{ + if (!ofw_bus_is_compatible(dev, "ti,musb-am33xx")) + return (ENXIO); + + device_set_desc(dev, "TI AM33xx integrated USB OTG controller"); + + return (BUS_PROBE_DEFAULT); +} + +static int +musbotg_attach(device_t dev) +{ + struct musbotg_super_softc *sc = device_get_softc(dev); + int err; + int i; + uint32_t rev, reg; + + /* Request the memory resources */ + err = bus_alloc_resources(dev, am335x_musbotg_mem_spec, + sc->sc_mem_res); + if (err) { + device_printf(dev, + "Error: could not allocate mem resources\n"); + return (ENXIO); + } + + /* Request the IRQ resources */ + err = bus_alloc_resources(dev, am335x_musbotg_irq_spec, + sc->sc_irq_res); + if (err) { + device_printf(dev, + "Error: could not allocate irq resources\n"); + return (ENXIO); + } + + /* + * Reset USBSS, USB0 and USB1 + */ + rev = USBSS_READ4(sc, USBSS_REVREG); + device_printf(dev, "TI AM335X USBSS v%d.%d.%d\n", + (rev >> 8) & 7, (rev >> 6) & 3, rev & 63); + + ti_prcm_clk_enable(MUSB0_CLK); + + USBSS_WRITE4(sc, USBSS_SYSCONFIG, + USBSS_SYSCONFIG_SRESET); + while (USBSS_READ4(sc, USBSS_SYSCONFIG) & + USBSS_SYSCONFIG_SRESET) + ; + + err = bus_setup_intr(dev, sc->sc_irq_res[0], + INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)musbotg_usbss_interrupt, sc, + &sc->sc_intr_hdl); + + if (err) { + sc->sc_intr_hdl = NULL; + device_printf(dev, "Failed to setup USBSS interrupt\n"); + goto error; + } + + for (i = 0; i < AM335X_USB_PORTS; i++) { + /* setup MUSB OTG USB controller interface softc */ + sc->sc_otg[i].sc_clocks_on = &musbotg_clocks_on; + sc->sc_otg[i].sc_clocks_off = &musbotg_clocks_off; + sc->sc_otg[i].sc_clocks_arg = &USB_CTRL[i]; + + sc->sc_otg[i].sc_ep_int_set = musbotg_ep_int_set; + + /* initialise some bus fields */ + sc->sc_otg[i].sc_bus.parent = dev; + sc->sc_otg[i].sc_bus.devices = sc->sc_otg[i].sc_devices; + sc->sc_otg[i].sc_bus.devices_max = MUSB2_MAX_DEVICES; + + /* get all DMA memory */ + if (usb_bus_mem_alloc_all(&sc->sc_otg[i].sc_bus, + USB_GET_DMA_TAG(dev), NULL)) { + device_printf(dev, + "Failed allocate bus mem for musb%d\n", i); + return (ENOMEM); + } + sc->sc_otg[i].sc_io_res = sc->sc_mem_res[RES_USBCORE(i)]; + sc->sc_otg[i].sc_io_tag = + rman_get_bustag(sc->sc_otg[i].sc_io_res); + sc->sc_otg[i].sc_io_hdl = + rman_get_bushandle(sc->sc_otg[i].sc_io_res); + sc->sc_otg[i].sc_io_size = + rman_get_size(sc->sc_otg[i].sc_io_res); + + sc->sc_otg[i].sc_irq_res = sc->sc_irq_res[i+1]; + + sc->sc_otg[i].sc_bus.bdev = device_add_child(dev, "usbus", -1); + if (!(sc->sc_otg[i].sc_bus.bdev)) { + device_printf(dev, "No busdev for musb%d\n", i); + goto error; + } + device_set_ivars(sc->sc_otg[i].sc_bus.bdev, + &sc->sc_otg[i].sc_bus); + + err = bus_setup_intr(dev, sc->sc_otg[i].sc_irq_res, + INTR_TYPE_BIO | INTR_MPSAFE, + NULL, (driver_intr_t *)musbotg_wrapper_interrupt, + &sc->sc_otg[i], &sc->sc_otg[i].sc_intr_hdl); + if (err) { + sc->sc_otg[i].sc_intr_hdl = NULL; + device_printf(dev, + "Failed to setup interrupt for musb%d\n", i); + goto error; + } + + sc->sc_otg[i].sc_id = i; + sc->sc_otg[i].sc_platform_data = sc; + if (i == 0) + sc->sc_otg[i].sc_mode = MUSB2_DEVICE_MODE; + else + sc->sc_otg[i].sc_mode = MUSB2_HOST_MODE; + + /* + * software-controlled function + */ + + if (sc->sc_otg[i].sc_mode == MUSB2_HOST_MODE) { + reg = USBCTRL_READ4(sc, i, USBCTRL_MODE); + reg |= USBCTRL_MODE_IDDIGMUX; + reg &= ~USBCTRL_MODE_IDDIG; + USBCTRL_WRITE4(sc, i, USBCTRL_MODE, reg); + USBCTRL_WRITE4(sc, i, USBCTRL_UTMI, + USBCTRL_UTMI_FSDATAEXT); + } else { + reg = USBCTRL_READ4(sc, i, USBCTRL_MODE); + reg |= USBCTRL_MODE_IDDIGMUX; + reg |= USBCTRL_MODE_IDDIG; + USBCTRL_WRITE4(sc, i, USBCTRL_MODE, reg); + } + + reg = USBCTRL_INTEN_USB_ALL & ~USBCTRL_INTEN_USB_SOF; + USBCTRL_WRITE4(sc, i, USBCTRL_INTEN_SET1, reg); + USBCTRL_WRITE4(sc, i, USBCTRL_INTEN_CLR0, 0xffffffff); + + err = musbotg_init(&sc->sc_otg[i]); + if (!err) + err = device_probe_and_attach(sc->sc_otg[i].sc_bus.bdev); + + if (err) + goto error; + + /* poll VBUS one time */ + musbotg_vbus_poll(sc, i); + } + + return (0); + +error: + musbotg_detach(dev); + return (ENXIO); +} + +static int +musbotg_detach(device_t dev) +{ + struct musbotg_super_softc *sc = device_get_softc(dev); + device_t bdev; + int err; + int i; + + for (i = 0; i < AM335X_USB_PORTS; i++) { + if (sc->sc_otg[i].sc_bus.bdev) { + bdev = sc->sc_otg[i].sc_bus.bdev; + device_detach(bdev); + device_delete_child(dev, bdev); + } + + if (sc->sc_otg[i].sc_irq_res && sc->sc_otg[i].sc_intr_hdl) { + /* + * only call musbotg_uninit() after musbotg_init() + */ + musbotg_uninit(&sc->sc_otg[i]); + + err = bus_teardown_intr(dev, sc->sc_otg[i].sc_irq_res, + sc->sc_otg[i].sc_intr_hdl); + sc->sc_otg[i].sc_intr_hdl = NULL; + } + + usb_bus_mem_free_all(&sc->sc_otg[i].sc_bus, NULL); + } + + if (sc->sc_intr_hdl) { + bus_teardown_intr(dev, sc->sc_irq_res[0], + sc->sc_intr_hdl); + sc->sc_intr_hdl = NULL; + } + + + /* Free resources if any */ + if (sc->sc_mem_res[0]) + bus_release_resources(dev, am335x_musbotg_mem_spec, + sc->sc_mem_res); + + if (sc->sc_irq_res[0]) + bus_release_resources(dev, am335x_musbotg_irq_spec, + sc->sc_irq_res); + + /* during module unload there are lots of children leftover */ + device_delete_children(dev); + + return (0); +} + +static device_method_t musbotg_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, musbotg_probe), + DEVMETHOD(device_attach, musbotg_attach), + DEVMETHOD(device_detach, musbotg_detach), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + + DEVMETHOD_END +}; + +static driver_t musbotg_driver = { + .name = "musbotg", + .methods = musbotg_methods, + .size = sizeof(struct musbotg_super_softc), +}; + +static devclass_t musbotg_devclass; + +DRIVER_MODULE(musbotg, simplebus, musbotg_driver, musbotg_devclass, 0, 0); +MODULE_DEPEND(musbotg, usb, 1, 1, 1); Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Sun Jul 7 04:18:35 2013 (r252912) +++ head/sys/arm/ti/am335x/files.am335x Sun Jul 7 04:22:08 2013 (r252913) @@ -7,6 +7,7 @@ arm/ti/am335x/am335x_scm_padconf.c stand arm/ti/am335x/am335x_lcd.c optional sc arm/ti/am335x/am335x_lcd_syscons.c optional sc arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_usbss.c optional musb fdt arm/ti/ti_edma3.c standard arm/ti/ti_mmchs.c optional mmc arm/ti/cpsw/if_cpsw.c optional cpsw From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 04:23:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E1AE32A6; Sun, 7 Jul 2013 04:23:30 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C2B291056; Sun, 7 Jul 2013 04:23:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r674NUJW038724; Sun, 7 Jul 2013 04:23:30 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r674NUnN038714; Sun, 7 Jul 2013 04:23:30 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201307070423.r674NUnN038714@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 7 Jul 2013 04:23:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252914 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 04:23:31 -0000 Author: gonzo Date: Sun Jul 7 04:23:29 2013 New Revision: 252914 URL: http://svnweb.freebsd.org/changeset/base/252914 Log: - Add musb node to shared dtsi and proper pin configuratin for every AM553x-based device Modified: head/sys/boot/fdt/dts/am335x-evm.dts head/sys/boot/fdt/dts/am335x.dtsi head/sys/boot/fdt/dts/beaglebone-black.dts head/sys/boot/fdt/dts/beaglebone.dts Modified: head/sys/boot/fdt/dts/am335x-evm.dts ============================================================================== --- head/sys/boot/fdt/dts/am335x-evm.dts Sun Jul 7 04:22:08 2013 (r252913) +++ head/sys/boot/fdt/dts/am335x-evm.dts Sun Jul 7 04:23:29 2013 (r252914) @@ -106,6 +106,9 @@ "GPMC_BEn0_CLE", "timer5", "output", "GPMC_WEn", "timer6", "output", "GPMC_OEn_REn", "timer7", "output", + /* USB0 and USB1 */ + "USB0_DRVVBUS", "USB0_DRVVBUS", "output", + "USB1_DRVVBUS", "USB1_DRVVBUS", "output", /* LCD */ "GPMC_AD8", "lcd_data23", "output", "GPMC_AD9", "lcd_data22", "output", Modified: head/sys/boot/fdt/dts/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/am335x.dtsi Sun Jul 7 04:22:08 2013 (r252913) +++ head/sys/boot/fdt/dts/am335x.dtsi Sun Jul 7 04:23:29 2013 (r252914) @@ -201,5 +201,23 @@ interrupts = <36>; interrupt-parent = <&AINTC>; }; + + usb@47400000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "ti,musb-am33xx"; + reg =< 0x47400000 0x1000 /* USBSS */ + 0x47401000 0x300 /* USB0 */ + 0x47401300 0x100 /* USB0_PHY */ + 0x47401400 0x400 /* USB0_CORE */ + 0x47401800 0x300 /* USB1 */ + 0x47401B00 0x100 /* USB1_PHY */ + 0x47401C00 0x400 /* USB1_CORE */ + >; + interrupts = <17 18 19>; + interrupt-parent = <&AINTC>; + /* 1 - Host Mode, 0 - Device Mode */ + modemask = <2>; + }; }; }; Modified: head/sys/boot/fdt/dts/beaglebone-black.dts ============================================================================== --- head/sys/boot/fdt/dts/beaglebone-black.dts Sun Jul 7 04:22:08 2013 (r252913) +++ head/sys/boot/fdt/dts/beaglebone-black.dts Sun Jul 7 04:23:29 2013 (r252914) @@ -123,6 +123,9 @@ "GPMC_BEn0_CLE", "timer5", "output", "GPMC_WEn", "timer6", "output", "GPMC_OEn_REn", "timer7", "output", + /* USB0 and USB1 */ + "USB0_DRVVBUS", "USB0_DRVVBUS", "output", + "USB1_DRVVBUS", "USB1_DRVVBUS", "output", /* PWM */ "GPMC_A2", "ehrpwm1A", "output", "GPMC_A3", "ehrpwm1B", "output", Modified: head/sys/boot/fdt/dts/beaglebone.dts ============================================================================== --- head/sys/boot/fdt/dts/beaglebone.dts Sun Jul 7 04:22:08 2013 (r252913) +++ head/sys/boot/fdt/dts/beaglebone.dts Sun Jul 7 04:23:29 2013 (r252914) @@ -74,6 +74,9 @@ "MMC0_DAT1", "mmc0_dat1", "input_pullup", "MMC0_DAT2", "mmc0_dat2", "input_pullup", "MMC0_DAT3", "mmc0_dat3", "input_pullup", + /* USB0 and USB1 */ + "USB0_DRVVBUS", "USB0_DRVVBUS", "output", + "USB1_DRVVBUS", "USB1_DRVVBUS", "output", /* GPIO */ "ECAP0_IN_PWM0_OUT", "gpio0_7", "input_pulldown", "GPMC_AD10", "gpio0_26", "input_pulldown", From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 04:24:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 911523EA; Sun, 7 Jul 2013 04:24:39 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 837BA105F; Sun, 7 Jul 2013 04:24:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r674Odi8038886; Sun, 7 Jul 2013 04:24:39 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r674Ocil038885; Sun, 7 Jul 2013 04:24:38 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201307070424.r674Ocil038885@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sun, 7 Jul 2013 04:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252915 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 04:24:39 -0000 Author: gonzo Date: Sun Jul 7 04:24:38 2013 New Revision: 252915 URL: http://svnweb.freebsd.org/changeset/base/252915 Log: - Add USFS driver as an example of device mode for AM335x-based devices Modified: head/sys/arm/conf/BEAGLEBONE Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Sun Jul 7 04:23:29 2013 (r252914) +++ head/sys/arm/conf/BEAGLEBONE Sun Jul 7 04:24:38 2013 (r252915) @@ -123,6 +123,10 @@ device bpf device miibus device axe # ASIX Electronics USB Ethernet +# Device mode support and USFS template +device usb_template # Control of the gadget +device usfs + # Flattened Device Tree options FDT options FDT_DTB_STATIC From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 04:28:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 89B43531; Sun, 7 Jul 2013 04:28:38 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3A3106D; Sun, 7 Jul 2013 04:28:38 +0000 (UTC) Received: from [207.6.254.8] (helo=[192.168.1.65]) by id.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1UvgaR-000DFz-18; Sat, 06 Jul 2013 21:28:37 -0700 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r252912 - head/sys/dev/usb/controller From: Oleksandr Tymoshenko In-Reply-To: <201307070418.r674IZZg036437@svn.freebsd.org> Date: Sat, 6 Jul 2013 21:28:16 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201307070418.r674IZZg036437@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.1503) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 2013-07-06, at 9:18 PM, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Sun Jul 7 04:18:35 2013 > New Revision: 252912 > URL: http://svnweb.freebsd.org/changeset/base/252912 > > Log: > - Add initial host mode support for Mentor Graphics USB OTG controller > - Sync musb_otg_atmelarm with new core logic API [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 04:28:38 -0000 On 2013-07-06, at 9:18 PM, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Sun Jul 7 04:18:35 2013 > New Revision: 252912 > URL: http://svnweb.freebsd.org/changeset/base/252912 > > Log: > - Add initial host mode support for Mentor Graphics USB OTG controller > - Sync musb_otg_atmelarm with new core logic API Reviewed by: hselasky@ From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 04:33:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0D3D068F for ; Sun, 7 Jul 2013 04:33:31 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com [209.85.217.174]) by mx1.freebsd.org (Postfix) with ESMTP id 0B650108F for ; Sun, 7 Jul 2013 04:33:29 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id x10so2940593lbi.33 for ; Sat, 06 Jul 2013 21:33:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=VnihBvgPTFvS29ISNS96JZyFsmyBpCBFbxU0Epyi4Ng=; b=aTAJqUHGMhaM6Zm1r3HtpN2mtktHFx1z74Vh5NXPZRQRF4hmcUz1+5uj3ir2M1fkNC IsL5b6qeZb5imtFjhQ0QH89QD507ntqq37UZckq4blbkZ6C1swVypmW41HqZ902ElAOy IAU0sYNLXDwx6YK/bEEazslhlHt7mtZw0wUa1k9/msw0gNYFdM00k+wrihX3+GtRs6vS /SlKrYF4lKZoK8QEC/1ehCkePFFgnupXsflswTm+bHVwOzXYrlMLE4MO2/fICT2P5MlP iKCM2dM9/ZElRd5ldcppr62vr3z1zDiu9Ap2Tf/GUHJea0QPcgZpQwxEEGk5YVIhSe8u Tv4g== X-Received: by 10.112.77.164 with SMTP id t4mr8217924lbw.52.1373171608533; Sat, 06 Jul 2013 21:33:28 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.113.231 with HTTP; Sat, 6 Jul 2013 21:33:08 -0700 (PDT) In-Reply-To: <201307070422.r674M9HM038537@svn.freebsd.org> References: <201307070422.r674M9HM038537@svn.freebsd.org> From: Juli Mallett Date: Sat, 6 Jul 2013 21:33:08 -0700 X-Google-Sender-Auth: --qx7yBPRUZhJ0s7ZKpZ2-dw98U Message-ID: Subject: Re: svn commit: r252913 - head/sys/arm/ti/am335x To: Oleksandr Tymoshenko Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnkfPk5oRCFO4BE6BfO/no7hY5eEXn+iF+oG077W0S6Mi4S2pCN5dX6TYpyP4+8VqA6zUKl Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 04:33:31 -0000 Thanks for this and the other commits, Oleksandr! Much appreciated. Looking forward to giving it a spin on my BeagleBones Black! On Sat, Jul 6, 2013 at 9:22 PM, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Sun Jul 7 04:22:08 2013 > New Revision: 252913 > URL: http://svnweb.freebsd.org/changeset/base/252913 > > Log: > - Add USBSS driver for AM335x SoC. Driver is a wrapper around Mentors Graphic > USB OTG core. > > Added: > head/sys/arm/ti/am335x/am335x_usbss.c (contents, props changed) > Modified: > head/sys/arm/ti/am335x/files.am335x > > Added: head/sys/arm/ti/am335x/am335x_usbss.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/arm/ti/am335x/am335x_usbss.c Sun Jul 7 04:22:08 2013 (r252913) > @@ -0,0 +1,481 @@ > +/*- > + * Copyright (c) 2013 Oleksandr Tymoshenko > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#include > +#include > + > +#include > +#include > +#include > +#include > + > +#define USB_DEBUG_VAR usbssdebug > + > +#include > +#include > +#include > +#include > + > +#include > + > +#include > +#include > +#include > + > +#define AM335X_USB_PORTS 2 > + > +#define USBSS_REVREG 0x00 > +#define USBSS_SYSCONFIG 0x10 > +#define USBSS_SYSCONFIG_SRESET 1 > + > +#define USBCTRL_REV 0x00 > +#define USBCTRL_CTRL 0x14 > +#define USBCTRL_STAT 0x18 > +#define USBCTRL_IRQ_STAT0 0x30 > +#define IRQ_STAT0_RXSHIFT 16 > +#define IRQ_STAT0_TXSHIFT 0 > +#define USBCTRL_IRQ_STAT1 0x34 > +#define IRQ_STAT1_DRVVBUS (1 << 8) > +#define USBCTRL_INTEN_SET0 0x38 > +#define USBCTRL_INTEN_SET1 0x3C > +#define USBCTRL_INTEN_USB_ALL 0x1ff > +#define USBCTRL_INTEN_USB_SOF (1 << 3) > +#define USBCTRL_INTEN_CLR0 0x40 > +#define USBCTRL_INTEN_CLR1 0x44 > +#define USBCTRL_UTMI 0xE0 > +#define USBCTRL_UTMI_FSDATAEXT (1 << 1) > +#define USBCTRL_MODE 0xE8 > +#define USBCTRL_MODE_IDDIG (1 << 8) > +#define USBCTRL_MODE_IDDIGMUX (1 << 7) > + > +/* USBSS resource + 2 MUSB ports */ > + > +#define RES_USBSS 0 > +#define RES_USBCTRL(i) (3*i+1) > +#define RES_USBPHY(i) (3*i+2) > +#define RES_USBCORE(i) (3*i+3) > + > +#define USB_WRITE4(sc, idx, reg, val) do { \ > + bus_write_4((sc)->sc_mem_res[idx], (reg), (val)); \ > +} while (0) > + > +#define USB_READ4(sc, idx, reg) bus_read_4((sc)->sc_mem_res[idx], (reg)) > + > +#define USBSS_WRITE4(sc, reg, val) \ > + USB_WRITE4((sc), RES_USBSS, (reg), (val)) > +#define USBSS_READ4(sc, reg) \ > + USB_READ4((sc), RES_USBSS, (reg)) > +#define USBCTRL_WRITE4(sc, unit, reg, val) \ > + USB_WRITE4((sc), RES_USBCTRL(unit), (reg), (val)) > +#define USBCTRL_READ4(sc, unit, reg) \ > + USB_READ4((sc), RES_USBCTRL(unit), (reg)) > +#define USBPHY_WRITE4(sc, unit, reg, val) \ > + USB_WRITE4((sc), RES_USBPHY(unit), (reg), (val)) > +#define USBPHY_READ4(sc, unit, reg) \ > + USB_READ4((sc), RES_USBPHY(unit), (reg)) > + > +static struct resource_spec am335x_musbotg_mem_spec[] = { > + { SYS_RES_MEMORY, 0, RF_ACTIVE }, > + { SYS_RES_MEMORY, 1, RF_ACTIVE }, > + { SYS_RES_MEMORY, 2, RF_ACTIVE }, > + { SYS_RES_MEMORY, 3, RF_ACTIVE }, > + { SYS_RES_MEMORY, 4, RF_ACTIVE }, > + { SYS_RES_MEMORY, 5, RF_ACTIVE }, > + { SYS_RES_MEMORY, 6, RF_ACTIVE }, > + { -1, 0, 0 } > +}; > + > +static struct resource_spec am335x_musbotg_irq_spec[] = { > + { SYS_RES_IRQ, 0, RF_ACTIVE }, > + { SYS_RES_IRQ, 1, RF_ACTIVE }, > + { SYS_RES_IRQ, 2, RF_ACTIVE }, > + { -1, 0, 0 } > +}; > + > +#ifdef USB_DEBUG > +static int usbssdebug = 0; > + > +static SYSCTL_NODE(_hw_usb, OID_AUTO, am335x_usbss, CTLFLAG_RW, 0, "AM335x USBSS"); > +SYSCTL_INT(_hw_usb_am335x_usbss, OID_AUTO, debug, CTLFLAG_RW, > + &usbssdebug, 0, "Debug level"); > +#endif > + > +static device_probe_t musbotg_probe; > +static device_attach_t musbotg_attach; > +static device_detach_t musbotg_detach; > + > +struct musbotg_super_softc { > + struct musbotg_softc sc_otg[AM335X_USB_PORTS]; > + struct resource *sc_mem_res[AM335X_USB_PORTS*3+1]; > + struct resource *sc_irq_res[AM335X_USB_PORTS+1]; > + void *sc_intr_hdl; > +}; > + > +static void > +musbotg_vbus_poll(struct musbotg_super_softc *sc, int port) > +{ > + uint32_t stat; > + > + if (sc->sc_otg[port].sc_mode == MUSB2_DEVICE_MODE) > + musbotg_vbus_interrupt(&sc->sc_otg[port], 1); > + else { > + stat = USBCTRL_READ4(sc, port, USBCTRL_STAT); > + musbotg_vbus_interrupt(&sc->sc_otg[port], stat & 1); > + } > +} > + > +/* > + * Arg to musbotg_clocks_on and musbot_clocks_off is > + * a uint32_t * pointing to the SCM register offset. > + */ > +static uint32_t USB_CTRL[] = {SCM_USB_CTRL0, SCM_USB_CTRL1}; > + > +static void > +musbotg_clocks_on(void *arg) > +{ > + uint32_t c, reg = *(uint32_t *)arg; > + > + ti_scm_reg_read_4(reg, &c); > + c &= ~3; /* Enable power */ > + c |= 1 << 19; /* VBUS detect enable */ > + c |= 1 << 20; /* Session end enable */ > + ti_scm_reg_write_4(reg, c); > +} > + > +static void > +musbotg_clocks_off(void *arg) > +{ > + uint32_t c, reg = *(uint32_t *)arg; > + > + /* Disable power to PHY */ > + ti_scm_reg_read_4(reg, &c); > + ti_scm_reg_write_4(reg, c | 3); > +} > + > +static void > +musbotg_ep_int_set(struct musbotg_softc *sc, int ep, int on) > +{ > + struct musbotg_super_softc *ssc = sc->sc_platform_data; > + uint32_t epmask; > + > + epmask = ((1 << ep) << IRQ_STAT0_RXSHIFT); > + epmask |= ((1 << ep) << IRQ_STAT0_TXSHIFT); > + if (on) > + USBCTRL_WRITE4(ssc, sc->sc_id, > + USBCTRL_INTEN_SET0, epmask); > + else > + USBCTRL_WRITE4(ssc, sc->sc_id, > + USBCTRL_INTEN_CLR0, epmask); > +} > + > +static void > +musbotg_usbss_interrupt(void *arg) > +{ > + panic("USBSS real interrupt"); > +} > + > +static void > +musbotg_wrapper_interrupt(void *arg) > +{ > + struct musbotg_softc *sc = arg; > + struct musbotg_super_softc *ssc = sc->sc_platform_data; > + uint32_t stat, stat0, stat1; > + stat = USBCTRL_READ4(ssc, sc->sc_id, USBCTRL_STAT); > + stat0 = USBCTRL_READ4(ssc, sc->sc_id, USBCTRL_IRQ_STAT0); > + stat1 = USBCTRL_READ4(ssc, sc->sc_id, USBCTRL_IRQ_STAT1); > + if (stat0) > + USBCTRL_WRITE4(ssc, sc->sc_id, USBCTRL_IRQ_STAT0, stat0); > + if (stat1) > + USBCTRL_WRITE4(ssc, sc->sc_id, USBCTRL_IRQ_STAT1, stat1); > + > + DPRINTFN(4, "port%d: stat0=%08x stat1=%08x, stat=%08x\n", > + sc->sc_id, stat0, stat1, stat); > + > + if (stat1 & IRQ_STAT1_DRVVBUS) > + musbotg_vbus_interrupt(sc, stat & 1); > + > + musbotg_interrupt(arg, ((stat0 >> 16) & 0xffff), > + stat0 & 0xffff, stat1 & 0xff); > +} > + > +static int > +musbotg_probe(device_t dev) > +{ > + if (!ofw_bus_is_compatible(dev, "ti,musb-am33xx")) > + return (ENXIO); > + > + device_set_desc(dev, "TI AM33xx integrated USB OTG controller"); > + > + return (BUS_PROBE_DEFAULT); > +} > + > +static int > +musbotg_attach(device_t dev) > +{ > + struct musbotg_super_softc *sc = device_get_softc(dev); > + int err; > + int i; > + uint32_t rev, reg; > + > + /* Request the memory resources */ > + err = bus_alloc_resources(dev, am335x_musbotg_mem_spec, > + sc->sc_mem_res); > + if (err) { > + device_printf(dev, > + "Error: could not allocate mem resources\n"); > + return (ENXIO); > + } > + > + /* Request the IRQ resources */ > + err = bus_alloc_resources(dev, am335x_musbotg_irq_spec, > + sc->sc_irq_res); > + if (err) { > + device_printf(dev, > + "Error: could not allocate irq resources\n"); > + return (ENXIO); > + } > + > + /* > + * Reset USBSS, USB0 and USB1 > + */ > + rev = USBSS_READ4(sc, USBSS_REVREG); > + device_printf(dev, "TI AM335X USBSS v%d.%d.%d\n", > + (rev >> 8) & 7, (rev >> 6) & 3, rev & 63); > + > + ti_prcm_clk_enable(MUSB0_CLK); > + > + USBSS_WRITE4(sc, USBSS_SYSCONFIG, > + USBSS_SYSCONFIG_SRESET); > + while (USBSS_READ4(sc, USBSS_SYSCONFIG) & > + USBSS_SYSCONFIG_SRESET) > + ; > + > + err = bus_setup_intr(dev, sc->sc_irq_res[0], > + INTR_TYPE_BIO | INTR_MPSAFE, > + NULL, (driver_intr_t *)musbotg_usbss_interrupt, sc, > + &sc->sc_intr_hdl); > + > + if (err) { > + sc->sc_intr_hdl = NULL; > + device_printf(dev, "Failed to setup USBSS interrupt\n"); > + goto error; > + } > + > + for (i = 0; i < AM335X_USB_PORTS; i++) { > + /* setup MUSB OTG USB controller interface softc */ > + sc->sc_otg[i].sc_clocks_on = &musbotg_clocks_on; > + sc->sc_otg[i].sc_clocks_off = &musbotg_clocks_off; > + sc->sc_otg[i].sc_clocks_arg = &USB_CTRL[i]; > + > + sc->sc_otg[i].sc_ep_int_set = musbotg_ep_int_set; > + > + /* initialise some bus fields */ > + sc->sc_otg[i].sc_bus.parent = dev; > + sc->sc_otg[i].sc_bus.devices = sc->sc_otg[i].sc_devices; > + sc->sc_otg[i].sc_bus.devices_max = MUSB2_MAX_DEVICES; > + > + /* get all DMA memory */ > + if (usb_bus_mem_alloc_all(&sc->sc_otg[i].sc_bus, > + USB_GET_DMA_TAG(dev), NULL)) { > + device_printf(dev, > + "Failed allocate bus mem for musb%d\n", i); > + return (ENOMEM); > + } > + sc->sc_otg[i].sc_io_res = sc->sc_mem_res[RES_USBCORE(i)]; > + sc->sc_otg[i].sc_io_tag = > + rman_get_bustag(sc->sc_otg[i].sc_io_res); > + sc->sc_otg[i].sc_io_hdl = > + rman_get_bushandle(sc->sc_otg[i].sc_io_res); > + sc->sc_otg[i].sc_io_size = > + rman_get_size(sc->sc_otg[i].sc_io_res); > + > + sc->sc_otg[i].sc_irq_res = sc->sc_irq_res[i+1]; > + > + sc->sc_otg[i].sc_bus.bdev = device_add_child(dev, "usbus", -1); > + if (!(sc->sc_otg[i].sc_bus.bdev)) { > + device_printf(dev, "No busdev for musb%d\n", i); > + goto error; > + } > + device_set_ivars(sc->sc_otg[i].sc_bus.bdev, > + &sc->sc_otg[i].sc_bus); > + > + err = bus_setup_intr(dev, sc->sc_otg[i].sc_irq_res, > + INTR_TYPE_BIO | INTR_MPSAFE, > + NULL, (driver_intr_t *)musbotg_wrapper_interrupt, > + &sc->sc_otg[i], &sc->sc_otg[i].sc_intr_hdl); > + if (err) { > + sc->sc_otg[i].sc_intr_hdl = NULL; > + device_printf(dev, > + "Failed to setup interrupt for musb%d\n", i); > + goto error; > + } > + > + sc->sc_otg[i].sc_id = i; > + sc->sc_otg[i].sc_platform_data = sc; > + if (i == 0) > + sc->sc_otg[i].sc_mode = MUSB2_DEVICE_MODE; > + else > + sc->sc_otg[i].sc_mode = MUSB2_HOST_MODE; > + > + /* > + * software-controlled function > + */ > + > + if (sc->sc_otg[i].sc_mode == MUSB2_HOST_MODE) { > + reg = USBCTRL_READ4(sc, i, USBCTRL_MODE); > + reg |= USBCTRL_MODE_IDDIGMUX; > + reg &= ~USBCTRL_MODE_IDDIG; > + USBCTRL_WRITE4(sc, i, USBCTRL_MODE, reg); > + USBCTRL_WRITE4(sc, i, USBCTRL_UTMI, > + USBCTRL_UTMI_FSDATAEXT); > + } else { > + reg = USBCTRL_READ4(sc, i, USBCTRL_MODE); > + reg |= USBCTRL_MODE_IDDIGMUX; > + reg |= USBCTRL_MODE_IDDIG; > + USBCTRL_WRITE4(sc, i, USBCTRL_MODE, reg); > + } > + > + reg = USBCTRL_INTEN_USB_ALL & ~USBCTRL_INTEN_USB_SOF; > + USBCTRL_WRITE4(sc, i, USBCTRL_INTEN_SET1, reg); > + USBCTRL_WRITE4(sc, i, USBCTRL_INTEN_CLR0, 0xffffffff); > + > + err = musbotg_init(&sc->sc_otg[i]); > + if (!err) > + err = device_probe_and_attach(sc->sc_otg[i].sc_bus.bdev); > + > + if (err) > + goto error; > + > + /* poll VBUS one time */ > + musbotg_vbus_poll(sc, i); > + } > + > + return (0); > + > +error: > + musbotg_detach(dev); > + return (ENXIO); > +} > + > +static int > +musbotg_detach(device_t dev) > +{ > + struct musbotg_super_softc *sc = device_get_softc(dev); > + device_t bdev; > + int err; > + int i; > + > + for (i = 0; i < AM335X_USB_PORTS; i++) { > + if (sc->sc_otg[i].sc_bus.bdev) { > + bdev = sc->sc_otg[i].sc_bus.bdev; > + device_detach(bdev); > + device_delete_child(dev, bdev); > + } > + > + if (sc->sc_otg[i].sc_irq_res && sc->sc_otg[i].sc_intr_hdl) { > + /* > + * only call musbotg_uninit() after musbotg_init() > + */ > + musbotg_uninit(&sc->sc_otg[i]); > + > + err = bus_teardown_intr(dev, sc->sc_otg[i].sc_irq_res, > + sc->sc_otg[i].sc_intr_hdl); > + sc->sc_otg[i].sc_intr_hdl = NULL; > + } > + > + usb_bus_mem_free_all(&sc->sc_otg[i].sc_bus, NULL); > + } > + > + if (sc->sc_intr_hdl) { > + bus_teardown_intr(dev, sc->sc_irq_res[0], > + sc->sc_intr_hdl); > + sc->sc_intr_hdl = NULL; > + } > + > + > + /* Free resources if any */ > + if (sc->sc_mem_res[0]) > + bus_release_resources(dev, am335x_musbotg_mem_spec, > + sc->sc_mem_res); > + > + if (sc->sc_irq_res[0]) > + bus_release_resources(dev, am335x_musbotg_irq_spec, > + sc->sc_irq_res); > + > + /* during module unload there are lots of children leftover */ > + device_delete_children(dev); > + > + return (0); > +} > + > +static device_method_t musbotg_methods[] = { > + /* Device interface */ > + DEVMETHOD(device_probe, musbotg_probe), > + DEVMETHOD(device_attach, musbotg_attach), > + DEVMETHOD(device_detach, musbotg_detach), > + DEVMETHOD(device_suspend, bus_generic_suspend), > + DEVMETHOD(device_resume, bus_generic_resume), > + DEVMETHOD(device_shutdown, bus_generic_shutdown), > + > + DEVMETHOD_END > +}; > + > +static driver_t musbotg_driver = { > + .name = "musbotg", > + .methods = musbotg_methods, > + .size = sizeof(struct musbotg_super_softc), > +}; > + > +static devclass_t musbotg_devclass; > + > +DRIVER_MODULE(musbotg, simplebus, musbotg_driver, musbotg_devclass, 0, 0); > +MODULE_DEPEND(musbotg, usb, 1, 1, 1); > > Modified: head/sys/arm/ti/am335x/files.am335x > ============================================================================== > --- head/sys/arm/ti/am335x/files.am335x Sun Jul 7 04:18:35 2013 (r252912) > +++ head/sys/arm/ti/am335x/files.am335x Sun Jul 7 04:22:08 2013 (r252913) > @@ -7,6 +7,7 @@ arm/ti/am335x/am335x_scm_padconf.c stand > arm/ti/am335x/am335x_lcd.c optional sc > arm/ti/am335x/am335x_lcd_syscons.c optional sc > arm/ti/am335x/am335x_pwm.c standard > +arm/ti/am335x/am335x_usbss.c optional musb fdt > arm/ti/ti_edma3.c standard > arm/ti/ti_mmchs.c optional mmc > arm/ti/cpsw/if_cpsw.c optional cpsw From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 05:36:14 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E302C63; Sun, 7 Jul 2013 05:36:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-gh0-x22f.google.com (mail-gh0-x22f.google.com [IPv6:2607:f8b0:4002:c05::22f]) by mx1.freebsd.org (Postfix) with ESMTP id 90CBE119A; Sun, 7 Jul 2013 05:36:13 +0000 (UTC) Received: by mail-gh0-f175.google.com with SMTP id z19so1264975ghb.6 for ; Sat, 06 Jul 2013 22:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=x/Waj2fly9J1WySxi//s8ybjYZPeWRIUjh4g2INBN/Y=; b=fXgDDpKH8PdtW7XeDZGiWXzYJN0EZ1savsUk2HS8hxtGpaA+e5CD3HDQiin+ce4Fs+ 10FgwWgsox5heQiNEDQ3bLtvLCP1PFL2map8rpJmU0CFMOOf0ffCnJ5tVMPTWsUPYc3Z 5fo2j/23yceCvf7c+C1KmzNWQ1RSI4Fjv/YeitTtXrCjRd3l2QaOvpm9zotkzE8jPIP8 EBj41Eac0cthbmhxSDJLMXfS1cvqcyyxRuvrRniORtv1k4YgobRDsSQ0hcCPWphZrHPg Q6YtKOrEKm0n1Juq/fK7xONkOibEG9vdh3U2zYyySn5e05Aku3V21DMpEnmX0vC78wYD xHXw== X-Received: by 10.236.31.202 with SMTP id m50mr9340824yha.19.1373175372704; Sat, 06 Jul 2013 22:36:12 -0700 (PDT) Received: from [10.77.122.209] (mobile-166-147-108-080.mycingular.net. [166.147.108.80]) by mx.google.com with ESMTPSA id e69sm26783412yhl.3.2013.07.06.22.36.08 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 06 Jul 2013 22:36:12 -0700 (PDT) References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org> <20130706184249.GD25842@garage.freebsd.pl> <20130706195108.GA34684@stack.nl> <20130707114237.L897@besplex.bde.org> Mime-Version: 1.0 (1.0) In-Reply-To: <20130707114237.L897@besplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com> X-Mailer: iPhone Mail (10B329) From: Garrett Cooper Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol Date: Sat, 6 Jul 2013 22:36:04 -0700 To: Bruce Evans Cc: Jim Harris , "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , Jilles Tjoelker , "svn-src-all@FreeBSD.org" , Bruce Evans , "svn-src-head@FreeBSD.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 05:36:14 -0000 One minor interjection and I'll butt out of the discussion... Sent from my iPhone On Jul 6, 2013, at 7:26 PM, Bruce Evans wrote: > On Sat, 6 Jul 2013, Jilles Tjoelker wrote: >=20 >> On Sat, Jul 06, 2013 at 08:42:49PM +0200, Pawel Jakub Dawidek wrote: >>> On Thu, Jul 04, 2013 at 11:44:28AM +1000, Bruce Evans wrote: >>>> Many style bugs are visible in this patch: >>> [...] >>>> - sysexits.h is used >>> [...] >>=20 >>> Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used, >>> please stop calling this a bug, because you are just confusing people. >>> At this point sysexits(3) actually even suggests it is blessed by >>> style(9). This is how it starts: >>=20 >>> According to style(9), it is not a good practice to call exit(3) >>> with arbitrary values to indicate a failure condition when >>> ending a program. Instead, the pre-defined exit codes from >>> sysexits should be used, so the caller of the process can get a >>> rough estimation about the failure class without looking up the >>> source code. >=20 > This is just another bug in sysexits(3). This is not according to > style(9), since style(9) was fixed to not say that after I complained > previously :-). It has never been normal practice to use sysexits(3), > but someone who likes it added recommendations to use it to style(9) when t= hey added the man pages for sysexits(3). Before that, it was > so rarely used that it had no man page. >=20 >>> In my personal opinion it doesn't hurt to use sysexits(3) - if you don't= >>> want to interpret exit status then treat every value !=3D 0 as an error.= >>> In HAST (IIRC) I do interpret exit status - if I get EX_TEMPFAIL, I know= >>> I can try to restart the process, if I get something else I don't >>> restart it, as I risk an infinite loop. >=20 > That's fine for suites of programs that agree on exit codes. You can't > depend on this for anything else. >=20 >>> Apart from my personal opinion, if you want to call it a bug and not >>> confuse people, then start discussion and change the manual page to >>> recommend avoiding sysexits(3). As of now we are just sending mixed >>> signals and create confusion. >>=20 >> This is indeed confusing, because style(9) itself does not recommend >> sysexits at all. This was changed in 2008 but sysexits(3) was not >> adjusted along with that. >>=20 >> The text in style(9) that only allows 0 or 1 is not universally valid >> either. Firstly, in some application areas like mail delivery, it is >> conventional and documented to use and interpret sysexits codes. (So if >> HAST uses sysexits, it should document that fact.) Secondly, some other >> utilities such as test, cmp and diff use 0 for a "true" condition, 1 for >> a "false" condition and greater than 1 (usually 2) for failures. >=20 > 0 and 1 are all that are universally valid. Programs shouldn't generate > more than these unless they have special requirements/protocols. But > nonzero meaning "failed" should be accepted by all POSIX programs. >=20 > This is even more implementation-defined than I remembered in plain C > programs. In C99, EXIT_SUCCESS (0) is mapped to success in some > implementation-defined way; EXIT_FAILURE (1) is mapped to failure > in some implementation-defined way; for all other exit() args, the > whole mapping is implementation-defined, so 2 and everything in > sysexits.h may be mapped to success. Therefore, portable C programs > must not use anythying except 0 or 1 (preferably spelled using the > C99 macros). Not using sysexits.h also keeps the sources portable. > sysexits.h is in neither C99 nor POSIX. >=20 > style(9) isn't the place to give portability lessons like the above. > I think we discussed using EXIT_SUCCESS and EXIT_FAILURE when we changed > it to not mention sysexits, but for some reason it hard code 0 and 1. >=20 > The original style rule against using cryptic error codes hasn't been > restored. =46rom the 4.4BSD style guide: >=20 > % /* > % * Exits should be 0 on success, and 1 on failure. Don't denote > % * all the possible exit points, using the integers 1 through 300. > % */ > % exit(0); /* Avoid obvious comments such as "Exit 0 on success." */= >=20 > (Here 300 is off by 45. Exit statuses less than 0 and greater than 255 > give implementation-defined behaviour that is worse than usual.) I think > this rule is to limit cryptic undocumented exit codes. I don't like > sysexits because it gives cryptic documented exit codes instead. All > that can be safeley done (except in prgram suites) is map all nonzero > exit codes to "failed" (or killed by a signal). >=20 > In another thread involving Pawel, phk campaigns against errno and asks > for error strings (even if they are only in English). Using perror() > did this long ago for program termination, and using the err() family > does it better. Except possibly for program suites -- translating a > single numeric error is easier for programs than translating an > unstructured string. I actually prefer using binary representations > for programs. Your argument would be valid if computers were parsing output and putting it= in more meaningful forms, but it's invalid when humans need to understand w= hy things fail. Many devs who consume FreeBSD don't understand the concept o= f man 5 errno, and if they don't, I doubt end-users of FreeBSD (and its deri= vatives) will. Thanks.= From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 07:02:02 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 37EAD986; Sun, 7 Jul 2013 07:02:02 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C0C921341; Sun, 7 Jul 2013 07:02:00 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA18529; Sun, 07 Jul 2013 10:01:58 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Uviys-00033N-Ei; Sun, 07 Jul 2013 10:01:58 +0300 Message-ID: <51D9122F.3050405@FreeBSD.org> Date: Sun, 07 Jul 2013 10:01:03 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130405 Thunderbird/17.0.5 MIME-Version: 1.0 To: Jeff Roberson Subject: Re: svn commit: r252226 - head/sys/vm References: <201306260057.r5Q0vcG8021089@svn.freebsd.org> In-Reply-To: <201306260057.r5Q0vcG8021089@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 07:02:02 -0000 on 26/06/2013 03:57 Jeff Roberson said the following: > + { NULL, "4 Bucket", BUCKET_SIZE(4), 4096 }, Looks like BUCKET_SIZE(4) is zero, if I am not mistaken. Is this OK / intended? -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 07:06:21 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A048DAD3; Sun, 7 Jul 2013 07:06:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 35F341354; Sun, 7 Jul 2013 07:06:19 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id KAA18563; Sun, 07 Jul 2013 10:06:18 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Uvj34-00033s-8e; Sun, 07 Jul 2013 10:06:18 +0300 Message-ID: <51D91334.8060402@FreeBSD.org> Date: Sun, 07 Jul 2013 10:05:24 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130405 Thunderbird/17.0.5 MIME-Version: 1.0 To: Jeff Roberson Subject: Re: svn commit: r251826 - head/sys/vm References: <201306170343.r5H3hmtq006361@svn.freebsd.org> In-Reply-To: <201306170343.r5H3hmtq006361@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 07:06:21 -0000 on 17/06/2013 06:43 Jeff Roberson said the following: > + void *uz_arg; /* Import/release argument. */ Would it make sense to use a more descriptive/distinct name for this member? The one that would signify its relation to import/release as opposed to being some other kind of argument. Unfortunately I can not come up with anything descriptive and short at the moments. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 08:30:19 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 886FD36B; Sun, 7 Jul 2013 08:30:19 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id EFB051A88; Sun, 7 Jul 2013 08:30:18 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id C978D1042308; Sun, 7 Jul 2013 18:30:15 +1000 (EST) Date: Sun, 7 Jul 2013 18:30:15 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Garrett Cooper Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol In-Reply-To: <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com> Message-ID: <20130707181851.E4398@besplex.bde.org> References: <201307040026.r640QOCd079203@svn.freebsd.org> <20130704105843.B982@besplex.bde.org> <20130706184249.GD25842@garage.freebsd.pl> <20130706195108.GA34684@stack.nl> <20130707114237.L897@besplex.bde.org> <9C9CE501-055E-44A6-82BD-FFB44A04B30F@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=K8x6hFqI c=1 sm=1 a=RvpeemXtX5oA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=X2rCv88ZkwkA:10 a=qlV08caaGxAhSlL7ab0A:9 a=CjuIK1q_8ugA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 Cc: Jim Harris , "src-committers@FreeBSD.org" , Pawel Jakub Dawidek , Jilles Tjoelker , "svn-src-all@FreeBSD.org" , Bruce Evans , "svn-src-head@FreeBSD.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 08:30:19 -0000 > One minor interjection and I'll butt out of the discussion... >> .... >> In another thread involving Pawel, phk campaigns against errno and asks >> for error strings (even if they are only in English). Using perror() >> did this long ago for program termination, and using the err() family >> does it better. Except possibly for program suites -- translating a >> single numeric error is easier for programs than translating an >> unstructured string. I actually prefer using binary representations >> for programs. > > Your argument would be valid if computers were parsing output and putting it in more meaningful forms, but it's invalid when humans need to understand why things fail. Many devs who consume FreeBSD don't understand the concept of man 5 errno, and if they don't, I doubt end-users of FreeBSD (and its derivatives) will. That was more than half of my argument. perror() and err() give messages that are readable by humans. Extra info in exit statuses adds less than nothing for most humans. Some programs can parse it, but most can't. Sysexits is thus useless for almost everything. Bruce From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 11:45:58 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0CAF03CA; Sun, 7 Jul 2013 11:45:58 +0000 (UTC) (envelope-from fullermd@over-yonder.net) Received: from thyme.infocus-llc.com (server.infocus-llc.com [206.156.254.44]) by mx1.freebsd.org (Postfix) with ESMTP id 2196F1112; Sun, 7 Jul 2013 11:45:56 +0000 (UTC) Received: from draco.over-yonder.net (c-75-65-60-66.hsd1.ms.comcast.net [75.65.60.66]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by thyme.infocus-llc.com (Postfix) with ESMTPSA id B31E737B4E0; Sun, 7 Jul 2013 06:45:55 -0500 (CDT) Received: by draco.over-yonder.net (Postfix, from userid 100) id 3bp7KH2GpxzSZk; Sun, 7 Jul 2013 06:45:55 -0500 (CDT) Date: Sun, 7 Jul 2013 06:45:55 -0500 From: "Matthew D. Fuller" To: John Baldwin Subject: Re: svn commit: r252209 - in head: share/man/man9 sys/kern sys/sys Message-ID: <20130707114555.GB13386@over-yonder.net> References: <201306251844.r5PIiFDZ009708@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201306251844.r5PIiFDZ009708@svn.freebsd.org> X-Editor: vi X-OS: FreeBSD User-Agent: Mutt/1.5.21-fullermd.4 (2010-09-15) X-Virus-Scanned: clamav-milter 0.97.8 at thyme.infocus-llc.com X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 11:45:58 -0000 On Tue, Jun 25, 2013 at 06:44:15PM +0000 I heard the voice of John Baldwin, and lo! it spake thus: > Author: jhb > Date: Tue Jun 25 18:44:15 2013 > New Revision: 252209 > URL: http://svnweb.freebsd.org/changeset/base/252209 > > Log: > Several improvements to rmlock(9). Many of these are based on patches > provided by Isilon. This breaks the kernel build with INVARIANT_SUPPORT but not INVARIANTS: /usr/src/sys/kern/kern_rmlock.c:714:1: error: expected identifier or '(' Presumably, because: > +#ifndef INVARIANTS > +#define _rm_assert(c, what, file, line) > +#endif thus #define's, but then later > +#ifdef INVARIANT_SUPPORT > +/* > + * Note that this does not need to use witness_assert() for read lock > + * assertions since an exact count of read locks held by this thread > + * is computable. > + */ > +void > +_rm_assert(const struct rmlock *rm, int what, const char *file, int line) tries to make a function but the preprocessor has already munged it up. -- Matthew Fuller (MF4839) | fullermd@over-yonder.net Systems/Network Administrator | http://www.over-yonder.net/~fullermd/ On the Internet, nobody can hear you scream. From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 15:51:29 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 58120F22; Sun, 7 Jul 2013 15:51:29 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4ACF3193A; Sun, 7 Jul 2013 15:51:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67FpTZd042267; Sun, 7 Jul 2013 15:51:29 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67FpTBu042266; Sun, 7 Jul 2013 15:51:29 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201307071551.r67FpTBu042266@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 7 Jul 2013 15:51:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252956 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 15:51:29 -0000 Author: pfg Date: Sun Jul 7 15:51:28 2013 New Revision: 252956 URL: http://svnweb.freebsd.org/changeset/base/252956 Log: Implement SEEK_HOLE/SEEK_DATA for ext2fs. Merged from r236044 on UFS. MFC after: 3 days Modified: head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Sun Jul 7 15:50:01 2013 (r252955) +++ head/sys/fs/ext2fs/ext2_vnops.c Sun Jul 7 15:51:28 2013 (r252956) @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -92,6 +93,7 @@ static vop_close_t ext2_close; static vop_create_t ext2_create; static vop_fsync_t ext2_fsync; static vop_getattr_t ext2_getattr; +static vop_ioctl_t ext2_ioctl; static vop_link_t ext2_link; static vop_mkdir_t ext2_mkdir; static vop_mknod_t ext2_mknod; @@ -122,6 +124,7 @@ struct vop_vector ext2_vnodeops = { .vop_fsync = ext2_fsync, .vop_getattr = ext2_getattr, .vop_inactive = ext2_inactive, + .vop_ioctl = ext2_ioctl, .vop_link = ext2_link, .vop_lookup = vfs_cache_lookup, .vop_mkdir = ext2_mkdir, @@ -1427,6 +1430,9 @@ ext2_pathconf(struct vop_pathconf_args * case _PC_NO_TRUNC: *ap->a_retval = 1; return (0); + case _PC_MIN_HOLE_SIZE: + *ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize; + return(0); default: return (EINVAL); } @@ -1702,6 +1708,20 @@ ext2_read(struct vop_read_args *ap) return (error); } +static int +ext2_ioctl(struct vop_ioctl_args *ap) +{ + + switch (ap->a_command) { + case FIOSEEKDATA: + case FIOSEEKHOLE: + return (vn_bmap_seekhole(ap->a_vp, ap->a_command, + (off_t *)ap->a_data, ap->a_cred)); + default: + return (ENOTTY); + } +} + /* * Vnode op for writing. */ From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 16:12:22 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D4830E9; Sun, 7 Jul 2013 16:12:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ACCB01A24; Sun, 7 Jul 2013 16:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67GCMsk049626; Sun, 7 Jul 2013 16:12:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67GCMhK049625; Sun, 7 Jul 2013 16:12:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201307071612.r67GCMhK049625@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Jul 2013 16:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252965 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 16:12:22 -0000 Author: imp Date: Sun Jul 7 16:12:22 2013 New Revision: 252965 URL: http://svnweb.freebsd.org/changeset/base/252965 Log: Remove all the NOPs after SYNC. They aren't needed. They originated in the original Octeon port. They weren't present, as far as I can tell, on the projects/mips branch until after this point. They were in the original Octeon port in code picked up from the vendor, who I've been able to find out trolling old email put them there to get around an SMP problem that most likely was fixed in other ways. NetBSD and Linux don't have these, except for some specific uses of SYNC on the alchemy parts (which we don't support, but even if we did it is only a specific case and would be specifically coded anyway). This is true of the current Linux code, as well as one old version I polled. I looked back at the old R12000, R8000, R6000, R4000, R4400 errata that I have, and could find no mention of SYNC needing NOPs for silicon bugs (although plenty of other cases where NOPs and other contortions were needed). An Google search turned up no old mailing list discussions on this on Linux, NetBSD or FreeBSD (except the disussion that kicked off these studies). I've test booted this on my Octeon Plus eval board and survived a buildworld. Adrian Chadd reports that this patch has no ill effects on the Ahteros platforms he tested it on. I conclude it is safe to just remove the NOPs. But added __MIPS_PLATFORM_SYNC_NOPS as a failsafe in case we find some platform where these are, in fact, required. Reviewed by: adrian@ Modified: head/sys/mips/include/atomic.h Modified: head/sys/mips/include/atomic.h ============================================================================== --- head/sys/mips/include/atomic.h Sun Jul 7 16:11:13 2013 (r252964) +++ head/sys/mips/include/atomic.h Sun Jul 7 16:12:22 2013 (r252965) @@ -44,20 +44,16 @@ * do not have atomic operations defined for them, but generally shouldn't * need atomic operations. */ +#ifndef __MIPS_PLATFORM_SYNC_NOPS +#define __MIPS_PLATFORM_SYNC_NOPS "" +#endif static __inline void mips_sync(void) { - __asm __volatile (".set noreorder\n\t" - "sync\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" - "nop\n\t" + __asm __volatile (".set noreorder\n" + "\tsync\n" + __MIPS_PLATFORM_SYNC_NOPS ".set reorder\n" : : : "memory"); } From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 17:12:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0DF1B1AE for ; Sun, 7 Jul 2013 17:12:47 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f177.google.com (mail-ie0-f177.google.com [209.85.223.177]) by mx1.freebsd.org (Postfix) with ESMTP id CFC141C86 for ; Sun, 7 Jul 2013 17:12:46 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id aq17so7998450iec.8 for ; Sun, 07 Jul 2013 10:12:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=f5KJRwtK4EF/MJZGk8R30PA7gbAbJenkocR58VGPdPo=; b=mO8K5AkFrYRafQJi/Va2IT533qXkUYcpHIKTFHeQVC1BJsZIZXq/dL4oecz5LX53R0 F8/F7PWbxV/1manJgbZ46+GIFKpw5OzRNNRiNrtqcV7Nla6dcnO0VC2vZApjMyNvmf7N AusC9TX/jTc5KmXTIgn1pRfbcKW//YHcT/jQOLl8M4JLONl4Ep352qFOA+ibrQLbeHS9 ODrF7qB4OwzW1yEoerMh95q5+ZKTlaKucMIxE978/JPDrHCLej72+7REjkVdl06PJKpI 0x+0KaX5N3sCNliuYAddVmNqbZJyWnmBQMkLTJHuMzfCiplJIEHeG+npl9e88P1wGEe6 ktJw== X-Received: by 10.50.79.169 with SMTP id k9mr31973136igx.20.1373217160461; Sun, 07 Jul 2013 10:12:40 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id q10sm7773075ige.4.2013.07.07.10.12.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 10:12:39 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r252856 - head Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201307060013.r660D8bg037291@svn.freebsd.org> Date: Sun, 7 Jul 2013 11:12:36 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201307060013.r660D8bg037291@svn.freebsd.org> To: Simon J. Gerraty X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQn/wZUn5HldLGQSekpABlxq8AdmN2k6Sy2C96SNrrXk9GKNa889Wx1bPwQ0ywIU43frc2xW Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 17:12:47 -0000 Doesn't .MAKE break the update path? Warner On Jul 5, 2013, at 6:13 PM, Simon J. Gerraty wrote: > Author: sjg > Date: Sat Jul 6 00:13:08 2013 > New Revision: 252856 > URL: http://svnweb.freebsd.org/changeset/base/252856 >=20 > Log: > Sprinkle some .MAKE magic >=20 > Modified: > head/Makefile.inc1 >=20 > Modified: head/Makefile.inc1 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/Makefile.inc1 Sat Jul 6 00:10:52 2013 = (r252855) > +++ head/Makefile.inc1 Sat Jul 6 00:13:08 2013 = (r252856) > @@ -1237,7 +1237,7 @@ _kerberos5_bootstrap_tools=3D \ > # Please document (add comment) why something is in = 'bootstrap-tools'. > # Try to bound the building of the bootstrap-tool to just the > # FreeBSD versions that need the tool built at this stage of the = build. > -bootstrap-tools: > +bootstrap-tools: .MAKE > .for _tool in \ > ${_clang_tblgen} \ > ${_kerberos5_bootstrap_tools} \ > @@ -1290,7 +1290,7 @@ _gcc_tools=3D gnu/usr.bin/cc/cc_tools > _rescue=3D rescue/rescue > .endif >=20 > -build-tools: > +build-tools: .MAKE > .for _tool in \ > bin/csh \ > bin/sh \ > @@ -1352,7 +1352,7 @@ _cc=3D gnu/usr.bin/cc > .endif > .endif >=20 > -cross-tools: > +cross-tools: .MAKE > .for _tool in \ > ${_clang_libs} \ > ${_clang} \ > @@ -1383,12 +1383,12 @@ hierarchy hier: > # interdependencies (__L) are built automatically by the > # ${.CURDIR}/tools/make_libdeps.sh script. > # > -libraries: > - cd ${.CURDIR}; \ > - ${MAKE} -f Makefile.inc1 _prereq_libs; \ > - ${MAKE} -f Makefile.inc1 _startup_libs; \ > - ${MAKE} -f Makefile.inc1 _prebuild_libs; \ > - ${MAKE} -f Makefile.inc1 _generic_libs; > +libraries: .MAKE > + cd ${.CURDIR} && \ > + ${MAKE} -f Makefile.inc1 _prereq_libs && \ > + ${MAKE} -f Makefile.inc1 _startup_libs && \ > + ${MAKE} -f Makefile.inc1 _prebuild_libs && \ > + ${MAKE} -f Makefile.inc1 _generic_libs >=20 > # > # static libgcc.a prerequisite for shared libc > @@ -1542,7 +1542,7 @@ lib/libradius__L: lib/libmd__L > .endif >=20 > .for _lib in ${_prereq_libs} > -${_lib}__PL: .PHONY > +${_lib}__PL: .PHONY .MAKE > .if exists(${.CURDIR}/${_lib}) > ${_+_}@${ECHODIR} "=3D=3D=3D> ${_lib} (obj,depend,all,install)"; = \ > cd ${.CURDIR}/${_lib} && \ > @@ -1554,7 +1554,7 @@ ${_lib}__PL: .PHONY > .endfor >=20 > .for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} = ${_generic_libs} > -${_lib}__L: .PHONY > +${_lib}__L: .PHONY .MAKE > .if exists(${.CURDIR}/${_lib}) > ${_+_}@${ECHODIR} "=3D=3D=3D> ${_lib} (obj,depend,all,install)"; = \ > cd ${.CURDIR}/${_lib} && \ > @@ -1568,7 +1568,7 @@ ${_lib}__L: .PHONY > # libpam is special: we need to build static PAM modules before > # static PAM library, and dynamic PAM library before dynamic PAM > # modules. > -lib/libpam__L: .PHONY > +lib/libpam__L: .PHONY .MAKE > ${_+_}@${ECHODIR} "=3D=3D=3D> lib/libpam = (obj,depend,all,install)"; \ > cd ${.CURDIR}/lib/libpam && \ > ${MAKE} DIRPRFX=3Dlib/libpam/ obj && \ > @@ -1583,7 +1583,7 @@ _generic_libs: ${_generic_libs:S/$/__L/} >=20 > .for __target in all clean cleandepend cleandir depend includes obj > .for entry in ${SUBDIR} > -${entry}.${__target}__D: .PHONY > +${entry}.${__target}__D: .PHONY .MAKE > ${_+_}@set -e; if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; = then \ > ${ECHODIR} "=3D=3D=3D> = ${DIRPRFX}${entry}.${MACHINE_ARCH} (${__target})"; \ > edir=3D${entry}.${MACHINE_ARCH}; \ From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 18:21:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 225081E1; Sun, 7 Jul 2013 18:21:49 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 11DC31EB7; Sun, 7 Jul 2013 18:21:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67ILmjg088750; Sun, 7 Jul 2013 18:21:48 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67ILU3U088640; Sun, 7 Jul 2013 18:21:30 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201307071821.r67ILU3U088640@svn.freebsd.org> From: Devin Teske Date: Sun, 7 Jul 2013 18:21:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252980 - in head/usr.sbin/bsdconfig: . console diskmgmt docsinstall dot mouse networking networking/share packages password security share share/media share/packages startup startup/sh... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 18:21:49 -0000 Author: dteske Date: Sun Jul 7 18:21:30 2013 New Revision: 252980 URL: http://svnweb.freebsd.org/changeset/base/252980 Log: Be consistent with other usr.sbin programs w/respect to the copyright wording ("All rights reserved."); I had the casing wrong on many instances. Modified: head/usr.sbin/bsdconfig/USAGE head/usr.sbin/bsdconfig/console/USAGE head/usr.sbin/bsdconfig/console/console head/usr.sbin/bsdconfig/console/font head/usr.sbin/bsdconfig/console/keymap head/usr.sbin/bsdconfig/console/repeat head/usr.sbin/bsdconfig/console/saver head/usr.sbin/bsdconfig/console/screenmap head/usr.sbin/bsdconfig/console/ttys head/usr.sbin/bsdconfig/diskmgmt/USAGE head/usr.sbin/bsdconfig/diskmgmt/diskmgmt head/usr.sbin/bsdconfig/docsinstall/USAGE head/usr.sbin/bsdconfig/docsinstall/docsinstall head/usr.sbin/bsdconfig/dot/USAGE head/usr.sbin/bsdconfig/dot/dot head/usr.sbin/bsdconfig/mouse/USAGE head/usr.sbin/bsdconfig/mouse/disable head/usr.sbin/bsdconfig/mouse/enable head/usr.sbin/bsdconfig/mouse/flags head/usr.sbin/bsdconfig/mouse/mouse head/usr.sbin/bsdconfig/mouse/port head/usr.sbin/bsdconfig/mouse/type head/usr.sbin/bsdconfig/networking/USAGE head/usr.sbin/bsdconfig/networking/defaultrouter head/usr.sbin/bsdconfig/networking/devices head/usr.sbin/bsdconfig/networking/hostname head/usr.sbin/bsdconfig/networking/nameservers head/usr.sbin/bsdconfig/networking/networking head/usr.sbin/bsdconfig/networking/share/common.subr head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/networking/share/hostname.subr head/usr.sbin/bsdconfig/networking/share/ipaddr.subr head/usr.sbin/bsdconfig/networking/share/media.subr head/usr.sbin/bsdconfig/networking/share/netmask.subr head/usr.sbin/bsdconfig/networking/share/resolv.subr head/usr.sbin/bsdconfig/networking/share/routing.subr head/usr.sbin/bsdconfig/networking/share/services.subr head/usr.sbin/bsdconfig/packages/USAGE head/usr.sbin/bsdconfig/packages/packages head/usr.sbin/bsdconfig/password/USAGE head/usr.sbin/bsdconfig/password/password head/usr.sbin/bsdconfig/security/USAGE head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/security/security head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/dialog.subr head/usr.sbin/bsdconfig/share/media/any.subr head/usr.sbin/bsdconfig/share/media/cdrom.subr head/usr.sbin/bsdconfig/share/media/common.subr head/usr.sbin/bsdconfig/share/media/directory.subr head/usr.sbin/bsdconfig/share/media/dos.subr head/usr.sbin/bsdconfig/share/media/floppy.subr head/usr.sbin/bsdconfig/share/media/ftp.subr head/usr.sbin/bsdconfig/share/media/http.subr head/usr.sbin/bsdconfig/share/media/httpproxy.subr head/usr.sbin/bsdconfig/share/media/network.subr head/usr.sbin/bsdconfig/share/media/nfs.subr head/usr.sbin/bsdconfig/share/media/options.subr head/usr.sbin/bsdconfig/share/media/tcpip.subr head/usr.sbin/bsdconfig/share/media/ufs.subr head/usr.sbin/bsdconfig/share/media/usb.subr head/usr.sbin/bsdconfig/share/mustberoot.subr head/usr.sbin/bsdconfig/share/packages/categories.subr head/usr.sbin/bsdconfig/share/packages/index.subr head/usr.sbin/bsdconfig/share/packages/packages.subr head/usr.sbin/bsdconfig/share/script.subr head/usr.sbin/bsdconfig/share/strings.subr head/usr.sbin/bsdconfig/share/struct.subr head/usr.sbin/bsdconfig/share/variable.subr head/usr.sbin/bsdconfig/startup/USAGE head/usr.sbin/bsdconfig/startup/misc head/usr.sbin/bsdconfig/startup/rcadd head/usr.sbin/bsdconfig/startup/rcconf head/usr.sbin/bsdconfig/startup/rcdelete head/usr.sbin/bsdconfig/startup/rcvar head/usr.sbin/bsdconfig/startup/share/rcconf.subr head/usr.sbin/bsdconfig/startup/share/rcvar.subr head/usr.sbin/bsdconfig/startup/startup head/usr.sbin/bsdconfig/timezone/USAGE head/usr.sbin/bsdconfig/timezone/share/continents.subr head/usr.sbin/bsdconfig/timezone/share/countries.subr head/usr.sbin/bsdconfig/timezone/share/iso3166.subr head/usr.sbin/bsdconfig/timezone/share/menus.subr head/usr.sbin/bsdconfig/timezone/share/zones.subr head/usr.sbin/bsdconfig/timezone/timezone head/usr.sbin/bsdconfig/ttys/USAGE head/usr.sbin/bsdconfig/ttys/ttys head/usr.sbin/bsdconfig/usermgmt/USAGE Modified: head/usr.sbin/bsdconfig/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,6 +1,6 @@ # Copyright (c) 2012 Ron McDowell # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/console/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/console ============================================================================== --- head/usr.sbin/bsdconfig/console/console Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/console Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/font ============================================================================== --- head/usr.sbin/bsdconfig/console/font Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/font Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/keymap ============================================================================== --- head/usr.sbin/bsdconfig/console/keymap Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/keymap Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/repeat ============================================================================== --- head/usr.sbin/bsdconfig/console/repeat Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/repeat Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/saver ============================================================================== --- head/usr.sbin/bsdconfig/console/saver Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/saver Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/screenmap ============================================================================== --- head/usr.sbin/bsdconfig/console/screenmap Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/screenmap Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/console/ttys Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/diskmgmt/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/diskmgmt/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/diskmgmt/diskmgmt ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/docsinstall/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/docsinstall/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/docsinstall/docsinstall ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/docsinstall Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/docsinstall/docsinstall Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/dot/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/dot/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/dot/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/dot/dot ============================================================================== --- head/usr.sbin/bsdconfig/dot/dot Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/dot/dot Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/mouse/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/disable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/disable Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/disable Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/enable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/enable Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/enable Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/flags ============================================================================== --- head/usr.sbin/bsdconfig/mouse/flags Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/flags Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/mouse ============================================================================== --- head/usr.sbin/bsdconfig/mouse/mouse Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/mouse Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/port ============================================================================== --- head/usr.sbin/bsdconfig/mouse/port Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/port Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/mouse/type ============================================================================== --- head/usr.sbin/bsdconfig/mouse/type Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/mouse/type Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/networking/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/defaultrouter ============================================================================== --- head/usr.sbin/bsdconfig/networking/defaultrouter Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/defaultrouter Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/devices ============================================================================== --- head/usr.sbin/bsdconfig/networking/devices Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/devices Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/hostname ============================================================================== --- head/usr.sbin/bsdconfig/networking/hostname Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/hostname Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/nameservers ============================================================================== --- head/usr.sbin/bsdconfig/networking/nameservers Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/nameservers Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/networking ============================================================================== --- head/usr.sbin/bsdconfig/networking/networking Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/networking Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/common.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/common.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_COMMON_SUBR" ]; then _NETWORKING_COMMON_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_DEVICE_SUBR" ]; then _NETWORKING_DEVICE_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/hostname.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/hostname.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/hostname.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_HOSTNAME_SUBR" ]; then _NETWORKING_HOSTNAME_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/ipaddr.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_IPADDR_SUBR" ]; then _NETWORKING_IPADDR_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/media.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/media.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/media.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_MEDIA_SUBR" ]; then _NETWORKING_MEDIA_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/netmask.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/netmask.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/netmask.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_NETMASK_SUBR" ]; then _NETWORKING_NETMASK_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/resolv.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/resolv.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/resolv.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_RESOLV_SUBR" ]; then _NETWORKING_RESOLV_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/routing.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/routing.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/routing.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_ROUTING_SUBR" ]; then _NETWORKING_ROUTING_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/networking/share/services.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/services.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/networking/share/services.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_NETWORKING_SERVICES_SUBR" ]; then _NETWORKING_SERVICES_SUBR=1 # # Copyright (c) 2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/packages/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/packages/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/packages/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/packages/packages ============================================================================== --- head/usr.sbin/bsdconfig/packages/packages Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/packages/packages Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/password/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/password/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/password/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/password/password ============================================================================== --- head/usr.sbin/bsdconfig/password/password Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/password/password Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/security/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/security/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/security/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/security/security ============================================================================== --- head/usr.sbin/bsdconfig/security/security Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/security/security Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/device.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/dialog.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/any.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/any.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/any.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_ANY_SUBR" ]; then _MEDIA_ANY_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/cdrom.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/cdrom.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/cdrom.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_CDROM_SUBR" ]; then _MEDIA_CDROM_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/common.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/common.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_COMMON_SUBR" ]; then _MEDIA_COMMON_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/directory.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/directory.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/directory.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_DIRECTORY_SUBR" ]; then _MEDIA_DIRECTORY_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/dos.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/dos.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/dos.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_DOS_SUBR" ]; then _MEDIA_DOS_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/floppy.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/floppy.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/floppy.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_FLOPPY_SUBR" ]; then _MEDIA_FLOPPY_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ftp.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_FTP_SUBR" ]; then _MEDIA_FTP_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/http.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_HTTP_SUBR" ]; then _MEDIA_HTTP_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/httpproxy.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/httpproxy.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/httpproxy.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_HTTPPROXY_SUBR" ]; then _MEDIA_HTTPPROXY_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/network.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/network.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/network.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_NETWORK_SUBR" ]; then _MEDIA_NETWORK_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/nfs.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/nfs.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/nfs.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_NFS_SUBR" ]; then _MEDIA_NFS_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/options.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/options.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/options.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_OPTIONS_SUBR" ]; then _MEDIA_OPTIONS_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/tcpip.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/tcpip.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_TCPIP_SUBR" ]; then _MEDIA_TCPIP_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/ufs.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ufs.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/ufs.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_UFS_SUBR" ]; then _MEDIA_UFS_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/media/usb.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/usb.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/media/usb.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MEDIA_USB_SUBR" ]; then _MEDIA_USB_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/mustberoot.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/mustberoot.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/mustberoot.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUSTBEROOT_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/packages/categories.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/categories.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/packages/categories.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_PACKAGES_CATEGORIES_SUBR" ]; then _PACKAGES_CATEGORIES_SUBR=1 # # Copyright (c) 2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/packages/index.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/index.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/packages/index.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_PACKAGES_INDEX_SUBR" ]; then _PACKAGES_INDEX_SUBR=1 # # Copyright (c) 2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/packages/packages.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/packages.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/packages/packages.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_PACKAGES_PACKAGES_SUBR" ]; then _PACKAGES_PACKAGES_SUBR=1 # # Copyright (c) 2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/script.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/script.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/script.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_SCRIPT_SUBR" ]; then _SCRIPT_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/strings.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_STRINGS_SUBR" ]; then _STRINGS_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/struct.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/struct.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/struct.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_STRUCT_SUBR" ]; then _STRUCT_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/share/variable.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/variable.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/share/variable.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_VARIABLE_SUBR" ]; then _VARIABLE_SUBR=1 # # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/startup/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/misc ============================================================================== --- head/usr.sbin/bsdconfig/startup/misc Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/misc Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/rcadd ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcadd Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/rcadd Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/rcconf ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcconf Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/rcconf Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/rcdelete ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcdelete Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/rcdelete Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/rcvar ============================================================================== --- head/usr.sbin/bsdconfig/startup/rcvar Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/rcvar Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/share/rcconf.subr ============================================================================== --- head/usr.sbin/bsdconfig/startup/share/rcconf.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/share/rcconf.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_STARTUP_RCCONF_SUBR" ]; then _STARTUP_RCCONF_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/share/rcvar.subr ============================================================================== --- head/usr.sbin/bsdconfig/startup/share/rcvar.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/share/rcvar.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_STARTUP_RCVAR_SUBR" ]; then _STARTUP_RCVAR_SUBR=1 # # Copyright (c) 2006-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/startup/startup ============================================================================== --- head/usr.sbin/bsdconfig/startup/startup Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/startup/startup Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/timezone/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2011-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/share/continents.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/continents.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/share/continents.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_TIMEZONE_CONTINENTS_SUBR" ]; then _TIMEZONE_CONTINENTS_SUBR=1 # # Copyright (c) 2011-2012 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/share/countries.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/countries.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/share/countries.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_TIMEZONE_COUNTRIES_SUBR" ]; then _TIMEZONE_COUNTRIES_SUBR=1 # # Copyright (c) 2011-2012 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/share/iso3166.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/iso3166.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/share/iso3166.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_TIMEZONE_ISO3166_SUBR" ]; then _TIMEZONE_ISO3166_SUBR=1 # # Copyright (c) 2011-2012 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/share/menus.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/menus.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/share/menus.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_TIMEZONE_MENUS_SUBR" ]; then _TIMEZONE_MENUS_SUBR=1 # # Copyright (c) 2011-2012 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/share/zones.subr ============================================================================== --- head/usr.sbin/bsdconfig/timezone/share/zones.subr Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/share/zones.subr Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ if [ ! "$_TIMEZONE_ZONES_SUBR" ]; then _TIMEZONE_ZONES_SUBR=1 # # Copyright (c) 2011-2012 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/timezone/timezone ============================================================================== --- head/usr.sbin/bsdconfig/timezone/timezone Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/timezone/timezone Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2011-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/ttys/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/ttys/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/ttys/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/ttys/ttys ============================================================================== --- head/usr.sbin/bsdconfig/ttys/ttys Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/ttys/ttys Sun Jul 7 18:21:30 2013 (r252980) @@ -1,7 +1,7 @@ #!/bin/sh #- # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions Modified: head/usr.sbin/bsdconfig/usermgmt/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/usermgmt/USAGE Sun Jul 7 17:45:58 2013 (r252979) +++ head/usr.sbin/bsdconfig/usermgmt/USAGE Sun Jul 7 18:21:30 2013 (r252980) @@ -1,5 +1,5 @@ # Copyright (c) 2012-2013 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 18:34:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E3757C4; Sun, 7 Jul 2013 18:34:37 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 10C891F5A; Sun, 7 Jul 2013 18:34:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67IYabk092029; Sun, 7 Jul 2013 18:34:36 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67IYaPE092028; Sun, 7 Jul 2013 18:34:36 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201307071834.r67IYaPE092028@svn.freebsd.org> From: Devin Teske Date: Sun, 7 Jul 2013 18:34:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252982 - head/usr.sbin/bsdconfig/share X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 18:34:37 -0000 Author: dteske Date: Sun Jul 7 18:34:36 2013 New Revision: 252982 URL: http://svnweb.freebsd.org/changeset/base/252982 Log: Be consistent with other usr.sbin programs w/respect to the copyright wording ("All rights reserved."); I had the casing wrong on many instances. Modified: head/usr.sbin/bsdconfig/share/sysrc.subr Modified: head/usr.sbin/bsdconfig/share/sysrc.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/sysrc.subr Sun Jul 7 18:31:02 2013 (r252981) +++ head/usr.sbin/bsdconfig/share/sysrc.subr Sun Jul 7 18:34:36 2013 (r252982) @@ -1,7 +1,7 @@ if [ ! "$_SYSRC_SUBR" ]; then _SYSRC_SUBR=1 # # Copyright (c) 2006-2012 Devin Teske -# All Rights Reserved. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 18:51:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8445A391; Sun, 7 Jul 2013 18:51:57 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 735A81050; Sun, 7 Jul 2013 18:51:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67IpvJf097663; Sun, 7 Jul 2013 18:51:57 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67Ipimp097582; Sun, 7 Jul 2013 18:51:44 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201307071851.r67Ipimp097582@svn.freebsd.org> From: Devin Teske Date: Sun, 7 Jul 2013 18:51:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252987 - in head/usr.sbin: bsdconfig bsdconfig/console bsdconfig/diskmgmt bsdconfig/docsinstall bsdconfig/dot bsdconfig/mouse bsdconfig/networking bsdconfig/networking/share bsdconfig/... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 18:51:57 -0000 Author: dteske Date: Sun Jul 7 18:51:44 2013 New Revision: 252987 URL: http://svnweb.freebsd.org/changeset/base/252987 Log: Fix typos in the BSD License. Modified: head/usr.sbin/bsdconfig/USAGE head/usr.sbin/bsdconfig/console/USAGE head/usr.sbin/bsdconfig/console/console head/usr.sbin/bsdconfig/console/font head/usr.sbin/bsdconfig/console/keymap head/usr.sbin/bsdconfig/console/repeat head/usr.sbin/bsdconfig/console/saver head/usr.sbin/bsdconfig/console/screenmap head/usr.sbin/bsdconfig/console/ttys head/usr.sbin/bsdconfig/diskmgmt/USAGE head/usr.sbin/bsdconfig/diskmgmt/diskmgmt head/usr.sbin/bsdconfig/docsinstall/USAGE head/usr.sbin/bsdconfig/docsinstall/docsinstall head/usr.sbin/bsdconfig/dot/USAGE head/usr.sbin/bsdconfig/dot/dot head/usr.sbin/bsdconfig/mouse/USAGE head/usr.sbin/bsdconfig/mouse/disable head/usr.sbin/bsdconfig/mouse/enable head/usr.sbin/bsdconfig/mouse/flags head/usr.sbin/bsdconfig/mouse/mouse head/usr.sbin/bsdconfig/mouse/port head/usr.sbin/bsdconfig/mouse/type head/usr.sbin/bsdconfig/networking/USAGE head/usr.sbin/bsdconfig/networking/defaultrouter head/usr.sbin/bsdconfig/networking/devices head/usr.sbin/bsdconfig/networking/hostname head/usr.sbin/bsdconfig/networking/nameservers head/usr.sbin/bsdconfig/networking/networking head/usr.sbin/bsdconfig/networking/share/common.subr head/usr.sbin/bsdconfig/networking/share/device.subr head/usr.sbin/bsdconfig/networking/share/hostname.subr head/usr.sbin/bsdconfig/networking/share/ipaddr.subr head/usr.sbin/bsdconfig/networking/share/media.subr head/usr.sbin/bsdconfig/networking/share/netmask.subr head/usr.sbin/bsdconfig/networking/share/resolv.subr head/usr.sbin/bsdconfig/networking/share/routing.subr head/usr.sbin/bsdconfig/networking/share/services.subr head/usr.sbin/bsdconfig/packages/USAGE head/usr.sbin/bsdconfig/packages/packages head/usr.sbin/bsdconfig/password/USAGE head/usr.sbin/bsdconfig/password/password head/usr.sbin/bsdconfig/security/USAGE head/usr.sbin/bsdconfig/security/kern_securelevel head/usr.sbin/bsdconfig/security/security head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/bsdconfig/share/dialog.subr head/usr.sbin/bsdconfig/share/media/any.subr head/usr.sbin/bsdconfig/share/media/cdrom.subr head/usr.sbin/bsdconfig/share/media/common.subr head/usr.sbin/bsdconfig/share/media/directory.subr head/usr.sbin/bsdconfig/share/media/dos.subr head/usr.sbin/bsdconfig/share/media/floppy.subr head/usr.sbin/bsdconfig/share/media/ftp.subr head/usr.sbin/bsdconfig/share/media/http.subr head/usr.sbin/bsdconfig/share/media/httpproxy.subr head/usr.sbin/bsdconfig/share/media/network.subr head/usr.sbin/bsdconfig/share/media/nfs.subr head/usr.sbin/bsdconfig/share/media/options.subr head/usr.sbin/bsdconfig/share/media/tcpip.subr head/usr.sbin/bsdconfig/share/media/ufs.subr head/usr.sbin/bsdconfig/share/media/usb.subr head/usr.sbin/bsdconfig/share/mustberoot.subr head/usr.sbin/bsdconfig/share/packages/categories.subr head/usr.sbin/bsdconfig/share/packages/index.subr head/usr.sbin/bsdconfig/share/packages/packages.subr head/usr.sbin/bsdconfig/share/script.subr head/usr.sbin/bsdconfig/share/strings.subr head/usr.sbin/bsdconfig/share/struct.subr head/usr.sbin/bsdconfig/share/sysrc.subr head/usr.sbin/bsdconfig/share/variable.subr head/usr.sbin/bsdconfig/startup/USAGE head/usr.sbin/bsdconfig/startup/misc head/usr.sbin/bsdconfig/startup/rcadd head/usr.sbin/bsdconfig/startup/rcconf head/usr.sbin/bsdconfig/startup/rcdelete head/usr.sbin/bsdconfig/startup/rcvar head/usr.sbin/bsdconfig/startup/share/rcconf.subr head/usr.sbin/bsdconfig/startup/share/rcvar.subr head/usr.sbin/bsdconfig/startup/startup head/usr.sbin/bsdconfig/timezone/USAGE head/usr.sbin/bsdconfig/timezone/share/continents.subr head/usr.sbin/bsdconfig/timezone/share/countries.subr head/usr.sbin/bsdconfig/timezone/share/iso3166.subr head/usr.sbin/bsdconfig/timezone/share/menus.subr head/usr.sbin/bsdconfig/timezone/share/zones.subr head/usr.sbin/bsdconfig/timezone/timezone head/usr.sbin/bsdconfig/ttys/USAGE head/usr.sbin/bsdconfig/ttys/ttys head/usr.sbin/bsdconfig/usermgmt/USAGE head/usr.sbin/sysrc/sysrc Modified: head/usr.sbin/bsdconfig/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -12,11 +12,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/console/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/console ============================================================================== --- head/usr.sbin/bsdconfig/console/console Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/console Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/font ============================================================================== --- head/usr.sbin/bsdconfig/console/font Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/font Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/keymap ============================================================================== --- head/usr.sbin/bsdconfig/console/keymap Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/keymap Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/repeat ============================================================================== --- head/usr.sbin/bsdconfig/console/repeat Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/repeat Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/saver ============================================================================== --- head/usr.sbin/bsdconfig/console/saver Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/saver Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/screenmap ============================================================================== --- head/usr.sbin/bsdconfig/console/screenmap Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/screenmap Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/console/ttys ============================================================================== --- head/usr.sbin/bsdconfig/console/ttys Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/console/ttys Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/diskmgmt/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/diskmgmt/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/diskmgmt/diskmgmt ============================================================================== --- head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/diskmgmt/diskmgmt Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/docsinstall/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/docsinstall/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/docsinstall/docsinstall ============================================================================== --- head/usr.sbin/bsdconfig/docsinstall/docsinstall Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/docsinstall/docsinstall Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/dot/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/dot/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/dot/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/dot/dot ============================================================================== --- head/usr.sbin/bsdconfig/dot/dot Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/dot/dot Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/mouse/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/disable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/disable Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/disable Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/enable ============================================================================== --- head/usr.sbin/bsdconfig/mouse/enable Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/enable Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/flags ============================================================================== --- head/usr.sbin/bsdconfig/mouse/flags Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/flags Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/mouse ============================================================================== --- head/usr.sbin/bsdconfig/mouse/mouse Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/mouse Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/port ============================================================================== --- head/usr.sbin/bsdconfig/mouse/port Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/port Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/mouse/type ============================================================================== --- head/usr.sbin/bsdconfig/mouse/type Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/mouse/type Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/networking/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/defaultrouter ============================================================================== --- head/usr.sbin/bsdconfig/networking/defaultrouter Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/defaultrouter Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/devices ============================================================================== --- head/usr.sbin/bsdconfig/networking/devices Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/devices Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/hostname ============================================================================== --- head/usr.sbin/bsdconfig/networking/hostname Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/hostname Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/nameservers ============================================================================== --- head/usr.sbin/bsdconfig/networking/nameservers Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/nameservers Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/networking ============================================================================== --- head/usr.sbin/bsdconfig/networking/networking Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/networking Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/common.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/common.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_COMMON_SUBR" ]; 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/device.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/device.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_DEVICE_SUBR" ]; 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/hostname.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/hostname.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/hostname.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_HOSTNAME_SUBR" ]; t # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/ipaddr.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/ipaddr.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_IPADDR_SUBR" ]; 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/media.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/media.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/media.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_MEDIA_SUBR" ]; then # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/netmask.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/netmask.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/netmask.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_NETMASK_SUBR" ]; th # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/resolv.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/resolv.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/resolv.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_RESOLV_SUBR" ]; 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/routing.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/routing.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/routing.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_ROUTING_SUBR" ]; th # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/networking/share/services.subr ============================================================================== --- head/usr.sbin/bsdconfig/networking/share/services.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/networking/share/services.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_NETWORKING_SERVICES_SUBR" ]; t # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/packages/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/packages/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/packages/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/packages/packages ============================================================================== --- head/usr.sbin/bsdconfig/packages/packages Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/packages/packages Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/password/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/password/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/password/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/password/password ============================================================================== --- head/usr.sbin/bsdconfig/password/password Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/password/password Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/security/USAGE ============================================================================== --- head/usr.sbin/bsdconfig/security/USAGE Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/security/USAGE Sun Jul 7 18:51:44 2013 (r252987) @@ -11,11 +11,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/security/kern_securelevel ============================================================================== --- head/usr.sbin/bsdconfig/security/kern_securelevel Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/security/kern_securelevel Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/security/security ============================================================================== --- head/usr.sbin/bsdconfig/security/security Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/security/security Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/device.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_DEVICE_SUBR" ]; then _DEVICE_S # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/dialog.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/dialog.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/dialog.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_DIALOG_SUBR" ]; then _DIALOG_S # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/any.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/any.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/any.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_ANY_SUBR" ]; then _MEDIA # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/cdrom.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/cdrom.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/cdrom.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_CDROM_SUBR" ]; then _MED # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/common.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/common.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/common.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_COMMON_SUBR" ]; then _ME # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/directory.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/directory.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/directory.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_DIRECTORY_SUBR" ]; then # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/dos.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/dos.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/dos.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_DOS_SUBR" ]; then _MEDIA # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/floppy.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/floppy.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/floppy.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_FLOPPY_SUBR" ]; then _ME # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/ftp.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ftp.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/ftp.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_FTP_SUBR" ]; then _MEDIA # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/http.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/http.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/http.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_HTTP_SUBR" ]; then _MEDI # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/httpproxy.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/httpproxy.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/httpproxy.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_HTTPPROXY_SUBR" ]; then # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/network.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/network.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/network.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_NETWORK_SUBR" ]; then _M # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/nfs.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/nfs.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/nfs.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_NFS_SUBR" ]; then _MEDIA # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/options.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/options.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/options.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_OPTIONS_SUBR" ]; then _M # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/tcpip.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/tcpip.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/tcpip.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_TCPIP_SUBR" ]; then _MED # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/ufs.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/ufs.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/ufs.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_UFS_SUBR" ]; then _MEDIA # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/media/usb.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/media/usb.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/media/usb.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MEDIA_USB_SUBR" ]; then _MEDIA # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/mustberoot.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/mustberoot.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/mustberoot.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_MUSTBEROOT_SUBR" ]; then _MUST # 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 +# 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 (INLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# 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 Modified: head/usr.sbin/bsdconfig/share/packages/categories.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/packages/categories.subr Sun Jul 7 18:50:26 2013 (r252986) +++ head/usr.sbin/bsdconfig/share/packages/categories.subr Sun Jul 7 18:51:44 2013 (r252987) @@ -13,11 +13,11 @@ if [ ! "$_PACKAGES_CATEGORIES_SUBR" ]; t # 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 +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 19:19:18 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CC4711F6; Sun, 7 Jul 2013 19:19:18 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BF368112E; Sun, 7 Jul 2013 19:19:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67JJI9s005390; Sun, 7 Jul 2013 19:19:18 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67JJI4x005389; Sun, 7 Jul 2013 19:19:18 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307071919.r67JJI4x005389@svn.freebsd.org> From: Rui Paulo Date: Sun, 7 Jul 2013 19:19:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252996 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 19:19:18 -0000 Author: rpaulo Date: Sun Jul 7 19:19:18 2013 New Revision: 252996 URL: http://svnweb.freebsd.org/changeset/base/252996 Log: Fix all the compiler warnings in elf_trampoline.c. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sun Jul 7 19:13:34 2013 (r252995) +++ head/sys/arm/arm/elf_trampoline.c Sun Jul 7 19:19:18 2013 (r252996) @@ -49,51 +49,67 @@ void _start(void); void __start(void); void __startC(void); +extern unsigned int cpufunc_id(void); +extern void armv6_idcache_wbinv_all(void); +extern void do_call(void *, void *, void *, int); + #define GZ_HEAD 0xa #ifdef CPU_ARM7TDMI #define cpu_idcache_wbinv_all arm7tdmi_cache_flushID +extern void arm7tdmi_cache_flushID(void); #elif defined(CPU_ARM8) #define cpu_idcache_wbinv_all arm8_cache_purgeID +extern void arm8_cache_purgeID(void); #elif defined(CPU_ARM9) #define cpu_idcache_wbinv_all arm9_idcache_wbinv_all +extern void arm9_idcache_wbinv_all(void); #elif defined(CPU_FA526) || defined(CPU_FA626TE) #define cpu_idcache_wbinv_all fa526_idcache_wbinv_all +extern void fa526_idcache_wbinv_all(void); #elif defined(CPU_ARM9E) #define cpu_idcache_wbinv_all armv5_ec_idcache_wbinv_all +extern void armv5_ec_idcache_wbinv_all(void); #elif defined(CPU_ARM10) #define cpu_idcache_wbinv_all arm10_idcache_wbinv_all +extern void arm10_idcache_wbinv_all(void); #elif defined(CPU_ARM1136) || defined(CPU_ARM1176) #define cpu_idcache_wbinv_all armv6_idcache_wbinv_all #elif defined(CPU_SA110) || defined(CPU_SA1110) || defined(CPU_SA1100) || \ defined(CPU_IXP12X0) #define cpu_idcache_wbinv_all sa1_cache_purgeID +extern void sa1_cache_purgeID(void); #elif defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) || \ defined(CPU_XSCALE_80219) #define cpu_idcache_wbinv_all xscale_cache_purgeID +extern void xscale_cache_purgeID(void); #elif defined(CPU_XSCALE_81342) #define cpu_idcache_wbinv_all xscalec3_cache_purgeID +extern void xscalec3_cache_purgeID(void); #elif defined(CPU_MV_PJ4B) #if !defined(SOC_MV_ARMADAXP) #define cpu_idcache_wbinv_all armv6_idcache_wbinv_all +extern void armv6_idcache_wbinv_all(void); #else #define cpu_idcache_wbinv_all() armadaxp_idcache_wbinv_all +extern void armadaxp_idcache_wbinv_all(void); #endif #endif /* CPU_MV_PJ4B */ #ifdef CPU_XSCALE_81342 #define cpu_l2cache_wbinv_all xscalec3_l2cache_purge +extern void xscalec3_l2cache_purge(void); #elif defined(SOC_MV_KIRKWOOD) || defined(SOC_MV_DISCOVERY) #define cpu_l2cache_wbinv_all sheeva_l2cache_wbinv_all +extern void sheeva_l2cache_wbinv_all(void); #elif defined(CPU_CORTEXA) #define cpu_idcache_wbinv_all armv7_idcache_wbinv_all +extern void armv7_idcache_wbinv_all(void); #define cpu_l2cache_wbinv_all() #else #define cpu_l2cache_wbinv_all() #endif -static void armadaxp_idcache_wbinv_all(void); - int arm_picache_size; int arm_picache_line_size; int arm_picache_ways; @@ -434,11 +450,11 @@ static void * inflate_kernel(void *kernel, void *startaddr) { struct inflate infl; - char slide[GZ_WSIZE]; + unsigned char slide[GZ_WSIZE]; orig_input = kernel; memcnt = memtot = 0; - i_input = (char *)kernel + GZ_HEAD; + i_input = (unsigned char *)kernel + GZ_HEAD; if (((char *)kernel)[3] & 0x18) { while (*i_input) i_input++; @@ -590,6 +606,8 @@ load_kernel(unsigned int kstart, unsigne __asm __volatile(".globl func_end\n" "func_end:"); + /* NOTREACHED */ + return NULL; } extern char func_end[]; From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 19:22:32 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3E051362; Sun, 7 Jul 2013 19:22:32 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 304D11144; Sun, 7 Jul 2013 19:22:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67JMWWI007529; Sun, 7 Jul 2013 19:22:32 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67JMWrG007528; Sun, 7 Jul 2013 19:22:32 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307071922.r67JMWrG007528@svn.freebsd.org> From: Rui Paulo Date: Sun, 7 Jul 2013 19:22:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252997 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 19:22:32 -0000 Author: rpaulo Date: Sun Jul 7 19:22:31 2013 New Revision: 252997 URL: http://svnweb.freebsd.org/changeset/base/252997 Log: armadaxp_idcache_wbinv_all() is in this file. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sun Jul 7 19:19:18 2013 (r252996) +++ head/sys/arm/arm/elf_trampoline.c Sun Jul 7 19:22:31 2013 (r252997) @@ -93,7 +93,6 @@ extern void xscalec3_cache_purgeID(void) extern void armv6_idcache_wbinv_all(void); #else #define cpu_idcache_wbinv_all() armadaxp_idcache_wbinv_all -extern void armadaxp_idcache_wbinv_all(void); #endif #endif /* CPU_MV_PJ4B */ #ifdef CPU_XSCALE_81342 @@ -110,6 +109,8 @@ extern void armv7_idcache_wbinv_all(void #define cpu_l2cache_wbinv_all() #endif +static void armadaxp_idcache_wbinv_all(void); + int arm_picache_size; int arm_picache_line_size; int arm_picache_ways; From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 19:47:23 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C693686D; Sun, 7 Jul 2013 19:47:23 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9FB0D1205; Sun, 7 Jul 2013 19:47:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67JlNqW013810; Sun, 7 Jul 2013 19:47:23 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67JlNZ6013809; Sun, 7 Jul 2013 19:47:23 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307071947.r67JlNZ6013809@svn.freebsd.org> From: Rui Paulo Date: Sun, 7 Jul 2013 19:47:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r252998 - head/sys/dev/mbox X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 19:47:23 -0000 Author: rpaulo Date: Sun Jul 7 19:47:22 2013 New Revision: 252998 URL: http://svnweb.freebsd.org/changeset/base/252998 Log: Add a mailbox interface. Mailboxes are an IPC mechanism found on several ARM architectures, namely OMAP4, BCM2385, Sitara, etc. Reviewed by: gonzo Added: head/sys/dev/mbox/ head/sys/dev/mbox/mbox_if.m (contents, props changed) Added: head/sys/dev/mbox/mbox_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/mbox/mbox_if.m Sun Jul 7 19:47:22 2013 (r252998) @@ -0,0 +1,46 @@ +#- +# Copyright (c) 2013 Rui Paulo +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# +# Mailboxes are used as an IPC mechanism that allows subsystems to +# communicate with each other. +# A system can have multiple mailboxes (e.g. OMAP4) but there's usually a +# system wide mailbox. +# + +INTERFACE mbox; + +METHOD int read { + device_t dev; + int channel; + uint32_t *data; +}; + +METHOD int write { + device_t dev; + int channel; + uint32_t data; +}; From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 19:48:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A4679B2; Sun, 7 Jul 2013 19:48:26 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 57DD31210; Sun, 7 Jul 2013 19:48:26 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:b446:8df4:1336:11e1] (unknown [IPv6:2601:9:4d00:119:b446:8df4:1336:11e1]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 7E5A63982B; Sun, 7 Jul 2013 12:48:25 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r252998 - head/sys/dev/mbox From: Rui Paulo In-Reply-To: <201307071947.r67JlNZ6013809@svn.freebsd.org> Date: Sun, 7 Jul 2013 12:48:24 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201307071947.r67JlNZ6013809@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.1508) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 19:48:26 -0000 On 7 Jul 2013, at 12:47, Rui Paulo wrote: > Author: rpaulo > Date: Sun Jul 7 19:47:22 2013 > New Revision: 252998 > URL: http://svnweb.freebsd.org/changeset/base/252998 >=20 > Log: > Add a mailbox interface. >=20 > Mailboxes are an IPC mechanism found on several ARM architectures, = namely > OMAP4, BCM2385, Sitara, etc. Although currently only specific to ARM, Mailboxes can be used by = multiple architectures and that's why I committed it to sys/dev. -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 20:39:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7C7C9B6F; Sun, 7 Jul 2013 20:39:12 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6E46115C4; Sun, 7 Jul 2013 20:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67KdCQu028909; Sun, 7 Jul 2013 20:39:12 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67KdCdR028908; Sun, 7 Jul 2013 20:39:12 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201307072039.r67KdCdR028908@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 7 Jul 2013 20:39:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253002 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 20:39:12 -0000 Author: alfred Date: Sun Jul 7 20:39:11 2013 New Revision: 253002 URL: http://svnweb.freebsd.org/changeset/base/253002 Log: Document tip on how to build all kernels quickly. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sun Jul 7 19:58:14 2013 (r253001) +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) @@ -32,6 +32,12 @@ # targets - Print a list of supported TARGET/TARGET_ARCH pairs # for world and kernel targets. # toolchains - Build a toolchain for all world and kernel targets. +# +# "quick" way to test all kernel builds: +# _jflag=`sysctl -n hw.ncpu` +# _jflag=$(($_jflag * 2)) +# [ $_jflag -gt 12 ] && _jflag=12 +# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 20:44:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1DBCDCE2; Sun, 7 Jul 2013 20:44:05 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 100AF15E9; Sun, 7 Jul 2013 20:44:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67Ki4qm031147; Sun, 7 Jul 2013 20:44:04 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67Ki4Mk031146; Sun, 7 Jul 2013 20:44:04 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201307072044.r67Ki4Mk031146@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 7 Jul 2013 20:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253003 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 20:44:05 -0000 Author: alfred Date: Sun Jul 7 20:44:04 2013 New Revision: 253003 URL: http://svnweb.freebsd.org/changeset/base/253003 Log: Correct typo specifying jflags. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sun Jul 7 20:39:11 2013 (r253002) +++ head/Makefile Sun Jul 7 20:44:04 2013 (r253003) @@ -37,7 +37,7 @@ # _jflag=`sysctl -n hw.ncpu` # _jflag=$(($_jflag * 2)) # [ $_jflag -gt 12 ] && _jflag=12 -# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} +# make universe -DMAKE_JUST_KERNELS JFLAG=-j${_jflag} # # This makefile is simple by design. The FreeBSD make automatically reads # the /usr/share/mk/sys.mk unless the -m argument is specified on the From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:01:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 20C6E14B; Sun, 7 Jul 2013 21:01:08 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-ye0-x22f.google.com (mail-ye0-x22f.google.com [IPv6:2607:f8b0:4002:c04::22f]) by mx1.freebsd.org (Postfix) with ESMTP id ACC38167D; Sun, 7 Jul 2013 21:01:07 +0000 (UTC) Received: by mail-ye0-f175.google.com with SMTP id q8so1451012yen.34 for ; Sun, 07 Jul 2013 14:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=ub32QaFqIo58U6Xr1+9aH+gInBfH8XEW1C0Yz3hk4aI=; b=m6AOlX3yGMsuuuziLJzVXCG7MuIaMt1ngGV47cGkfdUZLQW7H0OxpLkBeXP6kZzPub M967xP25ryCHGVPqCLqJzDQhc3qByHAVbyDh2+CWqZ4Xb/nNRhkR9F0pB8qXovCLeavq O7kPbfpNcEyRNsaX8VOovu/lDSnc9EPITEQ9+wxXoBZsqDnPNgPm+w6xOlDW3KrKyUre R7oc1aA0j27jTNQcrdjH27jIEEgr7pdxvBaPCXBSjb914oYAi106Nt9VWgNkikJ4UmPg 6AJ5PBYxegsK4Sxxz7G392+XmbaZYwnNVN4Qv1l7Ot2/JTMdXfuQwYdup4hwXLhos8/t g2Iw== X-Received: by 10.236.6.138 with SMTP id 10mr10652637yhn.137.1373230867237; Sun, 07 Jul 2013 14:01:07 -0700 (PDT) Received: from [10.81.248.182] (mobile-166-147-109-067.mycingular.net. [166.147.109.67]) by mx.google.com with ESMTPSA id a62sm31688910yhk.4.2013.07.07.14.01.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 07 Jul 2013 14:01:06 -0700 (PDT) References: <201307072039.r67KdCdR028908@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201307072039.r67KdCdR028908@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com> X-Mailer: iPhone Mail (10B329) From: Garrett Cooper Subject: Re: svn commit: r253002 - head Date: Sun, 7 Jul 2013 14:01:01 -0700 To: Alfred Perlstein Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:01:08 -0000 Why the magic number 12? Sent from my iPhone On Jul 7, 2013, at 1:39 PM, Alfred Perlstein wrote: > Author: alfred > Date: Sun Jul 7 20:39:11 2013 > New Revision: 253002 > URL: http://svnweb.freebsd.org/changeset/base/253002 >=20 > Log: > Document tip on how to build all kernels quickly. >=20 > Modified: > head/Makefile >=20 > Modified: head/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/Makefile Sun Jul 7 19:58:14 2013 (r253001) > +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) > @@ -32,6 +32,12 @@ > # targets - Print a list of supported TARGET/TARGET_ARCH pairs= > # for world and kernel targets. > # toolchains - Build a toolchain for all world and kernel targets= . > +#=20 > +# "quick" way to test all kernel builds: > +# _jflag=3D`sysctl -n hw.ncpu` > +# _jflag=3D$(($_jflag * 2)) > +# [ $_jflag -gt 12 ] && _jflag=3D12 > +# make universe -DMAKE_JUST_KERNELS JFLAG=3D${jflag} > # > # This makefile is simple by design. The FreeBSD make automatically reads > # the /usr/share/mk/sys.mk unless the -m argument is specified on the > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:15:03 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1312F39A; Sun, 7 Jul 2013 21:15:03 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 00C0616E5; Sun, 7 Jul 2013 21:15:02 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id F235E1A3C1A; Sun, 7 Jul 2013 14:15:01 -0700 (PDT) Message-ID: <51D9DA55.2090808@freebsd.org> Date: Sun, 07 Jul 2013 14:15:01 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Garrett Cooper Subject: Re: svn commit: r253002 - head References: <201307072039.r67KdCdR028908@svn.freebsd.org> <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com> In-Reply-To: <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com> 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" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:15:03 -0000 On 7/7/13 2:01 PM, Garrett Cooper wrote: > Why the magic number 12? Numbers higher seem to result in worse performance as reported by some members of my team. -Alfred > > Sent from my iPhone > > On Jul 7, 2013, at 1:39 PM, Alfred Perlstein wrote: > >> Author: alfred >> Date: Sun Jul 7 20:39:11 2013 >> New Revision: 253002 >> URL: http://svnweb.freebsd.org/changeset/base/253002 >> >> Log: >> Document tip on how to build all kernels quickly. >> >> Modified: >> head/Makefile >> >> Modified: head/Makefile >> ============================================================================== >> --- head/Makefile Sun Jul 7 19:58:14 2013 (r253001) >> +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) >> @@ -32,6 +32,12 @@ >> # targets - Print a list of supported TARGET/TARGET_ARCH pairs >> # for world and kernel targets. >> # toolchains - Build a toolchain for all world and kernel targets. >> +# >> +# "quick" way to test all kernel builds: >> +# _jflag=`sysctl -n hw.ncpu` >> +# _jflag=$(($_jflag * 2)) >> +# [ $_jflag -gt 12 ] && _jflag=12 >> +# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} >> # >> # This makefile is simple by design. The FreeBSD make automatically reads >> # the /usr/share/mk/sys.mk unless the -m argument is specified on the >> _______________________________________________ >> svn-src-head@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-head >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:19:54 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 341C4529; Sun, 7 Jul 2013 21:19:54 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 14F05170C; Sun, 7 Jul 2013 21:19:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67LJru0040766; Sun, 7 Jul 2013 21:19:53 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67LJrBS040765; Sun, 7 Jul 2013 21:19:53 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <201307072119.r67LJrBS040765@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sun, 7 Jul 2013 21:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253004 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:19:54 -0000 Author: pjd Date: Sun Jul 7 21:19:53 2013 New Revision: 253004 URL: http://svnweb.freebsd.org/changeset/base/253004 Log: Sandbox tcpdump(8) using Capsicum's capability mode and capabilities. For now, sandboxing is done only if -n option was specified and neither -z nor -V options were given. Because it is very common to run tcpdump(8) with the -n option for speed, I decided to commit sandboxing now. To also support sandboxing when -n option wasn't specified, we need Casper daemon and its services that are not available in FreeBSD yet. - Limit file descriptors of a file specified by -r option or files specified via -V option to CAP_READ only. - If neither -r nor -V options were specified, we operate on /dev/bpf. Limit its descriptor to CAP_READ and CAP_IOCTL plus limit allowed ioctls to BIOCGSTATS only. - Limit file descriptor of a file specified by -w option to CAP_SEEK and CAP_WRITE. - If either -C or -G options were specified, we open directory containing destination file and we limit directory descriptor to CAP_CREATE, CAP_FCNTL, CAP_FTRUNCATE, CAP_LOOKUP, CAP_SEEK and CAP_WRITE. Newly opened/created files are limited to CAP_SEEK and CAP_WRITE only. - Enter capability mode if -n option was specified and neither -z nor -V options were specified. Approved by: delphij, wxs Sponsored by: The FreeBSD Foundation Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Sun Jul 7 20:44:04 2013 (r253003) +++ head/contrib/tcpdump/tcpdump.c Sun Jul 7 21:19:53 2013 (r253004) @@ -68,6 +68,13 @@ extern int SIZE_BUF; #include #include #include +#ifdef __FreeBSD__ +#include +#include +#include +#include +#include +#endif /* __FreeBSD__ */ #ifndef WIN32 #include #include @@ -384,6 +391,9 @@ struct dump_info { char *CurrentFileName; pcap_t *pd; pcap_dumper_t *p; +#ifdef __FreeBSD__ + int dirfd; +#endif }; #ifdef HAVE_PCAP_SET_TSTAMP_TYPE @@ -702,6 +712,10 @@ main(int argc, char **argv) #endif int status; FILE *VFile; +#ifdef __FreeBSD__ + int cansandbox; +#endif + #ifdef WIN32 if(wsockinit() != 0) return 1; #endif /* WIN32 */ @@ -1189,6 +1203,12 @@ main(int argc, char **argv) pd = pcap_open_offline(RFileName, ebuf); if (pd == NULL) error("%s", ebuf); +#ifdef __FreeBSD__ + if (cap_rights_limit(fileno(pcap_file(pd)), CAP_READ) < 0 && + errno != ENOSYS) { + error("unable to limit pcap descriptor"); + } +#endif dlt = pcap_datalink(pd); dlt_name = pcap_datalink_val_to_name(dlt); if (dlt_name == NULL) { @@ -1437,6 +1457,20 @@ main(int argc, char **argv) if (pcap_setfilter(pd, &fcode) < 0) error("%s", pcap_geterr(pd)); +#ifdef __FreeBSD__ + if (RFileName == NULL && VFileName == NULL) { + static const unsigned long cmds[] = { BIOCGSTATS }; + + if (cap_rights_limit(pcap_fileno(pd), + CAP_IOCTL | CAP_READ) < 0 && errno != ENOSYS) { + error("unable to limit pcap descriptor"); + } + if (cap_ioctls_limit(pcap_fileno(pd), cmds, + sizeof(cmds) / sizeof(cmds[0])) < 0 && errno != ENOSYS) { + error("unable to limit ioctls on pcap descriptor"); + } + } +#endif if (WFileName) { pcap_dumper_t *p; /* Do not exceed the default PATH_MAX for files. */ @@ -1458,9 +1492,30 @@ main(int argc, char **argv) #endif if (p == NULL) error("%s", pcap_geterr(pd)); +#ifdef __FreeBSD__ + if (cap_rights_limit(fileno(pcap_dump_file(p)), + CAP_SEEK | CAP_WRITE) < 0 && errno != ENOSYS) { + error("unable to limit dump descriptor"); + } +#endif if (Cflag != 0 || Gflag != 0) { - callback = dump_packet_and_trunc; +#ifdef __FreeBSD__ + dumpinfo.WFileName = strdup(basename(WFileName)); + dumpinfo.dirfd = open(dirname(WFileName), + O_DIRECTORY | O_RDONLY); + if (dumpinfo.dirfd < 0) { + error("unable to open directory %s", + dirname(WFileName)); + } + if (cap_rights_limit(dumpinfo.dirfd, CAP_CREATE | + CAP_FCNTL | CAP_FTRUNCATE | CAP_LOOKUP | CAP_SEEK | + CAP_WRITE) < 0 && errno != ENOSYS) { + error("unable to limit directory rights"); + } +#else /* !__FreeBSD__ */ dumpinfo.WFileName = WFileName; +#endif + callback = dump_packet_and_trunc; dumpinfo.pd = pd; dumpinfo.p = p; pcap_userdata = (u_char *)&dumpinfo; @@ -1530,6 +1585,15 @@ main(int argc, char **argv) (void)fflush(stderr); } #endif /* WIN32 */ + +#ifdef __FreeBSD__ + cansandbox = (nflag && VFileName == NULL && zflag == NULL); + if (cansandbox && cap_enter() < 0 && errno != ENOSYS) + error("unable to enter the capability mode"); + if (cap_sandboxed()) + fprintf(stderr, "capability mode sandbox enabled\n"); +#endif + do { status = pcap_loop(pd, cnt, callback, pcap_userdata); if (WFileName == NULL) { @@ -1569,6 +1633,12 @@ main(int argc, char **argv) pd = pcap_open_offline(RFileName, ebuf); if (pd == NULL) error("%s", ebuf); +#ifdef __FreeBSD__ + if (cap_rights_limit(fileno(pcap_file(pd)), + CAP_READ) < 0 && errno != ENOSYS) { + error("unable to limit pcap descriptor"); + } +#endif new_dlt = pcap_datalink(pd); if (WFileName && new_dlt != dlt) error("%s: new dlt does not match original", RFileName); @@ -1765,6 +1835,11 @@ dump_packet_and_trunc(u_char *user, cons /* If the time is greater than the specified window, rotate */ if (t - Gflag_time >= Gflag) { +#ifdef __FreeBSD__ + FILE *fp; + int fd; +#endif + /* Update the Gflag_time */ Gflag_time = t; /* Update Gflag_count */ @@ -1811,13 +1886,35 @@ dump_packet_and_trunc(u_char *user, cons capng_update(CAPNG_ADD, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE); capng_apply(CAPNG_EFFECTIVE); #endif /* HAVE_CAP_NG_H */ +#ifdef __FreeBSD__ + fd = openat(dump_info->dirfd, + dump_info->CurrentFileName, + O_CREAT | O_WRONLY | O_TRUNC, 0644); + if (fd < 0) { + error("unable to open file %s", + dump_info->CurrentFileName); + } + fp = fdopen(fd, "w"); + if (fp == NULL) { + error("unable to fdopen file %s", + dump_info->CurrentFileName); + } + dump_info->p = pcap_dump_fopen(dump_info->pd, fp); +#else /* !__FreeBSD__ */ dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); +#endif #ifdef HAVE_CAP_NG_H capng_update(CAPNG_DROP, CAPNG_EFFECTIVE, CAP_DAC_OVERRIDE); capng_apply(CAPNG_EFFECTIVE); #endif /* HAVE_CAP_NG_H */ if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); +#ifdef __FreeBSD__ + if (cap_rights_limit(fileno(pcap_dump_file(dump_info->p)), + CAP_SEEK | CAP_WRITE) < 0 && errno != ENOSYS) { + error("unable to limit dump descriptor"); + } +#endif } } @@ -1827,6 +1924,11 @@ dump_packet_and_trunc(u_char *user, cons * file could put it over Cflag. */ if (Cflag != 0 && pcap_dump_ftell(dump_info->p) > Cflag) { +#ifdef __FreeBSD__ + FILE *fp; + int fd; +#endif + /* * Close the current file and open a new one. */ @@ -1849,9 +1951,30 @@ dump_packet_and_trunc(u_char *user, cons if (dump_info->CurrentFileName == NULL) error("dump_packet_and_trunc: malloc"); MakeFilename(dump_info->CurrentFileName, dump_info->WFileName, Cflag_count, WflagChars); +#ifdef __FreeBSD__ + fd = openat(dump_info->dirfd, dump_info->CurrentFileName, + O_CREAT | O_WRONLY | O_TRUNC, 0644); + if (fd < 0) { + error("unable to open file %s", + dump_info->CurrentFileName); + } + fp = fdopen(fd, "w"); + if (fp == NULL) { + error("unable to fdopen file %s", + dump_info->CurrentFileName); + } + dump_info->p = pcap_dump_fopen(dump_info->pd, fp); +#else /* !__FreeBSD__ */ dump_info->p = pcap_dump_open(dump_info->pd, dump_info->CurrentFileName); +#endif if (dump_info->p == NULL) error("%s", pcap_geterr(pd)); +#ifdef __FreeBSD__ + if (cap_rights_limit(fileno(pcap_dump_file(dump_info->p)), + CAP_SEEK | CAP_WRITE) < 0 && errno != ENOSYS) { + error("unable to limit dump descriptor"); + } +#endif } pcap_dump((u_char *)dump_info->p, h, sp); From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:20:53 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0708B673; Sun, 7 Jul 2013 21:20:53 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ECA66171B; Sun, 7 Jul 2013 21:20:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67LKqk3042543; Sun, 7 Jul 2013 21:20:52 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67LKqwP042542; Sun, 7 Jul 2013 21:20:52 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307072120.r67LKqwP042542@svn.freebsd.org> From: Rui Paulo Date: Sun, 7 Jul 2013 21:20:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253005 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:20:53 -0000 Author: rpaulo Date: Sun Jul 7 21:20:52 2013 New Revision: 253005 URL: http://svnweb.freebsd.org/changeset/base/253005 Log: Another warning. Modified: head/sys/arm/arm/elf_trampoline.c Modified: head/sys/arm/arm/elf_trampoline.c ============================================================================== --- head/sys/arm/arm/elf_trampoline.c Sun Jul 7 21:19:53 2013 (r253004) +++ head/sys/arm/arm/elf_trampoline.c Sun Jul 7 21:20:52 2013 (r253005) @@ -51,6 +51,7 @@ void __startC(void); extern unsigned int cpufunc_id(void); extern void armv6_idcache_wbinv_all(void); +extern void armv7_idcache_wbinv_all(void); extern void do_call(void *, void *, void *, int); #define GZ_HEAD 0xa @@ -103,7 +104,6 @@ extern void xscalec3_l2cache_purge(void) extern void sheeva_l2cache_wbinv_all(void); #elif defined(CPU_CORTEXA) #define cpu_idcache_wbinv_all armv7_idcache_wbinv_all -extern void armv7_idcache_wbinv_all(void); #define cpu_l2cache_wbinv_all() #else #define cpu_l2cache_wbinv_all() From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:23:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A6B5A7C6; Sun, 7 Jul 2013 21:23:59 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 97C18172F; Sun, 7 Jul 2013 21:23:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67LNxOM042965; Sun, 7 Jul 2013 21:23:59 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67LNwUb042958; Sun, 7 Jul 2013 21:23:58 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307072123.r67LNwUb042958@svn.freebsd.org> From: Rui Paulo Date: Sun, 7 Jul 2013 21:23:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253006 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:23:59 -0000 Author: rpaulo Date: Sun Jul 7 21:23:58 2013 New Revision: 253006 URL: http://svnweb.freebsd.org/changeset/base/253006 Log: Convert bcm2835_mbox to the new mbox interface. Reviewed by: gonzo Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c head/sys/arm/broadcom/bcm2835/bcm2835_mbox.h head/sys/arm/broadcom/bcm2835/files.bcm2835 Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sun Jul 7 21:20:52 2013 (r253005) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fb.c Sun Jul 7 21:23:58 2013 (r253006) @@ -66,6 +66,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "mbox_if.h" + #define BCMFB_FONT_HEIGHT 16 struct argb { @@ -173,6 +175,7 @@ bcm_fb_init(void *arg) volatile struct bcm_fb_config* fb_config = sc->fb_config; phandle_t node; pcell_t cell; + device_t mbox; node = ofw_bus_get_node(sc->dev); @@ -205,8 +208,12 @@ bcm_fb_init(void *arg) bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); - bcm_mbox_write(BCM2835_MBOX_CHAN_FB, sc->fb_config_phys); - bcm_mbox_read(BCM2835_MBOX_CHAN_FB, &err); + + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox) { + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_FB, sc->fb_config_phys); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_FB, &err); + } bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_POSTREAD); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Jul 7 21:20:52 2013 (r253005) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sun Jul 7 21:23:58 2013 (r253006) @@ -49,8 +49,11 @@ __FBSDID("$FreeBSD$"); #include #include + #include +#include "mbox_if.h" + #define REG_READ 0x00 #define REG_POL 0x10 #define REG_SENDER 0x14 @@ -65,12 +68,12 @@ __FBSDID("$FreeBSD$"); #define MBOX_CHAN(msg) ((msg) & 0xf) #define MBOX_DATA(msg) ((msg) & ~0xf) -#define MBOX_LOCK do { \ - mtx_lock(&bcm_mbox_sc->lock); \ +#define MBOX_LOCK(sc) do { \ + mtx_lock(&(sc)->lock); \ } while(0) -#define MBOX_UNLOCK do { \ - mtx_unlock(&bcm_mbox_sc->lock); \ +#define MBOX_UNLOCK(sc) do { \ + mtx_unlock(&(sc)->lock); \ } while(0) #ifdef DEBUG @@ -90,12 +93,10 @@ struct bcm_mbox_softc { int msg[BCM2835_MBOX_CHANS]; }; -static struct bcm_mbox_softc *bcm_mbox_sc = NULL; - -#define mbox_read_4(reg) \ - bus_space_read_4(bcm_mbox_sc->bst, bcm_mbox_sc->bsh, reg) -#define mbox_write_4(reg, val) \ - bus_space_write_4(bcm_mbox_sc->bst, bcm_mbox_sc->bsh, reg, val) +#define mbox_read_4(sc, reg) \ + bus_space_read_4((sc)->bst, (sc)->bsh, reg) +#define mbox_write_4(sc, reg, val) \ + bus_space_write_4((sc)->bst, (sc)->bsh, reg, val) static void bcm_mbox_intr(void *arg) @@ -105,9 +106,9 @@ bcm_mbox_intr(void *arg) uint32_t data; uint32_t msg; - MBOX_LOCK; - while (!(mbox_read_4(REG_STATUS) & STATUS_EMPTY)) { - msg = mbox_read_4(REG_READ); + MBOX_LOCK(sc); + while (!(mbox_read_4(sc, REG_STATUS) & STATUS_EMPTY)) { + msg = mbox_read_4(sc, REG_READ); dprintf("bcm_mbox_intr: raw data %08x\n", msg); chan = MBOX_CHAN(msg); data = MBOX_DATA(msg); @@ -121,7 +122,7 @@ bcm_mbox_intr(void *arg) wakeup(&sc->msg[chan]); } - MBOX_UNLOCK; + MBOX_UNLOCK(sc); } static int @@ -143,9 +144,6 @@ bcm_mbox_attach(device_t dev) int i; int rid = 0; - if (bcm_mbox_sc != NULL) - return (EINVAL); - sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (sc->mem_res == NULL) { device_printf(dev, "could not allocate memory resource\n"); @@ -176,72 +174,76 @@ bcm_mbox_attach(device_t dev) sc->msg[0] = 0; } - bcm_mbox_sc = sc; /* Read all pending messages */ bcm_mbox_intr(sc); - /* Should be called after bcm_mbox_sc initialization */ - mbox_write_4(REG_CONFIG, CONFIG_DATA_IRQ); + mbox_write_4(sc, REG_CONFIG, CONFIG_DATA_IRQ); return (0); } -static device_method_t bcm_mbox_methods[] = { - DEVMETHOD(device_probe, bcm_mbox_probe), - DEVMETHOD(device_attach, bcm_mbox_attach), - { 0, 0 } -}; - -static driver_t bcm_mbox_driver = { - "mbox", - bcm_mbox_methods, - sizeof(struct bcm_mbox_softc), -}; - -static devclass_t bcm_mbox_devclass; - -DRIVER_MODULE(mbox, simplebus, bcm_mbox_driver, bcm_mbox_devclass, 0, 0); - /* * Mailbox API */ -int -bcm_mbox_write(int chan, uint32_t data) +static int +bcm_mbox_write(device_t dev, int chan, uint32_t data) { int limit = 20000; + struct bcm_mbox_softc *sc = device_get_softc(dev); dprintf("bcm_mbox_write: chan %d, data %08x\n", chan, data); - MBOX_LOCK; + MBOX_LOCK(sc); - while ((mbox_read_4(REG_STATUS) & STATUS_FULL) && limit--) { + while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && limit--) { DELAY(2); } if (limit == 0) { printf("bcm_mbox_write: STATUS_FULL stuck"); - MBOX_UNLOCK; + MBOX_UNLOCK(sc); return (EAGAIN); } - mbox_write_4(REG_WRITE, MBOX_MSG(chan, data)); + mbox_write_4(sc, REG_WRITE, MBOX_MSG(chan, data)); - MBOX_UNLOCK; + MBOX_UNLOCK(sc); return (0); } -int -bcm_mbox_read(int chan, uint32_t *data) +static int +bcm_mbox_read(device_t dev, int chan, uint32_t *data) { - struct bcm_mbox_softc *sc = bcm_mbox_sc; + struct bcm_mbox_softc *sc = device_get_softc(dev); dprintf("bcm_mbox_read: chan %d\n", chan); - MBOX_LOCK; + MBOX_LOCK(sc); while (!sc->valid[chan]) msleep(&sc->msg[chan], &sc->lock, PZERO, "vcio mbox read", 0); - *data = bcm_mbox_sc->msg[chan]; - bcm_mbox_sc->valid[chan] = 0; - MBOX_UNLOCK; + *data = sc->msg[chan]; + sc->valid[chan] = 0; + MBOX_UNLOCK(sc); dprintf("bcm_mbox_read: chan %d, data %08x\n", chan, *data); return (0); } + +static device_method_t bcm_mbox_methods[] = { + DEVMETHOD(device_probe, bcm_mbox_probe), + DEVMETHOD(device_attach, bcm_mbox_attach), + + DEVMETHOD(mbox_read, bcm_mbox_read), + DEVMETHOD(mbox_write, bcm_mbox_write), + + DEVMETHOD_END +}; + +static driver_t bcm_mbox_driver = { + "mbox", + bcm_mbox_methods, + sizeof(struct bcm_mbox_softc), +}; + +static devclass_t bcm_mbox_devclass; + +DRIVER_MODULE(mbox, simplebus, bcm_mbox_driver, bcm_mbox_devclass, 0, 0); + Modified: head/sys/arm/broadcom/bcm2835/bcm2835_mbox.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_mbox.h Sun Jul 7 21:20:52 2013 (r253005) +++ head/sys/arm/broadcom/bcm2835/bcm2835_mbox.h Sun Jul 7 21:23:58 2013 (r253006) @@ -38,7 +38,4 @@ #define BCM2835_MBOX_CHAN_TS 6 #define BCM2835_MBOX_CHANS 7 -int bcm_mbox_write(int chan, uint32_t data); -int bcm_mbox_read(int chan, uint32_t *data); - #endif /* _BCM2835_MBOX_H_ */ Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Jul 7 21:20:52 2013 (r253005) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Sun Jul 7 21:23:58 2013 (r253006) @@ -22,3 +22,5 @@ arm/arm/cpufunc_asm_armv6.S arm/arm/irq_dispatch.S standard kern/kern_clocksource.c standard + +dev/mbox/mbox_if.m standard From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:39:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 49973A4C; Sun, 7 Jul 2013 21:39:38 +0000 (UTC) (envelope-from alfred@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8E617AD; Sun, 7 Jul 2013 21:39:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67Ldcfl046412; Sun, 7 Jul 2013 21:39:38 GMT (envelope-from alfred@svn.freebsd.org) Received: (from alfred@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67Ldb6u046408; Sun, 7 Jul 2013 21:39:37 GMT (envelope-from alfred@svn.freebsd.org) Message-Id: <201307072139.r67Ldb6u046408@svn.freebsd.org> From: Alfred Perlstein Date: Sun, 7 Jul 2013 21:39:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253007 - in head/sys: kern net80211 sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:39:38 -0000 Author: alfred Date: Sun Jul 7 21:39:37 2013 New Revision: 253007 URL: http://svnweb.freebsd.org/changeset/base/253007 Log: Make kassert_printf use __printflike. Fix associated errors/warnings while I'm here. Requested by: avg Modified: head/sys/kern/subr_witness.c head/sys/kern/vfs_bio.c head/sys/net80211/ieee80211_output.c head/sys/sys/systm.h Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sun Jul 7 21:23:58 2013 (r253006) +++ head/sys/kern/subr_witness.c Sun Jul 7 21:39:37 2013 (r253007) @@ -1138,12 +1138,16 @@ witness_checkorder(struct lock_object *l iclass = LOCK_CLASS(interlock); lock1 = find_instance(lock_list, interlock); if (lock1 == NULL) - kassert_panic("interlock (%s) %s not locked @ %s:%d", + kassert_panic( + "interlock (%s) %s not locked while locking" + " %s @ %s:%d", iclass->lc_name, interlock->lo_name, flags & LOP_EXCLUSIVE ? "exclusive" : "shared", fixup_filename(file), line); else if ((lock1->li_flags & LI_RECURSEMASK) != 0) - kassert_panic("interlock (%s) %s recursed @ %s:%d", + kassert_panic( + "interlock (%s) %s recursed while locking %s" + " @ %s:%d", iclass->lc_name, interlock->lo_name, flags & LOP_EXCLUSIVE ? "exclusive" : "shared", fixup_filename(file), line); Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Jul 7 21:23:58 2013 (r253006) +++ head/sys/kern/vfs_bio.c Sun Jul 7 21:39:37 2013 (r253007) @@ -4485,8 +4485,8 @@ bdata2bio(struct buf *bp, struct bio *bi bip->bio_flags |= BIO_UNMAPPED; KASSERT(round_page(bip->bio_ma_offset + bip->bio_length) / PAGE_SIZE == bp->b_npages, - ("Buffer %p too short: %d %d %d", bp, bip->bio_ma_offset, - bip->bio_length, bip->bio_ma_n)); + ("Buffer %p too short: %d %lld %d", bp, bip->bio_ma_offset, + (long long)bip->bio_length, bip->bio_ma_n)); } else { bip->bio_data = bp->b_data; bip->bio_ma = NULL; Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Jul 7 21:23:58 2013 (r253006) +++ head/sys/net80211/ieee80211_output.c Sun Jul 7 21:39:37 2013 (r253007) @@ -1022,7 +1022,7 @@ ieee80211_mbuf_adjust(struct ieee80211va return NULL; } KASSERT(needed_space <= MHLEN, - ("not enough room, need %u got %zu\n", needed_space, MHLEN)); + ("not enough room, need %u got %d\n", needed_space, MHLEN)); /* * Setup new mbuf to have leading space to prepend the * 802.11 header and any crypto header bits that are Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sun Jul 7 21:23:58 2013 (r253006) +++ head/sys/sys/systm.h Sun Jul 7 21:39:37 2013 (r253007) @@ -74,7 +74,7 @@ extern int vm_guest; /* Running as virt enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN }; #if defined(WITNESS) || defined(INVARIANTS) -void kassert_panic(const char *fmt, ...); +void kassert_panic(const char *fmt, ...) __printflike(1, 2); #endif #ifdef INVARIANTS /* The option is always available */ From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:41:55 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 674C6CB2; Sun, 7 Jul 2013 21:41:55 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 14D7917CB; Sun, 7 Jul 2013 21:41:53 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id AAA27318; Mon, 08 Jul 2013 00:41:52 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1UvwiN-0004B1-Qs; Mon, 08 Jul 2013 00:41:51 +0300 Message-ID: <51D9E069.5060300@FreeBSD.org> Date: Mon, 08 Jul 2013 00:40:57 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130405 Thunderbird/17.0.5 MIME-Version: 1.0 To: Alfred Perlstein Subject: Re: svn commit: r253002 - head References: <201307072039.r67KdCdR028908@svn.freebsd.org> <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com> <51D9DA55.2090808@freebsd.org> In-Reply-To: <51D9DA55.2090808@freebsd.org> X-Enigmail-Version: 1.5.1 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" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:41:55 -0000 on 08/07/2013 00:15 Alfred Perlstein said the following: > On 7/7/13 2:01 PM, Garrett Cooper wrote: >> Why the magic number 12? > > Numbers higher seem to result in worse performance as reported by some members > of my team. Should we really commit all "notes to self" or "my team's knowledge base" to FreeBSD source code like this? >> >> On Jul 7, 2013, at 1:39 PM, Alfred Perlstein wrote: >> >>> Author: alfred >>> Date: Sun Jul 7 20:39:11 2013 >>> New Revision: 253002 >>> URL: http://svnweb.freebsd.org/changeset/base/253002 >>> >>> Log: >>> Document tip on how to build all kernels quickly. >>> >>> Modified: >>> head/Makefile >>> >>> Modified: head/Makefile >>> ============================================================================== >>> --- head/Makefile Sun Jul 7 19:58:14 2013 (r253001) >>> +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) >>> @@ -32,6 +32,12 @@ >>> # targets - Print a list of supported TARGET/TARGET_ARCH pairs >>> # for world and kernel targets. >>> # toolchains - Build a toolchain for all world and kernel targets. >>> +# >>> +# "quick" way to test all kernel builds: >>> +# _jflag=`sysctl -n hw.ncpu` >>> +# _jflag=$(($_jflag * 2)) >>> +# [ $_jflag -gt 12 ] && _jflag=12 >>> +# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} >>> # >>> # This makefile is simple by design. The FreeBSD make automatically reads >>> # the /usr/share/mk/sys.mk unless the -m argument is specified on the >>> _______________________________________________ >>> svn-src-head@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/svn-src-head >>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 21:50:58 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 15D33E75; Sun, 7 Jul 2013 21:50:58 +0000 (UTC) (envelope-from alfred@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 027621804; Sun, 7 Jul 2013 21:50:57 +0000 (UTC) Received: from Alfreds-MacBook-Pro-9.local (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218]) by elvis.mu.org (Postfix) with ESMTPSA id 07F361A3C61; Sun, 7 Jul 2013 14:50:57 -0700 (PDT) Message-ID: <51D9E2C0.6060603@freebsd.org> Date: Sun, 07 Jul 2013 14:50:56 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r253002 - head References: <201307072039.r67KdCdR028908@svn.freebsd.org> <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com> <51D9DA55.2090808@freebsd.org> <51D9E069.5060300@FreeBSD.org> In-Reply-To: <51D9E069.5060300@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 21:50:58 -0000 On 7/7/13 2:40 PM, Andriy Gapon wrote: > on 08/07/2013 00:15 Alfred Perlstein said the following: >> On 7/7/13 2:01 PM, Garrett Cooper wrote: >>> Why the magic number 12? >> Numbers higher seem to result in worse performance as reported by some members >> of my team. > Should we really commit all "notes to self" or "my team's knowledge base" to > FreeBSD source code like this? I would hope so! At least in comments, that way we can all help each other. Otherwise each time another person comes along they are subject to having to discover the same things that I did. What is the point of listing 10+ make targets if someone coming in doesn't know which ones to run and how to run them optimally in order to ensure a safe build? Do you not agree that more of this sort of documentation should be in the code instead of having to ask on IRC? For the record I checked multiple pages in developer primer and scoured makefiles for a while before giving up and asking on IRC. I figured it would be helpful for the next clueless goon that came in and tried to make things better if I recorded my experience to guide them. I hold no strong feelings towards the comments, other than they should be preserved in some form, or maybe even turned into a workable target for people that don't want or can not hold all that context in their brains. -Alfred > >>> On Jul 7, 2013, at 1:39 PM, Alfred Perlstein wrote: >>> >>>> Author: alfred >>>> Date: Sun Jul 7 20:39:11 2013 >>>> New Revision: 253002 >>>> URL: http://svnweb.freebsd.org/changeset/base/253002 >>>> >>>> Log: >>>> Document tip on how to build all kernels quickly. >>>> >>>> Modified: >>>> head/Makefile >>>> >>>> Modified: head/Makefile >>>> ============================================================================== >>>> --- head/Makefile Sun Jul 7 19:58:14 2013 (r253001) >>>> +++ head/Makefile Sun Jul 7 20:39:11 2013 (r253002) >>>> @@ -32,6 +32,12 @@ >>>> # targets - Print a list of supported TARGET/TARGET_ARCH pairs >>>> # for world and kernel targets. >>>> # toolchains - Build a toolchain for all world and kernel targets. >>>> +# >>>> +# "quick" way to test all kernel builds: >>>> +# _jflag=`sysctl -n hw.ncpu` >>>> +# _jflag=$(($_jflag * 2)) >>>> +# [ $_jflag -gt 12 ] && _jflag=12 >>>> +# make universe -DMAKE_JUST_KERNELS JFLAG=${jflag} >>>> # >>>> # This makefile is simple by design. The FreeBSD make automatically reads >>>> # the /usr/share/mk/sys.mk unless the -m argument is specified on the >>>> _______________________________________________ >>>> svn-src-head@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/svn-src-head >>>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 22:03:36 2013 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DAF476FE; Sun, 7 Jul 2013 22:03:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1E95218BA; Sun, 7 Jul 2013 22:03:34 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id BAA27620; Mon, 08 Jul 2013 01:03:32 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Uvx3M-0004Cz-D4; Mon, 08 Jul 2013 01:03:32 +0300 Message-ID: <51D9E57F.3090803@FreeBSD.org> Date: Mon, 08 Jul 2013 01:02:39 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130405 Thunderbird/17.0.5 MIME-Version: 1.0 To: Alfred Perlstein Subject: Re: svn commit: r253002 - head References: <201307072039.r67KdCdR028908@svn.freebsd.org> <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com> <51D9DA55.2090808@freebsd.org> <51D9E069.5060300@FreeBSD.org> <51D9E2C0.6060603@freebsd.org> In-Reply-To: <51D9E2C0.6060603@freebsd.org> X-Enigmail-Version: 1.5.1 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" , Garrett Cooper X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 22:03:36 -0000 on 08/07/2013 00:50 Alfred Perlstein said the following: > On 7/7/13 2:40 PM, Andriy Gapon wrote: >> on 08/07/2013 00:15 Alfred Perlstein said the following: >>> On 7/7/13 2:01 PM, Garrett Cooper wrote: >>>> Why the magic number 12? >>> Numbers higher seem to result in worse performance as reported by some members >>> of my team. >> Should we really commit all "notes to self" or "my team's knowledge base" to >> FreeBSD source code like this? > > I would hope so! I hope not ;) > At least in comments, that way we can all help each other. > > Otherwise each time another person comes along they are subject to having to > discover the same things that I did. > > What is the point of listing 10+ make targets if someone coming in doesn't know > which ones to run and how to run them optimally in order to ensure a safe > build? Do you not agree that more of this sort of documentation should be in > the code instead of having to ask on IRC? > > For the record I checked multiple pages in developer primer and scoured > makefiles for a while before giving up and asking on IRC. I figured it would be > helpful for the next clueless goon that came in and tried to make things better > if I recorded my experience to guide them. > > I hold no strong feelings towards the comments, other than they should be > preserved in some form, or maybe even turned into a workable target for people > that don't want or can not hold all that context in their brains. I am sure that the next time you need to run the same thing you'll remember where you put the comment and you'll copy/paste from it. I am sure that if any other developer runs into the same situation, then he will: - google - ask on irc - ask on mailing lists - perhaps even read build(7) I am sure that looking through the Makefile would be one of the last things on his mind. So, I am all in favor of documenting things but that should be done properly. What you did was not commenting the code (such comments usually appear near the code and describe the code), it was putting a mini-how-to at an obscure place. -- Andriy Gapon From owner-svn-src-head@FreeBSD.ORG Sun Jul 7 22:24:00 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A8B25D28; Sun, 7 Jul 2013 22:24:00 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 990741955; Sun, 7 Jul 2013 22:24:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r67MO0HK060688; Sun, 7 Jul 2013 22:24:00 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r67MNxQT060673; Sun, 7 Jul 2013 22:23:59 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201307072223.r67MNxQT060673@svn.freebsd.org> From: Edwin Groothuis Date: Sun, 7 Jul 2013 22:23:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253009 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jul 2013 22:24:00 -0000 Author: edwin Date: Sun Jul 7 22:23:59 2013 New Revision: 253009 URL: http://svnweb.freebsd.org/changeset/base/253009 Log: MFV of tzdata2013d, 253008 - Morocco: announced that the year's Ramadan daylight-savings transitions would be 2013-07-07 and 2013-08-10. - Israel: As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March. DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the second day of the Jewish Rosh Hashana holiday, in which case DST ends a day later (i.e. at 02:00 the first Monday after October 2). [Rosh Hashana holidays are factored in until 2100.] Modified: head/contrib/tzdata/africa head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/europe head/contrib/tzdata/southamerica head/contrib/tzdata/zone.tab Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/africa ============================================================================== --- head/contrib/tzdata/africa Sun Jul 7 22:18:08 2013 (r253008) +++ head/contrib/tzdata/africa Sun Jul 7 22:23:59 2013 (r253009) @@ -852,12 +852,18 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 J # announced that year's Ramadan daylight-saving transitions would be # 2012-07-20 and 2012-08-20; see # . -# + +# From Andrew Paprocki (2013-07-02): +# Morocco announced that the year's Ramadan daylight-savings +# transitions would be 2013-07-07 and 2013-08-10; see: +# http://www.maroc.ma/en/news/morocco-suspends-daylight-saving-time-july-7-aug10 + +# From Paul Eggert (2013-07-03): # To estimate what the Moroccan government will do in future years, -# transition dates for 2013 through 2021 were determined by running +# transition dates for 2014 through 2021 were determined by running # the following program under GNU Emacs 24.3: # -# (let ((islamic-year 1434)) +# (let ((islamic-year 1435)) # (while (< islamic-year 1444) # (let ((a # (calendar-gregorian-from-absolute @@ -910,8 +916,8 @@ Rule Morocco 2012 2019 - Apr lastSun 2: Rule Morocco 2012 max - Sep lastSun 3:00 0 - Rule Morocco 2012 only - Jul 20 3:00 0 - Rule Morocco 2012 only - Aug 20 2:00 1:00 S -Rule Morocco 2013 only - Jul 9 3:00 0 - -Rule Morocco 2013 only - Aug 8 2:00 1:00 S +Rule Morocco 2013 only - Jul 7 3:00 0 - +Rule Morocco 2013 only - Aug 10 2:00 1:00 S Rule Morocco 2014 only - Jun 29 3:00 0 - Rule Morocco 2014 only - Jul 29 2:00 1:00 S Rule Morocco 2015 only - Jun 18 3:00 0 - Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Sun Jul 7 22:18:08 2013 (r253008) +++ head/contrib/tzdata/asia Sun Jul 7 22:23:59 2013 (r253009) @@ -1212,39 +1212,21 @@ Rule Zion 2011 only - Oct 2 2:00 0 S Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D Rule Zion 2012 only - Sep 23 2:00 0 S -# From Ephraim Silverberg (2012-10-18): -# Yesterday, the Interior Ministry Committee, after more than a year -# past, approved sending the proposed June 2011 changes to the Time -# Decree Law back to the Knesset for second and third (final) votes -# before the upcoming elections on Jan. 22, 2013. Hence, although the -# changes are not yet law, they are expected to be so before February 2013. -# -# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March. -# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the -# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day -# later (i.e. at 02:00 the first Monday after October 2). -# [Rosh Hashana holidays are factored in until 2100.] - -# From Ephraim Silverberg (2012-11-05): -# The Knesset passed today (in second and final readings) the amendment to the -# Time Decree Law making the changes ... law. +# From Ephraim Silverberg (2013-06-27): +# On June 23, 2013, the Israeli government approved changes to the +# Time Decree Law. The next day, the changes passed the First Reading +# in the Knesset. The law is expected to pass the Second and Third +# (final) Readings by the beginning of September 2013. +# +# As of 2013, DST starts at 02:00 on the Friday before the last Sunday +# in March. DST ends at 02:00 on the last Sunday of October. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D -Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S -Rule Zion 2027 only - Oct Mon>=3 2:00 0 S -Rule Zion 2028 max - Oct Sun>=2 2:00 0 S -# The following rules are commented out for now, as they break older -# versions of zic that support only signed 32-bit timestamps, i.e., -# through 2038-01-19 03:14:07 UTC. -#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S -#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S -#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S -#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S -#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S +Rule Zion 2013 max - Oct lastSun 2:00 0 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Jerusalem 2:20:56 - LMT 1880 +Zone Asia/Jerusalem 2:20:54 - LMT 1880 2:20:40 - JMT 1918 # Jerusalem Mean Time? 2:00 Zion I%sT @@ -2547,8 +2529,8 @@ Rule Syria 2006 only - Sep 22 0:00 0 - Rule Syria 2007 only - Mar lastFri 0:00 1:00 S # From Jesper Norgard (2007-10-27): # The sister center ICARDA of my work CIMMYT is confirming that Syria DST will -# not take place 1.st November at 0:00 o'clock but 1.st November at 24:00 or -# rather Midnight between Thursday and Friday. This does make more sence than +# not take place 1st November at 0:00 o'clock but 1st November at 24:00 or +# rather Midnight between Thursday and Friday. This does make more sense than # having it between Wednesday and Thursday (two workdays in Syria) since the # weekend in Syria is not Saturday and Sunday, but Friday and Saturday. So now # it is implemented at midnight of the last workday before weekend... Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Sun Jul 7 22:18:08 2013 (r253008) +++ head/contrib/tzdata/australasia Sun Jul 7 22:23:59 2013 (r253009) @@ -230,10 +230,16 @@ Zone Australia/Lord_Howe 10:36:20 - LMT # - Macquarie Island will stay on UTC+11 for winter and therefore not # switch back from daylight savings time when other parts of Australia do # on 4 April. +# +# From Arthur David Olson (2013-05-23): +# The 1919 transition is overspecified below so pre-2013 zics +# will produce a binary file with an EST-type as the first 32-bit type; +# this is required for correct handling of times before 1916 by +# pre-2013 versions of localtime. Zone Antarctica/Macquarie 0 - zzz 1899 Nov 10:00 - EST 1916 Oct 1 2:00 10:00 1:00 EST 1917 Feb - 10:00 Aus EST 1919 Apr + 10:00 Aus EST 1919 Apr 1 0:00s 0 - zzz 1948 Mar 25 10:00 Aus EST 1967 10:00 AT EST 2010 Apr 4 3:00 @@ -1475,12 +1481,12 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # From Paul Eggert (2000-01-08): # IATA SSIM (1999-09) says DST ends 0100 local time. Go with McDow. -# From the BBC World Service (1998-10-31 11:32 UTC): +# From the BBC World Service in +# http://news.bbc.co.uk/2/hi/asia-pacific/205226.stm (1998-10-31 16:03 UTC): # The Fijiian government says the main reasons for the time change is to -# improve productivity and reduce road accidents. But correspondents say it -# also hopes the move will boost Fiji's ability to compete with other pacific -# islands in the effort to attract tourists to witness the dawning of the new -# millenium. +# improve productivity and reduce road accidents.... [T]he move is also +# intended to boost Fiji's ability to attract tourists to witness the dawning +# of the new millennium. # http://www.fiji.gov.fj/press/2000_09/2000_09_13-05.shtml (2000-09-13) # reports that Fiji has discontinued DST. @@ -1625,7 +1631,7 @@ Zone Pacific/Wallis 12:15:20 - LMT 1901 # Shanks & Pottenger say the transition was on 1968-10-01; go with Mundell. # From Eric Ulevik (1999-05-03): -# Tonga's director of tourism, who is also secretary of the National Millenium +# Tonga's director of tourism, who is also secretary of the National Millennium # Committee, has a plan to get Tonga back in front. # He has proposed a one-off move to tropical daylight saving for Tonga from # October to March, which has won approval in principle from the Tongan Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Sun Jul 7 22:18:08 2013 (r253008) +++ head/contrib/tzdata/europe Sun Jul 7 22:23:59 2013 (r253009) @@ -523,7 +523,7 @@ Rule C-Eur 1944 only - Oct 2 2:00s 0 - # It seems that Paris, Monaco, Rule France, Rule Belgium all agree on # 2:00 standard time, e.g. 3:00 local time. However there are no # countries that use C-Eur rules in September 1945, so the only items -# affected are apparently these ficticious zones that translates acronyms +# affected are apparently these fictitious zones that translate acronyms # CET and MET: # # Zone CET 1:00 C-Eur CE%sT @@ -2779,9 +2779,9 @@ Link Europe/Istanbul Asia/Istanbul # Ist # Ukraine # -# From Igor Karpov, who works for the Ukranian Ministry of Justice, +# From Igor Karpov, who works for the Ukrainian Ministry of Justice, # via Garrett Wollman (2003-01-27): -# BTW, I've found the official document on this matter. It's goverment +# BTW, I've found the official document on this matter. It's government # regulations number 509, May 13, 1996. In my poor translation it says: # "Time in Ukraine is set to second timezone (Kiev time). Each last Sunday # of March at 3am the time is changing to 4am and each last Sunday of @@ -2815,7 +2815,7 @@ Link Europe/Istanbul Asia/Istanbul # Ist # time this year after all. # # From Udo Schwedt (2011-10-18): -# As far as I understand, the recent change to the Ukranian time zone +# As far as I understand, the recent change to the Ukrainian time zone # (Europe/Kiev) to introduce permanent daylight saving time (similar # to Russia) was reverted today: # Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Sun Jul 7 22:18:08 2013 (r253008) +++ head/contrib/tzdata/southamerica Sun Jul 7 22:23:59 2013 (r253009) @@ -971,7 +971,7 @@ Rule Brazil 2007 only - Feb 25 0:00 0 - # adopted by the same states as before. Rule Brazil 2007 only - Oct Sun>=8 0:00 1:00 S # From Frederico A. C. Neves (2008-09-10): -# Acording to this decree +# According to this decree # # http://www.planalto.gov.br/ccivil_03/_Ato2007-2010/2008/Decreto/D6558.htm # @@ -1203,7 +1203,7 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # http://www.emol.com/noticias/nacional/detalle/detallenoticias.asp?idnoticia=467651 # # -# This is not yet reflected in the offical "cambio de hora" site, but +# This is not yet reflected in the official "cambio de hora" site, but # probably will be soon: # # http://www.horaoficial.cl/cambio.htm Modified: head/contrib/tzdata/zone.tab ============================================================================== --- head/contrib/tzdata/zone.tab Sun Jul 7 22:18:08 2013 (r253008) +++ head/contrib/tzdata/zone.tab Sun Jul 7 22:23:59 2013 (r253009) @@ -1,18 +1,21 @@ -#
+# TZ zone descriptions
+#
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #
-# TZ zone descriptions
-#
-# From Paul Eggert (1996-08-05):
+# From Paul Eggert (2013-05-27):
 #
 # This file contains a table with the following columns:
 # 1.  ISO 3166 2-character country code.  See /usr/share/misc/iso3166.
+#     This identifies a country that overlaps the zone.  The country may
+#     overlap other zones and the zone may overlap other countries.
 # 2.  Latitude and longitude of the zone's principal location
 #     in ISO 6709 sign-degrees-minutes-seconds format,
 #     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
 #     first latitude (+ is north), then longitude (+ is east).
+#     This location need not lie within the column-1 country.
 # 3.  Zone name used in value of TZ environment variable.
+#     Please see the 'Theory' file for how zone names are chosen.
 # 4.  Comments; present if and only if the country has multiple rows.
 #
 # Columns are separated by a single tab.
@@ -22,6 +25,10 @@
 #
 # Lines beginning with `#' are comments.
 #
+# This table is intended as an aid for users, to help them select time
+# zone data appropriate for their practical needs.  It is not intended
+# to take or endorse any position on legal or territorial claims.
+#
 #country-
 #code	coordinates	TZ			comments
 AD	+4230+00131	Europe/Andorra
@@ -216,7 +223,7 @@ ID	-0002+10920	Asia/Pontianak	west & cen
 ID	-0507+11924	Asia/Makassar	east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor
 ID	-0232+14042	Asia/Jayapura	west New Guinea (Irian Jaya) & Malukus (Moluccas)
 IE	+5320-00615	Europe/Dublin
-IL	+3146+03514	Asia/Jerusalem
+IL	+314650+0351326	Asia/Jerusalem
 IM	+5409-00428	Europe/Isle_of_Man
 IN	+2232+08822	Asia/Kolkata
 IO	-0720+07225	Indian/Chagos

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 00:50:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 5F7B2359;
 Mon,  8 Jul 2013 00:50:58 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 40F0D1DEA;
 Mon,  8 Jul 2013 00:50:58 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r680ow1S004500;
 Mon, 8 Jul 2013 00:50:58 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r680owcc004499;
 Mon, 8 Jul 2013 00:50:58 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307080050.r680owcc004499@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 8 Jul 2013 00:50:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253015 - head/usr.sbin/gssd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 00:50:58 -0000

Author: rmacklem
Date: Mon Jul  8 00:50:57 2013
New Revision: 253015
URL: http://svnweb.freebsd.org/changeset/base/253015

Log:
  Add a new "-h" option to the gssd daemon that enables support for
  host based (kerberos service principal) initiator credentials in
  the default keytab file. This option won't actually be useful until
  the corresponding kernel changes are committed.
  
  Reviewed by:	jhb

Modified:
  head/usr.sbin/gssd/gssd.c

Modified: head/usr.sbin/gssd/gssd.c
==============================================================================
--- head/usr.sbin/gssd/gssd.c	Mon Jul  8 00:36:42 2013	(r253014)
+++ head/usr.sbin/gssd/gssd.c	Mon Jul  8 00:50:57 2013	(r253015)
@@ -60,6 +60,7 @@ __FBSDID("$FreeBSD$");
 #ifndef _PATH_GSSDSOCK
 #define _PATH_GSSDSOCK	"/var/run/gssd.sock"
 #endif
+#define GSSD_CREDENTIAL_CACHE_FILE	"/tmp/krb5cc_gssd"
 
 struct gss_resource {
 	LIST_ENTRY(gss_resource) gr_link;
@@ -75,6 +76,7 @@ static char ccfile_dirlist[PATH_MAX + 1]
 static char pref_realm[1024];
 static int verbose;
 static int use_old_des;
+static int hostbased_initiator_cred;
 #ifndef WITHOUT_KERBEROS
 /* 1.2.752.43.13.14 */
 static gss_OID_desc gss_krb5_set_allowable_enctypes_x_desc =
@@ -92,8 +94,10 @@ static int find_ccache_file(const char *
 static int is_a_valid_tgt_cache(const char *, uid_t, int *, time_t *);
 static void gssd_verbose_out(const char *, ...);
 #ifndef WITHOUT_KERBEROS
+static krb5_error_code gssd_get_cc_from_keytab(const char *);
 static OM_uint32 gssd_get_user_cred(OM_uint32 *, uid_t, gss_cred_id_t *);
 #endif
+void gssd_terminate(int);
 
 extern void gssd_1(struct svc_req *rqstp, SVCXPRT *transp);
 extern int gssd_syscall(char *path);
@@ -119,11 +123,23 @@ main(int argc, char **argv)
 	pref_realm[0] = '\0';
 	debug = 0;
 	verbose = 0;
-	while ((ch = getopt(argc, argv, "dovs:c:r:")) != -1) {
+	while ((ch = getopt(argc, argv, "dhovs:c:r:")) != -1) {
 		switch (ch) {
 		case 'd':
 			debug_level++;
 			break;
+		case 'h':
+#ifndef WITHOUT_KERBEROS
+			/*
+			 * Enable use of a host based initiator credential
+			 * in the default keytab file.
+			 */
+			hostbased_initiator_cred = 1;
+#else
+			errx(1, "This option not available when built"
+			    " without MK_KERBEROS\n");
+#endif
+			break;
 		case 'o':
 #ifndef WITHOUT_KERBEROS
 			/*
@@ -182,6 +198,7 @@ main(int argc, char **argv)
 		signal(SIGQUIT, SIG_IGN);
 		signal(SIGHUP, SIG_IGN);
 	}
+	signal(SIGTERM, gssd_terminate);
 
 	memset(&sun, 0, sizeof sun);
 	sun.sun_family = AF_LOCAL;
@@ -377,7 +394,17 @@ gssd_init_sec_context_1_svc(init_sec_con
 #endif
 
 	memset(result, 0, sizeof(*result));
-	if (ccfile_dirlist[0] != '\0' && argp->cred == 0) {
+	if (hostbased_initiator_cred != 0 && argp->cred != 0 &&
+	    argp->uid == 0) {
+		/*
+		 * These credentials are for a host based initiator name
+		 * in a keytab file, which should now have credentials
+		 * in /tmp/krb5cc_gssd, because gss_acquire_cred() did
+		 * the equivalent of "kinit -k".
+		 */
+		snprintf(ccname, sizeof(ccname), "FILE:%s",
+		    GSSD_CREDENTIAL_CACHE_FILE);
+	} else if (ccfile_dirlist[0] != '\0' && argp->cred == 0) {
 		/*
 		 * For the "-s" case and no credentials provided as an
 		 * argument, search the directory list for an appropriate
@@ -773,6 +800,51 @@ gssd_acquire_cred_1_svc(acquire_cred_arg
 #endif
 
 	memset(result, 0, sizeof(*result));
+	if (argp->desired_name) {
+		desired_name = gssd_find_resource(argp->desired_name);
+		if (!desired_name) {
+			result->major_status = GSS_S_BAD_NAME;
+			gssd_verbose_out("gssd_acquire_cred: no desired name"
+			    " found\n");
+			return (TRUE);
+		}
+	}
+
+#ifndef WITHOUT_KERBEROS
+	if (hostbased_initiator_cred != 0 && argp->desired_name != 0 &&
+	    argp->uid == 0 && argp->cred_usage == GSS_C_INITIATE) {
+		/* This is a host based initiator name in the keytab file. */
+		snprintf(ccname, sizeof(ccname), "FILE:%s",
+		    GSSD_CREDENTIAL_CACHE_FILE);
+		setenv("KRB5CCNAME", ccname, TRUE);
+		result->major_status = gss_display_name(&result->minor_status,
+		    desired_name, &namebuf, NULL);
+		gssd_verbose_out("gssd_acquire_cred: desired name for host "
+		    "based initiator cred major=0x%x minor=%d\n",
+		    (unsigned int)result->major_status,
+		    (int)result->minor_status);
+		if (result->major_status != GSS_S_COMPLETE)
+			return (TRUE);
+		if (namebuf.length > PATH_MAX + 5) {
+			result->minor_status = 0;
+			result->major_status = GSS_S_FAILURE;
+			return (TRUE);
+		}
+		memcpy(ccname, namebuf.value, namebuf.length);
+		ccname[namebuf.length] = '\0';
+		if ((cp = strchr(ccname, '@')) != NULL)
+			*cp = '/';
+		kret = gssd_get_cc_from_keytab(ccname);
+		gssd_verbose_out("gssd_acquire_cred: using keytab entry for "
+		    "%s, kerberos ret=%d\n", ccname, (int)kret);
+		gss_release_buffer(&minstat, &namebuf);
+		if (kret != 0) {
+			result->minor_status = kret;
+			result->major_status = GSS_S_FAILURE;
+			return (TRUE);
+		}
+	} else
+#endif /* !WITHOUT_KERBEROS */
 	if (ccfile_dirlist[0] != '\0' && argp->desired_name == 0) {
 		/*
 		 * For the "-s" case and no name provided as an
@@ -798,6 +870,7 @@ gssd_acquire_cred_1_svc(acquire_cred_arg
 			    " file found\n");
 			return (TRUE);
 		}
+		setenv("KRB5CCNAME", ccname, TRUE);
 	} else {
 		/*
 		 * If there wasn't a "-s" option or the name has
@@ -815,17 +888,7 @@ gssd_acquire_cred_1_svc(acquire_cred_arg
 		}
 		snprintf(ccname, sizeof(ccname), "FILE:/tmp/krb5cc_%d",
 		    (int) argp->uid);
-	}
-	setenv("KRB5CCNAME", ccname, TRUE);
-
-	if (argp->desired_name) {
-		desired_name = gssd_find_resource(argp->desired_name);
-		if (!desired_name) {
-			result->major_status = GSS_S_BAD_NAME;
-			gssd_verbose_out("gssd_acquire_cred: no desired name"
-			    " found\n");
-			return (TRUE);
-		}
+		setenv("KRB5CCNAME", ccname, TRUE);
 	}
 
 	result->major_status = gss_acquire_cred(&result->minor_status,
@@ -964,6 +1027,8 @@ find_ccache_file(const char *dirpath, ui
 		len = snprintf(namepath, sizeof(namepath), "%s/%s", dirpath,
 		    dp->d_name);
 		if (len < sizeof(namepath) &&
+		    (hostbased_initiator_cred == 0 || strcmp(namepath,
+		     GSSD_CREDENTIAL_CACHE_FILE) != 0) &&
 		    strstr(dp->d_name, ccfile_substring) != NULL &&
 		    lstat(namepath, &sb) >= 0 &&
 		    sb.st_uid == uid &&
@@ -1112,6 +1177,57 @@ is_a_valid_tgt_cache(const char *filepat
 
 #ifndef WITHOUT_KERBEROS
 /*
+ * This function attempts to do essentially a "kinit -k" for the principal
+ * name provided as the argument, so that there will be a TGT in the
+ * credential cache.
+ */
+static krb5_error_code
+gssd_get_cc_from_keytab(const char *name)
+{
+	krb5_error_code ret, opt_ret, princ_ret, cc_ret, kt_ret, cred_ret;
+	krb5_context context;
+	krb5_principal principal;
+	krb5_keytab kt;
+	krb5_creds cred;
+	krb5_get_init_creds_opt *opt;
+	krb5_deltat start_time = 0;
+	krb5_ccache ccache;
+
+	ret = krb5_init_context(&context);
+	if (ret != 0)
+		return (ret);
+	princ_ret = ret = krb5_parse_name(context, name, &principal);
+	if (ret == 0)
+		opt_ret = ret = krb5_get_init_creds_opt_alloc(context, &opt);
+	if (ret == 0)
+		cc_ret = ret = krb5_cc_default(context, &ccache);
+	if (ret == 0)
+		ret = krb5_cc_initialize(context, ccache, principal);
+	if (ret == 0) {
+		krb5_get_init_creds_opt_set_default_flags(context, "gssd",
+		    krb5_principal_get_realm(context, principal), opt);
+		kt_ret = ret = krb5_kt_default(context, &kt);
+	}
+	if (ret == 0)
+		cred_ret = ret = krb5_get_init_creds_keytab(context, &cred,
+		    principal, kt, start_time, NULL, opt);
+	if (ret == 0)
+		ret = krb5_cc_store_cred(context, ccache, &cred);
+	if (kt_ret == 0)
+		krb5_kt_close(context, kt);
+	if (cc_ret == 0)
+		krb5_cc_close(context, ccache);
+	if (opt_ret == 0)
+		krb5_get_init_creds_opt_free(context, opt);
+	if (princ_ret == 0)
+		krb5_free_principal(context, principal);
+	if (cred_ret == 0)
+		krb5_free_cred_contents(context, &cred);
+	krb5_free_context(context);
+	return (ret);
+}
+
+/*
  * Acquire a gss credential for a uid.
  */
 static OM_uint32
@@ -1159,3 +1275,14 @@ gssd_get_user_cred(OM_uint32 *min_statp,
 	return (maj_stat);
 }
 #endif /* !WITHOUT_KERBEROS */
+
+void gssd_terminate(int sig __unused)
+{
+
+#ifndef WITHOUT_KERBEROS
+	if (hostbased_initiator_cred != 0)
+		unlink(GSSD_CREDENTIAL_CACHE_FILE);
+#endif
+	exit(0);
+}
+

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 00:57:12 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id D61F158D;
 Mon,  8 Jul 2013 00:57:12 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C813A1E3E;
 Mon,  8 Jul 2013 00:57:12 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r680vCfD005279;
 Mon, 8 Jul 2013 00:57:12 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r680vCXi005278;
 Mon, 8 Jul 2013 00:57:12 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307080057.r680vCXi005278@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 8 Jul 2013 00:57:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253016 - head/usr.sbin/gssd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 00:57:12 -0000

Author: rmacklem
Date: Mon Jul  8 00:57:12 2013
New Revision: 253016
URL: http://svnweb.freebsd.org/changeset/base/253016

Log:
  Document the new "-h" option for the gssd daemon.
  This is a content change.
  
  Reviewed by:	jhb

Modified:
  head/usr.sbin/gssd/gssd.8

Modified: head/usr.sbin/gssd/gssd.8
==============================================================================
--- head/usr.sbin/gssd/gssd.8	Mon Jul  8 00:50:57 2013	(r253015)
+++ head/usr.sbin/gssd/gssd.8	Mon Jul  8 00:57:12 2013	(r253016)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 23, 2013
+.Dd July 7, 2013
 .Dt GSSD 8
 .Os
 .Sh NAME
@@ -34,6 +34,7 @@
 .Sh SYNOPSIS
 .Nm
 .Op Fl d
+.Op Fl h
 .Op Fl o
 .Op Fl v
 .Op Fl s Ar dir-list
@@ -51,6 +52,15 @@ Run in debug mode.
 In this mode,
 .Nm
 will not fork when it starts.
+.It Fl h
+Enable support for host based initiator credentials.
+This permits a kerberized NFS mount to use a service principal in
+the default Kerberos5 keytab file for access.
+Such access is enabled via the
+gssname
+option for the
+.Xr mount_nfs 8
+command.
 .It Fl o
 Force use of DES and the associated old style GSS-API initialization token.
 This may be required to make kerberized NFS mounts work against some
@@ -96,6 +106,7 @@ by kernel GSS-API services.
 .Ex -std
 .Sh SEE ALSO
 .Xr gssapi 3 ,
+.Xr mount_nfs 8 ,
 .Xr syslog 3
 .Sh HISTORY
 The

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 01:08:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 1619B77C;
 Mon,  8 Jul 2013 01:08:58 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 06BB11E92;
 Mon,  8 Jul 2013 01:08:58 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6818vUP008811;
 Mon, 8 Jul 2013 01:08:57 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6818vBT008810;
 Mon, 8 Jul 2013 01:08:57 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307080108.r6818vBT008810@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 8 Jul 2013 01:08:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253017 - head/usr.sbin/gssd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 01:08:58 -0000

Author: rmacklem
Date: Mon Jul  8 01:08:57 2013
New Revision: 253017
URL: http://svnweb.freebsd.org/changeset/base/253017

Log:
  Make sure the krb5 status variables are correctly initialized.

Modified:
  head/usr.sbin/gssd/gssd.c

Modified: head/usr.sbin/gssd/gssd.c
==============================================================================
--- head/usr.sbin/gssd/gssd.c	Mon Jul  8 00:57:12 2013	(r253016)
+++ head/usr.sbin/gssd/gssd.c	Mon Jul  8 01:08:57 2013	(r253017)
@@ -1196,6 +1196,7 @@ gssd_get_cc_from_keytab(const char *name
 	ret = krb5_init_context(&context);
 	if (ret != 0)
 		return (ret);
+	opt_ret = cc_ret = kt_ret = cred_ret = 0;
 	princ_ret = ret = krb5_parse_name(context, name, &principal);
 	if (ret == 0)
 		opt_ret = ret = krb5_get_init_creds_opt_alloc(context, &opt);

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 01:29:10 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 0EC74D07;
 Mon,  8 Jul 2013 01:29:10 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 015371F3D;
 Mon,  8 Jul 2013 01:29:10 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r681T9iK014756;
 Mon, 8 Jul 2013 01:29:09 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r681T9nE014755;
 Mon, 8 Jul 2013 01:29:09 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307080129.r681T9nE014755@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 8 Jul 2013 01:29:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253018 - head/usr.sbin/gssd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 01:29:10 -0000

Author: rmacklem
Date: Mon Jul  8 01:29:09 2013
New Revision: 253018
URL: http://svnweb.freebsd.org/changeset/base/253018

Log:
  Oops, initialize the krb5 ret values correctly (to anything non-zero).

Modified:
  head/usr.sbin/gssd/gssd.c

Modified: head/usr.sbin/gssd/gssd.c
==============================================================================
--- head/usr.sbin/gssd/gssd.c	Mon Jul  8 01:08:57 2013	(r253017)
+++ head/usr.sbin/gssd/gssd.c	Mon Jul  8 01:29:09 2013	(r253018)
@@ -1196,7 +1196,7 @@ gssd_get_cc_from_keytab(const char *name
 	ret = krb5_init_context(&context);
 	if (ret != 0)
 		return (ret);
-	opt_ret = cc_ret = kt_ret = cred_ret = 0;
+	opt_ret = cc_ret = kt_ret = cred_ret = 1;	/* anything non-zero */
 	princ_ret = ret = krb5_parse_name(context, name, &principal);
 	if (ret == 0)
 		opt_ret = ret = krb5_get_init_creds_opt_alloc(context, &opt);

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 01:35:31 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 87893F12;
 Mon,  8 Jul 2013 01:35:31 +0000 (UTC)
 (envelope-from bjkfbsd@gmail.com)
Received: from mail-qa0-x22b.google.com (mail-qa0-x22b.google.com
 [IPv6:2607:f8b0:400d:c00::22b])
 by mx1.freebsd.org (Postfix) with ESMTP id 1953D1F73;
 Mon,  8 Jul 2013 01:35:31 +0000 (UTC)
Received: by mail-qa0-f43.google.com with SMTP id d13so5411942qak.2
 for ; Sun, 07 Jul 2013 18:35:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=hRkRFz11tC70WCrKKBzvYzfhNjuZ2qbUHramiLo+u9Q=;
 b=jT31Wnflb30E7cOL49J3c/Z6vn/YKiL4UOy0lNJDXTnJYmnrwkabniPzGlq4oDZToL
 c9Hg71R+l4w8TPEA7Z+7uV/5uiq+JxFw0TwRqnXbwJX15Vw5ZxZKZPFhj30dqmdYvW6E
 y21swsbvEoWC/C1pnTqiKOqXfprnvF3G0ytJS2WxhE7VUdu4GKCgXtLzfb53XOE5AURf
 +VsRDCe9Oo0oYZ43hH8hH0PzortbZxmGjmPkULm9lgkyH/1FUJmh89NfBtkzzBnipaxY
 7XkBHD3zxVv6ZE7d8LSoij9gMGgKMhBJGlMIsLsTGSmj7r0w+TooTSun9iXzz38jZEfj
 /Dng==
MIME-Version: 1.0
X-Received: by 10.224.64.73 with SMTP id d9mr6886254qai.73.1373247330590; Sun,
 07 Jul 2013 18:35:30 -0700 (PDT)
Received: by 10.49.95.202 with HTTP; Sun, 7 Jul 2013 18:35:30 -0700 (PDT)
In-Reply-To: <201307080057.r680vCXi005278@svn.freebsd.org>
References: <201307080057.r680vCXi005278@svn.freebsd.org>
Date: Sun, 7 Jul 2013 21:35:30 -0400
Message-ID: 
Subject: Re: svn commit: r253016 - head/usr.sbin/gssd
From: Benjamin Kaduk 
To: Rick Macklem 
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 01:35:31 -0000

On Sun, Jul 7, 2013 at 8:57 PM, Rick Macklem  wrote:

> Author: rmacklem
> Date: Mon Jul  8 00:57:12 2013
> New Revision: 253016
> URL: http://svnweb.freebsd.org/changeset/base/253016
>
> Log:
>   Document the new "-h" option for the gssd daemon.
>   This is a content change.
>
>   Reviewed by:  jhb
>
> Modified:
>   head/usr.sbin/gssd/gssd.8
>
> Modified: head/usr.sbin/gssd/gssd.8
>
> ==============================================================================
> --- head/usr.sbin/gssd/gssd.8   Mon Jul  8 00:50:57 2013        (r253015)
> +++ head/usr.sbin/gssd/gssd.8   Mon Jul  8 00:57:12 2013        (r253016)
> @@ -51,6 +52,15 @@ Run in debug mode.
>  In this mode,
>  .Nm
>  will not fork when it starts.
> +.It Fl h
> +Enable support for host based initiator credentials.


"host-based" with a hyphen is preferred in krb5 circles.


> +This permits a kerberized NFS mount to use a service principal in
> +the default Kerberos5 keytab file for access.
>

"Kerberos 5" with a space, please.


> +Such access is enabled via the
> +gssname
>

.Ar gssname

-Ben

+option for the
> +.Xr mount_nfs 8
> +command.
>  .It Fl o
>  Force use of DES and the associated old style GSS-API initialization
> token.
>  This may be required to make kerberized NFS mounts work against some
> @@ -96,6 +106,7 @@ by kernel GSS-API services.
>  .Ex -std
>  .Sh SEE ALSO
>  .Xr gssapi 3 ,
> +.Xr mount_nfs 8 ,
>  .Xr syslog 3
>  .Sh HISTORY
>  The
> _______________________________________________
> 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-head@FreeBSD.ORG  Mon Jul  8 01:45:11 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
 id C9E20215; Mon,  8 Jul 2013 01:45:11 +0000 (UTC)
Date: Mon, 8 Jul 2013 01:45:11 +0000
From: Alexey Dokuchaev 
To: Juli Mallett 
Subject: Re: svn commit: r252913 - head/sys/arm/ti/am335x
Message-ID: <20130708014511.GB24353@FreeBSD.org>
References: <201307070422.r674M9HM038537@svn.freebsd.org>
 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, Oleksandr Tymoshenko ,
 svn-src-all@freebsd.org, src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 01:45:11 -0000

On Sat, Jul 06, 2013 at 09:33:08PM -0700, Juli Mallett wrote:
> Thanks for this and the other commits, Oleksandr!  Much appreciated.
> Looking forward to giving it a spin on my BeagleBones Black!
> 
> [commit diff skipped]

Looking forward to never see overquoting again on FreeBSD lists!

./danfe

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 01:47:50 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id C3CF56D0;
 Mon,  8 Jul 2013 01:47:50 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B6ADB1FE5;
 Mon,  8 Jul 2013 01:47:50 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r681lov8020499;
 Mon, 8 Jul 2013 01:47:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r681loOq020498;
 Mon, 8 Jul 2013 01:47:50 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307080147.r681loOq020498@svn.freebsd.org>
From: Rick Macklem 
Date: Mon, 8 Jul 2013 01:47:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253020 - head/usr.sbin/gssd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 01:47:50 -0000

Author: rmacklem
Date: Mon Jul  8 01:47:50 2013
New Revision: 253020
URL: http://svnweb.freebsd.org/changeset/base/253020

Log:
  Fix some Kerberos related terminology.
  This is a content change.
  
  Requested by:	bjk

Modified:
  head/usr.sbin/gssd/gssd.8

Modified: head/usr.sbin/gssd/gssd.8
==============================================================================
--- head/usr.sbin/gssd/gssd.8	Mon Jul  8 01:46:11 2013	(r253019)
+++ head/usr.sbin/gssd/gssd.8	Mon Jul  8 01:47:50 2013	(r253020)
@@ -53,9 +53,9 @@ In this mode,
 .Nm
 will not fork when it starts.
 .It Fl h
-Enable support for host based initiator credentials.
+Enable support for host-based initiator credentials.
 This permits a kerberized NFS mount to use a service principal in
-the default Kerberos5 keytab file for access.
+the default Kerberos 5 keytab file for access.
 Such access is enabled via the
 gssname
 option for the

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 02:03:19 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 0C5A9428;
 Mon,  8 Jul 2013 02:03:19 +0000 (UTC)
 (envelope-from markj@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id F321F109B;
 Mon,  8 Jul 2013 02:03:18 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6823IKM026454;
 Mon, 8 Jul 2013 02:03:18 GMT (envelope-from markj@svn.freebsd.org)
Received: (from markj@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6823IFT026453;
 Mon, 8 Jul 2013 02:03:18 GMT (envelope-from markj@svn.freebsd.org)
Message-Id: <201307080203.r6823IFT026453@svn.freebsd.org>
From: Mark Johnston 
Date: Mon, 8 Jul 2013 02:03:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253022 - head/sys/sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 02:03:19 -0000

Author: markj
Date: Mon Jul  8 02:03:18 2013
New Revision: 253022
URL: http://svnweb.freebsd.org/changeset/base/253022

Log:
  Also define SDT_PROBE_DEFINE0 for the !KDTRACE_HOOKS case.

Modified:
  head/sys/sys/sdt.h

Modified: head/sys/sys/sdt.h
==============================================================================
--- head/sys/sys/sdt.h	Mon Jul  8 01:51:17 2013	(r253021)
+++ head/sys/sys/sdt.h	Mon Jul  8 02:03:18 2013	(r253022)
@@ -86,6 +86,7 @@
 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
 #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type)
 
+#define	SDT_PROBE_DEFINE0(prov, mod, func, name, sname)
 #define	SDT_PROBE_DEFINE1(prov, mod, func, name, sname, arg0)
 #define	SDT_PROBE_DEFINE2(prov, mod, func, name, sname, arg0, arg1)
 #define	SDT_PROBE_DEFINE3(prov, mod, func, name, sname, arg0, arg1, arg2)

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 02:08:27 2013
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: by hub.freebsd.org (Postfix, from userid 1033)
 id F3432773; Mon,  8 Jul 2013 02:08:26 +0000 (UTC)
Date: Mon, 8 Jul 2013 02:08:26 +0000
From: Alexey Dokuchaev 
To: Andriy Gapon 
Subject: Re: svn commit: r253002 - head
Message-ID: <20130708020826.GA31063@FreeBSD.org>
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org> <51D9E069.5060300@FreeBSD.org>
 <51D9E2C0.6060603@freebsd.org> <51D9E57F.3090803@FreeBSD.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <51D9E57F.3090803@FreeBSD.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" ,
 Garrett Cooper 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 02:08:27 -0000

On Mon, Jul 08, 2013 at 01:02:39AM +0300, Andriy Gapon wrote:
> I am sure that the next time you need to run the same thing you'll remember
> where you put the comment and you'll copy/paste from it.
> I am sure that if any other developer runs into the same situation, then he
> will:
> - google
> - ask on irc
> - ask on mailing lists
> - perhaps even read build(7)
> 
> I am sure that looking through the Makefile would be one of the last things
> on his mind.

It's quite on the contrary.  First people reach for comments/documentation;
only as a last resort they will use Google or ask on MLs.  Bad documentation
is probably one of the key of Google's success. :-)

./danfe

P.S.  You gotta be kidding us, right?

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 02:25:42 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 370C3C4A;
 Mon,  8 Jul 2013 02:25:42 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pb0-x22c.google.com (mail-pb0-x22c.google.com
 [IPv6:2607:f8b0:400e:c01::22c])
 by mx1.freebsd.org (Postfix) with ESMTP id 0306C113D;
 Mon,  8 Jul 2013 02:25:41 +0000 (UTC)
Received: by mail-pb0-f44.google.com with SMTP id uo1so3771427pbc.3
 for ; Sun, 07 Jul 2013 19:25:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=references:mime-version:in-reply-to:content-type
 :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date
 :to; bh=wpe7sdh37y6H4iUp/M/B/NHJpQDl/3HMVFXv0ypAx3c=;
 b=HSnqzRY+mU33snJhe4nuk10aZ9mbIyfpDyw1LxFbu8mrUG4MpYU/z6q+TAdBY/EtzY
 I5unqSYIobmcachfCs5IOqcbGUw/E8ELr6YRCDceW11Dp9hMj7YrMZgvSty+ar97X4u3
 m+zgkYNQW1hx33h/D5CrhsuIxqotGGjRx9wLF+v+6phdjUpioxkBPIEQ73sODqpYdbwp
 0I3I89Hi2Nq27dq7RvCfMeZZoLCgpLnS3hPgSRohYDZlbcHSITIV22xjZhHi/wWcFd88
 9/2RfL97EUM/5fnJ/tvS+K2uVBdAf2yAiEJURfQfjAMf764vo2gdlXAv7gpQI7pucf/0
 p7Dg==
X-Received: by 10.66.164.232 with SMTP id yt8mr20952389pab.21.1373250341084;
 Sun, 07 Jul 2013 19:25:41 -0700 (PDT)
Received: from [10.198.134.121] (mobile-166-147-081-246.mycingular.net.
 [166.147.81.246])
 by mx.google.com with ESMTPSA id py6sm19535752pbb.33.2013.07.07.19.25.39
 for 
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Sun, 07 Jul 2013 19:25:40 -0700 (PDT)
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org>
Mime-Version: 1.0 (1.0)
In-Reply-To: <51D9DA55.2090808@freebsd.org>
Content-Type: text/plain;
	charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Message-Id: 
X-Mailer: iPhone Mail (10B329)
From: Garrett Cooper 
Subject: Re: svn commit: r253002 - head
Date: Sun, 7 Jul 2013 19:25:34 -0700
To: Alfred Perlstein 
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 02:25:42 -0000

On Jul 7, 2013, at 2:15 PM, Alfred Perlstein  wrote:

> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>> Why the magic number 12?
>=20
> Numbers higher seem to result in worse performance as reported by some mem=
bers of my team.

The suggestion is good in spirit, but this doesn't justify the reasoning for=
 this recommendation for all cases.

Please revert this change and add a doc page or notes to the dev handbook di=
scussing what the empirical process and results were for determining this va=
lue so people can come up with their own values that work best with their ha=
rdware and software config. This recommendation is prone to bitrot like some=
 of the recommendations in tuning(7).

Misinformation is sometimes more harmful than no information.

Thanks,
-Garrett=

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 04:27:04 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 5C1E29A9;
 Mon,  8 Jul 2013 04:27:04 +0000 (UTC)
 (envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4EE6E1702;
 Mon,  8 Jul 2013 04:27:04 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r684R3ER069047;
 Mon, 8 Jul 2013 04:27:03 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r684R31T069046;
 Mon, 8 Jul 2013 04:27:03 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <201307080427.r684R31T069046@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Mon, 8 Jul 2013 04:27:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253023 - head/sys/arm/ti
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 04:27:04 -0000

Author: gonzo
Date: Mon Jul  8 04:27:03 2013
New Revision: 253023
URL: http://svnweb.freebsd.org/changeset/base/253023

Log:
  - AM335x requires updated soft-reset logic too

Modified:
  head/sys/arm/ti/ti_mmchs.c

Modified: head/sys/arm/ti/ti_mmchs.c
==============================================================================
--- head/sys/arm/ti/ti_mmchs.c	Mon Jul  8 02:03:18 2013	(r253022)
+++ head/sys/arm/ti/ti_mmchs.c	Mon Jul  8 04:27:03 2013	(r253023)
@@ -213,10 +213,13 @@ ti_mmchs_reset_controller(struct ti_mmch
 	sysctl = ti_mmchs_read_4(sc, MMCHS_SYSCTL);
 	ti_mmchs_write_4(sc, MMCHS_SYSCTL, sysctl | bit);
 
-	if ((ti_chip() == CHIP_OMAP_4) && (ti_revision() > OMAP4430_REV_ES1_0)) {
-		/* OMAP4 ES2 and greater has an updated reset logic.
-		 * Monitor a 0->1 transition first
-		 */
+
+	/* 
+	 * AM335x and OMAP4 ES2 and greater has an updated reset logic.
+	 * Monitor a 0->1 transition first
+	 */
+	if ((ti_chip() == CHIP_AM335X) || 
+	    ((ti_chip() == CHIP_OMAP_4) && (ti_revision() > OMAP4430_REV_ES1_0))) {
 		attempts = 10000;
 		while (!(ti_mmchs_read_4(sc, MMCHS_SYSCTL) & bit) && (attempts-- > 0))
 			continue;

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 04:30:13 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 7345CB1E;
 Mon,  8 Jul 2013 04:30:13 +0000 (UTC)
 (envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 66166171F;
 Mon,  8 Jul 2013 04:30:13 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r684UDIE069649;
 Mon, 8 Jul 2013 04:30:13 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r684UDap069648;
 Mon, 8 Jul 2013 04:30:13 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <201307080430.r684UDap069648@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Mon, 8 Jul 2013 04:30:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253024 - head/sys/boot/fdt/dts
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 04:30:13 -0000

Author: gonzo
Date: Mon Jul  8 04:30:12 2013
New Revision: 253024
URL: http://svnweb.freebsd.org/changeset/base/253024

Log:
  - MMC1 (internal eMMC) pins should be configured as input-pullup, except
      for reset pin

Modified:
  head/sys/boot/fdt/dts/beaglebone-black.dts

Modified: head/sys/boot/fdt/dts/beaglebone-black.dts
==============================================================================
--- head/sys/boot/fdt/dts/beaglebone-black.dts	Mon Jul  8 04:27:03 2013	(r253023)
+++ head/sys/boot/fdt/dts/beaglebone-black.dts	Mon Jul  8 04:30:12 2013	(r253024)
@@ -76,17 +76,17 @@
 				"MMC0_DAT2", "mmc0_dat2", "input_pullup",
 				"MMC0_DAT3", "mmc0_dat3", "input_pullup",
 				/* MMC1 */
-				"GPMC_CSn1", "mmc1_clk", "input_pulldown",
-				"GPMC_CSn2", "mmc1_cmd", "input_pulldown",
-				"GPMC_CSn3", "gpio2_0", "output", /* Reset */
-				"GPMC_AD0", "mmc1_dat0", "input_pulldown",
-				"GPMC_AD1", "mmc1_dat1", "input_pulldown",
-				"GPMC_AD2", "mmc1_dat2", "input_pulldown",
-				"GPMC_AD3", "mmc1_dat3", "input_pulldown",
-				"GPMC_AD4", "mmc1_dat4", "input_pulldown",
-				"GPMC_AD5", "mmc1_dat5", "input_pulldown",
-				"GPMC_AD6", "mmc1_dat6", "input_pulldown",
-				"GPMC_AD7", "mmc1_dat7", "input_pulldown",
+				"GPMC_CSn1", "mmc1_clk", "input_pullup",
+				"GPMC_CSn2", "mmc1_cmd", "input_pullup",
+				"GPMC_CSn3", "gpio2_0", "output_pullup", /* Reset */
+				"GPMC_AD0", "mmc1_dat0", "input_pullup",
+				"GPMC_AD1", "mmc1_dat1", "input_pullup",
+				"GPMC_AD2", "mmc1_dat2", "input_pullup",
+				"GPMC_AD3", "mmc1_dat3", "input_pullup",
+				"GPMC_AD4", "mmc1_dat4", "input_pullup",
+				"GPMC_AD5", "mmc1_dat5", "input_pullup",
+				"GPMC_AD6", "mmc1_dat6", "input_pullup",
+				"GPMC_AD7", "mmc1_dat7", "input_pullup",
 				/* GPIO */
 				"ECAP0_IN_PWM0_OUT", "gpio0_7", "input_pulldown",
 				"GPMC_AD10", "gpio0_26", "input_pulldown",

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 05:06:33 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 75F3EF94;
 Mon,  8 Jul 2013 05:06:33 +0000 (UTC)
 (envelope-from gonzo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 68E8D180F;
 Mon,  8 Jul 2013 05:06:33 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6856XB8080531;
 Mon, 8 Jul 2013 05:06:33 GMT (envelope-from gonzo@svn.freebsd.org)
Received: (from gonzo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6856X34080530;
 Mon, 8 Jul 2013 05:06:33 GMT (envelope-from gonzo@svn.freebsd.org)
Message-Id: <201307080506.r6856X34080530@svn.freebsd.org>
From: Oleksandr Tymoshenko 
Date: Mon, 8 Jul 2013 05:06:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253025 - head/sys/arm/ti/am335x
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 05:06:33 -0000

Author: gonzo
Date: Mon Jul  8 05:06:32 2013
New Revision: 253025
URL: http://svnweb.freebsd.org/changeset/base/253025

Log:
  Add IDs for TPS65217C and TPS65217D

Modified:
  head/sys/arm/ti/am335x/am335x_pmic.c

Modified: head/sys/arm/ti/am335x/am335x_pmic.c
==============================================================================
--- head/sys/arm/ti/am335x/am335x_pmic.c	Mon Jul  8 04:30:12 2013	(r253024)
+++ head/sys/arm/ti/am335x/am335x_pmic.c	Mon Jul  8 05:06:32 2013	(r253025)
@@ -50,6 +50,8 @@ __FBSDID("$FreeBSD$");
 
 #define TPS65217A		0x7
 #define TPS65217B		0xF
+#define TPS65217C		0xE
+#define TPS65217D		0x6
 
 /* TPS65217 Reisters */
 #define TPS65217_CHIPID_REG	0x00
@@ -131,6 +133,12 @@ am335x_pmic_start(void *xdev)
 		case TPS65217B:
 			sprintf(name, "TPS65217B ver 1.%u", reg & 0xF);
 			break;
+		case TPS65217C:
+			sprintf(name, "TPS65217C ver 1.%u", reg & 0xF);
+			break;
+		case TPS65217D:
+			sprintf(name, "TPS65217D ver 1.%u", reg & 0xF);
+			break;
 		default:
 			sprintf(name, "Unknown PMIC");
 	}

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 05:58:09 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id CE16B86F;
 Mon,  8 Jul 2013 05:58:09 +0000 (UTC)
 (envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BFD27199D;
 Mon,  8 Jul 2013 05:58:09 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r685w9oV094881;
 Mon, 8 Jul 2013 05:58:09 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r685w9uA094880;
 Mon, 8 Jul 2013 05:58:09 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201307080558.r685w9uA094880@svn.freebsd.org>
From: Joel Dahl 
Date: Mon, 8 Jul 2013 05:58:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253026 - head/share/man/man9
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 05:58:09 -0000

Author: joel (doc committer)
Date: Mon Jul  8 05:58:09 2013
New Revision: 253026
URL: http://svnweb.freebsd.org/changeset/base/253026

Log:
  mdoc: remove superfluous paragraph macros.

Modified:
  head/share/man/man9/SDT.9

Modified: head/share/man/man9/SDT.9
==============================================================================
--- head/share/man/man9/SDT.9	Mon Jul  8 05:06:32 2013	(r253025)
+++ head/share/man/man9/SDT.9	Mon Jul  8 05:58:09 2013	(r253026)
@@ -54,7 +54,6 @@
 .Fn SDT_PROBE6 prov mod func name arg0 arg1 arg2 arg3 arg4 arg5
 .Fn SDT_PROBE7 prov mod func name arg0 arg1 arg2 arg3 arg4 arg5 arg6
 .Sh DESCRIPTION
-.Pp
 The
 .Nm
 macros allow programmers to define static trace points in kernel code.
@@ -158,7 +157,6 @@ trace points.
 They are meant to be added to executable code and can be used to instrument the
 code in which they are called.
 .Sh EXAMPLES
-.Pp
 The following probe definition will create a DTrace probe called
 .Ql icmp::unreach:pkt-receive ,
 which would hypothetically be triggered when the kernel receives an ICMP packet
@@ -216,7 +214,6 @@ framework were originally ported to Free
 This manual page was written by
 .An Mark Johnston Aq markj@FreeBSD.org .
 .Sh BUGS
-.Pp
 The
 .Nm
 macros allow the module name of a probe to be specified as part of a probe

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 06:10:29 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id B407ADD8;
 Mon,  8 Jul 2013 06:10:29 +0000 (UTC)
 (envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id A67921A17;
 Mon,  8 Jul 2013 06:10:29 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r686ATu3098677;
 Mon, 8 Jul 2013 06:10:29 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r686ATWI098676;
 Mon, 8 Jul 2013 06:10:29 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201307080610.r686ATWI098676@svn.freebsd.org>
From: Adrian Chadd 
Date: Mon, 8 Jul 2013 06:10:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253027 - head/sys/mips/atheros
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 06:10:29 -0000

Author: adrian
Date: Mon Jul  8 06:10:29 2013
New Revision: 253027
URL: http://svnweb.freebsd.org/changeset/base/253027

Log:
  Add AR9341, AR9342, AR9344 SoC types.

Modified:
  head/sys/mips/atheros/ar71xx_setup.h

Modified: head/sys/mips/atheros/ar71xx_setup.h
==============================================================================
--- head/sys/mips/atheros/ar71xx_setup.h	Mon Jul  8 05:58:09 2013	(r253026)
+++ head/sys/mips/atheros/ar71xx_setup.h	Mon Jul  8 06:10:29 2013	(r253027)
@@ -41,6 +41,9 @@ enum ar71xx_soc_type {
 	AR71XX_SOC_AR9132,
 	AR71XX_SOC_AR9330,
 	AR71XX_SOC_AR9331,
+	AR71XX_SOC_AR9341,
+	AR71XX_SOC_AR9342,
+	AR71XX_SOC_AR9344,
 };
 extern enum ar71xx_soc_type ar71xx_soc;   
 

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 06:12:39 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 6BB0BF19;
 Mon,  8 Jul 2013 06:12:39 +0000 (UTC)
 (envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 5D6AA1A24;
 Mon,  8 Jul 2013 06:12:39 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r686Cdew000601;
 Mon, 8 Jul 2013 06:12:39 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r686Cdt4000600;
 Mon, 8 Jul 2013 06:12:39 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201307080612.r686Cdt4000600@svn.freebsd.org>
From: Adrian Chadd 
Date: Mon, 8 Jul 2013 06:12:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253028 - head/sys/mips/atheros
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 06:12:39 -0000

Author: adrian
Date: Mon Jul  8 06:12:38 2013
New Revision: 253028
URL: http://svnweb.freebsd.org/changeset/base/253028

Log:
  Import the initial SoC register definitions for the AR934x MIPS74k SoC.
  
  Obtained from:	Linux/OpenWRT

Added:
  head/sys/mips/atheros/ar934xreg.h   (contents, props changed)

Added: head/sys/mips/atheros/ar934xreg.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/mips/atheros/ar934xreg.h	Mon Jul  8 06:12:38 2013	(r253028)
@@ -0,0 +1,156 @@
+/*-
+ * Copyright (c) 2013 Adrian Chadd 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef	__AR934X_REG_H__
+#define	__AR934X_REG_H__
+
+#define	AR934X_WMAC_BASE	(AR71XX_APB_BASE + 0x00100000)
+#define	AR934X_WMAC_SIZE	0x20000
+#define	AR934X_EHCI_BASE	0x1b000000
+#define	AR934X_EHCI_SIZE	0x200
+#define	AR934X_SRIF_BASE	(AR71XX_APB_BASE + 0x00116000)
+#define	AR934X_SRIF_SIZE	0x1000
+
+#define	AR934X_DDR_REG_FLUSH_GE0	(AR71XX_APB_BASE + 0x9c)
+#define	AR934X_DDR_REG_FLUSH_GE1	(AR71XX_APB_BASE + 0xa0)
+#define	AR934X_DDR_REG_FLUSH_USB	(AR71XX_APB_BASE + 0xa4)
+#define	AR934X_DDR_REG_FLUSH_PCIE	(AR71XX_APB_BASE + 0xa8)
+#define	AR934X_DDR_REG_FLUSH_WMAC	(AR71XX_APB_BASE + 0xac)
+
+#define	AR934X_PLL_CPU_CONFIG_REG	(AR71XX_PLL_CPU_BASE + 0x00)
+#define	AR934X_PLL_DDR_CONFIG_REG	(AR71XX_PLL_CPU_BASE + 0x04)
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_REG	(AR71XX_PLL_CPU_BASE + 0x08)
+
+#define	AR934X_PLL_CPU_CONFIG_NFRAC_SHIFT	0
+#define	AR934X_PLL_CPU_CONFIG_NFRAC_MASK	0x3f
+#define	AR934X_PLL_CPU_CONFIG_NINT_SHIFT	6
+#define	AR934X_PLL_CPU_CONFIG_NINT_MASK		0x3f
+#define	AR934X_PLL_CPU_CONFIG_REFDIV_SHIFT	12
+#define	AR934X_PLL_CPU_CONFIG_REFDIV_MASK	0x1f
+#define	AR934X_PLL_CPU_CONFIG_OUTDIV_SHIFT	19
+#define	AR934X_PLL_CPU_CONFIG_OUTDIV_MASK	0x3
+
+#define	AR934X_PLL_DDR_CONFIG_NFRAC_SHIFT	0
+#define	AR934X_PLL_DDR_CONFIG_NFRAC_MASK	0x3ff
+#define	AR934X_PLL_DDR_CONFIG_NINT_SHIFT	10
+#define	AR934X_PLL_DDR_CONFIG_NINT_MASK		0x3f
+#define	AR934X_PLL_DDR_CONFIG_REFDIV_SHIFT	16
+#define	AR934X_PLL_DDR_CONFIG_REFDIV_MASK	0x1f
+#define	AR934X_PLL_DDR_CONFIG_OUTDIV_SHIFT	23
+#define	AR934X_PLL_DDR_CONFIG_OUTDIV_MASK	0x7
+
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_PLL_BYPASS	(1 << 2)
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_PLL_BYPASS	(1 << 3)
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_PLL_BYPASS	(1 << 4)
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_POST_DIV_SHIFT	5
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_POST_DIV_MASK	0x1f
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_POST_DIV_SHIFT	10
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_POST_DIV_MASK	0x1f
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_POST_DIV_SHIFT	15
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_POST_DIV_MASK	0x1f
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_CPUCLK_FROM_CPUPLL	(1 << 20)
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_DDRCLK_FROM_DDRPLL	(1 << 21)
+#define	AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL	(1 << 24)
+
+#define	AR934X_RESET_REG_RESET_MODULE		(AR71XX_RST_BLOCK_BASE + 0x1c)
+#define	AR934X_RESET_REG_BOOTSTRAP		(AR71XX_RST_BLOCK_BASE + 0xb0)
+#define	AR934X_RESET_REG_PCIE_WMAC_INT_STATUS	(AR71XX_RST_BLOCK_BASE + 0xac)
+
+#define	AR934X_RESET_USB_PHY_ANALOG	(1 << 11)
+#define	AR934X_RESET_USB_HOST		(1 << 5)
+#define	AR934X_RESET_USB_PHY		(1 << 4)
+#define	AR934X_RESET_USBSUS_OVERRIDE	(1 << 3)
+
+#define	AR934X_BOOTSTRAP_SW_OPTION8	(1 << 23)
+#define	AR934X_BOOTSTRAP_SW_OPTION7	(1 << 22)
+#define	AR934X_BOOTSTRAP_SW_OPTION6	(1 << 21)
+#define	AR934X_BOOTSTRAP_SW_OPTION5	(1 << 20)
+#define	AR934X_BOOTSTRAP_SW_OPTION4	(1 << 19)
+#define	AR934X_BOOTSTRAP_SW_OPTION3	(1 << 18)
+#define	AR934X_BOOTSTRAP_SW_OPTION2	(1 << 17)
+#define	AR934X_BOOTSTRAP_SW_OPTION1	(1 << 16)
+#define	AR934X_BOOTSTRAP_USB_MODE_DEVICE	(1 << 7)
+#define	AR934X_BOOTSTRAP_PCIE_RC	(1 << 6)
+#define	AR934X_BOOTSTRAP_EJTAG_MODE	(1 << 5)
+#define	AR934X_BOOTSTRAP_REF_CLK_40	(1 << 4)
+#define	AR934X_BOOTSTRAP_BOOT_FROM_SPI	(1 << 2)
+#define	AR934X_BOOTSTRAP_SDRAM_DISABLED	(1 << 1)
+#define	AR934X_BOOTSTRAP_DDR1		(1 << 0)
+
+#define	AR934X_PCIE_WMAC_INT_WMAC_MISC	(1 << 0)
+#define	AR934X_PCIE_WMAC_INT_WMAC_TX	(1 << 1)
+#define	AR934X_PCIE_WMAC_INT_WMAC_RXLP	(1 << 2)
+#define	AR934X_PCIE_WMAC_INT_WMAC_RXHP	(1 << 3)
+#define	AR934X_PCIE_WMAC_INT_PCIE_RC	(1 << 4)
+#define	AR934X_PCIE_WMAC_INT_PCIE_RC0	(1 << 5)
+#define	AR934X_PCIE_WMAC_INT_PCIE_RC1	(1 << 6)
+#define	AR934X_PCIE_WMAC_INT_PCIE_RC2	(1 << 7)
+#define	AR934X_PCIE_WMAC_INT_PCIE_RC3	(1 << 8)
+#define	AR934X_PCIE_WMAC_INT_WMAC_ALL \
+        (AR934X_PCIE_WMAC_INT_WMAC_MISC | AR934X_PCIE_WMAC_INT_WMAC_TX | \
+         AR934X_PCIE_WMAC_INT_WMAC_RXLP | AR934X_PCIE_WMAC_INT_WMAC_RXHP)
+
+#define	AR934X_PCIE_WMAC_INT_PCIE_ALL \
+        (AR934X_PCIE_WMAC_INT_PCIE_RC | AR934X_PCIE_WMAC_INT_PCIE_RC0 | \
+         AR934X_PCIE_WMAC_INT_PCIE_RC1 | AR934X_PCIE_WMAC_INT_PCIE_RC2 | \
+         AR934X_PCIE_WMAC_INT_PCIE_RC3)
+
+#define	REV_ID_MAJOR_AR9341		0x0120
+#define	REV_ID_MAJOR_AR9342		0x1120
+#define	REV_ID_MAJOR_AR9344		0x2120
+
+#define	AR934X_REV_ID_REVISION_MASK     0xf
+
+/*
+ * GPIO block
+ */
+#define	AR934X_GPIO_REG_FUNC		0x6c
+#define	AR934X_GPIO_COUNT		23
+
+/*
+ * SRIF block
+ */
+#define	AR934X_SRIF_CPU_DPLL1_REG	(AR934X_SRIF_BASE + 0x1c0)
+#define	AR934X_SRIF_CPU_DPLL2_REG	(AR934X_SRIF_BASE + 0x1c4)
+#define	AR934X_SRIF_CPU_DPLL3_REG	(AR934X_SRIF_BASE + 0x1c8)
+
+#define	AR934X_SRIF_DDR_DPLL1_REG	(AR934X_SRIF_BASE + 0x240)
+#define	AR934X_SRIF_DDR_DPLL2_REG	(AR934X_SRIF_BASE + 0x244)
+#define	AR934X_SRIF_DDR_DPLL3_REG	(AR934X_SRIF_BASE + 0x248)
+
+#define	AR934X_SRIF_DPLL1_REFDIV_SHIFT	27
+#define	AR934X_SRIF_DPLL1_REFDIV_MASK	0x1f
+#define	AR934X_SRIF_DPLL1_NINT_SHIFT	18
+#define	AR934X_SRIF_DPLL1_NINT_MASK	0x1ff
+#define	AR934X_SRIF_DPLL1_NFRAC_MASK	0x0003ffff
+
+#define	AR934X_SRIF_DPLL2_LOCAL_PLL	(1 << 30)
+#define	AR934X_SRIF_DPLL2_OUTDIV_SHIFT	13
+#define	AR934X_SRIF_DPLL2_OUTDIV_MASK	0x7
+
+#endif	/* __AR934X_REG_H__ */

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 06:23:32 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 903885A4;
 Mon,  8 Jul 2013 06:23:32 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-vb0-x22c.google.com (mail-vb0-x22c.google.com
 [IPv6:2607:f8b0:400c:c02::22c])
 by mx1.freebsd.org (Postfix) with ESMTP id 1D0551AA9;
 Mon,  8 Jul 2013 06:23:32 +0000 (UTC)
Received: by mail-vb0-f44.google.com with SMTP id e15so3099329vbg.31
 for ; Sun, 07 Jul 2013 23:23:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type:content-transfer-encoding;
 bh=pZprHLhgQ7qljIiJE1K2R0/hlLLIgXYc59qNeR3shLc=;
 b=XoMlzBFLd8bfDECQIbWgmZRomBA11aE+2wzrm7gZh98A/8H/cfrtAhBZPukRRH/suM
 ga9HX5mPdzwxyS26tLxfGq6Oj3mL6IcSWy4fginLJwaFNUz3DtQKn19fRiVGWoxrzGMQ
 DT0rUc7JHEgtcIIgrijyXNXcidi9OWLOtnZ9h4kQMWpufOPcrO+k98Kev+Uscyn76/Zs
 yoFUeHL/mG6VYEHT/bpsAvZbJpMGgzV3L/cvkMTLUjpRjFD62sESRt9vxJQ5dXKnQWfX
 vHF0P1YzfZ5NeGSoTwfaZA/KHIbWPtn9k7khgdnN1DEedYGx+s6xeEPUh5zeN7W9QzoA
 y5Sw==
MIME-Version: 1.0
X-Received: by 10.221.5.71 with SMTP id of7mr13147599vcb.39.1373264611572;
 Sun, 07 Jul 2013 23:23:31 -0700 (PDT)
Received: by 10.220.146.145 with HTTP; Sun, 7 Jul 2013 23:23:31 -0700 (PDT)
In-Reply-To: 
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org>
 
Date: Sun, 7 Jul 2013 23:23:31 -0700
Message-ID: 
Subject: Re: svn commit: r253002 - head
From: Garrett Cooper 
To: Alfred Perlstein 
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 06:23:32 -0000

On Sun, Jul 7, 2013 at 7:25 PM, Garrett Cooper  wrot=
e:
> On Jul 7, 2013, at 2:15 PM, Alfred Perlstein  wrote:
>
>> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>>> Why the magic number 12?
>>
>> Numbers higher seem to result in worse performance as reported by some m=
embers of my team.
>
> The suggestion is good in spirit, but this doesn't justify the reasoning =
for this recommendation for all cases.
>
> Please revert this change and add a doc page or notes to the dev handbook=
 discussing what the empirical process and results were for determining thi=
s value so people can come up with their own values that work best with the=
ir hardware and software config. This recommendation is prone to bitrot lik=
e some of the recommendations in tuning(7).
>
> Misinformation is sometimes more harmful than no information.

I spoke with Alfred over the phone and did some more careful thought
about this and I'm rescinding this request.

Alfred did a good job at documenting how JFLAG works (it was
previously undocumented). My concern over -j12 was performance
related, and after giving things more careful thought it actually
makes sense why -j12 was chosen because Westmere and newer processors
have issues with NUMA and cache locality between multiple processor
packages as we've seen non-empirically and empirically at Isilon with
FreeBSD 7 and 10 (it's a known issue that jeffr@ and jhb@ are aware
of).

I'll come up with a concise patch that does what Alfred was trying to
achieve and have Alfred review it.

Thanks (and thank you Alfred for the contribution!!!)!
-Garrett

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 15:28:09 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id BC6A9DBF;
 Mon,  8 Jul 2013 15:28:09 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id ABDA618B1;
 Mon,  8 Jul 2013 15:28:09 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68FS9f3015739;
 Mon, 8 Jul 2013 15:28:09 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68FS9IX015736;
 Mon, 8 Jul 2013 15:28:09 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201307081528.r68FS9IX015736@svn.freebsd.org>
From: Alexander Motin 
Date: Mon, 8 Jul 2013 15:28:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253036 - head/sys/dev/sound/pci/hda
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 15:28:09 -0000

Author: mav
Date: Mon Jul  8 15:28:09 2013
New Revision: 253036
URL: http://svnweb.freebsd.org/changeset/base/253036

Log:
  Add quirk to configure headphones redirection on ASUS UX31A laptop.
  
  MFC after:	3 days

Modified:
  head/sys/dev/sound/pci/hda/hdaa_patches.c
  head/sys/dev/sound/pci/hda/hdac.h

Modified: head/sys/dev/sound/pci/hda/hdaa_patches.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa_patches.c	Mon Jul  8 13:24:18 2013	(r253035)
+++ head/sys/dev/sound/pci/hda/hdaa_patches.c	Mon Jul  8 15:28:09 2013	(r253036)
@@ -368,6 +368,13 @@ hdac_pin_patch(struct hdaa_widget *w)
 			patch = "as=1 seq=15";
 			break;
 		}
+	} else if (id == HDA_CODEC_ALC269 &&
+	    subid == ASUS_UX31A_SUBVENDOR) {
+		switch (nid) {
+		case 33:
+			patch = "as=1 seq=15";
+			break;
+		}
 	}
 
 	if (patch != NULL)

Modified: head/sys/dev/sound/pci/hda/hdac.h
==============================================================================
--- head/sys/dev/sound/pci/hda/hdac.h	Mon Jul  8 13:24:18 2013	(r253035)
+++ head/sys/dev/sound/pci/hda/hdac.h	Mon Jul  8 15:28:09 2013	(r253036)
@@ -198,6 +198,7 @@
 #define ASUS_F3JC_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1338)
 #define ASUS_G2K_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1339)
 #define ASUS_A7T_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x13c2)
+#define ASUS_UX31A_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1517)
 #define ASUS_W2J_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1971)
 #define ASUS_M5200_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x1993)
 #define ASUS_P5PL2_SUBVENDOR	HDA_MODEL_CONSTRUCT(ASUS, 0x817f)

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 16:03:19 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 45AA78E4;
 Mon,  8 Jul 2013 16:03:19 +0000 (UTC)
 (envelope-from hiren@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 36E831A2D;
 Mon,  8 Jul 2013 16:03:19 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68G3J4h027102;
 Mon, 8 Jul 2013 16:03:19 GMT (envelope-from hiren@svn.freebsd.org)
Received: (from hiren@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68G3Jm7027100;
 Mon, 8 Jul 2013 16:03:19 GMT (envelope-from hiren@svn.freebsd.org)
Message-Id: <201307081603.r68G3Jm7027100@svn.freebsd.org>
From: Hiren Panchasara 
Date: Mon, 8 Jul 2013 16:03:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253040 - head/contrib/wpa/src/rsn_supp
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 16:03:19 -0000

Author: hiren
Date: Mon Jul  8 16:03:18 2013
New Revision: 253040
URL: http://svnweb.freebsd.org/changeset/base/253040

Log:
  Move to MSG_DEBUG to print it via syslog only when requested.
  
  Reviewed by:	rpaulo, adrian
  Approved by:	sbruno (mentor)

Modified:
  head/contrib/wpa/src/rsn_supp/wpa.c

Modified: head/contrib/wpa/src/rsn_supp/wpa.c
==============================================================================
--- head/contrib/wpa/src/rsn_supp/wpa.c	Mon Jul  8 16:02:03 2013	(r253039)
+++ head/contrib/wpa/src/rsn_supp/wpa.c	Mon Jul  8 16:03:18 2013	(r253040)
@@ -1348,7 +1348,7 @@ static void wpa_supplicant_process_1_of_
 		goto failed;
 
 	if (rekey) {
-		wpa_msg(sm->ctx->msg_ctx, MSG_INFO, "WPA: Group rekeying "
+		wpa_msg(sm->ctx->msg_ctx, MSG_DEBUG, "WPA: Group rekeying "
 			"completed with " MACSTR " [GTK=%s]",
 			MAC2STR(sm->bssid), wpa_cipher_txt(sm->group_cipher));
 		wpa_sm_cancel_auth_timeout(sm);

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 17:57:12 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 09F6C56A;
 Mon,  8 Jul 2013 17:57:12 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id EEF601F0B;
 Mon,  8 Jul 2013 17:57:11 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68HvBsg059786;
 Mon, 8 Jul 2013 17:57:11 GMT (envelope-from dim@svn.freebsd.org)
Received: (from dim@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68HvB2i059785;
 Mon, 8 Jul 2013 17:57:11 GMT (envelope-from dim@svn.freebsd.org)
Message-Id: <201307081757.r68HvB2i059785@svn.freebsd.org>
From: Dimitry Andric 
Date: Mon, 8 Jul 2013 17:57:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253042 - head/contrib/llvm/lib/CodeGen/SelectionDAG
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 17:57:12 -0000

Author: dim
Date: Mon Jul  8 17:57:11 2013
New Revision: 253042
URL: http://svnweb.freebsd.org/changeset/base/253042

Log:
  Pull in r185616 from llvm trunk:
  
    FastISel can only append to basic blocks.
  
    Compute the insertion point from the end of the basic block instead of
    skipping labels from the front.
  
    This caused failures in landing pads when live-in copies where inserted
    before instruction selection.
  
  I missed this change in r252720; without it, certain compilation flags
  can cause exception labels to not be generated, but still referenced,
  leading to link errors.
  
  Reported by:	zeising
  MFC after:	3 days

Modified:
  head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp

Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
==============================================================================
--- head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp	Mon Jul  8 17:20:05 2013	(r253041)
+++ head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp	Mon Jul  8 17:57:11 2013	(r253042)
@@ -75,15 +75,12 @@ STATISTIC(NumFastIselDead, "Number of de
 void FastISel::startNewBlock() {
   LocalValueMap.clear();
 
+  // Instructions are appended to FuncInfo.MBB. If the basic block already
+  // contains labels or copies, use the last instruction as the last local
+  // value.
   EmitStartPt = 0;
-
-  // Advance the emit start point past any EH_LABEL instructions.
-  MachineBasicBlock::iterator
-    I = FuncInfo.MBB->begin(), E = FuncInfo.MBB->end();
-  while (I != E && I->getOpcode() == TargetOpcode::EH_LABEL) {
-    EmitStartPt = I;
-    ++I;
-  }
+  if (!FuncInfo.MBB->empty())
+    EmitStartPt = &FuncInfo.MBB->back();
   LastLocalValue = EmitStartPt;
 }
 

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 20:21:36 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id CC6BF35F;
 Mon,  8 Jul 2013 20:21:36 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BE9261791;
 Mon,  8 Jul 2013 20:21:36 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68KLaAg005031;
 Mon, 8 Jul 2013 20:21:36 GMT (envelope-from pfg@svn.freebsd.org)
Received: (from pfg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68KLanT005030;
 Mon, 8 Jul 2013 20:21:36 GMT (envelope-from pfg@svn.freebsd.org)
Message-Id: <201307082021.r68KLanT005030@svn.freebsd.org>
From: "Pedro F. Giffuni" 
Date: Mon, 8 Jul 2013 20:21:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253045 - head/sys/fs/ext2fs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 20:21:36 -0000

Author: pfg
Date: Mon Jul  8 20:21:36 2013
New Revision: 253045
URL: http://svnweb.freebsd.org/changeset/base/253045

Log:
  Avoid a panic and return EINVAL instead.
  
  Merge from UFS r232692:
  syscall() fuzzing can trigger this panic.
  
  MFC after:	3 days

Modified:
  head/sys/fs/ext2fs/ext2_vnops.c

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c	Mon Jul  8 19:40:50 2013	(r253044)
+++ head/sys/fs/ext2fs/ext2_vnops.c	Mon Jul  8 20:21:36 2013	(r253045)
@@ -1598,11 +1598,11 @@ ext2_read(struct vop_read_args *ap)
 	} else if (vp->v_type != VREG && vp->v_type != VDIR)
 		panic("%s: type %d", "ext2_read", vp->v_type);
 #endif
+	if (uio->uio_resid < 0 || uio->uio_offset < 0)
+		return (EINVAL);
 	orig_resid = uio->uio_resid;
-	KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0"));
 	if (orig_resid == 0)
 		return (0);
-	KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0"));
 	fs = ip->i_e2fs;
 	if (uio->uio_offset < ip->i_size &&
 	    uio->uio_offset >= fs->e2fs_maxfilesize)

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 21:10:30 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 94A04CA3;
 Mon,  8 Jul 2013 21:10:30 +0000 (UTC)
 (envelope-from asomers@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 86B491950;
 Mon,  8 Jul 2013 21:10:30 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68LAUZ4019788;
 Mon, 8 Jul 2013 21:10:30 GMT (envelope-from asomers@svn.freebsd.org)
Received: (from asomers@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68LAUNu019787;
 Mon, 8 Jul 2013 21:10:30 GMT (envelope-from asomers@svn.freebsd.org)
Message-Id: <201307082110.r68LAUNu019787@svn.freebsd.org>
From: Alan Somers 
Date: Mon, 8 Jul 2013 21:10:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253046 - head/sbin/devd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 21:10:30 -0000

Author: asomers
Date: Mon Jul  8 21:10:30 2013
New Revision: 253046
URL: http://svnweb.freebsd.org/changeset/base/253046

Log:
  Correct the printf format specifier for total_events.
  Add __printflike argument checking for devdlog().
  
  Reported by: pjd
  Approved by: gibbs (co-mentor)

Modified:
  head/sbin/devd/devd.cc

Modified: head/sbin/devd/devd.cc
==============================================================================
--- head/sbin/devd/devd.cc	Mon Jul  8 20:21:36 2013	(r253045)
+++ head/sbin/devd/devd.cc	Mon Jul  8 21:10:30 2013	(r253046)
@@ -124,7 +124,8 @@ static volatile sig_atomic_t romeo_must_
 
 static const char *configfile = CF;
 
-static void devdlog(int priority, const char* message, ...);
+static void devdlog(int priority, const char* message, ...)
+	__printflike(2, 3);
 static void event_loop(void);
 static void usage(void);
 
@@ -969,7 +970,7 @@ event_loop(void)
 		}
 		rv = select(max_fd, &fds, NULL, NULL, &tv);
 		if (got_siginfo) {
-			devdlog(LOG_INFO, "Events received so far=%ld\n",
+			devdlog(LOG_INFO, "Events received so far=%u\n",
 			    total_events);
 			got_siginfo = 0;
 		}

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 21:17:21 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 36E2FC4;
 Mon,  8 Jul 2013 21:17:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 297191996;
 Mon,  8 Jul 2013 21:17:21 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68LHLET020936;
 Mon, 8 Jul 2013 21:17:21 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68LHL9O020935;
 Mon, 8 Jul 2013 21:17:21 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201307082117.r68LHL9O020935@svn.freebsd.org>
From: John Baldwin 
Date: Mon, 8 Jul 2013 21:17:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253047 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 21:17:21 -0000

Author: jhb
Date: Mon Jul  8 21:17:20 2013
New Revision: 253047
URL: http://svnweb.freebsd.org/changeset/base/253047

Log:
  Fix build with INVARIANT_SUPPORT enabled but not INVARIANTS.
  
  Reported by:	"Matthew D. Fuller" 

Modified:
  head/sys/kern/kern_rmlock.c

Modified: head/sys/kern/kern_rmlock.c
==============================================================================
--- head/sys/kern/kern_rmlock.c	Mon Jul  8 21:10:30 2013	(r253046)
+++ head/sys/kern/kern_rmlock.c	Mon Jul  8 21:17:20 2013	(r253047)
@@ -704,6 +704,10 @@ _rm_runlock_debug(struct rmlock *rm, str
 #endif
 
 #ifdef INVARIANT_SUPPORT
+#ifndef INVARIANTS
+#undef _rm_assert
+#endif
+
 /*
  * Note that this does not need to use witness_assert() for read lock
  * assertions since an exact count of read locks held by this thread

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 21:25:13 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 91345536;
 Mon,  8 Jul 2013 21:25:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 692A219F9;
 Mon,  8 Jul 2013 21:25:13 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r68LPDeS023496;
 Mon, 8 Jul 2013 21:25:13 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r68LPDlY023493;
 Mon, 8 Jul 2013 21:25:13 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <201307082125.r68LPDlY023493@svn.freebsd.org>
From: John Baldwin 
Date: Mon, 8 Jul 2013 21:25:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253048 - in head/sys/ofed: drivers/net/mlx4 include/linux
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 21:25:13 -0000

Author: jhb
Date: Mon Jul  8 21:25:12 2013
New Revision: 253048
URL: http://svnweb.freebsd.org/changeset/base/253048

Log:
  Allow mlx4 devices to switch from Ethernet to Infiniband (and vice versa):
  - Fix sysctl wrapper for sysfs attributes to properly handle new string
    values similar to sysctl_handle_string() (only copyin the user's
    supplied length and nul-terminate the string).
  - Don't check for a trailing newline when evaluating the desired operating
    mode of a mlx4 device.
  
  PR:		kern/179999
  Submitted by:	Shahar Klein 
  MFC after:	1 week

Modified:
  head/sys/ofed/drivers/net/mlx4/main.c
  head/sys/ofed/include/linux/sysfs.h

Modified: head/sys/ofed/drivers/net/mlx4/main.c
==============================================================================
--- head/sys/ofed/drivers/net/mlx4/main.c	Mon Jul  8 21:17:20 2013	(r253047)
+++ head/sys/ofed/drivers/net/mlx4/main.c	Mon Jul  8 21:25:12 2013	(r253048)
@@ -479,11 +479,11 @@ static ssize_t set_port_type(struct devi
 	int i;
 	int err = 0;
 
-	if (!strcmp(buf, "ib\n"))
+	if (!strcmp(buf, "ib"))
 		info->tmp_type = MLX4_PORT_TYPE_IB;
-	else if (!strcmp(buf, "eth\n"))
+	else if (!strcmp(buf, "eth"))
 		info->tmp_type = MLX4_PORT_TYPE_ETH;
-	else if (!strcmp(buf, "auto\n"))
+	else if (!strcmp(buf, "auto"))
 		info->tmp_type = MLX4_PORT_TYPE_AUTO;
 	else {
 		mlx4_err(mdev, "%s is not supported port type\n", buf);

Modified: head/sys/ofed/include/linux/sysfs.h
==============================================================================
--- head/sys/ofed/include/linux/sysfs.h	Mon Jul  8 21:17:20 2013	(r253047)
+++ head/sys/ofed/include/linux/sysfs.h	Mon Jul  8 21:25:12 2013	(r253048)
@@ -104,10 +104,15 @@ sysctl_handle_attr(SYSCTL_HANDLER_ARGS)
 	error = SYSCTL_OUT(req, buf, len);
 	if (error || !req->newptr || ops->store == NULL)
 		goto out;
-	error = SYSCTL_IN(req, buf, PAGE_SIZE);
+	len = req->newlen - req->newidx;
+	if (len >= PAGE_SIZE)
+		error = EINVAL;
+	else 
+		error = SYSCTL_IN(req, buf, len);
 	if (error)
 		goto out;
-	len = ops->store(kobj, attr, buf, req->newlen);
+	((char *)buf)[len] = '\0';
+	len = ops->store(kobj, attr, buf, len);
 	if (len < 0)
 		error = -len;
 out:

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 21:26:15 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 7755171C;
 Mon,  8 Jul 2013 21:26:15 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id 532A61A15;
 Mon,  8 Jul 2013 21:26:15 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id B9B8FB9C2;
 Mon,  8 Jul 2013 17:26:14 -0400 (EDT)
From: John Baldwin 
To: Alfred Perlstein 
Subject: Re: svn commit: r253007 - in head/sys: kern net80211 sys
Date: Mon, 8 Jul 2013 16:20:02 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307072139.r67Ldb6u046408@svn.freebsd.org>
In-Reply-To: <201307072139.r67Ldb6u046408@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201307081620.02262.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Mon, 08 Jul 2013 17:26:14 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 21:26:15 -0000

On Sunday, July 07, 2013 5:39:37 pm Alfred Perlstein wrote:
> Author: alfred
> Date: Sun Jul  7 21:39:37 2013
> New Revision: 253007
> URL: http://svnweb.freebsd.org/changeset/base/253007
> 
> Log:
>   Make kassert_printf use __printflike.
>   
>   Fix associated errors/warnings while I'm here.
>   
>   Requested by: avg
> 
> Modified:
>   head/sys/kern/subr_witness.c
>   head/sys/kern/vfs_bio.c
>   head/sys/net80211/ieee80211_output.c
>   head/sys/sys/systm.h
> 
> Modified: head/sys/kern/subr_witness.c
> 
==============================================================================
> --- head/sys/kern/subr_witness.c	Sun Jul  7 21:23:58 2013	(r253006)
> +++ head/sys/kern/subr_witness.c	Sun Jul  7 21:39:37 2013	(r253007)
> @@ -1138,12 +1138,16 @@ witness_checkorder(struct lock_object *l
>  		iclass = LOCK_CLASS(interlock);
>  		lock1 = find_instance(lock_list, interlock);
>  		if (lock1 == NULL)
> -			kassert_panic("interlock (%s) %s not locked @ %s:%d",
> +			kassert_panic(
> +			    "interlock (%s) %s not locked while locking"
> +			    " %s @ %s:%d",
>  			    iclass->lc_name, interlock->lo_name,
>  			    flags & LOP_EXCLUSIVE ? "exclusive" : "shared",
>  			    fixup_filename(file), line);
>  		else if ((lock1->li_flags & LI_RECURSEMASK) != 0)
> -			kassert_panic("interlock (%s) %s recursed @ %s:%d",
> +			kassert_panic(
> +			    "interlock (%s) %s recursed while locking %s"
> +			    " @ %s:%d",
>  			    iclass->lc_name, interlock->lo_name,
>  			    flags & LOP_EXCLUSIVE ? "exclusive" : "shared",
>  			    fixup_filename(file), line);

Eh, this isn't really correct.  Better to remove the useless
"exclusive"/"shared" string argument.  That was a copy/paste bug on my part.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 21:26:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id EAB42745;
 Mon,  8 Jul 2013 21:26:18 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id 78CAF1A16;
 Mon,  8 Jul 2013 21:26:18 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9A62BB982;
 Mon,  8 Jul 2013 17:26:17 -0400 (EDT)
From: John Baldwin 
To: Garrett Cooper 
Subject: Re: svn commit: r253002 - head
Date: Mon, 8 Jul 2013 17:13:51 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 
 
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201307081713.51892.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Mon, 08 Jul 2013 17:26:17 -0400 (EDT)
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 21:26:19 -0000

On Monday, July 08, 2013 2:23:31 am Garrett Cooper wrote:
> On Sun, Jul 7, 2013 at 7:25 PM, Garrett Cooper  
wrote:
> > On Jul 7, 2013, at 2:15 PM, Alfred Perlstein  wrote:
> >
> >> On 7/7/13 2:01 PM, Garrett Cooper wrote:
> >>> Why the magic number 12?
> >>
> >> Numbers higher seem to result in worse performance as reported by some 
members of my team.
> >
> > The suggestion is good in spirit, but this doesn't justify the reasoning 
for this recommendation for all cases.
> >
> > Please revert this change and add a doc page or notes to the dev handbook 
discussing what the empirical process and results were for determining this 
value so people can come up with their own values that work best with their 
hardware and software config. This recommendation is prone to bitrot like some 
of the recommendations in tuning(7).
> >
> > Misinformation is sometimes more harmful than no information.
> 
> I spoke with Alfred over the phone and did some more careful thought
> about this and I'm rescinding this request.
> 
> Alfred did a good job at documenting how JFLAG works (it was
> previously undocumented). My concern over -j12 was performance
> related, and after giving things more careful thought it actually
> makes sense why -j12 was chosen because Westmere and newer processors
> have issues with NUMA and cache locality between multiple processor
> packages as we've seen non-empirically and empirically at Isilon with
> FreeBSD 7 and 10 (it's a known issue that jeffr@ and jhb@ are aware
> of).
> 
> I'll come up with a concise patch that does what Alfred was trying to
> achieve and have Alfred review it.
> 
> Thanks (and thank you Alfred for the contribution!!!)!

Westmere is fine, it's post-Westmere that is more troublesome.

I think the comment is not super useful, but don't object enough to want
it to be removed.  I always use 'make tinderbox' instead of
'make universe' though as I want build failures to be obvious.  For the
described use case of "checking if kernels build", 'tinderbox' certainly
seems to be the more appropriate target.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 22:13:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id B6595661;
 Mon,  8 Jul 2013 22:13:26 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com
 [IPv6:2607:f8b0:400e:c03::232])
 by mx1.freebsd.org (Postfix) with ESMTP id 81EE71C17;
 Mon,  8 Jul 2013 22:13:26 +0000 (UTC)
Received: by mail-pa0-f50.google.com with SMTP id fb1so4851054pad.37
 for ; Mon, 08 Jul 2013 15:13:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=subject:mime-version:content-type:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to:x-mailer;
 bh=O69bBy/sGC6V+ZYcRC53MOnboBEIj9UQTas6y+EGmSs=;
 b=KDc4uy2mLO4KkX+22vspzoUg1iAI30hhtR3ZmIK8U407EGKzqDRoRpSQHQ6RwKShSD
 Fs7uZ9IEFeRhvyPeD6s3b1qs5kqRsuLOD02ZumUAuelCalqVul3oLraFg793XYMpRspd
 F7EsUukg8T/7zr3gDOuspUSV+N4Ceu4koJf9F2Cz3ZLJyERRiCfO7uk4GI5J/oejREgg
 F4ISIQtL5q12OSuHW2arqS2ApbEf2/M350slNKLJX6UN+UTXLx2lrWJ3xAIs6rjdy0om
 KVcwO12zGboG7SnI88JA/hRicQTcVhA4MNVkqibl/SsMtQzIDPuBcPZo73MBbARTAYKV
 g+lQ==
X-Received: by 10.66.218.39 with SMTP id pd7mr25029921pac.148.1373321606262;
 Mon, 08 Jul 2013 15:13:26 -0700 (PDT)
Received: from [192.168.242.58] (c-67-182-131-225.hsd1.wa.comcast.net.
 [67.182.131.225])
 by mx.google.com with ESMTPSA id dj5sm24438421pbc.25.2013.07.08.15.13.24
 for 
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Mon, 08 Jul 2013 15:13:25 -0700 (PDT)
Subject: Re: svn commit: r253048 - in head/sys/ofed: drivers/net/mlx4
 include/linux
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset=us-ascii
From: Garrett Cooper 
In-Reply-To: <201307082125.r68LPDlY023493@svn.freebsd.org>
Date: Mon, 8 Jul 2013 15:13:22 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <3FF894D3-ACDF-4796-A682-F9F9DD8C943D@gmail.com>
References: <201307082125.r68LPDlY023493@svn.freebsd.org>
To: John Baldwin 
X-Mailer: Apple Mail (2.1283)
Cc: svn-src-head ,
 svn-src-all ,
 src-committers , shahark@mellanox.com
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 22:13:26 -0000

On Jul 8, 2013, at 2:25 PM, John Baldwin wrote:

> Author: jhb
> Date: Mon Jul  8 21:25:12 2013
> New Revision: 253048
> URL: http://svnweb.freebsd.org/changeset/base/253048
>=20
> Log:
>  Allow mlx4 devices to switch from Ethernet to Infiniband (and vice =
versa):
>  - Fix sysctl wrapper for sysfs attributes to properly handle new =
string
>    values similar to sysctl_handle_string() (only copyin the user's
>    supplied length and nul-terminate the string).
>  - Don't check for a trailing newline when evaluating the desired =
operating
>    mode of a mlx4 device.
>=20
>  PR:		kern/179999
>  Submitted by:	Shahar Klein 
>  MFC after:	1 week

Was there an issue with the patch I submitted via =
http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/174213 (basically =
solving the same problem, but only with the sysfs <-> sysctl(9) =
handler)? I was of the impression that sysfs on Linux always added on =
trailing newlines (but I could be wrong because I haven't used Linux at =
a dev level for ages). Thanks!=

From owner-svn-src-head@FreeBSD.ORG  Mon Jul  8 23:24:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 538085DA;
 Mon,  8 Jul 2013 23:24:05 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-ve0-x22a.google.com (mail-ve0-x22a.google.com
 [IPv6:2607:f8b0:400c:c01::22a])
 by mx1.freebsd.org (Postfix) with ESMTP id C111B1EC2;
 Mon,  8 Jul 2013 23:24:04 +0000 (UTC)
Received: by mail-ve0-f170.google.com with SMTP id 14so4106974vea.1
 for ; Mon, 08 Jul 2013 16:24:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=Mue28M9PuK266fsOgiBvJDC5UFyIhtMdvxesGv6Pskg=;
 b=KFnd9f+zR7v6CFSyRNTRj35z1szNk1/KnLVFblHnqyB+ALkdIysjXj4MIrGNa/6RF2
 wCE9kCz6oS/TxnNWEvxnzZDWsJisDohJ79Dy2bJaKGHcKTtWzmigRhXgcRo9FfEiEtOs
 wZ6A8JIuM7AaQFF6oNv4i9lUyO/2cRiG+ft754A4f7lefs6SwwSGvqJyyQUxEDE6CIkU
 XJ77aCCM+kbAu/JWN4x9MMuL+I7oLNAZV2jzuo3p5he6GnTXPBO1D7bfSsAdKtz4KtQJ
 u45x9PI2o8l80X9bk8FQlye5RUf0LyTyr+Fy9TNRdyHrpdMslD8IC5sV8kpfb9+WH2vN
 LDMg==
MIME-Version: 1.0
X-Received: by 10.52.186.129 with SMTP id fk1mr12459656vdc.66.1373325844249;
 Mon, 08 Jul 2013 16:24:04 -0700 (PDT)
Received: by 10.220.146.145 with HTTP; Mon, 8 Jul 2013 16:24:04 -0700 (PDT)
In-Reply-To: <201307081713.51892.jhb@freebsd.org>
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 
 
 <201307081713.51892.jhb@freebsd.org>
Date: Mon, 8 Jul 2013 16:24:04 -0700
Message-ID: 
Subject: Re: svn commit: r253002 - head
From: Garrett Cooper 
To: John Baldwin 
Content-Type: text/plain; charset=ISO-8859-1
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Mon, 08 Jul 2013 23:24:05 -0000

On Mon, Jul 8, 2013 at 2:13 PM, John Baldwin  wrote:
> On Monday, July 08, 2013 2:23:31 am Garrett Cooper wrote:
>> On Sun, Jul 7, 2013 at 7:25 PM, Garrett Cooper 
> wrote:
>> > On Jul 7, 2013, at 2:15 PM, Alfred Perlstein  wrote:
>> >
>> >> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>> >>> Why the magic number 12?
>> >>
>> >> Numbers higher seem to result in worse performance as reported by some
> members of my team.
>> >
>> > The suggestion is good in spirit, but this doesn't justify the reasoning
> for this recommendation for all cases.
>> >
>> > Please revert this change and add a doc page or notes to the dev handbook
> discussing what the empirical process and results were for determining this
> value so people can come up with their own values that work best with their
> hardware and software config. This recommendation is prone to bitrot like some
> of the recommendations in tuning(7).
>> >
>> > Misinformation is sometimes more harmful than no information.
>>
>> I spoke with Alfred over the phone and did some more careful thought
>> about this and I'm rescinding this request.
>>
>> Alfred did a good job at documenting how JFLAG works (it was
>> previously undocumented). My concern over -j12 was performance
>> related, and after giving things more careful thought it actually
>> makes sense why -j12 was chosen because Westmere and newer processors
>> have issues with NUMA and cache locality between multiple processor
>> packages as we've seen non-empirically and empirically at Isilon with
>> FreeBSD 7 and 10 (it's a known issue that jeffr@ and jhb@ are aware
>> of).
>>
>> I'll come up with a concise patch that does what Alfred was trying to
>> achieve and have Alfred review it.
>>
>> Thanks (and thank you Alfred for the contribution!!!)!
>
> Westmere is fine, it's post-Westmere that is more troublesome.

Even the 6-core Westmeres (I'm being completely dumb here as you and
Jeff know a lot more about the NUMA issue than I do as I just caught
the tail end of the conversation at BSDCan)? I'm asking because they
(iX) are using build.ix as the primary build machine and it has 2
Westmere dies with (IIRC -- please correct me if I'm wrong
Alfred/Xin/etc) 6 cores each and are SMT enabled. It also has a
boatload of RAM and disks hooked up to an mfi(4) controller (which
could be a contributing factor in the performance degradation issue).

> I think the comment is not super useful, but don't object enough to want
> it to be removed.  I always use 'make tinderbox' instead of
> 'make universe' though as I want build failures to be obvious.  For the
> described use case of "checking if kernels build", 'tinderbox' certainly
> seems to be the more appropriate target.

Changing it from universe to tinderbox seems like a better idea --
I'll put a short note in my proposed patch for that.

Thanks!
-Garrett

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 00:01:09 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 7E697BA6;
 Tue,  9 Jul 2013 00:01:09 +0000 (UTC)
 (envelope-from alfred@freebsd.org)
Received: from elvis.mu.org (elvis.mu.org [192.203.228.196])
 by mx1.freebsd.org (Postfix) with ESMTP id 5FA941FFB;
 Tue,  9 Jul 2013 00:01:09 +0000 (UTC)
Received: from Alfreds-MacBook-Pro-9.local
 (c-67-180-208-218.hsd1.ca.comcast.net [67.180.208.218])
 by elvis.mu.org (Postfix) with ESMTPSA id 3A75B1A3C7A;
 Mon,  8 Jul 2013 17:01:02 -0700 (PDT)
Message-ID: <51DB52BC.2030802@freebsd.org>
Date: Mon, 08 Jul 2013 17:01:00 -0700
From: Alfred Perlstein 
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7;
 rv:17.0) Gecko/20130620 Thunderbird/17.0.7
MIME-Version: 1.0
To: Garrett Cooper 
Subject: Re: svn commit: r253002 - head
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 
 
 <201307081713.51892.jhb@freebsd.org>
 
In-Reply-To: 
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" ,
 John Baldwin 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 00:01:09 -0000

On 7/8/13 4:24 PM, Garrett Cooper wrote:
> On Mon, Jul 8, 2013 at 2:13 PM, John Baldwin  wrote:
>> On Monday, July 08, 2013 2:23:31 am Garrett Cooper wrote:
>>> On Sun, Jul 7, 2013 at 7:25 PM, Garrett Cooper 
>> wrote:
>>>> On Jul 7, 2013, at 2:15 PM, Alfred Perlstein  wrote:
>>>>
>>>>> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>>>>>> Why the magic number 12?
>>>>> Numbers higher seem to result in worse performance as reported by some
>> members of my team.
>>>> The suggestion is good in spirit, but this doesn't justify the reasoning
>> for this recommendation for all cases.
>>>> Please revert this change and add a doc page or notes to the dev handbook
>> discussing what the empirical process and results were for determining this
>> value so people can come up with their own values that work best with their
>> hardware and software config. This recommendation is prone to bitrot like some
>> of the recommendations in tuning(7).
>>>> Misinformation is sometimes more harmful than no information.
>>> I spoke with Alfred over the phone and did some more careful thought
>>> about this and I'm rescinding this request.
>>>
>>> Alfred did a good job at documenting how JFLAG works (it was
>>> previously undocumented). My concern over -j12 was performance
>>> related, and after giving things more careful thought it actually
>>> makes sense why -j12 was chosen because Westmere and newer processors
>>> have issues with NUMA and cache locality between multiple processor
>>> packages as we've seen non-empirically and empirically at Isilon with
>>> FreeBSD 7 and 10 (it's a known issue that jeffr@ and jhb@ are aware
>>> of).
>>>
>>> I'll come up with a concise patch that does what Alfred was trying to
>>> achieve and have Alfred review it.
>>>
>>> Thanks (and thank you Alfred for the contribution!!!)!
>> Westmere is fine, it's post-Westmere that is more troublesome.
> Even the 6-core Westmeres (I'm being completely dumb here as you and
> Jeff know a lot more about the NUMA issue than I do as I just caught
> the tail end of the conversation at BSDCan)? I'm asking because they
> (iX) are using build.ix as the primary build machine and it has 2
> Westmere dies with (IIRC -- please correct me if I'm wrong
> Alfred/Xin/etc) 6 cores each and are SMT enabled. It also has a
> boatload of RAM and disks hooked up to an mfi(4) controller (which
> could be a contributing factor in the performance degradation issue).
>
>> I think the comment is not super useful, but don't object enough to want
>> it to be removed.  I always use 'make tinderbox' instead of
>> 'make universe' though as I want build failures to be obvious.  For the
>> described use case of "checking if kernels build", 'tinderbox' certainly
>> seems to be the more appropriate target.
> Changing it from universe to tinderbox seems like a better idea --
> I'll put a short note in my proposed patch for that.
>
> Thanks!
> -Garrett
>
Just to clarify, the passing of jflag in the comments was there because 
it seems like most of the targets default to "-j1" which out of the box 
is somewhat ludicrous these days.  It was only a guide such that someone 
who knows what "-j" does would be like "oh that's absurd, I know a 
better value" rather than just being oblivious to it (like me) or 
stupidly assume that some level of auto-tuning was done (also like me) 
and wind up wondering why "make universe" is taking as long as an actual 
real live universe to build.

;)

-Alfred

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 00:12:25 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 76592F85;
 Tue,  9 Jul 2013 00:12:25 +0000 (UTC)
 (envelope-from Devin.Teske@fisglobal.com)
Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190])
 by mx1.freebsd.org (Postfix) with ESMTP id 423431083;
 Tue,  9 Jul 2013 00:12:24 +0000 (UTC)
Received: from smtp.fisglobal.com ([10.132.206.31])
 by ltcfislmsgpa07.fnfis.com (8.14.5/8.14.5) with ESMTP id r690COH8003286
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);
 Mon, 8 Jul 2013 19:12:24 -0500
Received: from LTCFISWMSGMB21.FNFIS.com ([10.132.99.23]) by
 LTCFISWMSGHT03.FNFIS.com ([10.132.206.31]) with mapi id 14.02.0309.002; Mon,
 8 Jul 2013 19:12:24 -0500
From: "Teske, Devin" 
To: Alfred Perlstein 
Subject: Re: svn commit: r253002 - head
Thread-Topic: svn commit: r253002 - head
Thread-Index: AQHOe1IOUGaKuVMAxE6Zyjz3auiH3plaB1mAgAAD6YCAAcPiAA==
Date: Tue, 9 Jul 2013 00:12:22 +0000
Message-ID: <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org>
In-Reply-To: <51D9DA55.2090808@freebsd.org>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.132.253.126]
Content-Type: text/plain; charset="iso-8859-1"
Content-ID: <3741638654480344B94FF8ABDDF3EA6D@fisglobal.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794, 1.0.431,
 0.0.0000
 definitions=2013-07-08_06:2013-07-08,2013-07-08,1970-01-01 signatures=0
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Devin Teske ,
 "src-committers@freebsd.org" ,
 Garrett Cooper 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: Devin Teske 
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 00:12:25 -0000

On Jul 7, 2013, at 2:15 PM, Alfred Perlstein wrote:

> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>> Why the magic number 12?
>=20
> Numbers higher seem to result in worse performance as reported by some me=
mbers of my team.
>=20

We've run as high as -j48 ... number of logical cpu's "times-two" (it was o=
n a box with 24 logical CPUs).

We did buildworld in under 9 minutes. Beyond the "times-two" rule we saw a =
slow-down.

NOTE: I might also mention this was on RAID-1 SSD.
--=20
Devin



>> On Jul 7, 2013, at 1:39 PM, Alfred Perlstein  wrote:
>>=20
>>> Author: alfred
>>> Date: Sun Jul  7 20:39:11 2013
>>> New Revision: 253002
>>> URL: http://svnweb.freebsd.org/changeset/base/253002
>>>=20
>>> Log:
>>>  Document tip on how to build all kernels quickly.
>>>=20
>>> Modified:
>>>  head/Makefile
>>>=20
>>> Modified: head/Makefile
>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=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/Makefile    Sun Jul  7 19:58:14 2013    (r253001)
>>> +++ head/Makefile    Sun Jul  7 20:39:11 2013    (r253002)
>>> @@ -32,6 +32,12 @@
>>> # targets             - Print a list of supported TARGET/TARGET_ARCH pa=
irs
>>> #                       for world and kernel targets.
>>> # toolchains          - Build a toolchain for all world and kernel targ=
ets.
>>> +#
>>> +# "quick" way to test all kernel builds:
>>> +#    _jflag=3D`sysctl -n hw.ncpu`
>>> +#    _jflag=3D$(($_jflag * 2))
>>> +#    [ $_jflag -gt 12 ] && _jflag=3D12
>>> +#    make universe -DMAKE_JUST_KERNELS JFLAG=3D${jflag}
>>> #
>>> # This makefile is simple by design. The FreeBSD make automatically rea=
ds
>>> # the /usr/share/mk/sys.mk unless the -m argument is specified on the
>>> _______________________________________________
>>> svn-src-head@freebsd.org mailing list
>>> http://lists.freebsd.org/mailman/listinfo/svn-src-head
>>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>=20

_____________
The information contained in this message is proprietary and/or confidentia=
l. If you are not the intended recipient, please: (i) delete the message an=
d all copies; (ii) do not disclose, distribute or use the message in any ma=
nner; and (iii) notify the sender immediately. In addition, please be aware=
 that any message addressed to our domain is subject to archiving and revie=
w by persons other than the intended recipient. Thank you.

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 00:46:20 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 3028FF2B;
 Tue,  9 Jul 2013 00:46:20 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-pd0-x22a.google.com (mail-pd0-x22a.google.com
 [IPv6:2607:f8b0:400e:c02::22a])
 by mx1.freebsd.org (Postfix) with ESMTP id E8AAE1953;
 Tue,  9 Jul 2013 00:46:19 +0000 (UTC)
Received: by mail-pd0-f170.google.com with SMTP id x11so4673575pdj.1
 for ; Mon, 08 Jul 2013 17:46:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=subject:mime-version:content-type:from:in-reply-to:date:cc
 :content-transfer-encoding:message-id:references:to:x-mailer;
 bh=Svobeg1whpVeU3ywjb8f++Wqld6OyW7l8Y5GyRUN8oY=;
 b=gtbpOanj8n6kEkPpv6WZ14SVGNspcTPM/HR8QBbTWBZPAo9tkdAv5fzPvcgS0yy1Xp
 WC88BMxPihtOZaMiWM91v4Fbcxv2fg/mPyr/DQfOol8t+g8s8L3H8RhnB82724nE8DiC
 Qm/GFtejYuDIIqW8OgBFwt1m4ff+GV4E0AfgHhEYemLoLYlC8Oig0LhG07dIZMeC17MO
 4J9WXy2KnvB9Dj9EDT+9fbnEmVN42o/CGcHS6AWkHbLtm8pWHqPWueLSNpL57f5n5jNk
 /4Yz/Lsdtl4biqUSJm2DAJPFOXgUEmt101KGfC/Ww6FEW1/kkHbIwulk08R66D+Me0GV
 8ZZA==
X-Received: by 10.66.138.15 with SMTP id qm15mr24887589pab.128.1373328982184; 
 Mon, 08 Jul 2013 17:16:22 -0700 (PDT)
Received: from [192.168.242.58] (c-67-182-131-225.hsd1.wa.comcast.net.
 [67.182.131.225])
 by mx.google.com with ESMTPSA id vi8sm16244645pbc.31.2013.07.08.17.16.20
 for 
 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
 Mon, 08 Jul 2013 17:16:21 -0700 (PDT)
Subject: Re: svn commit: r253002 - head
Mime-Version: 1.0 (Apple Message framework v1283)
Content-Type: text/plain; charset=iso-8859-1
From: Garrett Cooper 
In-Reply-To: <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
Date: Mon, 8 Jul 2013 17:16:18 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <93211009-266E-4491-B706-67847A055832@gmail.com>
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org>
 <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
To: Devin Teske 
X-Mailer: Apple Mail (2.1283)
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 00:46:20 -0000

On Jul 8, 2013, at 5:12 PM, Teske, Devin wrote:

> On Jul 7, 2013, at 2:15 PM, Alfred Perlstein wrote:
>=20
>> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>>> Why the magic number 12?
>>=20
>> Numbers higher seem to result in worse performance as reported by =
some members of my team.
>>=20
>=20
> We've run as high as -j48 ... number of logical cpu's "times-two" (it =
was on a box with 24 logical CPUs).
>=20
> We did buildworld in under 9 minutes. Beyond the "times-two" rule we =
saw a slow-down.
>=20
> NOTE: I might also mention this was on RAID-1 SSD.

+1 as well, which is part of the reason why I questioned the performance =
recommendation, but that's beside the point. Thanks!=

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 01:05:30 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 89D7642F;
 Tue,  9 Jul 2013 01:05:30 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 6AFDC1A28;
 Tue,  9 Jul 2013 01:05:30 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6915UDD082156;
 Tue, 9 Jul 2013 01:05:30 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6915Tmi082145;
 Tue, 9 Jul 2013 01:05:29 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307090105.r6915Tmi082145@svn.freebsd.org>
From: Rick Macklem 
Date: Tue, 9 Jul 2013 01:05:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253049 - in head/sys: fs/nfs fs/nfsclient kgssapi rpc
 rpc/rpcsec_gss sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 01:05:30 -0000

Author: rmacklem
Date: Tue Jul  9 01:05:28 2013
New Revision: 253049
URL: http://svnweb.freebsd.org/changeset/base/253049

Log:
  Add support for host-based (Kerberos 5 service principal) initiator
  credentials to the kernel rpc. Modify the NFSv4 client to add
  support for the gssname and allgssname mount options to use this
  capability. Requires the gssd daemon to be running with the "-h" option.
  
  Reviewed by:	jhb

Modified:
  head/sys/fs/nfs/nfs.h
  head/sys/fs/nfs/nfs_commonkrpc.c
  head/sys/fs/nfsclient/nfs_clvfsops.c
  head/sys/kgssapi/gss_impl.c
  head/sys/rpc/rpcsec_gss.h
  head/sys/rpc/rpcsec_gss/rpcsec_gss.c
  head/sys/sys/param.h

Modified: head/sys/fs/nfs/nfs.h
==============================================================================
--- head/sys/fs/nfs/nfs.h	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/fs/nfs/nfs.h	Tue Jul  9 01:05:28 2013	(r253049)
@@ -466,6 +466,7 @@ struct nfssockreq {
 	u_int32_t	nr_prog;
 	u_int32_t	nr_vers;
 	struct __rpc_client *nr_client;
+	AUTH		*nr_auth;
 };
 
 /*

Modified: head/sys/fs/nfs/nfs_commonkrpc.c
==============================================================================
--- head/sys/fs/nfs/nfs_commonkrpc.c	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/fs/nfs/nfs_commonkrpc.c	Tue Jul  9 01:05:28 2013	(r253049)
@@ -102,7 +102,6 @@ static int	nfs_bufpackets = 4;
 static int	nfs_reconnects;
 static int	nfs3_jukebox_delay = 10;
 static int	nfs_skip_wcc_data_onerr = 1;
-static int	nfs_keytab_enctype = ETYPE_DES_CBC_CRC;
 
 SYSCTL_DECL(_vfs_nfs);
 
@@ -114,8 +113,6 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, nfs3_juke
     "Number of seconds to delay a retry after receiving EJUKEBOX");
 SYSCTL_INT(_vfs_nfs, OID_AUTO, skip_wcc_data_onerr, CTLFLAG_RW, &nfs_skip_wcc_data_onerr, 0,
     "Disable weak cache consistency checking when server returns an error");
-SYSCTL_INT(_vfs_nfs, OID_AUTO, keytab_enctype, CTLFLAG_RW, &nfs_keytab_enctype, 0,
-    "Encryption type for the keytab entry used by nfs");
 
 static void	nfs_down(struct nfsmount *, struct thread *, const char *,
     int, int);
@@ -393,9 +390,6 @@ nfs_getauth(struct nfssockreq *nrp, int 
 {
 	rpc_gss_service_t svc;
 	AUTH *auth;
-#ifdef notyet
-	rpc_gss_options_req_t req_options;
-#endif
 
 	switch (secflavour) {
 	case RPCSEC_GSS_KRB5:
@@ -411,28 +405,16 @@ nfs_getauth(struct nfssockreq *nrp, int 
 			svc = rpc_gss_svc_integrity;
 		else
 			svc = rpc_gss_svc_privacy;
-#ifdef notyet
-		req_options.req_flags = GSS_C_MUTUAL_FLAG;
-		req_options.time_req = 0;
-		req_options.my_cred = GSS_C_NO_CREDENTIAL;
-		req_options.input_channel_bindings = NULL;
-		req_options.enc_type = nfs_keytab_enctype;
-
-		auth = rpc_gss_secfind_call(nrp->nr_client, cred,
-		    clnt_principal, srv_principal, mech_oid, svc,
-		    &req_options);
-#else
-		/*
-		 * Until changes to the rpcsec_gss code are committed,
-		 * there is no support for host based initiator
-		 * principals. As such, that case cannot yet be handled.
-		 */
+
 		if (clnt_principal == NULL)
 			auth = rpc_gss_secfind_call(nrp->nr_client, cred,
 			    srv_principal, mech_oid, svc);
-		else
-			auth = NULL;
-#endif
+		else {
+			auth = rpc_gss_seccreate_call(nrp->nr_client, cred,
+			    clnt_principal, srv_principal, "kerberosv5",
+			    svc, NULL, NULL, NULL);
+			return (auth);
+		}
 		if (auth != NULL)
 			return (auth);
 		/* fallthrough */
@@ -505,7 +487,7 @@ newnfs_request(struct nfsrv_descript *nd
 	struct rpc_callextra ext;
 	enum clnt_stat stat;
 	struct nfsreq *rep = NULL;
-	char *srv_principal = NULL;
+	char *srv_principal = NULL, *clnt_principal = NULL;
 	sigset_t oldset;
 	struct ucred *authcred;
 
@@ -568,6 +550,7 @@ newnfs_request(struct nfsrv_descript *nd
 			 */
 			if (nmp->nm_krbnamelen > 0) {
 				usegssname = 1;
+				clnt_principal = nmp->nm_krbname;
 			} else if (nmp->nm_uid != (uid_t)-1) {
 				KASSERT(nmp->nm_sockreq.nr_cred != NULL,
 				    ("newnfs_request: NULL nr_cred"));
@@ -622,10 +605,19 @@ newnfs_request(struct nfsrv_descript *nd
 
 	if (nd->nd_procnum == NFSPROC_NULL)
 		auth = authnone_create();
-	else if (usegssname)
-		auth = nfs_getauth(nrp, secflavour, nmp->nm_krbname,
-		    srv_principal, NULL, authcred);
-	else
+	else if (usegssname) {
+		/*
+		 * For this case, the authenticator is held in the
+		 * nfssockreq structure, so don't release the reference count
+		 * held on it. --> Don't AUTH_DESTROY() it in this function.
+		 */
+		if (nrp->nr_auth == NULL)
+			nrp->nr_auth = nfs_getauth(nrp, secflavour,
+			    clnt_principal, srv_principal, NULL, authcred);
+		else
+			rpc_gss_refresh_auth_call(nrp->nr_auth);
+		auth = nrp->nr_auth;
+	} else
 		auth = nfs_getauth(nrp, secflavour, NULL,
 		    srv_principal, NULL, authcred);
 	crfree(authcred);
@@ -781,7 +773,8 @@ tryagain:
 	}
 	if (error) {
 		m_freem(nd->nd_mreq);
-		AUTH_DESTROY(auth);
+		if (usegssname == 0)
+			AUTH_DESTROY(auth);
 		if (rep != NULL)
 			FREE((caddr_t)rep, M_NFSDREQ);
 		if (set_sigset)
@@ -991,7 +984,8 @@ tryagain:
 #endif
 
 	m_freem(nd->nd_mreq);
-	AUTH_DESTROY(auth);
+	if (usegssname == 0)
+		AUTH_DESTROY(auth);
 	if (rep != NULL)
 		FREE((caddr_t)rep, M_NFSDREQ);
 	if (set_sigset)
@@ -1000,7 +994,8 @@ tryagain:
 nfsmout:
 	mbuf_freem(nd->nd_mrep);
 	mbuf_freem(nd->nd_mreq);
-	AUTH_DESTROY(auth);
+	if (usegssname == 0)
+		AUTH_DESTROY(auth);
 	if (rep != NULL)
 		FREE((caddr_t)rep, M_NFSDREQ);
 	if (set_sigset)

Modified: head/sys/fs/nfsclient/nfs_clvfsops.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clvfsops.c	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/fs/nfsclient/nfs_clvfsops.c	Tue Jul  9 01:05:28 2013	(r253049)
@@ -1446,6 +1446,8 @@ bad:
 		nfscl_clientrelease(clp);
 	newnfs_disconnect(&nmp->nm_sockreq);
 	crfree(nmp->nm_sockreq.nr_cred);
+	if (nmp->nm_sockreq.nr_auth != NULL)
+		AUTH_DESTROY(nmp->nm_sockreq.nr_auth);
 	mtx_destroy(&nmp->nm_sockreq.nr_mtx);
 	mtx_destroy(&nmp->nm_mtx);
 	if (nmp->nm_clp != NULL) {
@@ -1516,7 +1518,8 @@ nfs_unmount(struct mount *mp, int mntfla
 	newnfs_disconnect(&nmp->nm_sockreq);
 	crfree(nmp->nm_sockreq.nr_cred);
 	FREE(nmp->nm_nam, M_SONAME);
-
+	if (nmp->nm_sockreq.nr_auth != NULL)
+		AUTH_DESTROY(nmp->nm_sockreq.nr_auth);
 	mtx_destroy(&nmp->nm_sockreq.nr_mtx);
 	mtx_destroy(&nmp->nm_mtx);
 	TAILQ_FOREACH_SAFE(dsp, &nmp->nm_sess, nfsclds_list, tdsp)

Modified: head/sys/kgssapi/gss_impl.c
==============================================================================
--- head/sys/kgssapi/gss_impl.c	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/kgssapi/gss_impl.c	Tue Jul  9 01:05:28 2013	(r253049)
@@ -286,6 +286,7 @@ kgssapi_modevent(module_t mod, int type,
 
 	switch (type) {
 	case MOD_LOAD:
+		rpc_gss_entries.rpc_gss_refresh_auth = rpc_gss_refresh_auth;
 		rpc_gss_entries.rpc_gss_secfind = rpc_gss_secfind;
 		rpc_gss_entries.rpc_gss_secpurge = rpc_gss_secpurge;
 		rpc_gss_entries.rpc_gss_seccreate = rpc_gss_seccreate;

Modified: head/sys/rpc/rpcsec_gss.h
==============================================================================
--- head/sys/rpc/rpcsec_gss.h	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/rpc/rpcsec_gss.h	Tue Jul  9 01:05:28 2013	(r253049)
@@ -153,9 +153,9 @@ typedef AUTH	*rpc_gss_secfind_ftype(CLIE
 		    rpc_gss_service_t service);
 typedef void	rpc_gss_secpurge_ftype(CLIENT *clnt);
 typedef AUTH	*rpc_gss_seccreate_ftype(CLIENT *clnt, struct ucred *cred,
-		    const char *principal, const char *mechanism,
-		    rpc_gss_service_t service, const char *qop,
-		    rpc_gss_options_req_t *options_req,
+		    const char *clnt_principal, const char *principal,
+		    const char *mechanism, rpc_gss_service_t service,
+		    const char *qop, rpc_gss_options_req_t *options_req,
 		    rpc_gss_options_ret_t *options_ret);
 typedef bool_t	rpc_gss_set_defaults_ftype(AUTH *auth,
 		    rpc_gss_service_t service, const char *qop);
@@ -183,6 +183,7 @@ typedef bool_t	rpc_gss_get_principal_nam
 		    const char *domain);
 typedef int	rpc_gss_svc_max_data_length_ftype(struct svc_req *req,
 		    int max_tp_unit_len);
+typedef void	rpc_gss_refresh_auth_ftype(AUTH *auth);
 
 struct rpc_gss_entries {
 	rpc_gss_secfind_ftype		*rpc_gss_secfind;
@@ -204,6 +205,7 @@ struct rpc_gss_entries {
 	rpc_gss_clear_callback_ftype	*rpc_gss_clear_callback;
 	rpc_gss_get_principal_name_ftype *rpc_gss_get_principal_name;
 	rpc_gss_svc_max_data_length_ftype *rpc_gss_svc_max_data_length;
+	rpc_gss_refresh_auth_ftype	*rpc_gss_refresh_auth;
 };
 extern struct rpc_gss_entries	rpc_gss_entries;
 
@@ -229,16 +231,17 @@ rpc_gss_secpurge_call(CLIENT *clnt)
 }
 
 static __inline AUTH *
-rpc_gss_seccreate_call(CLIENT *clnt, struct ucred *cred, const char *principal,
-    const char *mechanism, rpc_gss_service_t service, const char *qop,
+rpc_gss_seccreate_call(CLIENT *clnt, struct ucred *cred,
+    const char *clnt_principal, const char *principal, const char *mechanism,
+    rpc_gss_service_t service, const char *qop,
     rpc_gss_options_req_t *options_req, rpc_gss_options_ret_t *options_ret)
 {
 	AUTH *ret = NULL;
 
 	if (rpc_gss_entries.rpc_gss_seccreate != NULL)
 		ret = (*rpc_gss_entries.rpc_gss_seccreate)(clnt, cred,
-		    principal, mechanism, service, qop, options_req,
-		    options_ret);
+		    clnt_principal, principal, mechanism, service, qop,
+		    options_req, options_ret);
 	return (ret);
 }
 
@@ -406,14 +409,29 @@ rpc_gss_svc_max_data_length_call(struct 
 	return (ret);
 }
 
+static __inline void
+rpc_gss_refresh_auth_call(AUTH *auth)
+{
+
+	if (rpc_gss_entries.rpc_gss_refresh_auth != NULL)
+		(*rpc_gss_entries.rpc_gss_refresh_auth)(auth);
+}
+
 AUTH	*rpc_gss_secfind(CLIENT *clnt, struct ucred *cred,
     const char *principal, gss_OID mech_oid, rpc_gss_service_t service);
 void	rpc_gss_secpurge(CLIENT *clnt);
-#endif
+void	rpc_gss_refresh_auth(AUTH *auth);
+AUTH	*rpc_gss_seccreate(CLIENT *clnt, struct ucred *cred,
+    const char *clnt_principal, const char *principal,
+    const char *mechanism, rpc_gss_service_t service,
+    const char *qop, rpc_gss_options_req_t *options_req,
+    rpc_gss_options_ret_t *options_ret);
+#else	/* !_KERNEL */
 AUTH	*rpc_gss_seccreate(CLIENT *clnt, struct ucred *cred,
     const char *principal, const char *mechanism, rpc_gss_service_t service,
     const char *qop, rpc_gss_options_req_t *options_req,
     rpc_gss_options_ret_t *options_ret);
+#endif	/* _KERNEL */
 bool_t	rpc_gss_set_defaults(AUTH *auth, rpc_gss_service_t service,
     const char *qop);
 int	rpc_gss_max_data_length(AUTH *handle, int max_tp_unit_len);

Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss.c
==============================================================================
--- head/sys/rpc/rpcsec_gss/rpcsec_gss.c	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/rpc/rpcsec_gss/rpcsec_gss.c	Tue Jul  9 01:05:28 2013	(r253049)
@@ -82,6 +82,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+
 #include "rpcsec_gss_int.h"
 
 static void	rpc_gss_nextverf(AUTH*);
@@ -122,6 +124,7 @@ struct rpc_gss_data {
 	AUTH			*gd_auth;	/* link back to AUTH */
 	struct ucred		*gd_ucred;	/* matching local cred */
 	char			*gd_principal;	/* server principal name */
+	char			*gd_clntprincipal; /* client principal name */
 	rpc_gss_options_req_t	gd_options;	/* GSS context options */
 	enum rpcsec_gss_state	gd_state;	/* connection state */
 	gss_buffer_desc		gd_verf;	/* save GSS_S_COMPLETE
@@ -153,7 +156,7 @@ static struct sx rpc_gss_lock;
 static int rpc_gss_count;
 
 static AUTH *rpc_gss_seccreate_int(CLIENT *, struct ucred *, const char *,
-    gss_OID, rpc_gss_service_t, u_int, rpc_gss_options_req_t *,
+    const char *, gss_OID, rpc_gss_service_t, u_int, rpc_gss_options_req_t *,
     rpc_gss_options_ret_t *);
 
 static void
@@ -251,8 +254,8 @@ again:
 	/*
 	 * We missed in the cache - create a new association.
 	 */
-	auth = rpc_gss_seccreate_int(clnt, cred, principal, mech_oid, service,
-	    GSS_C_QOP_DEFAULT, NULL, NULL);
+	auth = rpc_gss_seccreate_int(clnt, cred, NULL, principal, mech_oid,
+	    service, GSS_C_QOP_DEFAULT, NULL, NULL);
 	if (!auth)
 		return (NULL);
 
@@ -304,9 +307,10 @@ rpc_gss_secpurge(CLIENT *clnt)
 }
 
 AUTH *
-rpc_gss_seccreate(CLIENT *clnt, struct ucred *cred, const char *principal,
-    const char *mechanism, rpc_gss_service_t service, const char *qop,
-    rpc_gss_options_req_t *options_req, rpc_gss_options_ret_t *options_ret)
+rpc_gss_seccreate(CLIENT *clnt, struct ucred *cred, const char *clnt_principal,
+    const char *principal, const char *mechanism, rpc_gss_service_t service,
+    const char *qop, rpc_gss_options_req_t *options_req,
+    rpc_gss_options_ret_t *options_ret)
 {
 	gss_OID			oid;
 	u_int			qop_num;
@@ -324,13 +328,33 @@ rpc_gss_seccreate(CLIENT *clnt, struct u
 		qop_num = GSS_C_QOP_DEFAULT;
 	}
 
-	return (rpc_gss_seccreate_int(clnt, cred, principal, oid, service,
-		qop_num, options_req, options_ret));
+	return (rpc_gss_seccreate_int(clnt, cred, clnt_principal, principal,
+		oid, service, qop_num, options_req, options_ret));
+}
+
+void
+rpc_gss_refresh_auth(AUTH *auth)
+{
+	struct rpc_gss_data	*gd;
+	rpc_gss_options_ret_t	options;
+
+	gd = AUTH_PRIVATE(auth);
+	/*
+	 * If the state != ESTABLISHED, try and initialize
+	 * the authenticator again. This will happen if the
+	 * user's credentials have expired. It may succeed now,
+	 * if they have done a kinit or similar.
+	 */
+	if (gd->gd_state != RPCSEC_GSS_ESTABLISHED) {
+		memset(&options, 0, sizeof (options));
+		(void) rpc_gss_init(auth, &options);
+	}
 }
 
 static AUTH *
-rpc_gss_seccreate_int(CLIENT *clnt, struct ucred *cred, const char *principal,
-    gss_OID mech_oid, rpc_gss_service_t service, u_int qop_num,
+rpc_gss_seccreate_int(CLIENT *clnt, struct ucred *cred,
+    const char *clnt_principal, const char *principal, gss_OID mech_oid,
+    rpc_gss_service_t service, u_int qop_num,
     rpc_gss_options_req_t *options_req, rpc_gss_options_ret_t *options_ret)
 {
 	AUTH			*auth;
@@ -379,6 +403,10 @@ rpc_gss_seccreate_int(CLIENT *clnt, stru
 	gd->gd_auth = auth;
 	gd->gd_ucred = crdup(cred);
 	gd->gd_principal = strdup(principal, M_RPC);
+	if (clnt_principal != NULL)
+		gd->gd_clntprincipal = strdup(clnt_principal, M_RPC);
+	else
+		gd->gd_clntprincipal = NULL;
 
 
 	if (options_req) {
@@ -719,6 +747,8 @@ rpc_gss_init(AUTH *auth, rpc_gss_options
 	OM_uint32		 maj_stat, min_stat, call_stat;
 	const char		*mech;
 	struct rpc_callextra	 ext;
+	gss_OID			mech_oid;
+	gss_OID_set		mechlist;
 
 	rpc_gss_log_debug("in rpc_gss_refresh()");
 	
@@ -745,6 +775,65 @@ rpc_gss_init(AUTH *auth, rpc_gss_options
 	gd->gd_cred.gc_proc = RPCSEC_GSS_INIT;
 	gd->gd_cred.gc_seq = 0;
 
+	/*
+	 * For KerberosV, if there is a client principal name, that implies
+	 * that this is a host based initiator credential in the default
+	 * keytab file. For this case, it is necessary to do a
+	 * gss_acquire_cred(). When this is done, the gssd daemon will
+	 * do the equivalent of "kinit -k" to put a TGT for the name in
+	 * the credential cache file for the gssd daemon.
+	 */
+	if (gd->gd_clntprincipal != NULL &&
+	    rpc_gss_mech_to_oid("kerberosv5", &mech_oid) &&
+	    gd->gd_mech == mech_oid) {
+		/* Get rid of any old credential. */
+		if (gd->gd_options.my_cred != GSS_C_NO_CREDENTIAL) {
+			gss_release_cred(&min_stat, &gd->gd_options.my_cred);
+			gd->gd_options.my_cred = GSS_C_NO_CREDENTIAL;
+		}
+	
+		/*
+		 * The mechanism must be set to KerberosV for acquisition
+		 * of credentials to work reliably.
+		 */
+		maj_stat = gss_create_empty_oid_set(&min_stat, &mechlist);
+		if (maj_stat != GSS_S_COMPLETE) {
+			options_ret->major_status = maj_stat;
+			options_ret->minor_status = min_stat;
+			goto out;
+		}
+		maj_stat = gss_add_oid_set_member(&min_stat, gd->gd_mech,
+		    &mechlist);
+		if (maj_stat != GSS_S_COMPLETE) {
+			options_ret->major_status = maj_stat;
+			options_ret->minor_status = min_stat;
+			gss_release_oid_set(&min_stat, &mechlist);
+			goto out;
+		}
+	
+		principal_desc.value = (void *)gd->gd_clntprincipal;
+		principal_desc.length = strlen(gd->gd_clntprincipal);
+		maj_stat = gss_import_name(&min_stat, &principal_desc,
+		    GSS_C_NT_HOSTBASED_SERVICE, &name);
+		if (maj_stat != GSS_S_COMPLETE) {
+			options_ret->major_status = maj_stat;
+			options_ret->minor_status = min_stat;
+			gss_release_oid_set(&min_stat, &mechlist);
+			goto out;
+		}
+		/* Acquire the credentials. */
+		maj_stat = gss_acquire_cred(&min_stat, name, 0,
+		    mechlist, GSS_C_INITIATE,
+		    &gd->gd_options.my_cred, NULL, NULL);
+		gss_release_name(&min_stat, &name);
+		gss_release_oid_set(&min_stat, &mechlist);
+		if (maj_stat != GSS_S_COMPLETE) {
+			options_ret->major_status = maj_stat;
+			options_ret->minor_status = min_stat;
+			goto out;
+		}
+	}
+
 	principal_desc.value = (void *)gd->gd_principal;
 	principal_desc.length = strlen(gd->gd_principal);
 	maj_stat = gss_import_name(&min_stat, &principal_desc,
@@ -1036,6 +1125,8 @@ rpc_gss_destroy(AUTH *auth)
 	CLNT_RELEASE(gd->gd_clnt);
 	crfree(gd->gd_ucred);
 	free(gd->gd_principal, M_RPC);
+	if (gd->gd_clntprincipal != NULL)
+		free(gd->gd_clntprincipal, M_RPC);
 	if (gd->gd_verf.value)
 		xdr_free((xdrproc_t) xdr_gss_buffer_desc,
 		    (char *) &gd->gd_verf);

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Mon Jul  8 21:25:12 2013	(r253048)
+++ head/sys/sys/param.h	Tue Jul  9 01:05:28 2013	(r253049)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1000035	/* Master, propagated to newvers */
+#define __FreeBSD_version 1000036	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 01:07:07 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 8456557E;
 Tue,  9 Jul 2013 01:07:07 +0000 (UTC) (envelope-from gad@FreeBSD.org)
Received: from smtp9.server.rpi.edu (smtp9.server.rpi.edu [128.113.2.229])
 by mx1.freebsd.org (Postfix) with ESMTP id 308411A3A;
 Tue,  9 Jul 2013 01:07:06 +0000 (UTC)
Received: from gilead.netel.rpi.edu (gilead.netel.rpi.edu [128.113.124.121])
 by smtp9.server.rpi.edu (8.14.3/8.14.3/Debian-9.4) with ESMTP id
 r6916xOx016902; Mon, 8 Jul 2013 21:07:00 -0400
Message-ID: <51DB6233.1040003@FreeBSD.org>
Date: Mon, 08 Jul 2013 21:06:59 -0400
From: Garance A Drosehn 
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
 rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: Alfred Perlstein 
Subject: Re: svn commit: r253002 - head
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
In-Reply-To: <201307072039.r67KdCdR028908@svn.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Bayes-Prob: 0.1473 (Score 0, tokens from: local, @@RPTN)
X-Spam-Score: 3.00 (***) [Hold at 10.10] SPF(softfail:3)
X-CanIt-Incident-Id: 02JW16Xd7
X-CanIt-Geo: ip=128.113.124.121; country=US; region=NY; city=Troy;
 postalcode=12180; latitude=42.7495; longitude=-73.5951; metrocode=532;
 areacode=518; http://maps.google.com/maps?q=42.7495,-73.5951&z=6
X-CanItPRO-Stream: local
X-Canit-Stats-ID: Bayes signature not available
X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.229
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 01:07:07 -0000

On 7/7/13 4:39 PM, Alfred Perlstein wrote:
>
> Log:
>    Document tip on how to build all kernels quickly.
>
>
> Modified: head/Makefile
> ==============================================================================
> --- head/Makefile	Sun Jul  7 19:58:14 2013	(r253001)
> +++ head/Makefile	Sun Jul  7 20:39:11 2013	(r253002)
> @@ -32,6 +32,12 @@
>   # targets             - Print a list of supported TARGET/TARGET_ARCH pairs
>   #                       for world and kernel targets.
>   # toolchains          - Build a toolchain for all world and kernel targets.
> +#
> +# "quick" way to test all kernel builds:
> +# 	_jflag=`sysctl -n hw.ncpu`
> +# 	_jflag=$(($_jflag * 2))
> +# 	[ $_jflag -gt 12 ]&&  _jflag=12
> +# 	make universe -DMAKE_JUST_KERNELS JFLAG=${jflag}
>   #
>   # This makefile is simple by design. [...]

I think it's probably helpful to point out the -j flag, but I'm
not sure I would phrase it as if we're sure that the values here
are the ideal ones.  I expect the ideal values depend too much on
hardware (e.g.: the CPU, type of disk used, and amount of memory
on the machine).  I did a lot of benchmarks of -j a few years
ago on the few machines I owned.  In my case, when I averaged
the results across my machines, the ideal value was more like
ncpu+1, not ncpu*2.

It wouldn't surprise me at all if the ideal value has changed
since I did that.  And it wouldn't surprise me if the ideal
value changes again in the next two years, especially when
one considers the variety of hardware architectures that
FreeBSD runs on.

It's good to mention the make command, the -DMAKE_JUST_KERNELS,
and that using the JFLAG can speed things up.  But I think it
should be said that this min(jcpu*2, 12) recommendation works
well for some hardware, but that people might need to do their
own checking to see what value will work best on their hardware.

Put some short and generic recommendation in the makefile, and
then point people at a man page or some other documentation
for a more detailed explanation.  IMO.

-- 
Garance Alistair Drosehn                =     drosih@rpi.edu
Senior Systems Programmer               or   gad@FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 01:41:22 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 25C03C4F;
 Tue,  9 Jul 2013 01:41:22 +0000 (UTC)
 (envelope-from rmacklem@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 167A81BA4;
 Tue,  9 Jul 2013 01:41:22 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r691fLbX092827;
 Tue, 9 Jul 2013 01:41:21 GMT (envelope-from rmacklem@svn.freebsd.org)
Received: (from rmacklem@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r691VaIA090189;
 Tue, 9 Jul 2013 01:31:36 GMT (envelope-from rmacklem@svn.freebsd.org)
Message-Id: <201307090131.r691VaIA090189@svn.freebsd.org>
From: Rick Macklem 
Date: Tue, 9 Jul 2013 01:31:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253051 - head/sbin/mount_nfs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 01:41:22 -0000

Author: rmacklem
Date: Tue Jul  9 01:31:36 2013
New Revision: 253051
URL: http://svnweb.freebsd.org/changeset/base/253051

Log:
  Document the "gssname" and "allgssname" mount options added by the
  host-based initiator credential patches.
  This is a content change.

Modified:
  head/sbin/mount_nfs/mount_nfs.8

Modified: head/sbin/mount_nfs/mount_nfs.8
==============================================================================
--- head/sbin/mount_nfs/mount_nfs.8	Tue Jul  9 01:31:04 2013	(r253050)
+++ head/sbin/mount_nfs/mount_nfs.8	Tue Jul  9 01:31:36 2013	(r253051)
@@ -28,7 +28,7 @@
 .\"	@(#)mount_nfs.8	8.3 (Berkeley) 3/29/95
 .\" $FreeBSD$
 .\"
-.Dd December 9, 2012
+.Dd July 8, 2013
 .Dt MOUNT_NFS 8
 .Os
 .Sh NAME
@@ -118,6 +118,13 @@ for regular files, and 30 -> 60 seconds 
 The algorithm to calculate the timeout is based on the age of the file.
 The older the file,
 the longer the cache is considered valid, subject to the limits above.
+.It Cm allgssname
+This option can be used along with
+.Fl o Cm gssname
+to specify that all operations should use the host-based initiator
+credential.
+This may be used for clients that run system daemons that need to
+access files on the NFSv4 mounted volume.
 .It Cm bg
 If an initial attempt to contact the server fails, fork off a child to keep
 trying the mount in the background.
@@ -138,6 +145,23 @@ short.
 .It Cm fg
 Same as not specifying
 .Cm bg .
+.It Cm gssname Ns = Ns Aq Ar service-principal-name
+This option can be used with the KerberosV security flavors for NFSv4 mounts
+to specify the
+.Dq "service-principal-name"
+of a host-based entry in the default
+keytab file that is used for system operations.
+It allows the mount to be performed by
+.Dq "root"
+and avoids problems with
+cached credentials for the system operations expiring.
+The
+.Dq "service-prinicpal-name"
+should be specified without instance or domain and is typically
+.Dq "host" ,
+.Dq "nfs"
+or
+.Dq "root" .
 .It Cm hard
 Same as not specifying
 .Cm soft .

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 01:41:22 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 5987AC50;
 Tue,  9 Jul 2013 01:41:22 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 32BBD1BA5;
 Tue,  9 Jul 2013 01:41:22 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r691fLbZ092827;
 Tue, 9 Jul 2013 01:41:22 GMT (envelope-from pfg@svn.freebsd.org)
Received: (from pfg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r691V4wJ090149;
 Tue, 9 Jul 2013 01:31:04 GMT (envelope-from pfg@svn.freebsd.org)
Message-Id: <201307090131.r691V4wJ090149@svn.freebsd.org>
From: "Pedro F. Giffuni" 
Date: Tue, 9 Jul 2013 01:31:04 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253050 - head/sys/fs/ext2fs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 01:41:22 -0000

Author: pfg
Date: Tue Jul  9 01:31:04 2013
New Revision: 253050
URL: http://svnweb.freebsd.org/changeset/base/253050

Log:
  Enhancement when writing an entire block of a file.
  
  Merge from UFS r231313:
  
  This change first attempts the uiomove() to the newly allocated
  (and dirty) buffer and only zeros it if the uiomove() fails. The
  effect is to eliminate the gratuitous zeroing of the buffer in
  the usual case where the uiomove() successfully fills it.
  
  MFC after:	3 days

Modified:
  head/sys/fs/ext2fs/ext2_vnops.c

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c	Tue Jul  9 01:05:28 2013	(r253049)
+++ head/sys/fs/ext2fs/ext2_vnops.c	Tue Jul  9 01:31:04 2013	(r253050)
@@ -1812,15 +1812,6 @@ ext2_write(struct vop_write_args *ap)
 		if (error != 0)
 			break;
 
-		/*
-		 * If the buffer is not valid and we did not clear garbage
-		 * out above, we have to do so here even though the write
-		 * covers the entire buffer in order to avoid a mmap()/write
-		 * race where another process may see the garbage prior to
-		 * the uiomove() for a write replacing it.
-		 */
-		if ((bp->b_flags & B_CACHE) == 0 && fs->e2fs_bsize <= xfersize)
-			vfs_bio_clrbuf(bp);
 		if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
 			bp->b_flags |= B_NOCACHE;
 		if (uio->uio_offset + xfersize > ip->i_size)
@@ -1831,6 +1822,26 @@ ext2_write(struct vop_write_args *ap)
 
 		error =
 		    uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
+		/*
+		 * If the buffer is not already filled and we encounter an
+		 * error while trying to fill it, we have to clear out any
+		 * garbage data from the pages instantiated for the buffer.
+		 * If we do not, a failed uiomove() during a write can leave
+		 * the prior contents of the pages exposed to a userland mmap.
+		 *
+		 * Note that we need only clear buffers with a transfer size
+		 * equal to the block size because buffers with a shorter
+		 * transfer size were cleared above by the call to ext2_balloc()
+		 * with the BA_CLRBUF flag set.
+		 *
+		 * If the source region for uiomove identically mmaps the
+		 * buffer, uiomove() performed the NOP copy, and the buffer
+		 * content remains valid because the page fault handler
+		 * validated the pages.
+		 */
+		if (error != 0 && (bp->b_flags & B_CACHE) == 0 &&
+		    fs->e2fs_bsize == xfersize)
+			vfs_bio_clrbuf(bp);
 		if (ioflag & (IO_VMIO|IO_DIRECT)) {
 			bp->b_flags |= B_RELBUF;
 		}

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 01:55:35 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 735D0263;
 Tue,  9 Jul 2013 01:55:35 +0000 (UTC)
 (envelope-from emaste@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 661691C73;
 Tue,  9 Jul 2013 01:55:35 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r691tZ4H096176;
 Tue, 9 Jul 2013 01:55:35 GMT (envelope-from emaste@svn.freebsd.org)
Received: (from emaste@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r691tZBD096175;
 Tue, 9 Jul 2013 01:55:35 GMT (envelope-from emaste@svn.freebsd.org)
Message-Id: <201307090155.r691tZBD096175@svn.freebsd.org>
From: Ed Maste 
Date: Tue, 9 Jul 2013 01:55:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253052 - head/sys/arm/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 01:55:35 -0000

Author: emaste
Date: Tue Jul  9 01:55:34 2013
New Revision: 253052
URL: http://svnweb.freebsd.org/changeset/base/253052

Log:
  Remove extraneous format string converison specifier
  
  Submitted by:	wxs@

Modified:
  head/sys/arm/arm/pmap-v6.c

Modified: head/sys/arm/arm/pmap-v6.c
==============================================================================
--- head/sys/arm/arm/pmap-v6.c	Tue Jul  9 01:31:36 2013	(r253051)
+++ head/sys/arm/arm/pmap-v6.c	Tue Jul  9 01:55:34 2013	(r253052)
@@ -3336,7 +3336,7 @@ pmap_pv_reclaim(pmap_t locked_pmap)
 				m = PHYS_TO_VM_PAGE(l2pte_pa(*ptep));
 				KASSERT((vm_offset_t)m >= KERNBASE,
 				    ("Trying to access non-existent page "
-				     "va %x pte %x in %s", va, *ptep));
+				     "va %x pte %x", va, *ptep));
 				*ptep = 0;
 				PTE_SYNC(ptep);
 				pmap_nuke_pv(m, pmap, pv);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 02:50:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 9D628F85;
 Tue,  9 Jul 2013 02:50:05 +0000 (UTC)
 (envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 908591FDA;
 Tue,  9 Jul 2013 02:50:05 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r692o5D3011561;
 Tue, 9 Jul 2013 02:50:05 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r692o5sG011560;
 Tue, 9 Jul 2013 02:50:05 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201307090250.r692o5sG011560@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 9 Jul 2013 02:50:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253053 - head/sys/arm/ti
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 02:50:05 -0000

Author: rpaulo
Date: Tue Jul  9 02:50:05 2013
New Revision: 253053
URL: http://svnweb.freebsd.org/changeset/base/253053

Log:
  Improve a comment.

Modified:
  head/sys/arm/ti/ti_mmchs.c

Modified: head/sys/arm/ti/ti_mmchs.c
==============================================================================
--- head/sys/arm/ti/ti_mmchs.c	Tue Jul  9 01:55:34 2013	(r253052)
+++ head/sys/arm/ti/ti_mmchs.c	Tue Jul  9 02:50:05 2013	(r253053)
@@ -212,11 +212,9 @@ ti_mmchs_reset_controller(struct ti_mmch
 
 	sysctl = ti_mmchs_read_4(sc, MMCHS_SYSCTL);
 	ti_mmchs_write_4(sc, MMCHS_SYSCTL, sysctl | bit);
-
-
 	/* 
-	 * AM335x and OMAP4 ES2 and greater has an updated reset logic.
-	 * Monitor a 0->1 transition first
+	 * AM335x and OMAP4 >= ES2 have an updated reset logic.
+	 * Monitor a 0->1 transition first.
 	 */
 	if ((ti_chip() == CHIP_AM335X) || 
 	    ((ti_chip() == CHIP_OMAP_4) && (ti_revision() > OMAP4430_REV_ES1_0))) {

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 03:00:06 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id B20AE33F;
 Tue,  9 Jul 2013 03:00:06 +0000 (UTC)
 (envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id A519A1090;
 Tue,  9 Jul 2013 03:00:06 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69306nf014319;
 Tue, 9 Jul 2013 03:00:06 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69306mq014318;
 Tue, 9 Jul 2013 03:00:06 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201307090300.r69306mq014318@svn.freebsd.org>
From: Rui Paulo 
Date: Tue, 9 Jul 2013 03:00:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253054 - head/sys/dev/mmc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 03:00:06 -0000

Author: rpaulo
Date: Tue Jul  9 03:00:06 2013
New Revision: 253054
URL: http://svnweb.freebsd.org/changeset/base/253054

Log:
  Use meaningful names when creating mmc/sd threads.
  
  This can be useful when we want to be able to identify which mmcsd is stuck.

Modified:
  head/sys/dev/mmc/mmcsd.c

Modified: head/sys/dev/mmc/mmcsd.c
==============================================================================
--- head/sys/dev/mmc/mmcsd.c	Tue Jul  9 02:50:05 2013	(r253053)
+++ head/sys/dev/mmc/mmcsd.c	Tue Jul  9 03:00:06 2013	(r253054)
@@ -199,7 +199,8 @@ mmcsd_attach(device_t dev)
 	sc->running = 1;
 	sc->suspend = 0;
 	sc->eblock = sc->eend = 0;
-	kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "task: mmc/sd card");
+	kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "%s: mmc/sd card", 
+	    device_get_nameunit(dev));
 
 	return (0);
 }
@@ -260,7 +261,8 @@ mmcsd_resume(device_t dev)
 	if (sc->running <= 0) {
 		sc->running = 1;
 		MMCSD_UNLOCK(sc);
-		kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "task: mmc/sd card");
+		kproc_create(&mmcsd_task, sc, &sc->p, 0, 0, "%s: mmc/sd card",
+		    device_get_nameunit(dev));
 	} else
 		MMCSD_UNLOCK(sc);
 	return (0);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 05:01:41 2013
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 02EF084D;
 Tue,  9 Jul 2013 05:01:41 +0000 (UTC) (envelope-from sjg@juniper.net)
Received: from db9outboundpool.messaging.microsoft.com
 (mail-db9lp0251.outbound.messaging.microsoft.com [213.199.154.251])
 by mx1.freebsd.org (Postfix) with ESMTP id 646C217DB;
 Tue,  9 Jul 2013 05:01:39 +0000 (UTC)
Received: from mail96-db9-R.bigfish.com (10.174.16.237) by
 DB9EHSOBE014.bigfish.com (10.174.14.77) with Microsoft SMTP Server id
 14.1.225.22; Tue, 9 Jul 2013 04:31:21 +0000
Received: from mail96-db9 (localhost [127.0.0.1])	by mail96-db9-R.bigfish.com
 (Postfix) with ESMTP id 2E24A2400BD;
 Tue,  9 Jul 2013 04:31:21 +0000 (UTC)
X-Forefront-Antispam-Report: CIP:66.129.224.50; KIP:(null); UIP:(null); IPV:NLI;
 H:P-EMHUB02-HQ.jnpr.net; RD:none; EFVD:NLI
X-SpamScore: 3
X-BigFish: VPS3(zzzz1f42h1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzzz2fh2a8h668h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b88h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1155h)
Received-SPF: pass (mail96-db9: domain of juniper.net designates 66.129.224.50
 as permitted sender) client-ip=66.129.224.50; envelope-from=sjg@juniper.net;
 helo=P-EMHUB02-HQ.jnpr.net ; -HQ.jnpr.net ; 
Received: from mail96-db9 (localhost.localdomain [127.0.0.1]) by mail96-db9
 (MessageSwitch) id 1373344280130171_4924; Tue,  9 Jul 2013 04:31:20 +0000
 (UTC)
Received: from DB9EHSMHS030.bigfish.com (unknown [10.174.16.238])	by
 mail96-db9.bigfish.com (Postfix) with ESMTP id 1A2ED80046;	Tue,  9 Jul 2013
 04:31:20 +0000 (UTC)
Received: from P-EMHUB02-HQ.jnpr.net (66.129.224.50) by
 DB9EHSMHS030.bigfish.com (10.174.14.40) with Microsoft SMTP Server (TLS) id
 14.16.227.3; Tue, 9 Jul 2013 04:31:19 +0000
Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB02-HQ.jnpr.net
 (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 8 Jul
 2013 21:31:18 -0700
Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229])	by
 magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r694VIL63577;	Mon, 8 Jul
 2013 21:31:18 -0700 (PDT)	(envelope-from sjg@juniper.net)
Received: from chaos.jnpr.net (localhost [127.0.0.1])	by chaos.jnpr.net
 (Postfix) with ESMTP id C181758097;	Mon,  8 Jul 2013 21:31:17 -0700 (PDT)
To: Devin Teske 
Subject: Re: svn commit: r253002 - head
In-Reply-To: <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org>
 <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
Comments: In-reply-to: "Teske, Devin" 
 message dated "Tue, 09 Jul 2013 00:12:22 -0000."
From: "Simon J. Gerraty" 
X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1
Date: Mon, 8 Jul 2013 21:31:17 -0700
Message-ID: <20130709043117.C181758097@chaos.jnpr.net>
MIME-Version: 1.0
Content-Type: text/plain
X-OriginatorOrg: juniper.net
X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn%
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" ,
 Garrett Cooper 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 05:01:41 -0000

>We've run as high as -j48 ... number of logical cpu's "times-two" (it was o=
>n a box with 24 logical CPUs).

We've (ok dhw@ has) done a lot of empirical measurement
to determine optimal jobs_factor numbers for various machines.
Right now we are using .75 for boxes with > 16 cores.
For smaller boxes we use up to 1.5

Scaling on NUMA boxes is a sore point ;-)
If someone could get FreeBSD to scale on larger (64 core) NUMA boxes
that would be excellent.



From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 05:36:25 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 08AE1C56;
 Tue,  9 Jul 2013 05:36:25 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au
 [211.29.132.246])
 by mx1.freebsd.org (Postfix) with ESMTP id 7A97318D2;
 Tue,  9 Jul 2013 05:36:23 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 9C4BA420985;
 Tue,  9 Jul 2013 15:36:15 +1000 (EST)
Date: Tue, 9 Jul 2013 15:36:13 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: "Pedro F. Giffuni" 
Subject: Re: svn commit: r253045 - head/sys/fs/ext2fs
In-Reply-To: <201307082021.r68KLanT005030@svn.freebsd.org>
Message-ID: <20130709131546.K1312@besplex.bde.org>
References: <201307082021.r68KLanT005030@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=Q6eKePKa c=1 sm=1 a=Ot8oeJroF2sA:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=AD96D3NyImQA:10
 a=UqKkTzXlbx42FBnIQX8A:9 a=CjuIK1q_8ugA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org, kib@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 05:36:25 -0000

On Mon, 8 Jul 2013, Pedro F. Giffuni wrote:

> Log:
>  Avoid a panic and return EINVAL instead.
>
>  Merge from UFS r232692:
>  syscall() fuzzing can trigger this panic.

This breaks the assertion without fixing the bug.

I don't know what is in the inscrutable reference r232692, but UFS doesn't
exist, and ffs still has the assertions.  Even ext2fs_write() still has
the assertions.

> Modified: head/sys/fs/ext2fs/ext2_vnops.c
> ==============================================================================
> --- head/sys/fs/ext2fs/ext2_vnops.c	Mon Jul  8 19:40:50 2013	(r253044)
> +++ head/sys/fs/ext2fs/ext2_vnops.c	Mon Jul  8 20:21:36 2013	(r253045)
> @@ -1598,11 +1598,11 @@ ext2_read(struct vop_read_args *ap)
> 	} else if (vp->v_type != VREG && vp->v_type != VDIR)
> 		panic("%s: type %d", "ext2_read", vp->v_type);
> #endif
> +	if (uio->uio_resid < 0 || uio->uio_offset < 0)
> +		return (EINVAL);
> 	orig_resid = uio->uio_resid;
> -	KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0"));
> 	if (orig_resid == 0)
> 		return (0);

Syscall fuzzing doesn't trigger this panic.  One of the many type errors
in ext2fs used to be trigger this panic.  Now this type error just gives
EINVAL for valid syscalls.

The type error is that orig_resid stil has type int, but uio->uio_resid
has type ssize_t.  SSIZE_MAX is is perfectly broken to POSIX spec, so
on 64-bit arches ssize_t is int64_t and SSIZE_MAX is 2**63-1.  So on
64-bit arches, anyone can easily trigger the panic using invalid syscall
args where uio->uio_resid is larger than INT_MAX and this is larger
than the buffer; anyone with a large amount of virtual memory and a
large data segment size limit can not quite so easily trigger the panic
using valid syscall args where uio->uio_resid is larger than INT_MAX
and this is not larger than the buffer.  Assignment to orig_resid then
overflows.  The behaviour is implementation-defined and is normally
to truncate the value (the FreeBSD implementation is missing
documentation to say this).  Sometimes the result is negative so the
error is detected.  Othertimes a truncated positive or zero value is
used, and the final result either a too-short i/o (if more than the
truncated count could be done) or actually correct (if the i/o is a
read() and EOF is reached before the non-truncated part of the count
is needed).

> -	KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0"));
> 	fs = ip->i_e2fs;
> 	if (uio->uio_offset < ip->i_size &&
> 	    uio->uio_offset >= fs->e2fs_maxfilesize)

This part of the change is just wrong.  uio->uio_offset is not copied to
a local variable of either the correct type or a wrong type, and there are
no problems with checking it directly.  Also, it has been 64 bits on all
arches in FreeBSD since FreeBSD-2, so doing a wrong check of it here is
presumably not necessary for avoiding worse problems later.

This commit doesn't change the KASSERT()s in ext2_write().  Now the
truncation bug doesn't affect the first KASSERT(), since uio->uio_resid
is not corrupted before checking it.

I thought that kib swept the tree to fix all the resid types to ssize_t
when he expanded the limit for read() and write(), etc.  Grep shows
that orig_resid has the correct type in all file systems in /sys/fs
except ext2fs.  It is spelled the same in ext2fs, msdosfs and nfsclient.
udf doesn't need it since its only use in the other file systems is to
handle setting of atime at the end, and udf is read-only.  But udf has
the following bugs handling uio->uio_resid: in udf_read():
- uio->uio_resid < 0 is not checked on entry, either to return EINVAL
   or panic.  Of course, this can't happen and the check doesn't belong
   in every file system.  Perhaps it could be moved to VOP_READ() and
   VOP_WRITE(), and omitted there more often than most KASSERT()s.
- uio->uio_resid == 0 is checked on entry.  Most or all file systems do
   this, but I think this can't happen either.
- uio->uio_offset < 0 is checked on entry, but not under a KASSERT() as
   on most file systems.  Putting it under KASSERT() saves space when
   invariants are not configured.
- uio->uio_resid is assigned to a variable n of the correct type.  The
   code using this seems to be OK.
- there is the following very bad code:
 		n = min((u_int)(udfmp->bsize - on),
 			uio->uio_resid);
   Here n has the correct type, but min() corrupts its uio->uio_resid arg
   to u_int.  The corruption gives much the same implementation-defined
   bugs as truncation by assignment to "int uio_resid", except more than
   1 of the misbehaviours may occur in a single syscall as uio->resid
   mod 2**32 crosses the 0 boundary.

   This and related code has many style bugs:
   - bogus cast to u_int.  min() converts both its args to u_int.  The
     conversion is normally (too) silent and the cast is even more silent.
     So the cast can at most break warnings about dubious types.
   - dubious and wrong types include:
        ssize_t n
        long size, on
     Except for the previous unrelated use of n, these variables are all for
     the block size and small offsets within a block.  They should have type
     int or u_int.  'on' is short for "old n".  It should have the same type
     as n.  I think the type of n was changed to ssize_t so that its other
     use was correct.  But it shouldn't have been used for unrelated variables.
   - n is bogusly cast to int in the call to uiomove() later.  I think this
     dates from 1980's code that this was cloned from (n had type long for
     bogus reasons, but fitted on an int, and uiomove() wasn't prototyped
     so this cast was required to support K&R).

Not quite similarly in cd9660_read().  It was just like udf_read() except
its n is not aboved for an unrelated purpose and it still has type long.
'long' is accidentally the same as ssize_t on all supported arches, but
isn't used to hold uio->uio_resid, and using it for n is bogus too, as
above above.  cd9660_read() used to use min() in the same place as
udf_read().  But someone fixed the corruption of uio->uio_resid in
min() by changing min() to MIN().  Using MIN() is a style bug.  It was
intentionally left out of 4.4BSD in the kernel, but contribed code kept
using this deprecated KPI and the KPI was broken to match and then non-
contribed code started using it too :-(.  MIN() has the disadvantages
of being unsafe and ugly.  The min() family has the disadantage of not
being type-generic; type errors using it are common.

Not similarly in devfs.  devfs_read() spells orig_resid worse as plain
resid, but doesn't have the type error.

Not similarly in fdescfs.  It uses uio_resid in fdesc_readdir().  It
has a lower limit of UIO_MAX instead of 1.  Similarly in fuse.

Not similarly in nandfs.  It doesn't check for uio_resid < 0.  It
replaces min() by omin().  This gives another type that is harmless
in practice.  omin() is for off_t's, but is used with an ssize_t
resid and an off_t filesize, after previously corrupting the filesize
variable from a uint64_t to an off_t.  64 bits signed should be enough
for anyone.  The logic seems to be broken if uio_resid < 0 actually
occurs.

Not similarly in pseudofs.  pfs_read() checks correctly for uio_resid < 0,
but handles this by returning EINVAL instead of KASSERT().  It has a
variable resid of type ssize_t, but doesn't do anything with this except
assign uio_resid to it so as to get an overflow if the types are broken
and the value doesn't fit.  This made more  sense when resid had type int.
It still has an INT_MAX limit on buflen and a bogus overflow check for
buflen (check for overflow after overflow has already caused undefined
behaviour).  The undefined behaviour can still easily occur on 32-bit
systems, since exoanding resid and buflen to ssize_t doesn't really
change them on 32-bit systems.  pfs_readdir() still assigns uio_resid
to "int resid".  Then it has a lower limit of more than 0 on resid,
as in fdesc_readdir() but now the check is broken since uio_resid was
corrupted by assignment to resid.

Not similarly in tmpfs.  tmpfs manages to combine most of the bugs.
tmpfs_read() starts with "int resid".  Then it has null sanity checking
for uio_resid (it does check uio_offset and handles it using EINVAL
instead of KASSERT().) Then it corrupts uio_resid by assigning it to
resid in the main loop.  The loop continuation criterion is that
corrupted resid is > 0.  Of course it uses the MIN() style bug.  It
doesn't use the old 'n' and 'on' variable names.  tmpfs_write() also
uses "int resid", but first does some checks using the uncorrupted
uio_resid.  The one for EFBIG depends on undefined behaviour to work.
Where ffs carefully casts the offset + resid expression to use uoff_t,
tmpfs lets it overflow and then converts the result to u_int64_t (sic),
provided off_t is no larger than 64 bits.  Normally the overflow is
benign and off_t is 64 bits, so this works.  Many cases where uio_resid
< 0 are detected accidentally here, since they cause offset + resid
to be negative and converting this this to u_int64_t often overflows
to a value > maxfilesize.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 05:39:37 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id C4044DB6;
 Tue,  9 Jul 2013 05:39:37 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au
 [211.29.132.97])
 by mx1.freebsd.org (Postfix) with ESMTP id 72BED18E6;
 Tue,  9 Jul 2013 05:39:37 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 16B6978104C;
 Tue,  9 Jul 2013 15:39:30 +1000 (EST)
Date: Tue, 9 Jul 2013 15:39:29 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: "Pedro F. Giffuni" 
Subject: Re: svn commit: r253050 - head/sys/fs/ext2fs
In-Reply-To: <201307090131.r691V4wJ090149@svn.freebsd.org>
Message-ID: <20130709153911.R1312@besplex.bde.org>
References: <201307090131.r691V4wJ090149@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=eqSHVfVX c=1 sm=1 a=90iWynEP2-8A:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=AD96D3NyImQA:10
 a=6I5d2MoRAAAA:8 a=KuIX9Q-2l-uLVCl-5lUA:9 a=CjuIK1q_8ugA:10
 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 05:39:37 -0000



On Tue, 9 Jul 2013, Pedro F. Giffuni wrote:

> Author: pfg
> Date: Tue Jul  9 01:31:04 2013
> New Revision: 253050
> URL: http://svnweb.freebsd.org/changeset/base/253050
>
> Log:
>  Enhancement when writing an entire block of a file.
>
>  Merge from UFS r231313:
>
>  This change first attempts the uiomove() to the newly allocated
>  (and dirty) buffer and only zeros it if the uiomove() fails. The
>  effect is to eliminate the gratuitous zeroing of the buffer in
>  the usual case where the uiomove() successfully fills it.
>
>  MFC after:	3 days
>
> Modified:
>  head/sys/fs/ext2fs/ext2_vnops.c
>
> Modified: head/sys/fs/ext2fs/ext2_vnops.c
> ==============================================================================
> --- head/sys/fs/ext2fs/ext2_vnops.c	Tue Jul  9 01:05:28 2013	(r253049)
> +++ head/sys/fs/ext2fs/ext2_vnops.c	Tue Jul  9 01:31:04 2013	(r253050)
> @@ -1812,15 +1812,6 @@ ext2_write(struct vop_write_args *ap)
> 		if (error != 0)
> 			break;
>
> -		/*
> -		 * If the buffer is not valid and we did not clear garbage
> -		 * out above, we have to do so here even though the write
> -		 * covers the entire buffer in order to avoid a mmap()/write
> -		 * race where another process may see the garbage prior to
> -		 * the uiomove() for a write replacing it.
> -		 */
> -		if ((bp->b_flags & B_CACHE) == 0 && fs->e2fs_bsize <= xfersize)
> -			vfs_bio_clrbuf(bp);
> 		if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL))
> 			bp->b_flags |= B_NOCACHE;
> 		if (uio->uio_offset + xfersize > ip->i_size)
> @@ -1831,6 +1822,26 @@ ext2_write(struct vop_write_args *ap)
>
> 		error =
> 		    uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio);
> +		/*
> +		 * If the buffer is not already filled and we encounter an
> +		 * error while trying to fill it, we have to clear out any
> +		 * garbage data from the pages instantiated for the buffer.
> +		 * If we do not, a failed uiomove() during a write can leave
> +		 * the prior contents of the pages exposed to a userland mmap.
> +		 *
> +		 * Note that we need only clear buffers with a transfer size
> +		 * equal to the block size because buffers with a shorter
> +		 * transfer size were cleared above by the call to ext2_balloc()
> +		 * with the BA_CLRBUF flag set.
> +		 *
> +		 * If the source region for uiomove identically mmaps the
> +		 * buffer, uiomove() performed the NOP copy, and the buffer
> +		 * content remains valid because the page fault handler
> +		 * validated the pages.
> +		 */
> +		if (error != 0 && (bp->b_flags & B_CACHE) == 0 &&
> +		    fs->e2fs_bsize == xfersize)
> +			vfs_bio_clrbuf(bp);
> 		if (ioflag & (IO_VMIO|IO_DIRECT)) {
> 			bp->b_flags |= B_RELBUF;
> 		}
>

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 05:42:53 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E6767F23;
 Tue,  9 Jul 2013 05:42:53 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au
 [211.29.132.246])
 by mx1.freebsd.org (Postfix) with ESMTP id 95CCA190B;
 Tue,  9 Jul 2013 05:42:53 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id BA825420417;
 Tue,  9 Jul 2013 15:42:51 +1000 (EST)
Date: Tue, 9 Jul 2013 15:42:50 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Bruce Evans 
Subject: Re: svn commit: r253050 - head/sys/fs/ext2fs
In-Reply-To: <20130709153911.R1312@besplex.bde.org>
Message-ID: <20130709154027.R1664@besplex.bde.org>
References: <201307090131.r691V4wJ090149@svn.freebsd.org>
 <20130709153911.R1312@besplex.bde.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=Q6eKePKa c=1 sm=1 a=90iWynEP2-8A:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=AD96D3NyImQA:10
 a=wVVh87SqMG8e3yxj5-0A:9 a=CjuIK1q_8ugA:10 a=8VGHg2_nSw8A:10
 a=_91Mhe1s9AIA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 "Pedro F. Giffuni" , src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 05:42:54 -0000

On Tue, 9 Jul 2013, Bruce Evans wrote:

> On Tue, 9 Jul 2013, Pedro F. Giffuni wrote:
>> ...
>> Log:
>>  Enhancement when writing an entire block of a file.
>> 
>>  Merge from UFS r231313:
>> ...

Oops, I didn't mean to reply to that (it seemed to be correct :-), and
just quoted it all.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 05:45:16 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 3279C107
 for ; Tue,  9 Jul 2013 05:45:16 +0000 (UTC)
 (envelope-from peter@wemm.org)
Received: from mail-vc0-x22f.google.com (mail-vc0-x22f.google.com
 [IPv6:2607:f8b0:400c:c03::22f])
 by mx1.freebsd.org (Postfix) with ESMTP id E64A6191F
 for ; Tue,  9 Jul 2013 05:45:15 +0000 (UTC)
Received: by mail-vc0-f175.google.com with SMTP id hr11so4030758vcb.34
 for ; Mon, 08 Jul 2013 22:45:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=gYHq3ku4q4DQYe5BqaWU1PCPRkNohmxzDi8vafFtyCI=;
 b=MX/kqkgv+XKVRIsAVHzAMWy90ZJ5n98SPo9KKR2PZ01IEp4npqGCkT2OKa6pcevBoN
 jBpbstT+VJIGW2vGoJS7DCwUD0Pzqxj+tIGIt6bEGoLLwmEISxOe2nZW1zGeab0RWl6H
 yGy1YaHdyIYyvv52orCbYKrbJAMvewr1CZVjw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=google.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type:x-gm-message-state;
 bh=gYHq3ku4q4DQYe5BqaWU1PCPRkNohmxzDi8vafFtyCI=;
 b=GFXRclKnvPOeA0Bp8rhfwStsbQeO1apMC24LcqFryq3gTZg2apM8/GlMS4NAIfCeqX
 hd/ZbFt+VaZPm2AK5ZUKTKQEIlXNCJmfCLZB8Uoz0P8BQoEbH1+5ISlSBEzGV7Iu2M8C
 uUcfnTqw/TUju8+jyWEjkP8TK5d3JQHK+HJHbBwUzhauWYSvEfxlt5f/T+FhL7r1gvhj
 TUdf01JX6PTqOolhL6GUyrQryGupBtfFodqmVCCxV8RrrA3BQHa34b9BbjGB7TQHveON
 988CMYNOmsb8kVF1xsGVt2miKaoSudZRsQwjyqY9/Y8wjjmz5XkMkLCguX+kCVYGnCcD
 y2sQ==
MIME-Version: 1.0
X-Received: by 10.220.47.131 with SMTP id n3mr15677249vcf.7.1373348715408;
 Mon, 08 Jul 2013 22:45:15 -0700 (PDT)
Received: by 10.221.37.198 with HTTP; Mon, 8 Jul 2013 22:45:15 -0700 (PDT)
In-Reply-To: <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <9D4C7540-A3B0-45E5-8219-6A455D41DF70@gmail.com>
 <51D9DA55.2090808@freebsd.org>
 <13CA24D6AB415D428143D44749F57D7201FB7609@ltcfiswmsgmb21>
Date: Mon, 8 Jul 2013 22:45:15 -0700
Message-ID: 
Subject: Re: svn commit: r253002 - head
From: Peter Wemm 
To: Devin Teske 
Content-Type: text/plain; charset=ISO-8859-1
X-Gm-Message-State: ALoCoQn5g65Fr3d3/BsjBic9g3TWCzcbjMg1jPTK1TCZxDt6xxtmKqFfnvwWCJkI5h85W8Kb4WA8
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" ,
 Garrett Cooper 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 05:45:16 -0000

On Mon, Jul 8, 2013 at 5:12 PM, Teske, Devin  wrote:
> On Jul 7, 2013, at 2:15 PM, Alfred Perlstein wrote:
>
>> On 7/7/13 2:01 PM, Garrett Cooper wrote:
>>> Why the magic number 12?
>>
>> Numbers higher seem to result in worse performance as reported by some members of my team.
>>
>
> We've run as high as -j48 ... number of logical cpu's "times-two" (it was on a box with 24 logical CPUs).

There's an additional constraint.  -j48 and 48 running instances of
clang++ and its memory demands when compiling C++ code each starts to
get non-trivial.

> We did buildworld in under 9 minutes. Beyond the "times-two" rule we saw a slow-down.
>
> NOTE: I might also mention this was on RAID-1 SSD.

On the cluster we get about 9 minutes on RELENG_9 with WITHOUT_CLANG.
About 11 minutes including the kernel.  Boring old disks with -j24.

I'd be pleasantly surprised if you were doing HEAD in < 9 minutes
given that it frequently fails to build with more than -j8 or -j10.
(I've heard this might be fixed.. but I'm skeptical as I had a -j2
race last week)

But we are talking about a commit giving advice for building kernels
here, right?

>>>> Log:
>>>>  Document tip on how to build all kernels quickly.

I used to use -j1000 to stress test context switching with a LINT
build - that was when we ran into FD_SETSIZE vs make.  Kernel builds
have always been highly tolerant of  very large -j values because
idiots like me used to use it to try and break things.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV
UTF-8: So you can \342\200\231 .. for when a ' just won't do
 ZFS must be the bacon of file systems. "everything's better with ZFS"

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 07:03:54 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id ED72FF5C;
 Tue,  9 Jul 2013 07:03:54 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E0DBE1C10;
 Tue,  9 Jul 2013 07:03:54 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6973st4087504;
 Tue, 9 Jul 2013 07:03:54 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6973sKc087503;
 Tue, 9 Jul 2013 07:03:54 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307090703.r6973sKc087503@svn.freebsd.org>
From: Hiroki Sato 
Date: Tue, 9 Jul 2013 07:03:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253057 - head/usr.sbin/rtadvd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 07:03:55 -0000

Author: hrs
Date: Tue Jul  9 07:03:54 2013
New Revision: 253057
URL: http://svnweb.freebsd.org/changeset/base/253057

Log:
  Add a missing white space.

Modified:
  head/usr.sbin/rtadvd/config.c

Modified: head/usr.sbin/rtadvd/config.c
==============================================================================
--- head/usr.sbin/rtadvd/config.c	Tue Jul  9 06:51:41 2013	(r253056)
+++ head/usr.sbin/rtadvd/config.c	Tue Jul  9 07:03:54 2013	(r253057)
@@ -1286,7 +1286,7 @@ make_prefix(struct rainfo *rai, int ifin
 
 	memset(&ipr, 0, sizeof(ipr));
 	if (if_indextoname(ifindex, ipr.ipr_name) == NULL) {
-		syslog(LOG_ERR, "<%s> Prefix added interface No.%d doesn't"
+		syslog(LOG_ERR, "<%s> Prefix added interface No.%d doesn't "
 		    "exist. This should not happen! %s", __func__,
 		    ifindex, strerror(errno));
 		exit(1);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 07:08:36 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id BA7DC1C1;
 Tue,  9 Jul 2013 07:08:36 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id AD4F11C3D;
 Tue,  9 Jul 2013 07:08:36 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6978ae5088348;
 Tue, 9 Jul 2013 07:08:36 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6978aK3088347;
 Tue, 9 Jul 2013 07:08:36 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307090708.r6978aK3088347@svn.freebsd.org>
From: Hiroki Sato 
Date: Tue, 9 Jul 2013 07:08:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253058 - head/usr.sbin/rtadvd
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 07:08:36 -0000

Author: hrs
Date: Tue Jul  9 07:08:36 2013
New Revision: 253058
URL: http://svnweb.freebsd.org/changeset/base/253058

Log:
  - Add missing "static" keywords.
  - Add a check for ifindex to if_indextoifinfo().  It returns NULL when
    if_indextoname() fails.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/rtadvd/rtadvd.c

Modified: head/usr.sbin/rtadvd/rtadvd.c
==============================================================================
--- head/usr.sbin/rtadvd/rtadvd.c	Tue Jul  9 07:03:54 2013	(r253057)
+++ head/usr.sbin/rtadvd/rtadvd.c	Tue Jul  9 07:08:36 2013	(r253058)
@@ -95,7 +95,7 @@ struct sockaddr_in6 rcvfrom;
 static const char *pidfilename = _PATH_RTADVDPID;
 const char *conffile = _PATH_RTADVDCONF;
 static struct pidfh *pfh;
-int dflag = 0, sflag = 0;
+static int dflag, sflag;
 static int wait_shutdown;
 
 #define	PFD_RAWSOCK	0
@@ -139,7 +139,7 @@ union nd_opt {
 #define NDOPT_FLAG_RDNSS	(1 << 5)
 #define NDOPT_FLAG_DNSSL	(1 << 6)
 
-uint32_t ndopt_flags[] = {
+static uint32_t ndopt_flags[] = {
 	[ND_OPT_SOURCE_LINKADDR]	= NDOPT_FLAG_SRCLINKADDR,
 	[ND_OPT_TARGET_LINKADDR]	= NDOPT_FLAG_TGTLINKADDR,
 	[ND_OPT_PREFIX_INFORMATION]	= NDOPT_FLAG_PREFIXINFO,
@@ -1637,6 +1637,11 @@ struct ifinfo *
 if_indextoifinfo(int idx)
 {
 	struct ifinfo *ifi;
+	char *name, name0[IFNAMSIZ];
+
+	/* Check if the interface has a valid name or not. */
+	if (if_indextoname(idx, name0) == NULL)
+		return (NULL);
 
 	TAILQ_FOREACH(ifi, &ifilist, ifi_next) {
 		if (ifi->ifi_ifindex == idx)

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 07:55:47 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id E42766DF;
 Tue,  9 Jul 2013 07:55:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BCCBD1E90;
 Tue,  9 Jul 2013 07:55:47 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r697tlXi002775;
 Tue, 9 Jul 2013 07:55:47 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r697tls1002774;
 Tue, 9 Jul 2013 07:55:47 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307090755.r697tls1002774@svn.freebsd.org>
From: Hiroki Sato 
Date: Tue, 9 Jul 2013 07:55:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253060 - head/share/man/man4
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 07:55:48 -0000

Author: hrs
Date: Tue Jul  9 07:55:47 2013
New Revision: 253060
URL: http://svnweb.freebsd.org/changeset/base/253060

Log:
  Document IPv6 support.

Modified:
  head/share/man/man4/bridge.4

Modified: head/share/man/man4/bridge.4
==============================================================================
--- head/share/man/man4/bridge.4	Tue Jul  9 07:51:11 2013	(r253059)
+++ head/share/man/man4/bridge.4	Tue Jul  9 07:55:47 2013	(r253060)
@@ -35,7 +35,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 9, 2010
+.Dd July 3, 2013
 .Dt IF_BRIDGE 4
 .Os
 .Sh NAME
@@ -142,6 +142,79 @@ This can be used to multiplex the input 
 stream.
 This is useful for reconstructing the traffic for network taps
 that transmit the RX/TX signals out through two separate interfaces.
+.Sh IPV6 SUPPORT
+.Nm
+supports the
+.Li AF_INET6
+address family on bridge interfaces.
+The following
+.Xr rc.conf 5
+variable configures an IPv6 link-local address on
+.Li bridge0
+interface: 
+.Bd -literal -offset indent
+ifconfig_bridge0_ipv6="up"
+.Ed
+.Pp
+or in a more explicit manner:
+.Bd -literal -offset indent
+ifconfig_bridge0_ipv6="inet6 auto_linklocal"
+.Ed
+.Pp
+However, the
+.Li AF_INET6
+address family has a concept of scope zone.
+Bridging multiple interfaces change the zone configuration because
+multiple links are merged to each other and form a new single link
+while the member interfaces still work individually.
+This means each member interface still has a separate link-local scope
+zone and the
+.Nm
+interface has another single,
+aggregated link-local scope zone at the same time.
+This situation is clearly against the description
+.Qq zones of the same scope cannot overlap
+in Section 5,
+RFC 4007.
+Although it works in most cases,
+it can cause some conterintuitive or undesirable behavior in some
+edge cases when both of the
+.Nm
+interface and one of the member interface have an IPv6 address
+and applications use both of them.
+.Pp
+To prevent this situation,
+.Nm
+checks whether an link-local scoped IPv6 address is configured on
+a member interface to be added and the 
+.Nm
+interface.
+When the
+.Nm
+interface has IPv6 addresses,
+IPv6 addresses on the member interface will be automatically removed
+before the interface is added.
+When both
+.Nm
+interface and the existing member interfaces do not have one,
+adding an interface with IPv6 addresses as a new member interface is allowed.
+These means only one interface in the link-local scope zone where the
+.Nm
+interface forms can have link-local scoped IPv6 addresses.
+.Pp
+Note that
+.Li ACCEPT_RTADV
+and
+.Li AUTO_LINKLOCAL
+interface flag are not enabled by default on
+.Nm
+interface even when
+.Va net.inet6.ip6.accept_rtadv
+and/or
+.Va net.inet6.ip6.auto_linklocal
+is set to
+.Li 1 .
+.Ed
 .Sh SPANNING TREE
 The
 .Nm

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 07:57:11 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 12AFC832;
 Tue,  9 Jul 2013 07:57:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 05B3A1E9F;
 Tue,  9 Jul 2013 07:57:11 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r697vAGm002975;
 Tue, 9 Jul 2013 07:57:10 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r697vALh002974;
 Tue, 9 Jul 2013 07:57:10 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307090757.r697vALh002974@svn.freebsd.org>
From: Hiroki Sato 
Date: Tue, 9 Jul 2013 07:57:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253061 - head/share/man/man5
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 07:57:11 -0000

Author: hrs
Date: Tue Jul  9 07:57:10 2013
New Revision: 253061
URL: http://svnweb.freebsd.org/changeset/base/253061

Log:
  Remove $swapfile and $geli_swap_flags.

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Tue Jul  9 07:55:47 2013	(r253060)
+++ head/share/man/man5/rc.conf.5	Tue Jul  9 07:57:10 2013	(r253061)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 25, 2013
+.Dd July 9, 2013
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -161,12 +161,6 @@ Setting this option will bypass that che
 always test whether or not the service is actually running.
 Enabling this option is likely to increase your boot time if
 services are enabled that utilize the force_depend check.
-.It Va swapfile
-.Pq Vt str
-If set to
-.Dq Li NO ,
-no swapfile is installed, otherwise the value is used as the full
-pathname to a file to use for additional swap space.
 .It Ao Ar name Ac Ns Va _chroot
 .Pq Vt str
 .Xr chroot
@@ -1890,12 +1884,6 @@ Default is
 This can be changed for every device separately by defining
 .Va geli_ Ns Ao Ar device Ac Ns Va _autodetach
 variable.
-.It Va geli_swap_flags
-Options passed to the
-.Xr geli 8
-utility when encrypted GEOM providers for swap partitions are created.
-The default is
-.Dq Li "-e aes -l 256 -s 4096 -d" .
 .It Va root_rw_mount
 .Pq Vt bool
 Set to

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:23:44 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 9CE7E36D;
 Tue,  9 Jul 2013 08:23:44 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 757E21FB0;
 Tue,  9 Jul 2013 08:23:44 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698Nilo012010;
 Tue, 9 Jul 2013 08:23:44 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698NiRj012008;
 Tue, 9 Jul 2013 08:23:44 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307090823.r698NiRj012008@svn.freebsd.org>
From: Hiroki Sato 
Date: Tue, 9 Jul 2013 08:23:44 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253066 - head/lib/libc/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:23:44 -0000

Author: hrs
Date: Tue Jul  9 08:23:43 2013
New Revision: 253066
URL: http://svnweb.freebsd.org/changeset/base/253066

Log:
  Update references.

Modified:
  head/lib/libc/net/getaddrinfo.3
  head/lib/libc/net/getnameinfo.3

Modified: head/lib/libc/net/getaddrinfo.3
==============================================================================
--- head/lib/libc/net/getaddrinfo.3	Tue Jul  9 08:17:43 2013	(r253065)
+++ head/lib/libc/net/getaddrinfo.3	Tue Jul  9 08:23:43 2013	(r253066)
@@ -255,7 +255,7 @@ member points to a filled-in socket addr
 This implementation of
 .Fn getaddrinfo
 allows numeric IPv6 address notation with scope identifier,
-as documented in chapter 11 of draft-ietf-ipv6-scoping-arch-02.txt.
+as documented in chapter 11 of RFC 4007.
 By appending the percent character and scope identifier to addresses,
 one can fill the
 .Li sin6_scope_id
@@ -441,9 +441,8 @@ freeaddrinfo(res0);
 .%A E. Nordmark
 .%A B. Zill
 .%T "IPv6 Scoped Address Architecture"
-.%R internet draft
-.%N draft-ietf-ipv6-scoping-arch-02.txt
-.%O work in progress material
+.%R RFC 4007
+.%D March 2005
 .Re
 .Rs
 .%A Craig Metz

Modified: head/lib/libc/net/getnameinfo.3
==============================================================================
--- head/lib/libc/net/getnameinfo.3	Tue Jul  9 08:17:43 2013	(r253065)
+++ head/lib/libc/net/getnameinfo.3	Tue Jul  9 08:23:43 2013	(r253066)
@@ -191,10 +191,11 @@ printf("host=%s\en", hbuf);
 .%A R. Gilligan
 .%A S. Thomson
 .%A J. Bound
+.%A J. McCann
 .%A W. Stevens
 .%T Basic Socket Interface Extensions for IPv6
-.%R RFC 2553
-.%D March 1999
+.%R RFC 3493
+.%D February 2003
 .Re
 .Rs
 .%A S. Deering
@@ -203,9 +204,8 @@ printf("host=%s\en", hbuf);
 .%A E. Nordmark
 .%A B. Zill
 .%T "IPv6 Scoped Address Architecture"
-.%R internet draft
-.%N draft-ietf-ipv6-scoping-arch-02.txt
-.%O work in progress material
+.%R RFC 4007
+.%D March 2005
 .Re
 .Rs
 .%A Craig Metz
@@ -217,9 +217,9 @@ printf("host=%s\en", hbuf);
 The
 .Fn getnameinfo
 function is defined by the
-.St -p1003.1g-2000
-draft specification and documented in
-.Tn "RFC 2553" ,
+.St -p1003.1-2004
+specification and documented in
+.Tn "RFC 3493" ,
 .Dq Basic Socket Interface Extensions for IPv6 .
 .Sh CAVEATS
 .Fn getnameinfo

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:29:15 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 533755F9;
 Tue,  9 Jul 2013 08:29:15 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 456DA1013;
 Tue,  9 Jul 2013 08:29:15 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698TFOs012688;
 Tue, 9 Jul 2013 08:29:15 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698TFob012687;
 Tue, 9 Jul 2013 08:29:15 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090829.r698TFob012687@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:29:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253067 - head/tools/tools/zfsboottest
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:29:15 -0000

Author: avg
Date: Tue Jul  9 08:29:14 2013
New Revision: 253067
URL: http://svnweb.freebsd.org/changeset/base/253067

Log:
  zfsboottest: sync with changes in zfs boot code
  
  - spa status can not be called before spa init
  - libzfs.h inclusion is now required
  - fix alternative code for explicit root dataset lookup
  
  MFC after:	10 days

Modified:
  head/tools/tools/zfsboottest/zfsboottest.c

Modified: head/tools/tools/zfsboottest/zfsboottest.c
==============================================================================
--- head/tools/tools/zfsboottest/zfsboottest.c	Tue Jul  9 08:23:43 2013	(r253066)
+++ head/tools/tools/zfsboottest/zfsboottest.c	Tue Jul  9 08:29:14 2013	(r253067)
@@ -52,6 +52,7 @@ pager_output(const char *line)
 
 #define ZFS_TEST
 #define	printf(...)	 fprintf(stderr, __VA_ARGS__)
+#include "libzfs.h"
 #include "zfsimpl.c"
 #undef printf
 
@@ -134,7 +135,6 @@ main(int argc, char** argv)
 			close(fd[i - 1]);
 		}
 	}
-	spa_all_status();
 
 	spa = STAILQ_FIRST(&zfs_pools);
 	if (spa == NULL) {
@@ -147,7 +147,10 @@ main(int argc, char** argv)
 		exit(1);
 	}
 
+	spa_all_status();
+
 #if 0
+	uint64_t rootobj;
 	if (zfs_get_root(spa, &rootobj)) {
 		fprintf(stderr, "can't get root\n");
 		exit(1);
@@ -158,8 +161,8 @@ main(int argc, char** argv)
 	if (zfs_mount(spa, 0, &zfsmnt)) {
 		fprintf(stderr, "can't mount\n");
 		exit(1);
-	}
 #endif
+	}
 
 	printf("\n");
 	for (++i, failures = 0; i < argc; i++) {

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:30:32 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id F206A777;
 Tue,  9 Jul 2013 08:30:31 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id CB64A1029;
 Tue,  9 Jul 2013 08:30:31 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698UV1d013112;
 Tue, 9 Jul 2013 08:30:31 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698UVsG013111;
 Tue, 9 Jul 2013 08:30:31 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090830.r698UVsG013111@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:30:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253068 - head/tools/tools/zfsboottest
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:30:32 -0000

Author: avg
Date: Tue Jul  9 08:30:31 2013
New Revision: 253068
URL: http://svnweb.freebsd.org/changeset/base/253068

Log:
  zfsboottest.sh: remove checks for things that are not strictly required
  
  MFC after:	10 days

Modified:
  head/tools/tools/zfsboottest/zfsboottest.sh

Modified: head/tools/tools/zfsboottest/zfsboottest.sh
==============================================================================
--- head/tools/tools/zfsboottest/zfsboottest.sh	Tue Jul  9 08:29:14 2013	(r253067)
+++ head/tools/tools/zfsboottest/zfsboottest.sh	Tue Jul  9 08:30:31 2013	(r253068)
@@ -54,11 +54,6 @@ bootfs=`zpool get bootfs "${pool}" | tai
 if [ "${bootfs}" = "-" ]; then
 	bootfs="${pool}"
 fi
-# Dataset's mountpoint property should be set to 'legacy'.
-if [ "`zfs get -H -o value mountpoint ${bootfs}`" != "legacy" ]; then
-	echo "The \"mountpoint\" property of dataset \"${bootfs}\" should be set to \"legacy\"." >&2
-	exit 1
-fi
 mountpoint=`df -t zfs "${bootfs}" 2>/dev/null | tail -1 | awk '{print $6}'`
 if [ -z "${mountpoint}" ]; then
 	echo "The \"${bootfs}\" dataset is not mounted." >&2
@@ -68,19 +63,6 @@ if [ ! -d "${mountpoint}${startdir}" ]; 
 	echo "The \"${mountpoint}${startdir}\" directory doesn't exist." >&2
 	exit 1
 fi
-# To be able to mount root ZFS file system we need either /etc/fstab entry
-# or vfs.root.mountfrom variable set in /boot/loader.conf.
-egrep -q '^'"${bootfs}"'[[:space:]]+/[[:space:]]+zfs[[:space:]]+' "${mountpoint}/etc/fstab" 2>/dev/null
-if [ $? -ne 0 ]; then
-	egrep -q 'vfs.root.mountfrom="?'"zfs:${bootfs}"'"?[[:space:]]*$' "${mountpoint}/boot/loader.conf" 2>/dev/null
-	if [ $? -ne 0 ]; then
-		echo "To be able to boot from \"${bootfs}\", you need to declare" >&2
-		echo "\"${bootfs}\" as being root file system in ${mountpoint}/etc/fstab" >&2
-		echo "or add \"vfs.root.mountfrom\" variable set to \"zfs:${bootfs}\" to" >&2
-		echo "${mountpoint}/boot/loader.conf." >&2
-		exit 1
-	fi
-fi
 vdevs=""
 for vdev in `zpool status "${pool}" | grep ONLINE | awk '{print $1}'`; do
 	vdev="/dev/${vdev#/dev/}"

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:32:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 27E738D5;
 Tue,  9 Jul 2013 08:32:18 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 1A2581041;
 Tue,  9 Jul 2013 08:32:18 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698WHHJ014779;
 Tue, 9 Jul 2013 08:32:17 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698WHiT014778;
 Tue, 9 Jul 2013 08:32:17 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201307090832.r698WHiT014778@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 9 Jul 2013 08:32:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253069 - head/sys/dev/ahci
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:32:18 -0000

Author: mav
Date: Tue Jul  9 08:32:17 2013
New Revision: 253069
URL: http://svnweb.freebsd.org/changeset/base/253069

Log:
  Add one more ID of Marvell SATA controller.
  
  Submitted by:	marck
  MFC after:	3 days

Modified:
  head/sys/dev/ahci/ahci.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Tue Jul  9 08:30:31 2013	(r253068)
+++ head/sys/dev/ahci/ahci.c	Tue Jul  9 08:32:17 2013	(r253069)
@@ -228,6 +228,7 @@ static struct {
 	{0x91301b4b, 0x00, "Marvell 88SE9130",  AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},
 	{0x91721b4b, 0x00, "Marvell 88SE9172",	AHCI_Q_NOBSYRES},
 	{0x91821b4b, 0x00, "Marvell 88SE9182",	AHCI_Q_NOBSYRES},
+	{0x91a01b4b, 0x00, "Marvell 88SE91Ax",	AHCI_Q_NOBSYRES},
 	{0x92201b4b, 0x00, "Marvell 88SE9220",  AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},
 	{0x92301b4b, 0x00, "Marvell 88SE9230",  AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},
 	{0x92351b4b, 0x00, "Marvell 88SE9235",  AHCI_Q_NOBSYRES},

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:36:16 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E491CC90;
 Tue,  9 Jul 2013 08:36:16 +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 739C31098;
 Tue,  9 Jul 2013 08:36:16 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id r698aFKO002756;
 Tue, 9 Jul 2013 12:36:15 +0400 (MSK) (envelope-from marck@rinet.ru)
Date: Tue, 9 Jul 2013 12:36:15 +0400 (MSK)
From: Dmitry Morozovsky 
To: Alexander Motin 
Subject: Re: svn commit: r253069 - head/sys/dev/ahci
In-Reply-To: <201307090832.r698WHiT014778@svn.freebsd.org>
Message-ID: 
References: <201307090832.r698WHiT014778@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.4.3
 (woozle.rinet.ru [0.0.0.0]); Tue, 09 Jul 2013 12:36:15 +0400 (MSK)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:36:17 -0000

On Tue, 9 Jul 2013, Alexander Motin wrote:

> Author: mav
> Date: Tue Jul  9 08:32:17 2013
> New Revision: 253069
> URL: http://svnweb.freebsd.org/changeset/base/253069
> 
> Log:
>   Add one more ID of Marvell SATA controller.
>   
>   Submitted by:	marck
>   MFC after:	3 days

Thanks a lot for lightning-fast commit! ;)

-- 
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-head@FreeBSD.ORG  Tue Jul  9 08:37:43 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 68E16DE4;
 Tue,  9 Jul 2013 08:37:43 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 5AE8210AE;
 Tue,  9 Jul 2013 08:37:43 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698bhU7015572;
 Tue, 9 Jul 2013 08:37:43 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698bhqa015571;
 Tue, 9 Jul 2013 08:37:43 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090837.r698bhqa015571@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:37:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253070 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:37:43 -0000

Author: avg
Date: Tue Jul  9 08:37:42 2013
New Revision: 253070
URL: http://svnweb.freebsd.org/changeset/base/253070

Log:
  zfs: load zpool.cache after a root fs is mounted
  
  MFC after:	3 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c	Tue Jul  9 08:32:17 2013	(r253069)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c	Tue Jul  9 08:37:42 2013	(r253070)
@@ -1697,6 +1697,10 @@ spa_boot_init()
 	spa_config_load();
 }
 
+#ifdef _KERNEL
+EVENTHANDLER_DEFINE(mountroot, spa_boot_init, NULL, 0);
+#endif
+
 void
 spa_init(int mode)
 {

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:40:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id AA1F9F40;
 Tue,  9 Jul 2013 08:40:05 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 9D03510C6;
 Tue,  9 Jul 2013 08:40:05 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698e5VM015921;
 Tue, 9 Jul 2013 08:40:05 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698e5lw015920;
 Tue, 9 Jul 2013 08:40:05 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090840.r698e5lw015920@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:40:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253071 - head/sys/boot/forth
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:40:05 -0000

Author: avg
Date: Tue Jul  9 08:40:05 2013
New Revision: 253071
URL: http://svnweb.freebsd.org/changeset/base/253071

Log:
  default loader.conf: there is no need to load zpool.cache now
  
  kernel does not need it for importing a root pool.
  
  MFC after:	4 weeks

Modified:
  head/sys/boot/forth/loader.conf

Modified: head/sys/boot/forth/loader.conf
==============================================================================
--- head/sys/boot/forth/loader.conf	Tue Jul  9 08:37:42 2013	(r253070)
+++ head/sys/boot/forth/loader.conf	Tue Jul  9 08:40:05 2013	(r253071)
@@ -518,11 +518,3 @@ mac_seeotheruids_load="NO"	# UID visbili
 #module_before="cmd"		# executes "cmd" before loading the module
 #module_after="cmd"		# executes "cmd" after loading the module
 #module_error="cmd"		# executes "cmd" if load fails
-
-##############################################################
-###  Always try to load ZFS pool cache file  #################
-##############################################################
-
-zpool_cache_load="YES"
-zpool_cache_type="/boot/zfs/zpool.cache"
-zpool_cache_name="/boot/zfs/zpool.cache"

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:42:03 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 2D08F12B;
 Tue,  9 Jul 2013 08:42:03 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 1FE5610DB;
 Tue,  9 Jul 2013 08:42:03 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698g3R2017762;
 Tue, 9 Jul 2013 08:42:03 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698g2CU017760;
 Tue, 9 Jul 2013 08:42:02 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090842.r698g2CU017760@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:42:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253072 - head/sys/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:42:03 -0000

Author: avg
Date: Tue Jul  9 08:42:02 2013
New Revision: 253072
URL: http://svnweb.freebsd.org/changeset/base/253072

Log:
  amd64: use -mno-omit-leaf-frame-pointer in addition to -fno-omit-frame-pointer
  
  ... in kernel builds.  This is to make behavior of clang consistent with
  behavior of gcc.
  
  MFC after:	2 weeks

Modified:
  head/sys/conf/Makefile.amd64
  head/sys/conf/kmod.mk

Modified: head/sys/conf/Makefile.amd64
==============================================================================
--- head/sys/conf/Makefile.amd64	Tue Jul  9 08:40:05 2013	(r253071)
+++ head/sys/conf/Makefile.amd64	Tue Jul  9 08:42:02 2013	(r253072)
@@ -34,7 +34,7 @@ S=	../../..
 INCLUDES+= -I$S/contrib/libfdt
 
 .if !empty(DDB_ENABLED) || !empty(DTR_ENABLED) || !empty(HWPMC_ENABLED)
-CFLAGS+=	-fno-omit-frame-pointer
+CFLAGS+=	-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
 .endif
 
 MKMODULESENV+= MACHINE=amd64

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Tue Jul  9 08:40:05 2013	(r253071)
+++ head/sys/conf/kmod.mk	Tue Jul  9 08:42:02 2013	(r253072)
@@ -122,7 +122,7 @@ LDFLAGS+=	-d -warn-common
 
 CFLAGS+=	${DEBUG_FLAGS}
 .if ${MACHINE_CPUARCH} == amd64
-CFLAGS+=	-fno-omit-frame-pointer
+CFLAGS+=	-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
 .endif
 
 .if ${MACHINE_CPUARCH} == powerpc

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:47:11 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id BEC79327;
 Tue,  9 Jul 2013 08:47:11 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B15851114;
 Tue,  9 Jul 2013 08:47:11 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698lBPB018446;
 Tue, 9 Jul 2013 08:47:11 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698lBLR018445;
 Tue, 9 Jul 2013 08:47:11 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090847.r698lBLR018445@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:47:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253073 -
 head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:47:11 -0000

Author: avg
Date: Tue Jul  9 08:47:11 2013
New Revision: 253073
URL: http://svnweb.freebsd.org/changeset/base/253073

Log:
  zfs: try to properly handle i/o errors in mappedread_sf
  
  Unconditionally freeing a page is not good, especially if it is the page
  that was wired by the caller.  The checks are picked up from
  kern_sendfile.
  
  MFC after:	3 weeks

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Tue Jul  9 08:42:02 2013	(r253072)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Tue Jul  9 08:47:11 2013	(r253073)
@@ -546,7 +546,9 @@ mappedread_sf(vnode_t *vp, int nbytes, u
 			vm_page_io_finish(pp);
 			vm_page_lock(pp);
 			if (error) {
-				vm_page_free(pp);
+				if (pp->wire_count == 0 && pp->valid == 0 &&
+				    pp->busy == 0 && !(pp->oflags & VPO_BUSY))
+					vm_page_free(pp);
 			} else {
 				pp->valid = VM_PAGE_BITS_ALL;
 				vm_page_activate(pp);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:49:17 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D5BA4504;
 Tue,  9 Jul 2013 08:49:17 +0000 (UTC) (envelope-from mav@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C8A2D112B;
 Tue,  9 Jul 2013 08:49:17 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698nHqx018762;
 Tue, 9 Jul 2013 08:49:17 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698nHLf018761;
 Tue, 9 Jul 2013 08:49:17 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <201307090849.r698nHLf018761@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 9 Jul 2013 08:49:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253074 - head/sys/dev/ahci
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:49:17 -0000

Author: mav
Date: Tue Jul  9 08:49:17 2013
New Revision: 253074
URL: http://svnweb.freebsd.org/changeset/base/253074

Log:
  Add ID for Marvell 88SE9215 AHCI SATA controller.
  
  MFC after:	3 days

Modified:
  head/sys/dev/ahci/ahci.c

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c	Tue Jul  9 08:47:11 2013	(r253073)
+++ head/sys/dev/ahci/ahci.c	Tue Jul  9 08:49:17 2013	(r253074)
@@ -229,6 +229,7 @@ static struct {
 	{0x91721b4b, 0x00, "Marvell 88SE9172",	AHCI_Q_NOBSYRES},
 	{0x91821b4b, 0x00, "Marvell 88SE9182",	AHCI_Q_NOBSYRES},
 	{0x91a01b4b, 0x00, "Marvell 88SE91Ax",	AHCI_Q_NOBSYRES},
+	{0x92151b4b, 0x00, "Marvell 88SE9215",  AHCI_Q_NOBSYRES},
 	{0x92201b4b, 0x00, "Marvell 88SE9220",  AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},
 	{0x92301b4b, 0x00, "Marvell 88SE9230",  AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},
 	{0x92351b4b, 0x00, "Marvell 88SE9235",  AHCI_Q_NOBSYRES},

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:54:02 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id E3057819;
 Tue,  9 Jul 2013 08:54:02 +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 6D9AE1167;
 Tue,  9 Jul 2013 08:54:02 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id r698s1mG003636;
 Tue, 9 Jul 2013 12:54:01 +0400 (MSK) (envelope-from marck@rinet.ru)
Date: Tue, 9 Jul 2013 12:54:01 +0400 (MSK)
From: Dmitry Morozovsky 
To: Garance A Drosehn 
Subject: Re: svn commit: r253002 - head
In-Reply-To: <51DB6233.1040003@FreeBSD.org>
Message-ID: 
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <51DB6233.1040003@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.4.3
 (woozle.rinet.ru [0.0.0.0]); Tue, 09 Jul 2013 12:54:01 +0400 (MSK)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 Alfred Perlstein , src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:54:03 -0000

On Mon, 8 Jul 2013, Garance A Drosehn wrote:

> I think it's probably helpful to point out the -j flag, but I'm
> not sure I would phrase it as if we're sure that the values here
> are the ideal ones.  I expect the ideal values depend too much on
> hardware (e.g.: the CPU, type of disk used, and amount of memory
> on the machine).

Just a quick note on the last sentense: building world with clang on core2Q 
with 8 gigs of RAM with even -j4 starts intense swapping, especially if using ZFS...


-- 
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-head@FreeBSD.ORG  Tue Jul  9 08:58:34 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id B8CDC9C4;
 Tue,  9 Jul 2013 08:58:34 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id AB9B011A5;
 Tue,  9 Jul 2013 08:58:34 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698wYwT021604;
 Tue, 9 Jul 2013 08:58:34 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698wYsq021603;
 Tue, 9 Jul 2013 08:58:34 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090858.r698wYsq021603@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:58:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253075 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:58:34 -0000

Author: avg
Date: Tue Jul  9 08:58:34 2013
New Revision: 253075
URL: http://svnweb.freebsd.org/changeset/base/253075

Log:
  namecache sdt: freebsd doesn't support structured characters yet
  
  :-)
  
  MFC after:	 7 days

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Tue Jul  9 08:49:17 2013	(r253074)
+++ head/sys/kern/vfs_cache.c	Tue Jul  9 08:58:34 2013	(r253075)
@@ -68,10 +68,10 @@ SDT_PROBE_DEFINE2(vfs, namecache, enter_
     "char *");
 SDT_PROBE_DEFINE1(vfs, namecache, fullpath, entry, entry, "struct vnode *");
 SDT_PROBE_DEFINE3(vfs, namecache, fullpath, hit, hit, "struct vnode *",
-    "struct char *", "struct vnode *");
+    "char *", "struct vnode *");
 SDT_PROBE_DEFINE1(vfs, namecache, fullpath, miss, miss, "struct vnode *");
 SDT_PROBE_DEFINE3(vfs, namecache, fullpath, return, return, "int",
-    "struct vnode *", "struct char *");
+    "struct vnode *", "char *");
 SDT_PROBE_DEFINE3(vfs, namecache, lookup, hit, hit, "struct vnode *", "char *",
     "struct vnode *");
 SDT_PROBE_DEFINE2(vfs, namecache, lookup, hit_negative, hit-negative,

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 08:59:40 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 479D2B0C;
 Tue,  9 Jul 2013 08:59:40 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 3A47E11B3;
 Tue,  9 Jul 2013 08:59:40 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r698xehS021761;
 Tue, 9 Jul 2013 08:59:40 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r698xebN021760;
 Tue, 9 Jul 2013 08:59:40 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090859.r698xebN021760@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 08:59:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253076 - head/etc/rc.d
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 08:59:40 -0000

Author: avg
Date: Tue Jul  9 08:59:39 2013
New Revision: 253076
URL: http://svnweb.freebsd.org/changeset/base/253076

Log:
  rc.d/zfs: pass -v option to zfs mount
  
  this should make boot process more informative (and entertaining)
  on systems with lots of zfs filesystems.
  
  MFC after:	7 days

Modified:
  head/etc/rc.d/zfs

Modified: head/etc/rc.d/zfs
==============================================================================
--- head/etc/rc.d/zfs	Tue Jul  9 08:58:34 2013	(r253075)
+++ head/etc/rc.d/zfs	Tue Jul  9 08:59:39 2013	(r253076)
@@ -23,7 +23,7 @@ zfs_start_jail()
 
 zfs_start_main()
 {
-	zfs mount -a
+	zfs mount -va
 	zfs share -a
 	if [ ! -r /etc/zfs/exports ]; then
 		touch /etc/zfs/exports

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:01:45 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 5DE42C8D;
 Tue,  9 Jul 2013 09:01:45 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 5082711D3;
 Tue,  9 Jul 2013 09:01:45 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6991juI023942;
 Tue, 9 Jul 2013 09:01:45 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6991j64023941;
 Tue, 9 Jul 2013 09:01:45 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090901.r6991j64023941@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 09:01:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253077 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:01:45 -0000

Author: avg
Date: Tue Jul  9 09:01:44 2013
New Revision: 253077
URL: http://svnweb.freebsd.org/changeset/base/253077

Log:
  should_yield: protect from td_swvoltick being uninitialized or too stale
  
  The distance between ticks and td_swvoltick should be calculated as
  an unsigned number.  Previously we could end up comparing a negative
  number with hogticks in which case should_yield() would give incorrect
  answer.
  
  We should probably ensure that td_swvoltick is properly initialized.
  
  Sponsored by:	HybridCluster
  MFC after:	5 days

Modified:
  head/sys/kern/kern_synch.c

Modified: head/sys/kern/kern_synch.c
==============================================================================
--- head/sys/kern/kern_synch.c	Tue Jul  9 08:59:39 2013	(r253076)
+++ head/sys/kern/kern_synch.c	Tue Jul  9 09:01:44 2013	(r253077)
@@ -581,7 +581,7 @@ int
 should_yield(void)
 {
 
-	return (ticks - curthread->td_swvoltick >= hogticks);
+	return ((unsigned int)(ticks - curthread->td_swvoltick) >= hogticks);
 }
 
 void

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:03:02 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 090A9EB9;
 Tue,  9 Jul 2013 09:03:02 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id F06F711EA;
 Tue,  9 Jul 2013 09:03:01 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69931EP024185;
 Tue, 9 Jul 2013 09:03:01 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69931Qq024184;
 Tue, 9 Jul 2013 09:03:01 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090903.r69931Qq024184@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 09:03:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253078 - head/sys/security/audit
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:03:02 -0000

Author: avg
Date: Tue Jul  9 09:03:01 2013
New Revision: 253078
URL: http://svnweb.freebsd.org/changeset/base/253078

Log:
  audit_proc_coredump: check return value of audit_new
  
  audit_new may return NULL if audit is disabled or suspended.
  
  Sponsored by:	HybridCluster
  MFC after:	7 days

Modified:
  head/sys/security/audit/audit.c

Modified: head/sys/security/audit/audit.c
==============================================================================
--- head/sys/security/audit/audit.c	Tue Jul  9 09:01:44 2013	(r253077)
+++ head/sys/security/audit/audit.c	Tue Jul  9 09:03:01 2013	(r253078)
@@ -701,6 +701,8 @@ audit_proc_coredump(struct thread *td, c
 	 * (signal) tokens.
 	 */
 	ar = audit_new(AUE_CORE, td);
+	if (ar == NULL)
+		return;
 	if (path != NULL) {
 		pathp = &ar->k_ar.ar_arg_upath1;
 		*pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:05:00 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id B2B3E1F3;
 Tue,  9 Jul 2013 09:05:00 +0000 (UTC) (envelope-from avg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id A53BE1211;
 Tue,  9 Jul 2013 09:05:00 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69950Zl024634;
 Tue, 9 Jul 2013 09:05:00 GMT (envelope-from avg@svn.freebsd.org)
Received: (from avg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69950Bt024633;
 Tue, 9 Jul 2013 09:05:00 GMT (envelope-from avg@svn.freebsd.org)
Message-Id: <201307090905.r69950Bt024633@svn.freebsd.org>
From: Andriy Gapon 
Date: Tue, 9 Jul 2013 09:05:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253079 -
 head/sys/cddl/contrib/opensolaris/uts/common/dtrace
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:05:00 -0000

Author: avg
Date: Tue Jul  9 09:05:00 2013
New Revision: 253079
URL: http://svnweb.freebsd.org/changeset/base/253079

Log:
  dtrace/fasttrap: install hook functions only after all data is
  initialized
  
  Sponsored by:	HybridCluster
  MFC after:	 7 days

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c	Tue Jul  9 09:03:01 2013	(r253078)
+++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c	Tue Jul  9 09:05:00 2013	(r253079)
@@ -2283,13 +2283,6 @@ fasttrap_load(void)
 		return (ret);
 	}
 
-	/*
-	 * Install our hooks into fork(2), exec(2), and exit(2).
-	 */
-	dtrace_fasttrap_fork = &fasttrap_fork;
-	dtrace_fasttrap_exit = &fasttrap_exec_exit;
-	dtrace_fasttrap_exec = &fasttrap_exec_exit;
-
 #if defined(sun)
 	fasttrap_max = ddi_getprop(DDI_DEV_T_ANY, devi, DDI_PROP_DONTPASS,
 	    "fasttrap-max-probes", FASTTRAP_MAX_DEFAULT);
@@ -2366,6 +2359,13 @@ fasttrap_load(void)
 	}
 #endif
 
+	/*
+	 * Install our hooks into fork(2), exec(2), and exit(2).
+	 */
+	dtrace_fasttrap_fork = &fasttrap_fork;
+	dtrace_fasttrap_exit = &fasttrap_exec_exit;
+	dtrace_fasttrap_exec = &fasttrap_exec_exit;
+
 	(void) dtrace_meta_register("fasttrap", &fasttrap_mops, NULL,
 	    &fasttrap_meta_id);
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:32:10 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 809FDD9B;
 Tue,  9 Jul 2013 09:32:10 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 712571373;
 Tue,  9 Jul 2013 09:32:10 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r699WALI034281;
 Tue, 9 Jul 2013 09:32:10 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r699W6Ks034249;
 Tue, 9 Jul 2013 09:32:06 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307090932.r699W6Ks034249@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 09:32:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253081 - in head: sys/net sys/netinet sys/netinet6
 sys/netipsec tools/tools/crypto usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:32:10 -0000

Author: ae
Date: Tue Jul  9 09:32:06 2013
New Revision: 253081
URL: http://svnweb.freebsd.org/changeset/base/253081

Log:
  Prepare network statistics structures for migration to PCPU counters.
  Use uint64_t as type for all fields of structures.
  
  Changed structures: ahstat, arpstat, espstat, icmp6_ifstat, icmp6stat,
  in6_ifstat, ip6stat, ipcompstat, ipipstat, ipsecstat, mrt6stat, mrtstat,
  pfkeystat, pim6stat, pimstat, rip6stat, udpstat.
  
  Discussed with:	arch@

Modified:
  head/sys/net/if_arp.h
  head/sys/netinet/icmp6.h
  head/sys/netinet/ip_mroute.h
  head/sys/netinet/pim_var.h
  head/sys/netinet/udp_var.h
  head/sys/netinet6/in6_var.h
  head/sys/netinet6/ip6_mroute.h
  head/sys/netinet6/ip6_var.h
  head/sys/netinet6/pim6_var.h
  head/sys/netinet6/raw_ip6.h
  head/sys/netipsec/ah_var.h
  head/sys/netipsec/esp_var.h
  head/sys/netipsec/ipcomp_var.h
  head/sys/netipsec/ipip_var.h
  head/sys/netipsec/ipsec.h
  head/sys/netipsec/keysock.h
  head/sys/netipsec/xform_ipcomp.c
  head/tools/tools/crypto/ipsecstats.c
  head/usr.bin/netstat/inet.c
  head/usr.bin/netstat/ipsec.c
  head/usr.bin/netstat/mroute.c

Modified: head/sys/net/if_arp.h
==============================================================================
--- head/sys/net/if_arp.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/net/if_arp.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -113,18 +113,18 @@ struct	arpcom {
 
 struct arpstat {
 	/* Normal things that happen: */
-	u_long txrequests;	/* # of ARP requests sent by this host. */
-	u_long txreplies;	/* # of ARP replies sent by this host. */
-	u_long rxrequests;	/* # of ARP requests received by this host. */
-	u_long rxreplies;	/* # of ARP replies received by this host. */
-	u_long received;	/* # of ARP packets received by this host. */
+	uint64_t txrequests;	/* # of ARP requests sent by this host. */
+	uint64_t txreplies;	/* # of ARP replies sent by this host. */
+	uint64_t rxrequests;	/* # of ARP requests received by this host. */
+	uint64_t rxreplies;	/* # of ARP replies received by this host. */
+	uint64_t received;	/* # of ARP packets received by this host. */
 
-	u_long arp_spares[4];	/* For either the upper or lower half. */
+	uint64_t arp_spares[4];	/* For either the upper or lower half. */
 	/* Abnormal event and error  counting: */
-	u_long dropped;		/* # of packets dropped waiting for a reply. */
-	u_long timeouts;	/* # of times with entries removed */
+	uint64_t dropped;	/* # of packets dropped waiting for a reply. */
+	uint64_t timeouts;	/* # of times with entries removed */
 				/* due to timeout. */
-	u_long dupips;		/* # of duplicate IPs detected. */
+	uint64_t dupips;	/* # of duplicate IPs detected. */
 };
 
 /*

Modified: head/sys/netinet/icmp6.h
==============================================================================
--- head/sys/netinet/icmp6.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet/icmp6.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -555,39 +555,39 @@ do {								\
  * of the internet control message protocol version 6.
  */
 struct icmp6errstat {
-	u_quad_t icp6errs_dst_unreach_noroute;
-	u_quad_t icp6errs_dst_unreach_admin;
-	u_quad_t icp6errs_dst_unreach_beyondscope;
-	u_quad_t icp6errs_dst_unreach_addr;
-	u_quad_t icp6errs_dst_unreach_noport;
-	u_quad_t icp6errs_packet_too_big;
-	u_quad_t icp6errs_time_exceed_transit;
-	u_quad_t icp6errs_time_exceed_reassembly;
-	u_quad_t icp6errs_paramprob_header;
-	u_quad_t icp6errs_paramprob_nextheader;
-	u_quad_t icp6errs_paramprob_option;
-	u_quad_t icp6errs_redirect; /* we regard redirect as an error here */
-	u_quad_t icp6errs_unknown;
+	uint64_t icp6errs_dst_unreach_noroute;
+	uint64_t icp6errs_dst_unreach_admin;
+	uint64_t icp6errs_dst_unreach_beyondscope;
+	uint64_t icp6errs_dst_unreach_addr;
+	uint64_t icp6errs_dst_unreach_noport;
+	uint64_t icp6errs_packet_too_big;
+	uint64_t icp6errs_time_exceed_transit;
+	uint64_t icp6errs_time_exceed_reassembly;
+	uint64_t icp6errs_paramprob_header;
+	uint64_t icp6errs_paramprob_nextheader;
+	uint64_t icp6errs_paramprob_option;
+	uint64_t icp6errs_redirect; /* we regard redirect as an error here */
+	uint64_t icp6errs_unknown;
 };
 
 struct icmp6stat {
 /* statistics related to icmp6 packets generated */
-	u_quad_t icp6s_error;		/* # of calls to icmp6_error */
-	u_quad_t icp6s_canterror;	/* no error 'cuz old was icmp */
-	u_quad_t icp6s_toofreq;		/* no error 'cuz rate limitation */
-	u_quad_t icp6s_outhist[256];
+	uint64_t icp6s_error;		/* # of calls to icmp6_error */
+	uint64_t icp6s_canterror;	/* no error 'cuz old was icmp */
+	uint64_t icp6s_toofreq;		/* no error 'cuz rate limitation */
+	uint64_t icp6s_outhist[256];
 /* statistics related to input message processed */
-	u_quad_t icp6s_badcode;		/* icmp6_code out of range */
-	u_quad_t icp6s_tooshort;	/* packet < sizeof(struct icmp6_hdr) */
-	u_quad_t icp6s_checksum;	/* bad checksum */
-	u_quad_t icp6s_badlen;		/* calculated bound mismatch */
+	uint64_t icp6s_badcode;		/* icmp6_code out of range */
+	uint64_t icp6s_tooshort;	/* packet < sizeof(struct icmp6_hdr) */
+	uint64_t icp6s_checksum;	/* bad checksum */
+	uint64_t icp6s_badlen;		/* calculated bound mismatch */
 	/*
 	 * number of responses: this member is inherited from netinet code, but
 	 * for netinet6 code, it is already available in icp6s_outhist[].
 	 */
-	u_quad_t icp6s_reflect;
-	u_quad_t icp6s_inhist[256];	
-	u_quad_t icp6s_nd_toomanyopt;	/* too many ND options */
+	uint64_t icp6s_reflect;
+	uint64_t icp6s_inhist[256];	
+	uint64_t icp6s_nd_toomanyopt;	/* too many ND options */
 	struct icmp6errstat icp6s_outerrhist;
 #define icp6s_odst_unreach_noroute \
 	icp6s_outerrhist.icp6errs_dst_unreach_noroute
@@ -607,13 +607,13 @@ struct icmp6stat {
 #define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option
 #define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect
 #define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown
-	u_quad_t icp6s_pmtuchg;		/* path MTU changes */
-	u_quad_t icp6s_nd_badopt;	/* bad ND options */
-	u_quad_t icp6s_badns;		/* bad neighbor solicitation */
-	u_quad_t icp6s_badna;		/* bad neighbor advertisement */
-	u_quad_t icp6s_badrs;		/* bad router advertisement */
-	u_quad_t icp6s_badra;		/* bad router advertisement */
-	u_quad_t icp6s_badredirect;	/* bad redirect message */
+	uint64_t icp6s_pmtuchg;		/* path MTU changes */
+	uint64_t icp6s_nd_badopt;	/* bad ND options */
+	uint64_t icp6s_badns;		/* bad neighbor solicitation */
+	uint64_t icp6s_badna;		/* bad neighbor advertisement */
+	uint64_t icp6s_badrs;		/* bad router advertisement */
+	uint64_t icp6s_badra;		/* bad router advertisement */
+	uint64_t icp6s_badredirect;	/* bad redirect message */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netinet/ip_mroute.h
==============================================================================
--- head/sys/netinet/ip_mroute.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet/ip_mroute.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -206,19 +206,19 @@ struct bw_upcall {
  * The kernel's multicast routing statistics.
  */
 struct mrtstat {
-    u_long	mrts_mfc_lookups;	/* # forw. cache hash table hits   */
-    u_long	mrts_mfc_misses;	/* # forw. cache hash table misses */
-    u_long	mrts_upcalls;		/* # calls to multicast routing daemon */
-    u_long	mrts_no_route;		/* no route for packet's origin    */
-    u_long	mrts_bad_tunnel;	/* malformed tunnel options        */
-    u_long	mrts_cant_tunnel;	/* no room for tunnel options      */
-    u_long	mrts_wrong_if;		/* arrived on wrong interface	   */
-    u_long	mrts_upq_ovflw;		/* upcall Q overflow		   */
-    u_long	mrts_cache_cleanups;	/* # entries with no upcalls	   */
-    u_long	mrts_drop_sel;		/* pkts dropped selectively        */
-    u_long	mrts_q_overflow;	/* pkts dropped - Q overflow       */
-    u_long	mrts_pkt2large;		/* pkts dropped - size > BKT SIZE  */
-    u_long	mrts_upq_sockfull;	/* upcalls dropped - socket full */
+	uint64_t mrts_mfc_lookups;    /* # forw. cache hash table hits   */
+	uint64_t mrts_mfc_misses;     /* # forw. cache hash table misses */
+	uint64_t mrts_upcalls;	      /* # calls to multicast routing daemon */
+	uint64_t mrts_no_route;	      /* no route for packet's origin    */
+	uint64_t mrts_bad_tunnel;     /* malformed tunnel options        */
+	uint64_t mrts_cant_tunnel;    /* no room for tunnel options      */
+	uint64_t mrts_wrong_if;	      /* arrived on wrong interface	 */
+	uint64_t mrts_upq_ovflw;      /* upcall Q overflow		 */
+	uint64_t mrts_cache_cleanups; /* # entries with no upcalls	 */
+	uint64_t mrts_drop_sel;	      /* pkts dropped selectively        */
+	uint64_t mrts_q_overflow;     /* pkts dropped - Q overflow       */
+	uint64_t mrts_pkt2large;      /* pkts dropped - size > BKT SIZE  */
+	uint64_t mrts_upq_sockfull;   /* upcalls dropped - socket full   */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netinet/pim_var.h
==============================================================================
--- head/sys/netinet/pim_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet/pim_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -46,17 +46,17 @@
  * PIM statistics kept in the kernel
  */
 struct pimstat {
-	u_quad_t pims_rcv_total_msgs;	   /* total PIM messages received    */
-	u_quad_t pims_rcv_total_bytes;	   /* total PIM bytes received	     */
-	u_quad_t pims_rcv_tooshort;	   /* rcvd with too few bytes	     */
-	u_quad_t pims_rcv_badsum;	   /* rcvd with bad checksum	     */
-	u_quad_t pims_rcv_badversion;	   /* rcvd bad PIM version	     */
-	u_quad_t pims_rcv_registers_msgs;  /* rcvd regs. msgs (data only)    */
-	u_quad_t pims_rcv_registers_bytes; /* rcvd regs. bytes (data only)   */
-	u_quad_t pims_rcv_registers_wrongiif; /* rcvd regs. on wrong iif     */
-	u_quad_t pims_rcv_badregisters;	   /* rcvd invalid registers	     */
-	u_quad_t pims_snd_registers_msgs;  /* sent regs. msgs (data only)    */
-	u_quad_t pims_snd_registers_bytes; /* sent regs. bytes (data only)   */
+	uint64_t pims_rcv_total_msgs;	   /* total PIM messages received    */
+	uint64_t pims_rcv_total_bytes;	   /* total PIM bytes received	     */
+	uint64_t pims_rcv_tooshort;	   /* rcvd with too few bytes	     */
+	uint64_t pims_rcv_badsum;	   /* rcvd with bad checksum	     */
+	uint64_t pims_rcv_badversion;	   /* rcvd bad PIM version	     */
+	uint64_t pims_rcv_registers_msgs;  /* rcvd regs. msgs (data only)    */
+	uint64_t pims_rcv_registers_bytes; /* rcvd regs. bytes (data only)   */
+	uint64_t pims_rcv_registers_wrongiif; /* rcvd regs. on wrong iif     */
+	uint64_t pims_rcv_badregisters;	   /* rcvd invalid registers	     */
+	uint64_t pims_snd_registers_msgs;  /* sent regs. msgs (data only)    */
+	uint64_t pims_snd_registers_bytes; /* sent regs. bytes (data only)   */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netinet/udp_var.h
==============================================================================
--- head/sys/netinet/udp_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet/udp_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -75,22 +75,22 @@ struct udpcb {
 
 struct udpstat {
 				/* input statistics: */
-	u_long	udps_ipackets;		/* total input packets */
-	u_long	udps_hdrops;		/* packet shorter than header */
-	u_long	udps_badsum;		/* checksum error */
-	u_long	udps_nosum;		/* no checksum */
-	u_long	udps_badlen;		/* data length larger than packet */
-	u_long	udps_noport;		/* no socket on port */
-	u_long	udps_noportbcast;	/* of above, arrived as broadcast */
-	u_long	udps_fullsock;		/* not delivered, input socket full */
-	u_long	udpps_pcbcachemiss;	/* input packets missing pcb cache */
-	u_long	udpps_pcbhashmiss;	/* input packets not for hashed pcb */
+	uint64_t udps_ipackets;		/* total input packets */
+	uint64_t udps_hdrops;		/* packet shorter than header */
+	uint64_t udps_badsum;		/* checksum error */
+	uint64_t udps_nosum;		/* no checksum */
+	uint64_t udps_badlen;		/* data length larger than packet */
+	uint64_t udps_noport;		/* no socket on port */
+	uint64_t udps_noportbcast;	/* of above, arrived as broadcast */
+	uint64_t udps_fullsock;		/* not delivered, input socket full */
+	uint64_t udpps_pcbcachemiss;	/* input packets missing pcb cache */
+	uint64_t udpps_pcbhashmiss;	/* input packets not for hashed pcb */
 				/* output statistics: */
-	u_long	udps_opackets;		/* total output packets */
-	u_long	udps_fastout;		/* output packets on fast path */
+	uint64_t udps_opackets;		/* total output packets */
+	uint64_t udps_fastout;		/* output packets on fast path */
 	/* of no socket on port, arrived as multicast */
-	u_long	udps_noportmcast;
-	u_long	udps_filtermcast;	/* blocked by multicast filter */
+	uint64_t udps_noportmcast;
+	uint64_t udps_filtermcast;	/* blocked by multicast filter */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netinet6/in6_var.h
==============================================================================
--- head/sys/netinet6/in6_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet6/in6_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -153,37 +153,37 @@ struct in6_addrpolicy {
  * IPv6 interface statistics, as defined in RFC2465 Ipv6IfStatsEntry (p12).
  */
 struct in6_ifstat {
-	u_quad_t ifs6_in_receive;	/* # of total input datagram */
-	u_quad_t ifs6_in_hdrerr;	/* # of datagrams with invalid hdr */
-	u_quad_t ifs6_in_toobig;	/* # of datagrams exceeded MTU */
-	u_quad_t ifs6_in_noroute;	/* # of datagrams with no route */
-	u_quad_t ifs6_in_addrerr;	/* # of datagrams with invalid dst */
-	u_quad_t ifs6_in_protounknown;	/* # of datagrams with unknown proto */
+	uint64_t ifs6_in_receive;	/* # of total input datagram */
+	uint64_t ifs6_in_hdrerr;	/* # of datagrams with invalid hdr */
+	uint64_t ifs6_in_toobig;	/* # of datagrams exceeded MTU */
+	uint64_t ifs6_in_noroute;	/* # of datagrams with no route */
+	uint64_t ifs6_in_addrerr;	/* # of datagrams with invalid dst */
+	uint64_t ifs6_in_protounknown;	/* # of datagrams with unknown proto */
 					/* NOTE: increment on final dst if */
-	u_quad_t ifs6_in_truncated;	/* # of truncated datagrams */
-	u_quad_t ifs6_in_discard;	/* # of discarded datagrams */
+	uint64_t ifs6_in_truncated;	/* # of truncated datagrams */
+	uint64_t ifs6_in_discard;	/* # of discarded datagrams */
 					/* NOTE: fragment timeout is not here */
-	u_quad_t ifs6_in_deliver;	/* # of datagrams delivered to ULP */
+	uint64_t ifs6_in_deliver;	/* # of datagrams delivered to ULP */
 					/* NOTE: increment on final dst if */
-	u_quad_t ifs6_out_forward;	/* # of datagrams forwarded */
+	uint64_t ifs6_out_forward;	/* # of datagrams forwarded */
 					/* NOTE: increment on outgoing if */
-	u_quad_t ifs6_out_request;	/* # of outgoing datagrams from ULP */
+	uint64_t ifs6_out_request;	/* # of outgoing datagrams from ULP */
 					/* NOTE: does not include forwrads */
-	u_quad_t ifs6_out_discard;	/* # of discarded datagrams */
-	u_quad_t ifs6_out_fragok;	/* # of datagrams fragmented */
-	u_quad_t ifs6_out_fragfail;	/* # of datagrams failed on fragment */
-	u_quad_t ifs6_out_fragcreat;	/* # of fragment datagrams */
+	uint64_t ifs6_out_discard;	/* # of discarded datagrams */
+	uint64_t ifs6_out_fragok;	/* # of datagrams fragmented */
+	uint64_t ifs6_out_fragfail;	/* # of datagrams failed on fragment */
+	uint64_t ifs6_out_fragcreat;	/* # of fragment datagrams */
 					/* NOTE: this is # after fragment */
-	u_quad_t ifs6_reass_reqd;	/* # of incoming fragmented packets */
+	uint64_t ifs6_reass_reqd;	/* # of incoming fragmented packets */
 					/* NOTE: increment on final dst if */
-	u_quad_t ifs6_reass_ok;		/* # of reassembled packets */
+	uint64_t ifs6_reass_ok;		/* # of reassembled packets */
 					/* NOTE: this is # after reass */
 					/* NOTE: increment on final dst if */
-	u_quad_t ifs6_reass_fail;	/* # of reass failures */
+	uint64_t ifs6_reass_fail;	/* # of reass failures */
 					/* NOTE: may not be packet count */
 					/* NOTE: increment on final dst if */
-	u_quad_t ifs6_in_mcast;		/* # of inbound multicast datagrams */
-	u_quad_t ifs6_out_mcast;	/* # of outbound multicast datagrams */
+	uint64_t ifs6_in_mcast;		/* # of inbound multicast datagrams */
+	uint64_t ifs6_out_mcast;	/* # of outbound multicast datagrams */
 };
 
 /*
@@ -195,77 +195,77 @@ struct icmp6_ifstat {
 	 * Input statistics
 	 */
 	/* ipv6IfIcmpInMsgs, total # of input messages */
-	u_quad_t ifs6_in_msg;
+	uint64_t ifs6_in_msg;
 	/* ipv6IfIcmpInErrors, # of input error messages */
-	u_quad_t ifs6_in_error;
+	uint64_t ifs6_in_error;
 	/* ipv6IfIcmpInDestUnreachs, # of input dest unreach errors */
-	u_quad_t ifs6_in_dstunreach;
+	uint64_t ifs6_in_dstunreach;
 	/* ipv6IfIcmpInAdminProhibs, # of input administratively prohibited errs */
-	u_quad_t ifs6_in_adminprohib;
+	uint64_t ifs6_in_adminprohib;
 	/* ipv6IfIcmpInTimeExcds, # of input time exceeded errors */
-	u_quad_t ifs6_in_timeexceed;
+	uint64_t ifs6_in_timeexceed;
 	/* ipv6IfIcmpInParmProblems, # of input parameter problem errors */
-	u_quad_t ifs6_in_paramprob;
+	uint64_t ifs6_in_paramprob;
 	/* ipv6IfIcmpInPktTooBigs, # of input packet too big errors */
-	u_quad_t ifs6_in_pkttoobig;
+	uint64_t ifs6_in_pkttoobig;
 	/* ipv6IfIcmpInEchos, # of input echo requests */
-	u_quad_t ifs6_in_echo;
+	uint64_t ifs6_in_echo;
 	/* ipv6IfIcmpInEchoReplies, # of input echo replies */
-	u_quad_t ifs6_in_echoreply;
+	uint64_t ifs6_in_echoreply;
 	/* ipv6IfIcmpInRouterSolicits, # of input router solicitations */
-	u_quad_t ifs6_in_routersolicit;
+	uint64_t ifs6_in_routersolicit;
 	/* ipv6IfIcmpInRouterAdvertisements, # of input router advertisements */
-	u_quad_t ifs6_in_routeradvert;
+	uint64_t ifs6_in_routeradvert;
 	/* ipv6IfIcmpInNeighborSolicits, # of input neighbor solicitations */
-	u_quad_t ifs6_in_neighborsolicit;
+	uint64_t ifs6_in_neighborsolicit;
 	/* ipv6IfIcmpInNeighborAdvertisements, # of input neighbor advertisements */
-	u_quad_t ifs6_in_neighboradvert;
+	uint64_t ifs6_in_neighboradvert;
 	/* ipv6IfIcmpInRedirects, # of input redirects */
-	u_quad_t ifs6_in_redirect;
+	uint64_t ifs6_in_redirect;
 	/* ipv6IfIcmpInGroupMembQueries, # of input MLD queries */
-	u_quad_t ifs6_in_mldquery;
+	uint64_t ifs6_in_mldquery;
 	/* ipv6IfIcmpInGroupMembResponses, # of input MLD reports */
-	u_quad_t ifs6_in_mldreport;
+	uint64_t ifs6_in_mldreport;
 	/* ipv6IfIcmpInGroupMembReductions, # of input MLD done */
-	u_quad_t ifs6_in_mlddone;
+	uint64_t ifs6_in_mlddone;
 
 	/*
 	 * Output statistics. We should solve unresolved routing problem...
 	 */
 	/* ipv6IfIcmpOutMsgs, total # of output messages */
-	u_quad_t ifs6_out_msg;
+	uint64_t ifs6_out_msg;
 	/* ipv6IfIcmpOutErrors, # of output error messages */
-	u_quad_t ifs6_out_error;
+	uint64_t ifs6_out_error;
 	/* ipv6IfIcmpOutDestUnreachs, # of output dest unreach errors */
-	u_quad_t ifs6_out_dstunreach;
+	uint64_t ifs6_out_dstunreach;
 	/* ipv6IfIcmpOutAdminProhibs, # of output administratively prohibited errs */
-	u_quad_t ifs6_out_adminprohib;
+	uint64_t ifs6_out_adminprohib;
 	/* ipv6IfIcmpOutTimeExcds, # of output time exceeded errors */
-	u_quad_t ifs6_out_timeexceed;
+	uint64_t ifs6_out_timeexceed;
 	/* ipv6IfIcmpOutParmProblems, # of output parameter problem errors */
-	u_quad_t ifs6_out_paramprob;
+	uint64_t ifs6_out_paramprob;
 	/* ipv6IfIcmpOutPktTooBigs, # of output packet too big errors */
-	u_quad_t ifs6_out_pkttoobig;
+	uint64_t ifs6_out_pkttoobig;
 	/* ipv6IfIcmpOutEchos, # of output echo requests */
-	u_quad_t ifs6_out_echo;
+	uint64_t ifs6_out_echo;
 	/* ipv6IfIcmpOutEchoReplies, # of output echo replies */
-	u_quad_t ifs6_out_echoreply;
+	uint64_t ifs6_out_echoreply;
 	/* ipv6IfIcmpOutRouterSolicits, # of output router solicitations */
-	u_quad_t ifs6_out_routersolicit;
+	uint64_t ifs6_out_routersolicit;
 	/* ipv6IfIcmpOutRouterAdvertisements, # of output router advertisements */
-	u_quad_t ifs6_out_routeradvert;
+	uint64_t ifs6_out_routeradvert;
 	/* ipv6IfIcmpOutNeighborSolicits, # of output neighbor solicitations */
-	u_quad_t ifs6_out_neighborsolicit;
+	uint64_t ifs6_out_neighborsolicit;
 	/* ipv6IfIcmpOutNeighborAdvertisements, # of output neighbor advertisements */
-	u_quad_t ifs6_out_neighboradvert;
+	uint64_t ifs6_out_neighboradvert;
 	/* ipv6IfIcmpOutRedirects, # of output redirects */
-	u_quad_t ifs6_out_redirect;
+	uint64_t ifs6_out_redirect;
 	/* ipv6IfIcmpOutGroupMembQueries, # of output MLD queries */
-	u_quad_t ifs6_out_mldquery;
+	uint64_t ifs6_out_mldquery;
 	/* ipv6IfIcmpOutGroupMembResponses, # of output MLD reports */
-	u_quad_t ifs6_out_mldreport;
+	uint64_t ifs6_out_mldreport;
 	/* ipv6IfIcmpOutGroupMembReductions, # of output MLD done */
-	u_quad_t ifs6_out_mlddone;
+	uint64_t ifs6_out_mlddone;
 };
 
 struct	in6_ifreq {

Modified: head/sys/netinet6/ip6_mroute.h
==============================================================================
--- head/sys/netinet6/ip6_mroute.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet6/ip6_mroute.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -121,19 +121,19 @@ struct mf6cctl {
  * The kernel's multicast routing statistics.
  */
 struct mrt6stat {
-	u_quad_t mrt6s_mfc_lookups;	/* # forw. cache hash table hits   */
-	u_quad_t mrt6s_mfc_misses;	/* # forw. cache hash table misses */
-	u_quad_t mrt6s_upcalls;		/* # calls to multicast routing daemon */
-	u_quad_t mrt6s_no_route;	/* no route for packet's origin    */
-	u_quad_t mrt6s_bad_tunnel;	/* malformed tunnel options        */
-	u_quad_t mrt6s_cant_tunnel;	/* no room for tunnel options      */
-	u_quad_t mrt6s_wrong_if;	/* arrived on wrong interface	   */
-	u_quad_t mrt6s_upq_ovflw;	/* upcall Q overflow		   */
-	u_quad_t mrt6s_cache_cleanups;	/* # entries with no upcalls	   */
-	u_quad_t mrt6s_drop_sel;	/* pkts dropped selectively        */
-	u_quad_t mrt6s_q_overflow;	/* pkts dropped - Q overflow       */
-	u_quad_t mrt6s_pkt2large;	/* pkts dropped - size > BKT SIZE  */
-	u_quad_t mrt6s_upq_sockfull;	/* upcalls dropped - socket full   */
+	uint64_t mrt6s_mfc_lookups;	/* # forw. cache hash table hits   */
+	uint64_t mrt6s_mfc_misses;	/* # forw. cache hash table misses */
+	uint64_t mrt6s_upcalls;		/* # calls to multicast routing daemon */
+	uint64_t mrt6s_no_route;	/* no route for packet's origin    */
+	uint64_t mrt6s_bad_tunnel;	/* malformed tunnel options        */
+	uint64_t mrt6s_cant_tunnel;	/* no room for tunnel options      */
+	uint64_t mrt6s_wrong_if;	/* arrived on wrong interface	   */
+	uint64_t mrt6s_upq_ovflw;	/* upcall Q overflow		   */
+	uint64_t mrt6s_cache_cleanups;	/* # entries with no upcalls	   */
+	uint64_t mrt6s_drop_sel;	/* pkts dropped selectively        */
+	uint64_t mrt6s_q_overflow;	/* pkts dropped - Q overflow       */
+	uint64_t mrt6s_pkt2large;	/* pkts dropped - size > BKT SIZE  */
+	uint64_t mrt6s_upq_sockfull;	/* upcalls dropped - socket full   */
 };
 
 #ifdef MRT6_OINIT

Modified: head/sys/netinet6/ip6_var.h
==============================================================================
--- head/sys/netinet6/ip6_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet6/ip6_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -181,39 +181,39 @@ struct	ip6_pktopts {
  */
 
 struct	ip6stat {
-	u_quad_t ip6s_total;		/* total packets received */
-	u_quad_t ip6s_tooshort;		/* packet too short */
-	u_quad_t ip6s_toosmall;		/* not enough data */
-	u_quad_t ip6s_fragments;	/* fragments received */
-	u_quad_t ip6s_fragdropped;	/* frags dropped(dups, out of space) */
-	u_quad_t ip6s_fragtimeout;	/* fragments timed out */
-	u_quad_t ip6s_fragoverflow;	/* fragments that exceeded limit */
-	u_quad_t ip6s_forward;		/* packets forwarded */
-	u_quad_t ip6s_cantforward;	/* packets rcvd for unreachable dest */
-	u_quad_t ip6s_redirectsent;	/* packets forwarded on same net */
-	u_quad_t ip6s_delivered;	/* datagrams delivered to upper level*/
-	u_quad_t ip6s_localout;		/* total ip packets generated here */
-	u_quad_t ip6s_odropped;		/* lost packets due to nobufs, etc. */
-	u_quad_t ip6s_reassembled;	/* total packets reassembled ok */
-	u_quad_t ip6s_fragmented;	/* datagrams successfully fragmented */
-	u_quad_t ip6s_ofragments;	/* output fragments created */
-	u_quad_t ip6s_cantfrag;		/* don't fragment flag was set, etc. */
-	u_quad_t ip6s_badoptions;	/* error in option processing */
-	u_quad_t ip6s_noroute;		/* packets discarded due to no route */
-	u_quad_t ip6s_badvers;		/* ip6 version != 6 */
-	u_quad_t ip6s_rawout;		/* total raw ip packets generated */
-	u_quad_t ip6s_badscope;		/* scope error */
-	u_quad_t ip6s_notmember;	/* don't join this multicast group */
+	uint64_t ip6s_total;		/* total packets received */
+	uint64_t ip6s_tooshort;		/* packet too short */
+	uint64_t ip6s_toosmall;		/* not enough data */
+	uint64_t ip6s_fragments;	/* fragments received */
+	uint64_t ip6s_fragdropped;	/* frags dropped(dups, out of space) */
+	uint64_t ip6s_fragtimeout;	/* fragments timed out */
+	uint64_t ip6s_fragoverflow;	/* fragments that exceeded limit */
+	uint64_t ip6s_forward;		/* packets forwarded */
+	uint64_t ip6s_cantforward;	/* packets rcvd for unreachable dest */
+	uint64_t ip6s_redirectsent;	/* packets forwarded on same net */
+	uint64_t ip6s_delivered;	/* datagrams delivered to upper level*/
+	uint64_t ip6s_localout;		/* total ip packets generated here */
+	uint64_t ip6s_odropped;		/* lost packets due to nobufs, etc. */
+	uint64_t ip6s_reassembled;	/* total packets reassembled ok */
+	uint64_t ip6s_fragmented;	/* datagrams successfully fragmented */
+	uint64_t ip6s_ofragments;	/* output fragments created */
+	uint64_t ip6s_cantfrag;		/* don't fragment flag was set, etc. */
+	uint64_t ip6s_badoptions;	/* error in option processing */
+	uint64_t ip6s_noroute;		/* packets discarded due to no route */
+	uint64_t ip6s_badvers;		/* ip6 version != 6 */
+	uint64_t ip6s_rawout;		/* total raw ip packets generated */
+	uint64_t ip6s_badscope;		/* scope error */
+	uint64_t ip6s_notmember;	/* don't join this multicast group */
 #define	IP6S_HDRCNT		256	/* headers count */
-	u_quad_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
-	u_quad_t ip6s_m1;		/* one mbuf */
+	uint64_t ip6s_nxthist[IP6S_HDRCNT]; /* next header history */
+	uint64_t ip6s_m1;		/* one mbuf */
 #define	IP6S_M2MMAX		32
-	u_quad_t ip6s_m2m[IP6S_M2MMAX];	/* two or more mbuf */
-	u_quad_t ip6s_mext1;		/* one ext mbuf */
-	u_quad_t ip6s_mext2m;		/* two or more ext mbuf */
-	u_quad_t ip6s_exthdrtoolong;	/* ext hdr are not contiguous */
-	u_quad_t ip6s_nogif;		/* no match gif found */
-	u_quad_t ip6s_toomanyhdr;	/* discarded due to too many headers */
+	uint64_t ip6s_m2m[IP6S_M2MMAX];	/* two or more mbuf */
+	uint64_t ip6s_mext1;		/* one ext mbuf */
+	uint64_t ip6s_mext2m;		/* two or more ext mbuf */
+	uint64_t ip6s_exthdrtoolong;	/* ext hdr are not contiguous */
+	uint64_t ip6s_nogif;		/* no match gif found */
+	uint64_t ip6s_toomanyhdr;	/* discarded due to too many headers */
 
 	/*
 	 * statistics for improvement of the source address selection
@@ -223,26 +223,26 @@ struct	ip6stat {
 #define	IP6S_RULESMAX		16
 #define	IP6S_SCOPECNT		16
 	/* number of times that address selection fails */
-	u_quad_t ip6s_sources_none;
+	uint64_t ip6s_sources_none;
 	/* number of times that an address on the outgoing I/F is chosen */
-	u_quad_t ip6s_sources_sameif[IP6S_SCOPECNT];
+	uint64_t ip6s_sources_sameif[IP6S_SCOPECNT];
 	/* number of times that an address on a non-outgoing I/F is chosen */
-	u_quad_t ip6s_sources_otherif[IP6S_SCOPECNT];
+	uint64_t ip6s_sources_otherif[IP6S_SCOPECNT];
 	/*
 	 * number of times that an address that has the same scope
 	 * from the destination is chosen.
 	 */
-	u_quad_t ip6s_sources_samescope[IP6S_SCOPECNT];
+	uint64_t ip6s_sources_samescope[IP6S_SCOPECNT];
 	/*
 	 * number of times that an address that has a different scope
 	 * from the destination is chosen.
 	 */
-	u_quad_t ip6s_sources_otherscope[IP6S_SCOPECNT];
+	uint64_t ip6s_sources_otherscope[IP6S_SCOPECNT];
 	/* number of times that a deprecated address is chosen */
-	u_quad_t ip6s_sources_deprecated[IP6S_SCOPECNT];
+	uint64_t ip6s_sources_deprecated[IP6S_SCOPECNT];
 
 	/* number of times that each rule of source selection is applied. */
-	u_quad_t ip6s_sources_rule[IP6S_RULESMAX];
+	uint64_t ip6s_sources_rule[IP6S_RULESMAX];
 };
 
 #ifdef _KERNEL

Modified: head/sys/netinet6/pim6_var.h
==============================================================================
--- head/sys/netinet6/pim6_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet6/pim6_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -42,13 +42,13 @@
 #define _NETINET6_PIM6_VAR_H_
 
 struct pim6stat {
-	u_quad_t pim6s_rcv_total;	/* total PIM messages received	*/
-	u_quad_t pim6s_rcv_tooshort;	/* received with too few bytes	*/
-	u_quad_t pim6s_rcv_badsum;	/* received with bad checksum	*/
-	u_quad_t pim6s_rcv_badversion;	/* received bad PIM version	*/
-	u_quad_t pim6s_rcv_registers;	/* received registers		*/
-	u_quad_t pim6s_rcv_badregisters; /* received invalid registers	*/
-	u_quad_t pim6s_snd_registers;	/* sent registers		*/
+	uint64_t pim6s_rcv_total;	/* total PIM messages received	*/
+	uint64_t pim6s_rcv_tooshort;	/* received with too few bytes	*/
+	uint64_t pim6s_rcv_badsum;	/* received with bad checksum	*/
+	uint64_t pim6s_rcv_badversion;	/* received bad PIM version	*/
+	uint64_t pim6s_rcv_registers;	/* received registers		*/
+	uint64_t pim6s_rcv_badregisters; /* received invalid registers	*/
+	uint64_t pim6s_snd_registers;	/* sent registers		*/
 };
 
 #if (defined(KERNEL)) || (defined(_KERNEL))

Modified: head/sys/netinet6/raw_ip6.h
==============================================================================
--- head/sys/netinet6/raw_ip6.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netinet6/raw_ip6.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -37,14 +37,14 @@
  * ICMPv6 stat is counted separately.  see netinet/icmp6.h
  */
 struct rip6stat {
-	u_quad_t rip6s_ipackets;	/* total input packets */
-	u_quad_t rip6s_isum;		/* input checksum computations */
-	u_quad_t rip6s_badsum;		/* of above, checksum error */
-	u_quad_t rip6s_nosock;		/* no matching socket */
-	u_quad_t rip6s_nosockmcast;	/* of above, arrived as multicast */
-	u_quad_t rip6s_fullsock;	/* not delivered, input socket full */
+	uint64_t rip6s_ipackets;	/* total input packets */
+	uint64_t rip6s_isum;		/* input checksum computations */
+	uint64_t rip6s_badsum;		/* of above, checksum error */
+	uint64_t rip6s_nosock;		/* no matching socket */
+	uint64_t rip6s_nosockmcast;	/* of above, arrived as multicast */
+	uint64_t rip6s_fullsock;	/* not delivered, input socket full */
 
-	u_quad_t rip6s_opackets;	/* total output packets */
+	uint64_t rip6s_opackets;	/* total output packets */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netipsec/ah_var.h
==============================================================================
--- head/sys/netipsec/ah_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/ah_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -48,26 +48,26 @@
 #define	AH_ALG_MAX	16
 
 struct ahstat {
-	u_int32_t	ahs_hdrops;	/* Packet shorter than header shows */
-	u_int32_t	ahs_nopf;	/* Protocol family not supported */
-	u_int32_t	ahs_notdb;
-	u_int32_t	ahs_badkcr;
-	u_int32_t	ahs_badauth;
-	u_int32_t	ahs_noxform;
-	u_int32_t	ahs_qfull;
-	u_int32_t	ahs_wrap;
-	u_int32_t	ahs_replay;
-	u_int32_t	ahs_badauthl;	/* Bad authenticator length */
-	u_int32_t	ahs_input;	/* Input AH packets */
-	u_int32_t	ahs_output;	/* Output AH packets */
-	u_int32_t	ahs_invalid;	/* Trying to use an invalid TDB */
-	u_int64_t	ahs_ibytes;	/* Input bytes */
-	u_int64_t	ahs_obytes;	/* Output bytes */
-	u_int32_t	ahs_toobig;	/* Packet got larger than IP_MAXPACKET */
-	u_int32_t	ahs_pdrops;	/* Packet blocked due to policy */
-	u_int32_t	ahs_crypto;	/* Crypto processing failure */
-	u_int32_t	ahs_tunnel;	/* Tunnel sanity check failure */
-	u_int32_t	ahs_hist[AH_ALG_MAX];	/* Per-algorithm op count */
+	uint64_t	ahs_hdrops;	/* Packet shorter than header shows */
+	uint64_t	ahs_nopf;	/* Protocol family not supported */
+	uint64_t	ahs_notdb;
+	uint64_t	ahs_badkcr;
+	uint64_t	ahs_badauth;
+	uint64_t	ahs_noxform;
+	uint64_t	ahs_qfull;
+	uint64_t	ahs_wrap;
+	uint64_t	ahs_replay;
+	uint64_t	ahs_badauthl;	/* Bad authenticator length */
+	uint64_t	ahs_input;	/* Input AH packets */
+	uint64_t	ahs_output;	/* Output AH packets */
+	uint64_t	ahs_invalid;	/* Trying to use an invalid TDB */
+	uint64_t	ahs_ibytes;	/* Input bytes */
+	uint64_t	ahs_obytes;	/* Output bytes */
+	uint64_t	ahs_toobig;	/* Packet got larger than IP_MAXPACKET */
+	uint64_t	ahs_pdrops;	/* Packet blocked due to policy */
+	uint64_t	ahs_crypto;	/* Crypto processing failure */
+	uint64_t	ahs_tunnel;	/* Tunnel sanity check failure */
+	uint64_t	ahs_hist[AH_ALG_MAX];	/* Per-algorithm op count */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netipsec/esp_var.h
==============================================================================
--- head/sys/netipsec/esp_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/esp_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -48,27 +48,27 @@
 #define	ESP_ALG_MAX	256		/* NB: could be < but skipjack is 249 */
 
 struct espstat {
-	u_int32_t	esps_hdrops;	/* Packet shorter than header shows */
-	u_int32_t	esps_nopf;	/* Protocol family not supported */
-	u_int32_t	esps_notdb;
-	u_int32_t	esps_badkcr;
-	u_int32_t	esps_qfull;
-	u_int32_t	esps_noxform;
-	u_int32_t	esps_badilen;
-	u_int32_t	esps_wrap;	/* Replay counter wrapped around */
-	u_int32_t	esps_badenc;	/* Bad encryption detected */
-	u_int32_t	esps_badauth;	/* Only valid for transforms with auth */
-	u_int32_t	esps_replay;	/* Possible packet replay detected */
-	u_int32_t	esps_input;	/* Input ESP packets */
-	u_int32_t	esps_output;	/* Output ESP packets */
-	u_int32_t	esps_invalid;	/* Trying to use an invalid TDB */
-	u_int64_t	esps_ibytes;	/* Input bytes */
-	u_int64_t	esps_obytes;	/* Output bytes */
-	u_int32_t	esps_toobig;	/* Packet got larger than IP_MAXPACKET */
-	u_int32_t	esps_pdrops;	/* Packet blocked due to policy */
-	u_int32_t	esps_crypto;	/* Crypto processing failure */
-	u_int32_t	esps_tunnel;	/* Tunnel sanity check failure */
-	u_int32_t	esps_hist[ESP_ALG_MAX];	/* Per-algorithm op count */
+	uint64_t	esps_hdrops;	/* Packet shorter than header shows */
+	uint64_t	esps_nopf;	/* Protocol family not supported */
+	uint64_t	esps_notdb;
+	uint64_t	esps_badkcr;
+	uint64_t	esps_qfull;
+	uint64_t	esps_noxform;
+	uint64_t	esps_badilen;
+	uint64_t	esps_wrap;	/* Replay counter wrapped around */
+	uint64_t	esps_badenc;	/* Bad encryption detected */
+	uint64_t	esps_badauth;	/* Only valid for transforms with auth */
+	uint64_t	esps_replay;	/* Possible packet replay detected */
+	uint64_t	esps_input;	/* Input ESP packets */
+	uint64_t	esps_output;	/* Output ESP packets */
+	uint64_t	esps_invalid;	/* Trying to use an invalid TDB */
+	uint64_t	esps_ibytes;	/* Input bytes */
+	uint64_t	esps_obytes;	/* Output bytes */
+	uint64_t	esps_toobig;	/* Packet got larger than IP_MAXPACKET */
+	uint64_t	esps_pdrops;	/* Packet blocked due to policy */
+	uint64_t	esps_crypto;	/* Crypto processing failure */
+	uint64_t	esps_tunnel;	/* Tunnel sanity check failure */
+	uint64_t	esps_hist[ESP_ALG_MAX];	/* Per-algorithm op count */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netipsec/ipcomp_var.h
==============================================================================
--- head/sys/netipsec/ipcomp_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/ipcomp_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -41,27 +41,26 @@
  */
 #define	IPCOMP_ALG_MAX	8
 
-#define	IPCOMPSTAT_VERSION	1
+#define	IPCOMPSTAT_VERSION	2
 struct ipcompstat {
-	u_int32_t	ipcomps_hdrops;	/* Packet shorter than header shows */
-	u_int32_t	ipcomps_nopf;	/* Protocol family not supported */
-	u_int32_t	ipcomps_notdb;
-	u_int32_t	ipcomps_badkcr;
-	u_int32_t	ipcomps_qfull;
-	u_int32_t	ipcomps_noxform;
-	u_int32_t	ipcomps_wrap;
-	u_int32_t	ipcomps_input;	/* Input IPcomp packets */
-	u_int32_t	ipcomps_output;	/* Output IPcomp packets */
-	u_int32_t	ipcomps_invalid;/* Trying to use an invalid TDB */
-	u_int64_t	ipcomps_ibytes;	/* Input bytes */
-	u_int64_t	ipcomps_obytes;	/* Output bytes */
-	u_int32_t	ipcomps_toobig;	/* Packet got > IP_MAXPACKET */
-	u_int32_t	ipcomps_pdrops;	/* Packet blocked due to policy */
-	u_int32_t	ipcomps_crypto;	/* "Crypto" processing failure */
-	u_int32_t	ipcomps_hist[IPCOMP_ALG_MAX];/* Per-algorithm op count */
-	u_int32_t	version;	/* Version of this structure. */
-	u_int32_t	ipcomps_threshold; /* Packet < comp. algo. threshold. */
-	u_int32_t	ipcomps_uncompr; /* Compression was useles. */
+	uint64_t	ipcomps_hdrops;	/* Packet shorter than header shows */
+	uint64_t	ipcomps_nopf;	/* Protocol family not supported */
+	uint64_t	ipcomps_notdb;
+	uint64_t	ipcomps_badkcr;
+	uint64_t	ipcomps_qfull;
+	uint64_t	ipcomps_noxform;
+	uint64_t	ipcomps_wrap;
+	uint64_t	ipcomps_input;	/* Input IPcomp packets */
+	uint64_t	ipcomps_output;	/* Output IPcomp packets */
+	uint64_t	ipcomps_invalid;/* Trying to use an invalid TDB */
+	uint64_t	ipcomps_ibytes;	/* Input bytes */
+	uint64_t	ipcomps_obytes;	/* Output bytes */
+	uint64_t	ipcomps_toobig;	/* Packet got > IP_MAXPACKET */
+	uint64_t	ipcomps_pdrops;	/* Packet blocked due to policy */
+	uint64_t	ipcomps_crypto;	/* "Crypto" processing failure */
+	uint64_t	ipcomps_hist[IPCOMP_ALG_MAX];/* Per-algorithm op count */
+	uint64_t	ipcomps_threshold; /* Packet < comp. algo. threshold. */
+	uint64_t	ipcomps_uncompr; /* Compression was useles. */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netipsec/ipip_var.h
==============================================================================
--- head/sys/netipsec/ipip_var.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/ipip_var.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -44,18 +44,17 @@
  * Not quite all the functionality of RFC-1853, but the main idea is there.
  */
 
-struct ipipstat
-{
-    u_int32_t	ipips_ipackets;		/* total input packets */
-    u_int32_t	ipips_opackets;		/* total output packets */
-    u_int32_t	ipips_hdrops;		/* packet shorter than header shows */
-    u_int32_t	ipips_qfull;
-    u_int64_t   ipips_ibytes;
-    u_int64_t   ipips_obytes;
-    u_int32_t	ipips_pdrops;		/* packet dropped due to policy */
-    u_int32_t	ipips_spoof;		/* IP spoofing attempts */
-    u_int32_t   ipips_family;		/* Protocol family mismatch */
-    u_int32_t   ipips_unspec;            /* Missing tunnel endpoint address */
+struct ipipstat {
+	uint64_t	ipips_ipackets;	/* total input packets */
+	uint64_t	ipips_opackets;	/* total output packets */
+	uint64_t	ipips_hdrops;	/* packet shorter than header shows */
+	uint64_t	ipips_qfull;
+	uint64_t	ipips_ibytes;
+	uint64_t	ipips_obytes;
+	uint64_t	ipips_pdrops;	/* packet dropped due to policy */
+	uint64_t	ipips_spoof;	/* IP spoofing attempts */
+	uint64_t	ipips_family;	/* Protocol family mismatch */
+	uint64_t	ipips_unspec;   /* Missing tunnel endpoint address */
 };
 
 #ifdef _KERNEL

Modified: head/sys/netipsec/ipsec.h
==============================================================================
--- head/sys/netipsec/ipsec.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/ipsec.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -217,54 +217,54 @@ struct secspacq {
 
 /* statistics for ipsec processing */
 struct ipsecstat {
-	u_quad_t in_success;  /* succeeded inbound process */
-	u_quad_t in_polvio;
+	uint64_t in_success;  /* succeeded inbound process */
+	uint64_t in_polvio;
 			/* security policy violation for inbound process */
-	u_quad_t in_nosa;     /* inbound SA is unavailable */
-	u_quad_t in_inval;    /* inbound processing failed due to EINVAL */
-	u_quad_t in_nomem;    /* inbound processing failed due to ENOBUFS */
-	u_quad_t in_badspi;   /* failed getting a SPI */
-	u_quad_t in_ahreplay; /* AH replay check failed */
-	u_quad_t in_espreplay; /* ESP replay check failed */
-	u_quad_t in_ahauthsucc; /* AH authentication success */
-	u_quad_t in_ahauthfail; /* AH authentication failure */
-	u_quad_t in_espauthsucc; /* ESP authentication success */
-	u_quad_t in_espauthfail; /* ESP authentication failure */
-	u_quad_t in_esphist[256];
-	u_quad_t in_ahhist[256];
-	u_quad_t in_comphist[256];
-	u_quad_t out_success; /* succeeded outbound process */
-	u_quad_t out_polvio;
+	uint64_t in_nosa;     /* inbound SA is unavailable */
+	uint64_t in_inval;    /* inbound processing failed due to EINVAL */
+	uint64_t in_nomem;    /* inbound processing failed due to ENOBUFS */
+	uint64_t in_badspi;   /* failed getting a SPI */
+	uint64_t in_ahreplay; /* AH replay check failed */
+	uint64_t in_espreplay; /* ESP replay check failed */
+	uint64_t in_ahauthsucc; /* AH authentication success */
+	uint64_t in_ahauthfail; /* AH authentication failure */
+	uint64_t in_espauthsucc; /* ESP authentication success */
+	uint64_t in_espauthfail; /* ESP authentication failure */
+	uint64_t in_esphist[256];
+	uint64_t in_ahhist[256];
+	uint64_t in_comphist[256];
+	uint64_t out_success; /* succeeded outbound process */
+	uint64_t out_polvio;
 			/* security policy violation for outbound process */
-	u_quad_t out_nosa;    /* outbound SA is unavailable */
-	u_quad_t out_inval;   /* outbound process failed due to EINVAL */
-	u_quad_t out_nomem;    /* inbound processing failed due to ENOBUFS */
-	u_quad_t out_noroute; /* there is no route */
-	u_quad_t out_esphist[256];
-	u_quad_t out_ahhist[256];
-	u_quad_t out_comphist[256];
-
-	u_quad_t spdcachelookup;
-	u_quad_t spdcachemiss;
-
-	u_int32_t ips_in_polvio;	/* input: sec policy violation */
-	u_int32_t ips_out_polvio;	/* output: sec policy violation */
-	u_int32_t ips_out_nosa;		/* output: SA unavailable  */
-	u_int32_t ips_out_nomem;	/* output: no memory available */
-	u_int32_t ips_out_noroute;	/* output: no route available */
-	u_int32_t ips_out_inval;	/* output: generic error */
-	u_int32_t ips_out_bundlesa;	/* output: bundled SA processed */
-	u_int32_t ips_mbcoalesced;	/* mbufs coalesced during clone */
-	u_int32_t ips_clcoalesced;	/* clusters coalesced during clone */
-	u_int32_t ips_clcopied;		/* clusters copied during clone */
-	u_int32_t ips_mbinserted;	/* mbufs inserted during makespace */
+	uint64_t out_nosa;    /* outbound SA is unavailable */
+	uint64_t out_inval;   /* outbound process failed due to EINVAL */
+	uint64_t out_nomem;    /* inbound processing failed due to ENOBUFS */
+	uint64_t out_noroute; /* there is no route */
+	uint64_t out_esphist[256];
+	uint64_t out_ahhist[256];
+	uint64_t out_comphist[256];
+
+	uint64_t spdcachelookup;
+	uint64_t spdcachemiss;
+
+	uint64_t ips_in_polvio;		/* input: sec policy violation */
+	uint64_t ips_out_polvio;	/* output: sec policy violation */
+	uint64_t ips_out_nosa;		/* output: SA unavailable  */
+	uint64_t ips_out_nomem;		/* output: no memory available */
+	uint64_t ips_out_noroute;	/* output: no route available */
+	uint64_t ips_out_inval;		/* output: generic error */
+	uint64_t ips_out_bundlesa;	/* output: bundled SA processed */
+	uint64_t ips_mbcoalesced;	/* mbufs coalesced during clone */
+	uint64_t ips_clcoalesced;	/* clusters coalesced during clone */
+	uint64_t ips_clcopied;		/* clusters copied during clone */
+	uint64_t ips_mbinserted;	/* mbufs inserted during makespace */
 	/* 
 	 * Temporary statistics for performance analysis.
 	 */
 	/* See where ESP/AH/IPCOMP header land in mbuf on input */
-	u_int32_t ips_input_front;
-	u_int32_t ips_input_middle;
-	u_int32_t ips_input_end;
+	uint64_t ips_input_front;
+	uint64_t ips_input_middle;
+	uint64_t ips_input_end;
 };
 
 /*

Modified: head/sys/netipsec/keysock.h
==============================================================================
--- head/sys/netipsec/keysock.h	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/keysock.h	Tue Jul  9 09:32:06 2013	(r253081)
@@ -36,26 +36,26 @@
 /* statistics for pfkey socket */
 struct pfkeystat {
 	/* kernel -> userland */
-	u_quad_t out_total;		/* # of total calls */
-	u_quad_t out_bytes;		/* total bytecount */
-	u_quad_t out_msgtype[256];	/* message type histogram */
-	u_quad_t out_invlen;		/* invalid length field */
-	u_quad_t out_invver;		/* invalid version field */
-	u_quad_t out_invmsgtype;	/* invalid message type field */
-	u_quad_t out_tooshort;		/* msg too short */
-	u_quad_t out_nomem;		/* memory allocation failure */
-	u_quad_t out_dupext;		/* duplicate extension */
-	u_quad_t out_invexttype;	/* invalid extension type */
-	u_quad_t out_invsatype;		/* invalid sa type */
-	u_quad_t out_invaddr;		/* invalid address extension */
+	uint64_t out_total;		/* # of total calls */
+	uint64_t out_bytes;		/* total bytecount */
+	uint64_t out_msgtype[256];	/* message type histogram */
+	uint64_t out_invlen;		/* invalid length field */
+	uint64_t out_invver;		/* invalid version field */
+	uint64_t out_invmsgtype;	/* invalid message type field */
+	uint64_t out_tooshort;		/* msg too short */
+	uint64_t out_nomem;		/* memory allocation failure */
+	uint64_t out_dupext;		/* duplicate extension */
+	uint64_t out_invexttype;	/* invalid extension type */
+	uint64_t out_invsatype;		/* invalid sa type */
+	uint64_t out_invaddr;		/* invalid address extension */
 	/* userland -> kernel */
-	u_quad_t in_total;		/* # of total calls */
-	u_quad_t in_bytes;		/* total bytecount */
-	u_quad_t in_msgtype[256];	/* message type histogram */
-	u_quad_t in_msgtarget[3];	/* one/all/registered */
-	u_quad_t in_nomem;		/* memory allocation failure */
+	uint64_t in_total;		/* # of total calls */
+	uint64_t in_bytes;		/* total bytecount */
+	uint64_t in_msgtype[256];	/* message type histogram */
+	uint64_t in_msgtarget[3];	/* one/all/registered */
+	uint64_t in_nomem;		/* memory allocation failure */
 	/* others */
-	u_quad_t sockerr;		/* # of socket related errors */
+	uint64_t sockerr;		/* # of socket related errors */
 };
 
 #define KEY_SENDUP_ONE		0

Modified: head/sys/netipsec/xform_ipcomp.c
==============================================================================
--- head/sys/netipsec/xform_ipcomp.c	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/sys/netipsec/xform_ipcomp.c	Tue Jul  9 09:32:06 2013	(r253081)
@@ -636,8 +636,6 @@ static void
 vnet_ipcomp_attach(const void *unused __unused)
 {
 
-	/* XXX */
-	V_ipcompstat.version = IPCOMPSTAT_VERSION;
 }
 
 VNET_SYSINIT(vnet_ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE,

Modified: head/tools/tools/crypto/ipsecstats.c
==============================================================================
--- head/tools/tools/crypto/ipsecstats.c	Tue Jul  9 09:31:26 2013	(r253080)
+++ head/tools/tools/crypto/ipsecstats.c	Tue Jul  9 09:32:06 2013	(r253081)
@@ -82,7 +82,7 @@ algname(int a, const struct alg algs[], 
 int
 main(int argc, char *argv[])
 {
-#define	STAT(x,fmt)	if (x) printf(fmt "\n", x)
+#define	STAT(x,fmt)	if (x) printf(fmt "\n", (uintmax_t)x)
 	struct ipsecstat ips;
 	struct ahstat ahs;
 	struct espstat esps;
@@ -99,8 +99,7 @@ main(int argc, char *argv[])
 	if (sysctlbyname("net.inet.esp.stats", &esps, &slen, NULL, NULL) < 0)
 		err(1, "net.inet.esp.stats");
 
-#define	AHSTAT(x,fmt)	if (x) printf("ah " fmt ": %u\n", x)
-#define	AHSTAT64(x,fmt)	if (x) printf("ah " fmt ": %llu\n", x)
+#define	AHSTAT(x,fmt)	if (x) printf("ah " fmt ": %ju\n", (uintmax_t)x)
 	AHSTAT(ahs.ahs_input, "input packets processed");
 	AHSTAT(ahs.ahs_output, "output packets processed");
 	AHSTAT(ahs.ahs_hdrops, "headers too short");
@@ -120,17 +119,15 @@ main(int argc, char *argv[])
 	AHSTAT(ahs.ahs_tunnel, "tunnel sanity check failures");
 	for (i = 0; i < AH_ALG_MAX; i++)
 		if (ahs.ahs_hist[i])
-			printf("ah packets with %s: %u\n"
+			printf("ah packets with %s: %ju\n"
 				, algname(i, aalgs, N(aalgs))
-				, ahs.ahs_hist[i]
+				, (uintmax_t)ahs.ahs_hist[i]
 			);
-	AHSTAT64(ahs.ahs_ibytes, "bytes received");
-	AHSTAT64(ahs.ahs_obytes, "bytes transmitted");
-#undef AHSTAT64
+	AHSTAT(ahs.ahs_ibytes, "bytes received");
+	AHSTAT(ahs.ahs_obytes, "bytes transmitted");
 #undef AHSTAT
 
-#define	ESPSTAT(x,fmt)	if (x) printf("esp " fmt ": %u\n", x)
-#define	ESPSTAT64(x,fmt)	if (x) printf("esp " fmt ": %llu\n", x)
+#define	ESPSTAT(x,fmt)	if (x) printf("esp " fmt ": %ju\n", (uintmax_t)x)
 	ESPSTAT(esps.esps_input, "input packets processed");
 	ESPSTAT(esps.esps_output, "output packets processed");
 	ESPSTAT(esps.esps_hdrops, "headers too short");
@@ -151,29 +148,30 @@ main(int argc, char *argv[])
 	ESPSTAT(esps.esps_tunnel, "tunnel sanity check failures");
 	for (i = 0; i < ESP_ALG_MAX; i++)
 		if (esps.esps_hist[i])
-			printf("esp packets with %s: %u\n"
+			printf("esp packets with %s: %ju\n"
 				, algname(i, espalgs, N(espalgs))
-				, esps.esps_hist[i]
+				, (uintmax_t)esps.esps_hist[i]
 			);
-	ESPSTAT64(esps.esps_ibytes, "bytes received");
-	ESPSTAT64(esps.esps_obytes, "bytes transmitted");
-#undef ESPSTAT64
+	ESPSTAT(esps.esps_ibytes, "bytes received");
+	ESPSTAT(esps.esps_obytes, "bytes transmitted");
 #undef ESPSTAT
 
 	printf("\n");
 	if (ips.ips_in_polvio+ips.ips_out_polvio)
-		printf("policy violations: input %u output %u\n",
-			ips.ips_in_polvio, ips.ips_out_polvio);
-	STAT(ips.ips_out_nosa, "no SA found %u (output)");
-	STAT(ips.ips_out_nomem, "no memory available %u (output)");
-	STAT(ips.ips_out_noroute, "no route available %u (output)");
-	STAT(ips.ips_out_inval, "generic error %u (output)");
-	STAT(ips.ips_out_bundlesa, "bundled SA processed %u (output)");
-	printf("m_clone processing: %u mbufs + %u clusters coalesced\n",
-		ips.ips_mbcoalesced, ips.ips_clcoalesced);
-	printf("m_clone processing: %u clusters copied\n", ips.ips_clcopied);
-	printf("m_makespace: %u mbufs inserted\n", ips.ips_mbinserted);
-	printf("header position [front/middle/end]: %u/%u/%u\n",
-		ips.ips_input_front, ips.ips_input_middle, ips.ips_input_end);
+		printf("policy violations: input %ju output %ju\n",
+		    (uintmax_t)ips.ips_in_polvio,
+		    (uintmax_t)ips.ips_out_polvio);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:37:22 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 37B8C1F1;
 Tue,  9 Jul 2013 09:37:22 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 1AA051450;
 Tue,  9 Jul 2013 09:37:22 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r699bL6T034960;
 Tue, 9 Jul 2013 09:37:21 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r699bLVo034958;
 Tue, 9 Jul 2013 09:37:21 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307090937.r699bLVo034958@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 09:37:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253082 - in head/sys: net sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:37:22 -0000

Author: ae
Date: Tue Jul  9 09:37:21 2013
New Revision: 253082
URL: http://svnweb.freebsd.org/changeset/base/253082

Log:
  Add several macros to help migrate statistics structures to PCPU counters.

Modified:
  head/sys/net/vnet.h
  head/sys/sys/counter.h

Modified: head/sys/net/vnet.h
==============================================================================
--- head/sys/net/vnet.h	Tue Jul  9 09:32:06 2013	(r253081)
+++ head/sys/net/vnet.h	Tue Jul  9 09:37:21 2013	(r253082)
@@ -85,6 +85,55 @@ struct vnet {
 
 #ifdef _KERNEL
 
+#define	VNET_PCPUSTAT_DECLARE(type, name)	\
+    VNET_DECLARE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)])
+
+#define	VNET_PCPUSTAT_DEFINE(type, name)	\
+    VNET_DEFINE(counter_u64_t, name[sizeof(type) / sizeof(uint64_t)])
+
+#define	VNET_PCPUSTAT_ALLOC(name, wait)	\
+    COUNTER_ARRAY_ALLOC(VNET(name), \
+	sizeof(VNET(name)) / sizeof(counter_u64_t), (wait))
+
+#define	VNET_PCPUSTAT_FREE(name)	\
+    COUNTER_ARRAY_FREE(VNET(name), sizeof(VNET(name)) / sizeof(counter_u64_t))
+
+#define	VNET_PCPUSTAT_ADD(type, name, f, v)	\
+    counter_u64_add(VNET(name)[offsetof(type, f) / sizeof(uint64_t)], (v))
+
+#define	VNET_PCPUSTAT_SYSINIT(name)	\
+static void				\
+vnet_##name##_init(const void *unused)	\
+{					\
+	VNET_PCPUSTAT_ALLOC(name, M_WAITOK);	\
+}					\
+VNET_SYSINIT(vnet_ ## name ## _init, SI_SUB_PROTO_IFATTACHDOMAIN,	\
+    SI_ORDER_ANY, vnet_ ## name ## _init, NULL)
+
+#define	VNET_PCPUSTAT_SYSUNINIT(name)					\
+static void								\
+vnet_##name##_uninit(const void *unused)				\
+{									\
+	VNET_PCPUSTAT_FREE(name);					\
+}									\
+VNET_SYSUNINIT(vnet_ ## name ## _uninit, SI_SUB_PROTO_IFATTACHDOMAIN,	\
+    SI_ORDER_ANY, vnet_ ## name ## _uninit, NULL)
+
+#define	SYSCTL_VNET_PCPUSTAT(parent, nbr, name, type, array, desc)	\
+static int								\
+array##_sysctl(SYSCTL_HANDLER_ARGS)					\
+{									\
+	type s;								\
+	CTASSERT(sizeof(type) == sizeof(VNET(array)));			\
+	COUNTER_ARRAY_COPY(VNET(array), &s, sizeof(type) / sizeof(uint64_t));\
+	if (req->newptr)						\
+		COUNTER_ARRAY_ZERO(VNET(array),				\
+		    sizeof(type) / sizeof(uint64_t));			\
+	return (SYSCTL_OUT(req, &s, sizeof(type)));			\
+}									\
+SYSCTL_VNET_PROC(parent, nbr, name, CTLTYPE_OPAQUE | CTLFLAG_RW, NULL,	\
+    0, array ## _sysctl, "I", desc)
+
 #ifdef VIMAGE
 #include 
 #include 			/* for struct thread */

Modified: head/sys/sys/counter.h
==============================================================================
--- head/sys/sys/counter.h	Tue Jul  9 09:32:06 2013	(r253081)
+++ head/sys/sys/counter.h	Tue Jul  9 09:37:21 2013	(r253082)
@@ -39,4 +39,23 @@ void		counter_u64_free(counter_u64_t);
 void		counter_u64_zero(counter_u64_t);
 uint64_t	counter_u64_fetch(counter_u64_t);
 
+#define	COUNTER_ARRAY_ALLOC(a, n, wait)	do {			\
+	for (int i = 0; i < (n); i++)				\
+		(a)[i] = counter_u64_alloc(wait);		\
+} while (0)
+
+#define	COUNTER_ARRAY_FREE(a, n)	do {			\
+	for (int i = 0; i < (n); i++)				\
+		counter_u64_free((a)[i]);			\
+} while (0)
+
+#define	COUNTER_ARRAY_COPY(a, dstp, n)	do {			\
+	for (int i = 0; i < (n); i++)				\
+		((uint64_t *)(dstp))[i] = counter_u64_fetch((a)[i]);\
+} while (0)
+
+#define	COUNTER_ARRAY_ZERO(a, n)	do {			\
+	for (int i = 0; i < (n); i++)				\
+		counter_u64_zero((a)[i]);			\
+} while (0)
 #endif	/* ! __SYS_COUNTER_H__ */

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:43:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 21BF5536;
 Tue,  9 Jul 2013 09:43:05 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 0E6051497;
 Tue,  9 Jul 2013 09:43:05 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r699h5RF037256;
 Tue, 9 Jul 2013 09:43:05 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r699h3GV037246;
 Tue, 9 Jul 2013 09:43:03 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307090943.r699h3GV037246@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 09:43:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253083 - in head: sys/netinet usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:43:05 -0000

Author: ae
Date: Tue Jul  9 09:43:03 2013
New Revision: 253083
URL: http://svnweb.freebsd.org/changeset/base/253083

Log:
  Use new macros to implement ipstat and tcpstat using PCPU counters.
  Change interface of kread_counters() similar ot kread() in the netstat(1).

Modified:
  head/sys/netinet/ip_input.c
  head/sys/netinet/ip_var.h
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_var.h
  head/usr.bin/netstat/inet.c
  head/usr.bin/netstat/main.c
  head/usr.bin/netstat/netstat.h

Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/sys/netinet/ip_input.c	Tue Jul  9 09:43:03 2013	(r253083)
@@ -208,73 +208,17 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, 
 static void	ip_freef(struct ipqhead *, struct ipq *);
 
 /*
- * IP statistics are stored in struct ipstat_p, which is
- * an "array" of counter(9)s.  Although it isn't a real
- * array, we treat it as array to reduce code bloat.
+ * IP statistics are stored in the "array" of counter(9)s.
  */
-VNET_DEFINE(struct ipstat_p, ipstatp);
-
-static void
-vnet_ipstatp_init(const void *unused)
-{
-	counter_u64_t *c;
-	int i;
-
-	for (i = 0, c = (counter_u64_t *)&V_ipstatp;
-	    i < sizeof(V_ipstatp) / sizeof(counter_u64_t);
-	    i++, c++) {
-		*c = counter_u64_alloc(M_WAITOK);
-		counter_u64_zero(*c);
-	}
-}
-VNET_SYSINIT(vnet_ipstatp_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
-            vnet_ipstatp_init, NULL);
+VNET_PCPUSTAT_DEFINE(struct ipstat, ipstat);
+VNET_PCPUSTAT_SYSINIT(ipstat);
+SYSCTL_VNET_PCPUSTAT(_net_inet_ip, IPCTL_STATS, stats, struct ipstat, ipstat,
+    "IP statistics (struct ipstat, netinet/ip_var.h)");
 
 #ifdef VIMAGE
-static void
-vnet_ipstatp_uninit(const void *unused)
-{
-	counter_u64_t *c;
-	int i;
-
-	for (i = 0, c = (counter_u64_t *)&V_ipstatp;
-	    i < sizeof(V_ipstatp) / sizeof(counter_u64_t);
-	    i++, c++)
-		counter_u64_free(*c);
-}
-VNET_SYSUNINIT(vnet_ipstatp_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
-            vnet_ipstatp_uninit, NULL);
+VNET_PCPUSTAT_SYSUNINIT(ipstat);
 #endif /* VIMAGE */
 
-static int
-ipstat_sysctl(SYSCTL_HANDLER_ARGS)
-{
-	struct ipstat ipstat;
-	counter_u64_t *c;
-	uint64_t *v;
-	int i;
-
-	for (i = 0, c = (counter_u64_t *)&V_ipstatp, v = (uint64_t *)&ipstat;
-	    i < sizeof(V_ipstatp) / sizeof(counter_u64_t);
-	    i++, c++, v++) {
-		*v = counter_u64_fetch(*c);
-		/*
-		 * Old interface allowed to rewrite 'struct ipstat', and
-		 * netstat(1) used it to zero the structure. To keep
-		 * compatibility with old netstat(1) we will zero out
-		 * statistics on every write attempt, however we no longer
-		 * support writing arbitrary fake values to the statistics.
-		 */
-		if (req->newptr)
-			counter_u64_zero(*c);
-	}
-
-	return (SYSCTL_OUT(req, &ipstat, sizeof(ipstat)));
-}
-SYSCTL_VNET_PROC(_net_inet_ip, IPCTL_STATS, stats, CTLTYPE_OPAQUE | CTLFLAG_RW,
-    NULL, 0, ipstat_sysctl, "I",
-    "IP statistics (struct ipstat, netinet/ip_var.h)");
-
 /*
  * Kernel module interface for updating ipstat.  The argument is an index
  * into ipstat treated as an array.
@@ -283,14 +227,14 @@ void
 kmod_ipstat_inc(int statnum)
 {
 
-	counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), 1);
+	counter_u64_add(VNET(ipstat)[statnum], 1);
 }
 
 void
 kmod_ipstat_dec(int statnum)
 {
 
-	counter_u64_add(*((counter_u64_t *)&V_ipstatp + statnum), -1);
+	counter_u64_add(VNET(ipstat)[statnum], -1);
 }
 
 static int

Modified: head/sys/netinet/ip_var.h
==============================================================================
--- head/sys/netinet/ip_var.h	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/sys/netinet/ip_var.h	Tue Jul  9 09:43:03 2013	(r253083)
@@ -133,46 +133,13 @@ struct	ipstat {
 #include 
 #include 
 
-/* Should match 'struct ipstat' above. */
-struct ipstat_p {
-	counter_u64_t ips_total;
-	counter_u64_t ips_badsum;
-	counter_u64_t ips_tooshort;
-	counter_u64_t ips_toosmall;
-	counter_u64_t ips_badhlen;
-	counter_u64_t ips_badlen;
-	counter_u64_t ips_fragments;
-	counter_u64_t ips_fragdropped;
-	counter_u64_t ips_fragtimeout;
-	counter_u64_t ips_forward;
-	counter_u64_t ips_fastforward;
-	counter_u64_t ips_cantforward;
-	counter_u64_t ips_redirectsent;
-	counter_u64_t ips_noproto;
-	counter_u64_t ips_delivered;
-	counter_u64_t ips_localout;
-	counter_u64_t ips_odropped;
-	counter_u64_t ips_reassembled;
-	counter_u64_t ips_fragmented;
-	counter_u64_t ips_ofragments;
-	counter_u64_t ips_cantfrag;
-	counter_u64_t ips_badoptions;
-	counter_u64_t ips_noroute;
-	counter_u64_t ips_badvers;
-	counter_u64_t ips_rawout;
-	counter_u64_t ips_toolong;
-	counter_u64_t ips_notmember;
-	counter_u64_t ips_nogif;
-	counter_u64_t ips_badaddr;
-};
-VNET_DECLARE(struct ipstat_p, ipstatp);
-#define	V_ipstatp VNET(ipstatp)
-
+VNET_PCPUSTAT_DECLARE(struct ipstat, ipstat);
 /*
  * In-kernel consumers can use these accessor macros directly to update
  * stats.
  */
-#define	IPSTAT_ADD(name, val)	counter_u64_add(V_ipstatp.name, (val))
+#define	IPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct ipstat, ipstat, name, (val))
 #define	IPSTAT_SUB(name, val)	IPSTAT_ADD(name, -(val))
 #define	IPSTAT_INC(name)	IPSTAT_ADD(name, 1)
 #define	IPSTAT_DEC(name)	IPSTAT_SUB(name, 1)
@@ -181,11 +148,11 @@ VNET_DECLARE(struct ipstat_p, ipstatp);
  * Kernel module consumers must use this accessor macro.
  */
 void	kmod_ipstat_inc(int statnum);
-#define	KMOD_IPSTAT_INC(name)						\
-	kmod_ipstat_inc(offsetof(struct ipstat_p, name) / sizeof(counter_u64_t))
+#define	KMOD_IPSTAT_INC(name)	\
+    kmod_ipstat_inc(offsetof(struct ipstat, name) / sizeof(uint64_t))
 void	kmod_ipstat_dec(int statnum);
-#define	KMOD_IPSTAT_DEC(name)						\
-	kmod_ipstat_dec(offsetof(struct ipstat_p, name) / sizeof(counter_u64_t))
+#define	KMOD_IPSTAT_DEC(name)	\
+    kmod_ipstat_dec(offsetof(struct ipstat, name) / sizeof(uint64_t))
 
 /* flags passed to ip_output as last parameter */
 #define	IP_FORWARDING		0x1		/* most of ip header exists */

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/sys/netinet/tcp_input.c	Tue Jul  9 09:43:03 2013	(r253083)
@@ -240,67 +240,16 @@ static void inline	hhook_run_tcp_est_in(
 			    struct tcphdr *th, struct tcpopt *to);
 
 /*
- * TCP statistics are stored in struct tcpstat_p, which is
- * an "array" of counter(9)s.  Although it isn't a real
- * array, we treat it as array to reduce code bloat.
+ * TCP statistics are stored in an "array" of counter(9)s.
  */
-VNET_DEFINE(struct tcpstat_p, tcpstatp);
-
-static void
-vnet_tcpstatp_init(const void *unused)
-{
-	counter_u64_t *c;
-	int i;
-
-	for (i = 0, c = (counter_u64_t *)&V_tcpstatp;
-	    i < sizeof(V_tcpstatp) / sizeof(counter_u64_t);
-	    i++, c++) {
-		*c = counter_u64_alloc(M_WAITOK);
-		counter_u64_zero(*c);
-	}
-}
-VNET_SYSINIT(vnet_tcpstatp_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
-	    vnet_tcpstatp_init, NULL);
+VNET_PCPUSTAT_DEFINE(struct tcpstat, tcpstat);
+VNET_PCPUSTAT_SYSINIT(tcpstat);
+SYSCTL_VNET_PCPUSTAT(_net_inet_tcp, TCPCTL_STATS, stats, struct tcpstat,
+    tcpstat, "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
 
 #ifdef VIMAGE
-static void
-vnet_tcpstatp_uninit(const void *unused)
-{
-	counter_u64_t *c;
-	int i;
-
-	for (i = 0, c = (counter_u64_t *)&V_tcpstatp;
-	    i < sizeof(V_tcpstatp) / sizeof(counter_u64_t);
-	    i++, c++)
-		counter_u64_free(*c);
-}
-VNET_SYSUNINIT(vnet_tcpstatp_uninit, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY,
-	    vnet_tcpstatp_uninit, NULL);
+VNET_PCPUSTAT_SYSUNINIT(tcpstat);
 #endif /* VIMAGE */
-
-static int
-tcpstat_sysctl(SYSCTL_HANDLER_ARGS)
-{
-	struct tcpstat tcpstat;
-	counter_u64_t *c;
-	uint64_t *v;
-	int i;
-
-	for (i = 0, c = (counter_u64_t *)&V_tcpstatp, v = (uint64_t *)&tcpstat;
-	    i < sizeof(V_tcpstatp) / sizeof(counter_u64_t);
-	    i++, c++, v++) {
-		*v = counter_u64_fetch(*c);
-		if (req->newptr)
-			counter_u64_zero(*c);
-	}
-
-	return (SYSCTL_OUT(req, &tcpstat, sizeof(tcpstat)));
-}
-
-SYSCTL_VNET_PROC(_net_inet_tcp, TCPCTL_STATS, stats, CTLTYPE_OPAQUE |
-    CTLFLAG_RW, NULL, 0, tcpstat_sysctl, "I", 
-    "TCP statistics (struct tcpstat, netinet/tcp_var.h)");
-
 /*
  * Kernel module interface for updating tcpstat.  The argument is an index
  * into tcpstat treated as an array.
@@ -309,7 +258,7 @@ void
 kmod_tcpstat_inc(int statnum)
 {
 
-	counter_u64_add(*((counter_u64_t *)&V_tcpstatp + statnum), 1);
+	counter_u64_add(VNET(tcpstat)[statnum], 1);
 }
 
 /*

Modified: head/sys/netinet/tcp_var.h
==============================================================================
--- head/sys/netinet/tcp_var.h	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/sys/netinet/tcp_var.h	Tue Jul  9 09:43:03 2013	(r253083)
@@ -514,119 +514,15 @@ struct	tcpstat {
 };
 
 #ifdef _KERNEL
-
 #include 
 
-/* Should match 'struct tcpstat' above. */
-struct tcpstat_p {
-	counter_u64_t tcps_connattempt;
-	counter_u64_t tcps_accepts;
-	counter_u64_t tcps_connects;
-	counter_u64_t tcps_drops;
-	counter_u64_t tcps_conndrops;
-	counter_u64_t tcps_minmssdrops;
-	counter_u64_t tcps_closed;
-	counter_u64_t tcps_segstimed;
-	counter_u64_t tcps_rttupdated;
-	counter_u64_t tcps_delack;
-	counter_u64_t tcps_timeoutdrop;
-	counter_u64_t tcps_rexmttimeo;
-	counter_u64_t tcps_persisttimeo;
-	counter_u64_t tcps_keeptimeo;
-	counter_u64_t tcps_keepprobe;
-	counter_u64_t tcps_keepdrops;
-	counter_u64_t tcps_sndtotal;
-	counter_u64_t tcps_sndpack;
-	counter_u64_t tcps_sndbyte;
-	counter_u64_t tcps_sndrexmitpack;
-	counter_u64_t tcps_sndrexmitbyte;
-	counter_u64_t tcps_sndrexmitbad;
-	counter_u64_t tcps_sndacks;
-	counter_u64_t tcps_sndprobe;
-	counter_u64_t tcps_sndurg;
-	counter_u64_t tcps_sndwinup;
-	counter_u64_t tcps_sndctrl;
-	counter_u64_t tcps_rcvtotal;
-	counter_u64_t tcps_rcvpack;
-	counter_u64_t tcps_rcvbyte;
-	counter_u64_t tcps_rcvbadsum;
-	counter_u64_t tcps_rcvbadoff;
-	counter_u64_t tcps_rcvmemdrop;
-	counter_u64_t tcps_rcvshort;
-	counter_u64_t tcps_rcvduppack;
-	counter_u64_t tcps_rcvdupbyte;
-	counter_u64_t tcps_rcvpartduppack;
-	counter_u64_t tcps_rcvpartdupbyte;
-	counter_u64_t tcps_rcvoopack;
-	counter_u64_t tcps_rcvoobyte;
-	counter_u64_t tcps_rcvpackafterwin;
-	counter_u64_t tcps_rcvbyteafterwin;
-	counter_u64_t tcps_rcvafterclose;
-	counter_u64_t tcps_rcvwinprobe;
-	counter_u64_t tcps_rcvdupack;
-	counter_u64_t tcps_rcvacktoomuch;
-	counter_u64_t tcps_rcvackpack;
-	counter_u64_t tcps_rcvackbyte;
-	counter_u64_t tcps_rcvwinupd;
-	counter_u64_t tcps_pawsdrop;
-	counter_u64_t tcps_predack;
-	counter_u64_t tcps_preddat;
-	counter_u64_t tcps_pcbcachemiss;
-	counter_u64_t tcps_cachedrtt;
-	counter_u64_t tcps_cachedrttvar;
-	counter_u64_t tcps_cachedssthresh;
-	counter_u64_t tcps_usedrtt;
-	counter_u64_t tcps_usedrttvar;
-	counter_u64_t tcps_usedssthresh;
-	counter_u64_t tcps_persistdrop;
-	counter_u64_t tcps_badsyn;
-	counter_u64_t tcps_mturesent;
-	counter_u64_t tcps_listendrop;
-	counter_u64_t tcps_badrst;
-	counter_u64_t tcps_sc_added;
-	counter_u64_t tcps_sc_retransmitted;
-	counter_u64_t tcps_sc_dupsyn;
-	counter_u64_t tcps_sc_dropped;
-	counter_u64_t tcps_sc_completed;
-	counter_u64_t tcps_sc_bucketoverflow;
-	counter_u64_t tcps_sc_cacheoverflow;
-	counter_u64_t tcps_sc_reset;
-	counter_u64_t tcps_sc_stale;
-	counter_u64_t tcps_sc_aborted;
-	counter_u64_t tcps_sc_badack;
-	counter_u64_t tcps_sc_unreach;
-	counter_u64_t tcps_sc_zonefail;
-	counter_u64_t tcps_sc_sendcookie;
-	counter_u64_t tcps_sc_recvcookie;
-	counter_u64_t tcps_hc_added;
-	counter_u64_t tcps_hc_bucketoverflow;
-	counter_u64_t tcps_finwait2_drops;
-	counter_u64_t tcps_sack_recovery_episode;
-	counter_u64_t tcps_sack_rexmits;
-	counter_u64_t tcps_sack_rexmit_bytes;
-	counter_u64_t tcps_sack_rcv_blocks;
-	counter_u64_t tcps_sack_send_blocks;
-	counter_u64_t tcps_sack_sboverflow;
-	counter_u64_t tcps_ecn_ce;
-	counter_u64_t tcps_ecn_ect0;
-	counter_u64_t tcps_ecn_ect1;
-	counter_u64_t tcps_ecn_shs;
-	counter_u64_t tcps_ecn_rcwnd;
-	counter_u64_t tcps_sig_rcvgoodsig;
-	counter_u64_t tcps_sig_rcvbadsig;
-	counter_u64_t tcps_sig_err_buildsig;
-	counter_u64_t tcps_sig_err_sigopt;
-	counter_u64_t tcps_sig_err_nosigopt;
-};
-
-VNET_DECLARE(struct tcpstat_p, tcpstatp);	/* tcp statistics */
-#define	V_tcpstatp VNET(tcpstatp)
-
+VNET_PCPUSTAT_DECLARE(struct tcpstat, tcpstat);	/* tcp statistics */
 /*
  * In-kernel consumers can use these accessor macros directly to update
  * stats.
  */
-#define	TCPSTAT_ADD(name, val)	counter_u64_add(V_tcpstatp.name, (val))
+#define	TCPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct tcpstat, tcpstat, name, (val))
 #define	TCPSTAT_INC(name)	TCPSTAT_ADD(name, 1)
 
 /*
@@ -634,8 +530,7 @@ VNET_DECLARE(struct tcpstat_p, tcpstatp)
  */
 void	kmod_tcpstat_inc(int statnum);
 #define	KMOD_TCPSTAT_INC(name)						\
-	kmod_tcpstat_inc(offsetof(struct tcpstat_p, name) /		\
-	sizeof(counter_u64_t))
+    kmod_tcpstat_inc(offsetof(struct tcpstat, name) / sizeof(uint64_t))
 
 /*
  * TCP specific helper hook point identifiers.

Modified: head/usr.bin/netstat/inet.c
==============================================================================
--- head/usr.bin/netstat/inet.c	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/usr.bin/netstat/inet.c	Tue Jul  9 09:43:03 2013	(r253083)
@@ -603,13 +603,8 @@ tcp_stats(u_long off, const char *name, 
 			warn("sysctl: net.inet.tcp.stats");
 			return;
 		}
-	} else {
-		u_long tcpstat_p[sizeof(struct tcpstat)/sizeof(uint64_t)];
- 
-		kread(off, &tcpstat_p, sizeof(tcpstat_p));
-		kread_counters(tcpstat_p, (uint64_t *)&tcpstat,
-		    sizeof(struct tcpstat)/sizeof(uint64_t));
-	}
+	} else
+		kread_counters(off, &tcpstat, len);
 
 	printf ("%s:\n", name);
 
@@ -863,13 +858,8 @@ ip_stats(u_long off, const char *name, i
 			warn("sysctl: net.inet.ip.stats");
 			return;
 		}
-	} else {
-		u_long ipstat_p[sizeof(struct ipstat)/sizeof(uint64_t)];
-
-		kread(off, &ipstat_p, sizeof(ipstat_p));
-		kread_counters(ipstat_p, (uint64_t *)&ipstat,
-		    sizeof(struct ipstat)/sizeof(uint64_t));
-	}
+	} else
+		kread_counters(off, &ipstat, len);
 
 	printf("%s:\n", name);
 

Modified: head/usr.bin/netstat/main.c
==============================================================================
--- head/usr.bin/netstat/main.c	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/usr.bin/netstat/main.c	Tue Jul  9 09:43:03 2013	(r253083)
@@ -147,11 +147,11 @@ static struct nlist nl[] = {
 #define	N_IPCOMPSTAT	37
 	{ .n_name = "_ipcompstat" },
 #define	N_TCPSTAT	38
-	{ .n_name = "_tcpstatp" },
+	{ .n_name = "_tcpstat" },
 #define	N_UDPSTAT	39
 	{ .n_name = "_udpstat" },
 #define	N_IPSTAT	40
-	{ .n_name = "_ipstatp" },
+	{ .n_name = "_ipstat" },
 #define	N_ICMPSTAT	41
 	{ .n_name = "_icmpstat" },
 #define	N_IGMPSTAT	42
@@ -753,15 +753,21 @@ kread(u_long addr, void *buf, size_t siz
  * Read an array of N counters in kernel memory into array of N uint64_t's.
  */
 int
-kread_counters(u_long *addr, uint64_t *rval, size_t count)
+kread_counters(u_long addr, void *buf, size_t size)
 {
+	uint64_t *c = buf;
 
 	if (kvmd_init() < 0)
 		return (-1);
 
-	for (u_int i = 0; i < count; i++, addr++, rval++)
-		*rval = kvm_counter_u64_fetch(kvmd, *addr);
+	if (kread(addr, buf, size) < 0)
+		return (-1);
 
+	while (size != 0) {
+		*c = kvm_counter_u64_fetch(kvmd, *c);
+		size -= sizeof(*c);
+		c++;
+	}
 	return (0);
 }
 

Modified: head/usr.bin/netstat/netstat.h
==============================================================================
--- head/usr.bin/netstat/netstat.h	Tue Jul  9 09:37:21 2013	(r253082)
+++ head/usr.bin/netstat/netstat.h	Tue Jul  9 09:43:03 2013	(r253083)
@@ -60,7 +60,7 @@ extern int	af;	/* address family */
 extern int	live;	/* true if we are examining a live system */
 
 int	kread(u_long addr, void *buf, size_t size);
-int	kread_counters(u_long *addr, uint64_t *rval, size_t count);
+int	kread_counters(u_long addr, void *buf, size_t size);
 const char *plural(uintmax_t);
 const char *plurales(uintmax_t);
 const char *pluralies(uintmax_t);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:50:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 7116D75E;
 Tue,  9 Jul 2013 09:50:18 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 62A6815FB;
 Tue,  9 Jul 2013 09:50:18 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r699oIMW038273;
 Tue, 9 Jul 2013 09:50:18 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r699oFEi038257;
 Tue, 9 Jul 2013 09:50:15 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307090950.r699oFEi038257@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 09:50:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253084 - in head: sys/net sys/netinet usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:50:18 -0000

Author: ae
Date: Tue Jul  9 09:50:15 2013
New Revision: 253084
URL: http://svnweb.freebsd.org/changeset/base/253084

Log:
  Migrate structs arpstat, icmpstat, mrtstat, pimstat and udpstat to PCPU
  counters.

Modified:
  head/sys/net/if_arp.h
  head/sys/netinet/icmp_var.h
  head/sys/netinet/if_ether.c
  head/sys/netinet/in.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet/ip_mroute.c
  head/sys/netinet/ip_mroute.h
  head/sys/netinet/pim_var.h
  head/sys/netinet/udp_usrreq.c
  head/sys/netinet/udp_var.h
  head/usr.bin/netstat/inet.c
  head/usr.bin/netstat/mroute.c

Modified: head/sys/net/if_arp.h
==============================================================================
--- head/sys/net/if_arp.h	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/net/if_arp.h	Tue Jul  9 09:50:15 2013	(r253084)
@@ -127,13 +127,21 @@ struct arpstat {
 	uint64_t dupips;	/* # of duplicate IPs detected. */
 };
 
+#ifdef _KERNEL
+#include 
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct arpstat, arpstat);
 /*
  * In-kernel consumers can use these accessor macros directly to update
  * stats.
  */
-#define	ARPSTAT_ADD(name, val)	V_arpstat.name += (val)
-#define	ARPSTAT_SUB(name, val)	V_arpstat.name -= (val)
+#define	ARPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct arpstat, arpstat, name, (val))
+#define	ARPSTAT_SUB(name, val)	ARPSTAT_ADD(name, -(val))
 #define	ARPSTAT_INC(name)	ARPSTAT_ADD(name, 1)
 #define	ARPSTAT_DEC(name)	ARPSTAT_SUB(name, 1)
 
+#endif /* _KERNEL */
+
 #endif /* !_NET_IF_ARP_H_ */

Modified: head/sys/netinet/icmp_var.h
==============================================================================
--- head/sys/netinet/icmp_var.h	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/icmp_var.h	Tue Jul  9 09:50:15 2013	(r253084)
@@ -58,11 +58,15 @@ struct	icmpstat {
 };
 
 #ifdef _KERNEL
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct icmpstat, icmpstat);
 /*
  * In-kernel consumers can use these accessor macros directly to update
  * stats.
  */
-#define	ICMPSTAT_ADD(name, val)	V_icmpstat.name += (val)
+#define	ICMPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct icmpstat, icmpstat, name, (val))
 #define	ICMPSTAT_INC(name)	ICMPSTAT_ADD(name, 1)
 
 /*
@@ -70,7 +74,7 @@ struct	icmpstat {
  */
 void	kmod_icmpstat_inc(int statnum);
 #define	KMOD_ICMPSTAT_INC(name)						\
-	kmod_icmpstat_inc(offsetof(struct icmpstat, name) / sizeof(u_long))
+    kmod_icmpstat_inc(offsetof(struct icmpstat, name) / sizeof(uint64_t))
 #endif
 
 /*
@@ -91,9 +95,6 @@ void	kmod_icmpstat_inc(int statnum);
 #ifdef _KERNEL
 SYSCTL_DECL(_net_inet_icmp);
 
-VNET_DECLARE(struct icmpstat, icmpstat);	/* icmp statistics. */
-#define	V_icmpstat	VNET(icmpstat)
-
 extern int badport_bandlim(int);
 #define BANDLIM_UNLIMITED -1
 #define BANDLIM_ICMP_UNREACH 0

Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/if_ether.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -89,7 +89,12 @@ VNET_DEFINE(int, useloopback) = 1;	/* us
 static VNET_DEFINE(int, arp_proxyall) = 0;
 static VNET_DEFINE(int, arpt_down) = 20;	/* keep incomplete entries for
 						 * 20 seconds */
-VNET_DEFINE(struct arpstat, arpstat);  /* ARP statistics, see if_arp.h */
+VNET_PCPUSTAT_DEFINE(struct arpstat, arpstat);  /* ARP statistics, see if_arp.h */
+VNET_PCPUSTAT_SYSINIT(arpstat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(arpstat);
+#endif /* VIMAGE */
 
 static VNET_DEFINE(int, arp_maxhold) = 1;
 
@@ -97,7 +102,6 @@ static VNET_DEFINE(int, arp_maxhold) = 1
 #define	V_arpt_down		VNET(arpt_down)
 #define	V_arp_maxtries		VNET(arp_maxtries)
 #define	V_arp_proxyall		VNET(arp_proxyall)
-#define	V_arpstat		VNET(arpstat)
 #define	V_arp_maxhold		VNET(arp_maxhold)
 
 SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW,
@@ -115,9 +119,8 @@ SYSCTL_VNET_INT(_net_link_ether_inet, OI
 SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, wait, CTLFLAG_RW,
 	&VNET_NAME(arpt_down), 0,
 	"Incomplete ARP entry lifetime in seconds");
-SYSCTL_VNET_STRUCT(_net_link_ether_arp, OID_AUTO, stats, CTLFLAG_RW,
-	&VNET_NAME(arpstat), arpstat,
-	"ARP statistics (struct arpstat, net/if_arp.h)");
+SYSCTL_VNET_PCPUSTAT(_net_link_ether_arp, OID_AUTO, stats, struct arpstat,
+    arpstat, "ARP statistics (struct arpstat, net/if_arp.h)");
 SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, maxhold, CTLFLAG_RW,
 	&VNET_NAME(arp_maxhold), 0,
 	"Number of packets to hold per ARP entry");

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/in.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -85,9 +85,6 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, 
 VNET_DECLARE(struct inpcbinfo, ripcbinfo);
 #define	V_ripcbinfo			VNET(ripcbinfo)
 
-VNET_DECLARE(struct arpstat, arpstat);  /* ARP statistics, see if_arp.h */
-#define	V_arpstat		VNET(arpstat)
-
 /*
  * Return 1 if an internet address is for a ``local'' host
  * (one to which we have a connection).

Modified: head/sys/netinet/ip_icmp.c
==============================================================================
--- head/sys/netinet/ip_icmp.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/ip_icmp.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -92,9 +92,14 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO
 	"Enable logging of ICMP response rate limiting");
 
 #ifdef INET
-VNET_DEFINE(struct icmpstat, icmpstat);
-SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW,
-	&VNET_NAME(icmpstat), icmpstat, "");
+VNET_PCPUSTAT_DEFINE(struct icmpstat, icmpstat);
+VNET_PCPUSTAT_SYSINIT(icmpstat);
+SYSCTL_VNET_PCPUSTAT(_net_inet_icmp, ICMPCTL_STATS, stats, struct icmpstat,
+    icmpstat, "ICMP statistics (struct icmpstat, netinet/icmp_var.h)");
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(icmpstat);
+#endif /* VIMAGE */
 
 static VNET_DEFINE(int, icmpmaskrepl) = 0;
 #define	V_icmpmaskrepl			VNET(icmpmaskrepl)
@@ -197,7 +202,7 @@ void
 kmod_icmpstat_inc(int statnum)
 {
 
-	(*((u_long *)&V_icmpstat + statnum))++;
+	counter_u64_add(VNET(icmpstat)[statnum], 1);
 }
 
 /*

Modified: head/sys/netinet/ip_mroute.c
==============================================================================
--- head/sys/netinet/ip_mroute.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/ip_mroute.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -93,6 +93,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -145,11 +146,11 @@ static struct mtx mrouter_mtx;
 static int ip_mrouter_cnt;	/* # of vnets with active mrouters */
 static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets */
 
-static VNET_DEFINE(struct mrtstat, mrtstat);
-#define	V_mrtstat		VNET(mrtstat)
-SYSCTL_VNET_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW,
-    &VNET_NAME(mrtstat), mrtstat,
-    "IPv4 Multicast Forwarding Statistics (struct mrtstat, "
+static VNET_PCPUSTAT_DEFINE(struct mrtstat, mrtstat);
+VNET_PCPUSTAT_SYSINIT(mrtstat);
+VNET_PCPUSTAT_SYSUNINIT(mrtstat);
+SYSCTL_VNET_PCPUSTAT(_net_inet_ip, OID_AUTO, mrtstat, struct mrtstat,
+    mrtstat, "IPv4 Multicast Forwarding Statistics (struct mrtstat, "
     "netinet/ip_mroute.h)");
 
 static VNET_DEFINE(u_long, mfchash);
@@ -225,13 +226,13 @@ static VNET_DEFINE(struct callout, bw_up
 
 #define BW_UPCALLS_PERIOD (hz)		/* periodical flush of bw upcalls */
 
-static VNET_DEFINE(struct pimstat, pimstat);
-#define	V_pimstat		VNET(pimstat)
+static VNET_PCPUSTAT_DEFINE(struct pimstat, pimstat);
+VNET_PCPUSTAT_SYSINIT(pimstat);
+VNET_PCPUSTAT_SYSUNINIT(pimstat);
 
 SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
-SYSCTL_VNET_STRUCT(_net_inet_pim, PIMCTL_STATS, stats, CTLFLAG_RD,
-    &VNET_NAME(pimstat), pimstat,
-    "PIM Statistics (struct pimstat, netinet/pim_var.h)");
+SYSCTL_VNET_PCPUSTAT(_net_inet_pim, PIMCTL_STATS, stats, struct pimstat,
+    pimstat, "PIM Statistics (struct pimstat, netinet/pim_var.h)");
 
 static u_long	pim_squelch_wholepkt = 0;
 SYSCTL_ULONG(_net_inet_pim, OID_AUTO, squelch_wholepkt, CTLFLAG_RW,

Modified: head/sys/netinet/ip_mroute.h
==============================================================================
--- head/sys/netinet/ip_mroute.h	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/ip_mroute.h	Tue Jul  9 09:50:15 2013	(r253084)
@@ -222,7 +222,8 @@ struct mrtstat {
 };
 
 #ifdef _KERNEL
-#define	MRTSTAT_ADD(name, val)	V_mrtstat.name += (val)
+#define	MRTSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct mrtstat, mrtstat, name, (val))
 #define	MRTSTAT_INC(name)	MRTSTAT_ADD(name, 1)
 #endif
 

Modified: head/sys/netinet/pim_var.h
==============================================================================
--- head/sys/netinet/pim_var.h	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/pim_var.h	Tue Jul  9 09:50:15 2013	(r253084)
@@ -60,7 +60,8 @@ struct pimstat {
 };
 
 #ifdef _KERNEL
-#define	PIMSTAT_ADD(name, val)	V_pimstat.name += (val)
+#define	PIMSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct pimstat, pimstat, name, (val))
 #define	PIMSTAT_INC(name)	PIMSTAT_ADD(name, 1)
 #endif
 

Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/udp_usrreq.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -143,11 +143,14 @@ static VNET_DEFINE(uma_zone_t, udpcb_zon
 #define	UDBHASHSIZE	128
 #endif
 
-VNET_DEFINE(struct udpstat, udpstat);		/* from udp_var.h */
-SYSCTL_VNET_STRUCT(_net_inet_udp, UDPCTL_STATS, stats, CTLFLAG_RW,
-    &VNET_NAME(udpstat), udpstat,
-    "UDP statistics (struct udpstat, netinet/udp_var.h)");
+VNET_PCPUSTAT_DEFINE(struct udpstat, udpstat);		/* from udp_var.h */
+VNET_PCPUSTAT_SYSINIT(udpstat);
+SYSCTL_VNET_PCPUSTAT(_net_inet_udp, UDPCTL_STATS, stats, struct udpstat,
+    udpstat, "UDP statistics (struct udpstat, netinet/udp_var.h)");
 
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(udpstat);
+#endif /* VIMAGE */
 #ifdef INET
 static void	udp_detach(struct socket *so);
 static int	udp_output(struct inpcb *, struct mbuf *, struct sockaddr *,
@@ -207,7 +210,7 @@ void
 kmod_udpstat_inc(int statnum)
 {
 
-	(*((u_long *)&V_udpstat + statnum))++;
+	counter_u64_add(VNET(udpstat)[statnum], 1);
 }
 
 int

Modified: head/sys/netinet/udp_var.h
==============================================================================
--- head/sys/netinet/udp_var.h	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/sys/netinet/udp_var.h	Tue Jul  9 09:50:15 2013	(r253084)
@@ -94,19 +94,23 @@ struct udpstat {
 };
 
 #ifdef _KERNEL
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct udpstat, udpstat);
 /*
  * In-kernel consumers can use these accessor macros directly to update
  * stats.
  */
-#define	UDPSTAT_ADD(name, val)	V_udpstat.name += (val)
+#define	UDPSTAT_ADD(name, val)  \
+    VNET_PCPUSTAT_ADD(struct udpstat, udpstat, name, (val))
 #define	UDPSTAT_INC(name)	UDPSTAT_ADD(name, 1)
 
 /*
  * Kernel module consumers must use this accessor macro.
  */
 void	kmod_udpstat_inc(int statnum);
-#define	KMOD_UDPSTAT_INC(name)						\
-	kmod_udpstat_inc(offsetof(struct udpstat, name) / sizeof(u_long))
+#define	KMOD_UDPSTAT_INC(name)	\
+    kmod_udpstat_inc(offsetof(struct udpstat, name) / sizeof(uint64_t))
 #endif
 
 /*
@@ -140,10 +144,8 @@ VNET_DECLARE(struct inpcbinfo, udbinfo);
 extern u_long			udp_sendspace;
 extern u_long			udp_recvspace;
 VNET_DECLARE(int, udp_cksum);
-VNET_DECLARE(struct udpstat, udpstat);
 VNET_DECLARE(int, udp_blackhole);
 #define	V_udp_cksum		VNET(udp_cksum)
-#define	V_udpstat		VNET(udpstat)
 #define	V_udp_blackhole		VNET(udp_blackhole)
 extern int			udp_log_in_vain;
 

Modified: head/usr.bin/netstat/inet.c
==============================================================================
--- head/usr.bin/netstat/inet.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/usr.bin/netstat/inet.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -756,7 +756,7 @@ udp_stats(u_long off, const char *name, 
 			return;
 		}
 	} else
-		kread(off, &udpstat, len);
+		kread_counters(off, &udpstat, len);
 
 	printf("%s:\n", name);
 #define	p(f, m) if (udpstat.f || sflag <= 1) \
@@ -923,7 +923,7 @@ arp_stats(u_long off, const char *name, 
 			return;
 		}
 	} else
-		kread(off, &arpstat, len);
+		kread_counters(off, &arpstat, len);
 
 	printf("%s:\n", name);
 
@@ -1010,7 +1010,7 @@ icmp_stats(u_long off, const char *name,
 			return;
 		}
 	} else
-		kread(off, &icmpstat, len);
+		kread_counters(off, &icmpstat, len);
 
 	printf("%s:\n", name);
 
@@ -1217,7 +1217,7 @@ pim_stats(u_long off __unused, const cha
 	} else {
 		if (off == 0)
 			return;
-		kread(off, &pimstat, len);
+		kread_counters(off, &pimstat, len);
 	}
 
 	printf("%s:\n", name);

Modified: head/usr.bin/netstat/mroute.c
==============================================================================
--- head/usr.bin/netstat/mroute.c	Tue Jul  9 09:43:03 2013	(r253083)
+++ head/usr.bin/netstat/mroute.c	Tue Jul  9 09:50:15 2013	(r253084)
@@ -350,7 +350,7 @@ mrt_stats(u_long mstaddr)
 			return;
 		}
 	} else
-		kread(mstaddr, (char *)&mrtstat, sizeof(mrtstat));
+		kread_counters(mstaddr, &mrtstat, len);
 
 	printf("IPv4 multicast forwarding:\n");
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:54:56 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 6585F8EA;
 Tue,  9 Jul 2013 09:54:56 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 570FB1630;
 Tue,  9 Jul 2013 09:54:56 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r699sueC040393;
 Tue, 9 Jul 2013 09:54:56 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r699ssGO040380;
 Tue, 9 Jul 2013 09:54:54 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307090954.r699ssGO040380@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 09:54:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253085 - in head: sys/netinet sys/netinet6
 usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:54:56 -0000

Author: ae
Date: Tue Jul  9 09:54:54 2013
New Revision: 253085
URL: http://svnweb.freebsd.org/changeset/base/253085

Log:
  Migrate structs ip6stat, icmp6stat and rip6stat to PCPU counters.

Modified:
  head/sys/netinet/icmp6.h
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/in6_proto.c
  head/sys/netinet6/in6_var.h
  head/sys/netinet6/ip6_input.c
  head/sys/netinet6/ip6_var.h
  head/sys/netinet6/raw_ip6.c
  head/sys/netinet6/raw_ip6.h
  head/usr.bin/netstat/inet6.c

Modified: head/sys/netinet/icmp6.h
==============================================================================
--- head/sys/netinet/icmp6.h	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet/icmp6.h	Tue Jul  9 09:54:54 2013	(r253085)
@@ -617,19 +617,23 @@ struct icmp6stat {
 };
 
 #ifdef _KERNEL
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct icmp6stat, icmp6stat);
 /*
  * In-kernel consumers can use these accessor macros directly to update
  * stats.
  */
-#define	ICMP6STAT_ADD(name, val)	V_icmp6stat.name += (val)
+#define	ICMP6STAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct icmp6stat, icmp6stat, name, (val))
 #define	ICMP6STAT_INC(name)		ICMP6STAT_ADD(name, 1)
 
 /*
  * Kernel module consumers must use this accessor macro.
  */
 void	kmod_icmp6stat_inc(int statnum);
-#define	KMOD_ICMP6STAT_INC(name)					\
-	kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(u_quad_t))
+#define	KMOD_ICMP6STAT_INC(name)	\
+    kmod_icmp6stat_inc(offsetof(struct icmp6stat, name) / sizeof(uint64_t))
 #endif
 
 /*

Modified: head/sys/netinet6/icmp6.c
==============================================================================
--- head/sys/netinet6/icmp6.c	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/icmp6.c	Tue Jul  9 09:54:54 2013	(r253085)
@@ -114,7 +114,12 @@ __FBSDID("$FreeBSD$");
 
 extern struct domain inet6domain;
 
-VNET_DEFINE(struct icmp6stat, icmp6stat);
+VNET_PCPUSTAT_DEFINE(struct icmp6stat, icmp6stat);
+VNET_PCPUSTAT_SYSINIT(icmp6stat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(icmp6stat);
+#endif /* VIMAGE */
 
 VNET_DECLARE(struct inpcbinfo, ripcbinfo);
 VNET_DECLARE(struct inpcbhead, ripcb);
@@ -155,7 +160,7 @@ void
 kmod_icmp6stat_inc(int statnum)
 {
 
-	(*((u_quad_t *)&V_icmp6stat + statnum))++;
+	counter_u64_add(VNET(icmp6stat)[statnum], 1);
 }
 
 static void

Modified: head/sys/netinet6/in6_proto.c
==============================================================================
--- head/sys/netinet6/in6_proto.c	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/in6_proto.c	Tue Jul  9 09:54:54 2013	(r253085)
@@ -506,8 +506,8 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_
 	&VNET_NAME(ip6_sendredirects), 0, "");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_DEFHLIM, hlim, CTLFLAG_RW,
 	&VNET_NAME(ip6_defhlim), 0, "");
-SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_STATS, stats, CTLFLAG_RW,
-	&VNET_NAME(ip6stat), ip6stat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_STATS, stats, struct ip6stat,
+    ip6stat, "IP6 statistics (struct ip6stat, netinet6/ip6_var.h)");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_MAXFRAGPACKETS, maxfragpackets,
 	CTLFLAG_RW, &VNET_NAME(ip6_maxfragpackets), 0, "");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_ACCEPT_RTADV, accept_rtadv,
@@ -559,8 +559,9 @@ SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_
 	CTLFLAG_RW, &VNET_NAME(ip6_auto_linklocal), 0,
 	"Default value of per-interface flag for automatically adding an IPv6"
 	" link-local address to interfaces when attached");
-SYSCTL_VNET_STRUCT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats, CTLFLAG_RW,
-	&VNET_NAME(rip6stat), rip6stat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet6_ip6, IPV6CTL_RIP6STATS, rip6stats,
+    struct rip6stat, rip6stat,
+    "Raw IP6 statistics (struct rip6stat, netinet6/raw_ip6.h)");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_PREFER_TEMPADDR, prefer_tempaddr,
 	CTLFLAG_RW, &VNET_NAME(ip6_prefer_tempaddr), 0, "");
 SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_USE_DEFAULTZONE, use_defaultzone,
@@ -589,8 +590,9 @@ SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6
 	CTLFLAG_RW, &VNET_NAME(icmp6_rediraccept), 0, "");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_REDIRTIMEOUT, redirtimeout,
 	CTLFLAG_RW, &VNET_NAME(icmp6_redirtimeout), 0, "");
-SYSCTL_VNET_STRUCT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats, CTLFLAG_RW,
-	&VNET_NAME(icmp6stat), icmp6stat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet6_icmp6, ICMPV6CTL_STATS, stats,
+    struct icmp6stat, icmp6stat,
+    "ICMPv6 statistics (struct icmp6stat, netinet/icmp6.h)");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_PRUNE, nd6_prune, CTLFLAG_RW,
 	&VNET_NAME(nd6_prune), 0, "");
 SYSCTL_VNET_INT(_net_inet6_icmp6, ICMPV6CTL_ND6_DELAY, nd6_delay, CTLFLAG_RW,

Modified: head/sys/netinet6/in6_var.h
==============================================================================
--- head/sys/netinet6/in6_var.h	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/in6_var.h	Tue Jul  9 09:54:54 2013	(r253085)
@@ -534,8 +534,6 @@ extern struct rwlock in6_ifaddr_lock;
 #define	IN6_IFADDR_WLOCK_ASSERT()	rw_assert(&in6_ifaddr_lock, RA_WLOCKED)
 #define	IN6_IFADDR_WUNLOCK()		rw_wunlock(&in6_ifaddr_lock)
 
-VNET_DECLARE(struct icmp6stat, icmp6stat);
-#define	V_icmp6stat			VNET(icmp6stat)
 #define in6_ifstat_inc(ifp, tag) \
 do {								\
 	if (ifp)						\

Modified: head/sys/netinet6/ip6_input.c
==============================================================================
--- head/sys/netinet6/ip6_input.c	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/ip6_input.c	Tue Jul  9 09:54:54 2013	(r253085)
@@ -141,7 +141,11 @@ VNET_DECLARE(struct callout, in6_tmpaddr
 
 VNET_DEFINE(struct pfil_head, inet6_pfil_hook);
 
-VNET_DEFINE(struct ip6stat, ip6stat);
+VNET_PCPUSTAT_DEFINE(struct ip6stat, ip6stat);
+VNET_PCPUSTAT_SYSINIT(ip6stat);
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ip6stat);
+#endif /* VIMAGE */
 
 struct rwlock in6_ifaddr_lock;
 RW_SYSINIT(in6_ifaddr_lock, &in6_ifaddr_lock, "in6_ifaddr_lock");

Modified: head/sys/netinet6/ip6_var.h
==============================================================================
--- head/sys/netinet6/ip6_var.h	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/ip6_var.h	Tue Jul  9 09:54:54 2013	(r253085)
@@ -246,8 +246,12 @@ struct	ip6stat {
 };
 
 #ifdef _KERNEL
-#define	IP6STAT_ADD(name, val)	V_ip6stat.name += (val)
-#define	IP6STAT_SUB(name, val)	V_ip6stat.name -= (val)
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct ip6stat, ip6stat);
+#define	IP6STAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct ip6stat, ip6stat, name, (val))
+#define	IP6STAT_SUB(name, val)	IP6STAT_ADD(name, -(val))
 #define	IP6STAT_INC(name)	IP6STAT_ADD(name, 1)
 #define	IP6STAT_DEC(name)	IP6STAT_SUB(name, 1)
 #endif
@@ -297,7 +301,6 @@ struct ip6aux {
 #define IP6_HDR_ALIGNED_P(ip)	((((intptr_t) (ip)) & 3) == 0)
 #endif
 
-VNET_DECLARE(struct ip6stat, ip6stat);	/* statistics */
 VNET_DECLARE(int, ip6_defhlim);		/* default hop limit */
 VNET_DECLARE(int, ip6_defmcasthlim);	/* default multicast hop limit */
 VNET_DECLARE(int, ip6_forwarding);	/* act as router? */
@@ -306,7 +309,6 @@ VNET_DECLARE(int, ip6_rr_prune);	/* rout
 					 * walk list every 5 sec.    */
 VNET_DECLARE(int, ip6_mcast_pmtu);	/* enable pMTU discovery for multicast? */
 VNET_DECLARE(int, ip6_v6only);
-#define	V_ip6stat			VNET(ip6stat)
 #define	V_ip6_defhlim			VNET(ip6_defhlim)
 #define	V_ip6_defmcasthlim		VNET(ip6_defmcasthlim)
 #define	V_ip6_forwarding		VNET(ip6_forwarding)

Modified: head/sys/netinet6/raw_ip6.c
==============================================================================
--- head/sys/netinet6/raw_ip6.c	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/raw_ip6.c	Tue Jul  9 09:54:54 2013	(r253085)
@@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -124,7 +125,12 @@ VNET_DECLARE(struct inpcbinfo, ripcbinfo
 extern u_long	rip_sendspace;
 extern u_long	rip_recvspace;
 
-VNET_DEFINE(struct rip6stat, rip6stat);
+VNET_PCPUSTAT_DEFINE(struct rip6stat, rip6stat);
+VNET_PCPUSTAT_SYSINIT(rip6stat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(rip6stat);
+#endif /* VIMAGE */
 
 /*
  * Hooks for multicast routing. They all default to NULL, so leave them not

Modified: head/sys/netinet6/raw_ip6.h
==============================================================================
--- head/sys/netinet6/raw_ip6.h	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/sys/netinet6/raw_ip6.h	Tue Jul  9 09:54:54 2013	(r253085)
@@ -48,10 +48,12 @@ struct rip6stat {
 };
 
 #ifdef _KERNEL
-#define	RIP6STAT_ADD(name, val)	V_rip6stat.name += (val)
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct rip6stat, rip6stat);
+#define	RIP6STAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct rip6stat, rip6stat, name, (val))
 #define	RIP6STAT_INC(name)	RIP6STAT_ADD(name, 1)
-VNET_DECLARE(struct rip6stat, rip6stat);
-#define	V_rip6stat			VNET(rip6stat)
-#endif
+#endif /* _KERNEL */
 
 #endif

Modified: head/usr.bin/netstat/inet6.c
==============================================================================
--- head/usr.bin/netstat/inet6.c	Tue Jul  9 09:50:15 2013	(r253084)
+++ head/usr.bin/netstat/inet6.c	Tue Jul  9 09:54:54 2013	(r253085)
@@ -376,7 +376,7 @@ ip6_stats(u_long off, const char *name, 
 			return;
 		}
 	} else
-		kread(off, &ip6stat, len);
+		kread_counters(off, &ip6stat, len);
 
 	printf("%s:\n", name);
 
@@ -858,7 +858,7 @@ icmp6_stats(u_long off, const char *name
 			return;
 		}
 	} else
-		kread(off, &icmp6stat, len);
+		kread_counters(off, &icmp6stat, len);
 
 	printf("%s:\n", name);
 
@@ -1052,7 +1052,7 @@ rip6_stats(u_long off, const char *name,
 			return;
 		}
 	} else
-		kread(off, &rip6stat, len);
+		kread_counters(off, &rip6stat, len);
 
 	printf("%s:\n", name);
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:56:56 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 9B6A6A5E
 for ; Tue,  9 Jul 2013 09:56:56 +0000 (UTC)
 (envelope-from andre@freebsd.org)
Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2])
 by mx1.freebsd.org (Postfix) with ESMTP id 3A2531650
 for ; Tue,  9 Jul 2013 09:56:55 +0000 (UTC)
Received: (qmail 71488 invoked from network); 9 Jul 2013 10:47:52 -0000
Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2])
 (envelope-sender )
 by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP
 for ; 9 Jul 2013 10:47:52 -0000
Message-ID: <51DBDE64.2060909@freebsd.org>
Date: Tue, 09 Jul 2013 11:56:52 +0200
From: Andre Oppermann 
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
 rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: "Andrey V. Elsukov" 
Subject: Re: svn commit: r253081 - in head: sys/net sys/netinet sys/netinet6
 sys/netipsec tools/tools/crypto usr.bin/netstat
References: <201307090932.r699W6Ks034249@svn.freebsd.org>
In-Reply-To: <201307090932.r699W6Ks034249@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
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:56:56 -0000

On 09.07.2013 11:32, Andrey V. Elsukov wrote:
> Author: ae
> Date: Tue Jul  9 09:32:06 2013
> New Revision: 253081
> URL: http://svnweb.freebsd.org/changeset/base/253081
>
> Log:
>    Prepare network statistics structures for migration to PCPU counters.
>    Use uint64_t as type for all fields of structures.

Yes!  Finally 64 bit counters! :)

-- 
Andre


From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 09:59:47 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 725A2BF6;
 Tue,  9 Jul 2013 09:59:47 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 552DF1675;
 Tue,  9 Jul 2013 09:59:47 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r699xlc1041020;
 Tue, 9 Jul 2013 09:59:47 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r699xkYb041017;
 Tue, 9 Jul 2013 09:59:46 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307090959.r699xkYb041017@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 09:59:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253086 - in head/sys: netinet netinet6
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 09:59:47 -0000

Author: ae
Date: Tue Jul  9 09:59:46 2013
New Revision: 253086
URL: http://svnweb.freebsd.org/changeset/base/253086

Log:
  Migrate structs in6_ifstat and icmp6_ifstat to PCPU counters.

Modified:
  head/sys/netinet/icmp6.h
  head/sys/netinet6/in6.c
  head/sys/netinet6/in6_var.h

Modified: head/sys/netinet/icmp6.h
==============================================================================
--- head/sys/netinet/icmp6.h	Tue Jul  9 09:54:54 2013	(r253085)
+++ head/sys/netinet/icmp6.h	Tue Jul  9 09:59:46 2013	(r253086)
@@ -692,7 +692,9 @@ void	icmp6_mtudisc_update(struct ip6ctlp
 #define icmp6_ifstat_inc(ifp, tag) \
 do {								\
 	if (ifp)						\
-		((struct in6_ifextra *)((ifp)->if_afdata[AF_INET6]))->icmp6_ifstat->tag++; \
+		counter_u64_add(((struct in6_ifextra *)		\
+		    ((ifp)->if_afdata[AF_INET6]))->icmp6_ifstat[\
+		    offsetof(struct icmp6_ifstat, tag) / sizeof(uint64_t)], 1);\
 } while (/*CONSTCOND*/ 0)
 
 #define icmp6_ifoutstat_inc(ifp, type, code) \

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c	Tue Jul  9 09:54:54 2013	(r253085)
+++ head/sys/netinet6/in6.c	Tue Jul  9 09:59:46 2013	(r253086)
@@ -570,10 +570,10 @@ in6_control(struct socket *so, u_long cm
 			error = EINVAL;
 			goto out;
 		}
-		bzero(&ifr->ifr_ifru.ifru_stat,
-		    sizeof(ifr->ifr_ifru.ifru_stat));
-		ifr->ifr_ifru.ifru_stat =
-		    *((struct in6_ifextra *)ifp->if_afdata[AF_INET6])->in6_ifstat;
+		COUNTER_ARRAY_COPY(((struct in6_ifextra *)
+		    ifp->if_afdata[AF_INET6])->in6_ifstat,
+		    &ifr->ifr_ifru.ifru_stat,
+		    sizeof(struct in6_ifstat) / sizeof(uint64_t));
 		break;
 
 	case SIOCGIFSTAT_ICMP6:
@@ -581,10 +581,10 @@ in6_control(struct socket *so, u_long cm
 			error = EINVAL;
 			goto out;
 		}
-		bzero(&ifr->ifr_ifru.ifru_icmp6stat,
-		    sizeof(ifr->ifr_ifru.ifru_icmp6stat));
-		ifr->ifr_ifru.ifru_icmp6stat =
-		    *((struct in6_ifextra *)ifp->if_afdata[AF_INET6])->icmp6_ifstat;
+		COUNTER_ARRAY_COPY(((struct in6_ifextra *)
+		    ifp->if_afdata[AF_INET6])->icmp6_ifstat,
+		    &ifr->ifr_ifru.ifru_icmp6stat,
+		    sizeof(struct icmp6_ifstat) / sizeof(uint64_t));
 		break;
 
 	case SIOCGIFALIFETIME_IN6:
@@ -2749,14 +2749,15 @@ in6_domifattach(struct ifnet *ifp)
 	ext = (struct in6_ifextra *)malloc(sizeof(*ext), M_IFADDR, M_WAITOK);
 	bzero(ext, sizeof(*ext));
 
-	ext->in6_ifstat = (struct in6_ifstat *)malloc(sizeof(struct in6_ifstat),
-	    M_IFADDR, M_WAITOK);
-	bzero(ext->in6_ifstat, sizeof(*ext->in6_ifstat));
-
-	ext->icmp6_ifstat =
-	    (struct icmp6_ifstat *)malloc(sizeof(struct icmp6_ifstat),
-	    M_IFADDR, M_WAITOK);
-	bzero(ext->icmp6_ifstat, sizeof(*ext->icmp6_ifstat));
+	ext->in6_ifstat = malloc(sizeof(struct in6_ifstat), M_IFADDR,
+	    M_WAITOK);
+	COUNTER_ARRAY_ALLOC(ext->in6_ifstat,
+	    sizeof(struct in6_ifstat) / sizeof(uint64_t), M_WAITOK);
+
+	ext->icmp6_ifstat = malloc(sizeof(struct icmp6_ifstat), M_IFADDR,
+	    M_WAITOK);
+	COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat,
+	    sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK);
 
 	ext->nd_ifinfo = nd6_ifattach(ifp);
 	ext->scope6_id = scope6_ifattach(ifp);
@@ -2781,7 +2782,11 @@ in6_domifdetach(struct ifnet *ifp, void 
 	scope6_ifdetach(ext->scope6_id);
 	nd6_ifdetach(ext->nd_ifinfo);
 	lltable_free(ext->lltable);
+	COUNTER_ARRAY_FREE(ext->in6_ifstat,
+	    sizeof(struct in6_ifstat) / sizeof(uint64_t));
 	free(ext->in6_ifstat, M_IFADDR);
+	COUNTER_ARRAY_FREE(ext->icmp6_ifstat,
+	    sizeof(struct icmp6_ifstat) / sizeof(uint64_t));
 	free(ext->icmp6_ifstat, M_IFADDR);
 	free(ext, M_IFADDR);
 }

Modified: head/sys/netinet6/in6_var.h
==============================================================================
--- head/sys/netinet6/in6_var.h	Tue Jul  9 09:54:54 2013	(r253085)
+++ head/sys/netinet6/in6_var.h	Tue Jul  9 09:59:46 2013	(r253086)
@@ -98,14 +98,28 @@ struct scope6_id;
 struct lltable;
 struct mld_ifinfo;
 
+#ifdef _KERNEL
+#include 
+
+struct in6_ifextra {
+	counter_u64_t *in6_ifstat;
+	counter_u64_t *icmp6_ifstat;
+	struct nd_ifinfo *nd_ifinfo;
+	struct scope6_id *scope6_id;
+	struct lltable *lltable;
+	struct mld_ifinfo *mld_ifinfo;
+};
+#else
+
 struct in6_ifextra {
-	struct in6_ifstat *in6_ifstat;
-	struct icmp6_ifstat *icmp6_ifstat;
+	void *in6_ifstat;
+	void *icmp6_ifstat;
 	struct nd_ifinfo *nd_ifinfo;
 	struct scope6_id *scope6_id;
 	struct lltable *lltable;
 	struct mld_ifinfo *mld_ifinfo;
 };
+#endif /* !_KERNEL */
 
 #define	LLTABLE6(ifp)	(((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable)
 
@@ -537,7 +551,9 @@ extern struct rwlock in6_ifaddr_lock;
 #define in6_ifstat_inc(ifp, tag) \
 do {								\
 	if (ifp)						\
-		((struct in6_ifextra *)((ifp)->if_afdata[AF_INET6]))->in6_ifstat->tag++; \
+		counter_u64_add(((struct in6_ifextra *)		\
+		    ((ifp)->if_afdata[AF_INET6]))->in6_ifstat[	\
+		    offsetof(struct in6_ifstat, tag) / sizeof(uint64_t)], 1);\
 } while (/*CONSTCOND*/ 0)
 
 extern u_char inet6ctlerrmap[];

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 10:02:52 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D42D5DC7;
 Tue,  9 Jul 2013 10:02:52 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C6D8816B1;
 Tue,  9 Jul 2013 10:02:52 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69A2qOB043271;
 Tue, 9 Jul 2013 10:02:52 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69A2qsR043268;
 Tue, 9 Jul 2013 10:02:52 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307091002.r69A2qsR043268@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 10:02:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253087 - in head: sys/netinet usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 10:02:52 -0000

Author: ae
Date: Tue Jul  9 10:02:51 2013
New Revision: 253087
URL: http://svnweb.freebsd.org/changeset/base/253087

Log:
  Migrate struct carpstats to PCPU counters.

Modified:
  head/sys/netinet/ip_carp.c
  head/sys/netinet/ip_carp.h
  head/usr.bin/netstat/inet.c

Modified: head/sys/netinet/ip_carp.c
==============================================================================
--- head/sys/netinet/ip_carp.c	Tue Jul  9 09:59:46 2013	(r253086)
+++ head/sys/netinet/ip_carp.c	Tue Jul  9 10:02:51 2013	(r253087)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -209,9 +210,25 @@ SYSCTL_INT(_net_inet_carp, OID_AUTO, sen
 SYSCTL_INT(_net_inet_carp, OID_AUTO, ifdown_demotion_factor, CTLFLAG_RW,
     &carp_ifdown_adj, 0, "Interface down demotion factor adjustment");
 
-static struct carpstats carpstats;
-SYSCTL_STRUCT(_net_inet_carp, OID_AUTO, stats, CTLFLAG_RW, &carpstats,
-    carpstats, "CARP statistics (struct carpstats, netinet/ip_carp.h)");
+static counter_u64_t carpstats[sizeof(struct carpstats) / sizeof(uint64_t)];
+#define	CARPSTATS_ADD(name, val)	\
+    counter_u64_add(carpstats[offsetof(struct carpstats, name) / \
+	sizeof(uint64_t)], (val))
+#define	CARPSTATS_INC(name)		CARPSTATS_ADD(name, 1)
+
+static int
+carpstats_sysctl(SYSCTL_HANDLER_ARGS)
+{
+	struct carpstats s;
+
+	COUNTER_ARRAY_COPY(carpstats, &s, sizeof(s) / sizeof(uint64_t));
+	if (req->newptr)
+		COUNTER_ARRAY_ZERO(carpstats, sizeof(s) / sizeof(uint64_t));
+	return (SYSCTL_OUT(req, &s, sizeof(s)));
+}
+SYSCTL_PROC(_net_inet_carp, OID_AUTO, stats, CTLTYPE_OPAQUE | CTLFLAG_RW,
+    NULL, 0, carpstats_sysctl, "I",
+    "CARP statistics (struct carpstats, netinet/ip_carp.h)");
 
 #define	CARP_LOCK_INIT(sc)	mtx_init(&(sc)->sc_mtx, "carp_softc",   \
 	NULL, MTX_DEF)
@@ -2084,6 +2101,8 @@ carp_mod_cleanup(void)
 	mtx_unlock(&carp_mtx);
 	taskqueue_drain(taskqueue_swi, &carp_sendall_task);
 	mtx_destroy(&carp_mtx);
+	COUNTER_ARRAY_FREE(carpstats,
+	    sizeof(struct carpstats) / sizeof(uint64_t));
 }
 
 static int
@@ -2093,6 +2112,8 @@ carp_mod_load(void)
 
 	mtx_init(&carp_mtx, "carp_mtx", NULL, MTX_DEF);
 	LIST_INIT(&carp_list);
+	COUNTER_ARRAY_ALLOC(carpstats,
+	    sizeof(struct carpstats) / sizeof(uint64_t), M_WAITOK);
 	carp_get_vhid_p = carp_get_vhid;
 	carp_forus_p = carp_forus;
 	carp_output_p = carp_output;

Modified: head/sys/netinet/ip_carp.h
==============================================================================
--- head/sys/netinet/ip_carp.h	Tue Jul  9 09:59:46 2013	(r253086)
+++ head/sys/netinet/ip_carp.h	Tue Jul  9 10:02:51 2013	(r253087)
@@ -117,11 +117,6 @@ struct carpstats {
 	uint64_t	carps_preempt;		/* if enabled, preemptions */
 };
 
-#ifdef _KERNEL
-#define	CARPSTATS_ADD(name, val)	carpstats.name += (val)
-#define	CARPSTATS_INC(name)		CARPSTATS_ADD(name, 1)
-#endif
-
 /*
  * Configuration structure for SIOCSVH SIOCGVH
  */

Modified: head/usr.bin/netstat/inet.c
==============================================================================
--- head/usr.bin/netstat/inet.c	Tue Jul  9 09:59:46 2013	(r253086)
+++ head/usr.bin/netstat/inet.c	Tue Jul  9 10:02:51 2013	(r253087)
@@ -811,7 +811,7 @@ carp_stats(u_long off, const char *name,
 	} else {
 		if (off == 0)
 			return;
-		kread(off, &carpstat, len);
+		kread_counters(off, &carpstat, len);
 	}
 
 	printf("%s:\n", name);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 10:08:16 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id CECB3F60;
 Tue,  9 Jul 2013 10:08:16 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C052A16E0;
 Tue,  9 Jul 2013 10:08:16 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69A8GvV044134;
 Tue, 9 Jul 2013 10:08:16 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69A8DcY044114;
 Tue, 9 Jul 2013 10:08:13 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307091008.r69A8DcY044114@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 10:08:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253088 - in head: sys/netipsec usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 10:08:16 -0000

Author: ae
Date: Tue Jul  9 10:08:13 2013
New Revision: 253088
URL: http://svnweb.freebsd.org/changeset/base/253088

Log:
  Migrate structs ahstat, espstat, ipcompstat, ipipstat, pfkeystat,
  ipsec4stat, ipsec6stat to PCPU counters.

Modified:
  head/sys/netipsec/ah_var.h
  head/sys/netipsec/esp_var.h
  head/sys/netipsec/ipcomp_var.h
  head/sys/netipsec/ipip_var.h
  head/sys/netipsec/ipsec.c
  head/sys/netipsec/ipsec.h
  head/sys/netipsec/ipsec6.h
  head/sys/netipsec/keysock.c
  head/sys/netipsec/keysock.h
  head/sys/netipsec/xform_ah.c
  head/sys/netipsec/xform_esp.c
  head/sys/netipsec/xform_ipcomp.c
  head/sys/netipsec/xform_ipip.c
  head/usr.bin/netstat/ipsec.c
  head/usr.bin/netstat/pfkey.c

Modified: head/sys/netipsec/ah_var.h
==============================================================================
--- head/sys/netipsec/ah_var.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/ah_var.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -71,14 +71,16 @@ struct ahstat {
 };
 
 #ifdef _KERNEL
+#include 
+
 VNET_DECLARE(int, ah_enable);
 VNET_DECLARE(int, ah_cleartos);
-VNET_DECLARE(struct ahstat, ahstat);
+VNET_PCPUSTAT_DECLARE(struct ahstat, ahstat);
 
-#define	AHSTAT_ADD(name, val)	V_ahstat.name += (val)
+#define	AHSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct ahstat, ahstat, name , (val))
 #define	AHSTAT_INC(name)	AHSTAT_ADD(name, 1)
 #define	V_ah_enable		VNET(ah_enable)
 #define	V_ah_cleartos		VNET(ah_cleartos)
-#define	V_ahstat		VNET(ahstat)
 #endif /* _KERNEL */
 #endif /*_NETIPSEC_AH_VAR_H_*/

Modified: head/sys/netipsec/esp_var.h
==============================================================================
--- head/sys/netipsec/esp_var.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/esp_var.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -72,12 +72,14 @@ struct espstat {
 };
 
 #ifdef _KERNEL
+#include 
+
 VNET_DECLARE(int, esp_enable);
-VNET_DECLARE(struct espstat, espstat);
+VNET_PCPUSTAT_DECLARE(struct espstat, espstat);
 
-#define	ESPSTAT_ADD(name, val)	V_espstat.name += (val)
+#define	ESPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct espstat, espstat, name, (val))
 #define	ESPSTAT_INC(name)	ESPSTAT_ADD(name, 1)
 #define	V_esp_enable	VNET(esp_enable)
-#define	V_espstat	VNET(espstat)
 #endif /* _KERNEL */
 #endif /*_NETIPSEC_ESP_VAR_H_*/

Modified: head/sys/netipsec/ipcomp_var.h
==============================================================================
--- head/sys/netipsec/ipcomp_var.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/ipcomp_var.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -64,12 +64,14 @@ struct ipcompstat {
 };
 
 #ifdef _KERNEL
+#include 
+
 VNET_DECLARE(int, ipcomp_enable);
-VNET_DECLARE(struct ipcompstat, ipcompstat);
+VNET_PCPUSTAT_DECLARE(struct ipcompstat, ipcompstat);
 
-#define	IPCOMPSTAT_ADD(name, val)	V_ipcompstat.name += (val)
+#define	IPCOMPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct ipcompstat, ipcompstat, name, (val))
 #define	IPCOMPSTAT_INC(name)		IPCOMPSTAT_ADD(name, 1)
 #define	V_ipcomp_enable		VNET(ipcomp_enable)
-#define	V_ipcompstat		VNET(ipcompstat)
 #endif /* _KERNEL */
 #endif /*_NETIPSEC_IPCOMP_VAR_H_*/

Modified: head/sys/netipsec/ipip_var.h
==============================================================================
--- head/sys/netipsec/ipip_var.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/ipip_var.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -58,12 +58,14 @@ struct ipipstat {
 };
 
 #ifdef _KERNEL
+#include 
+
 VNET_DECLARE(int, ipip_allow);
-VNET_DECLARE(struct ipipstat, ipipstat);
+VNET_PCPUSTAT_DECLARE(struct ipipstat, ipipstat);
 
-#define	IPIPSTAT_ADD(name, val)	V_ipipstat.name += (val)
+#define	IPIPSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct ipipstat, ipipstat, name, (val))
 #define	IPIPSTAT_INC(name)	IPIPSTAT_ADD(name, 1)
 #define	V_ipip_allow		VNET(ipip_allow)
-#define	V_ipipstat		VNET(ipipstat)
 #endif /* _KERNEL */
 #endif /* _NETINET_IPIP_H_ */

Modified: head/sys/netipsec/ipsec.c
==============================================================================
--- head/sys/netipsec/ipsec.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/ipsec.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -104,7 +104,13 @@ VNET_DEFINE(int, ipsec_debug) = 0;
 #endif
 
 /* NB: name changed so netstat doesn't use it. */
-VNET_DEFINE(struct ipsecstat, ipsec4stat);
+VNET_PCPUSTAT_DEFINE(struct ipsecstat, ipsec4stat);
+VNET_PCPUSTAT_SYSINIT(ipsec4stat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ipsec4stat);
+#endif /* VIMAGE */
+
 VNET_DEFINE(int, ip4_ah_offsetmask) = 0;	/* maybe IP_DF? */
 /* DF bit on encap. 0: clear 1: set 2: copy */
 VNET_DEFINE(int, ip4_ipsec_dfbit) = 0;
@@ -167,9 +173,8 @@ SYSCTL_VNET_INT(_net_inet_ipsec, IPSECCT
 SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUTO, crypto_support,
 	CTLFLAG_RW, &VNET_NAME(crypto_support), 0,
 	"Crypto driver selection.");
-SYSCTL_VNET_STRUCT(_net_inet_ipsec, OID_AUTO, ipsecstats,
-	CTLFLAG_RD, &VNET_NAME(ipsec4stat), ipsecstat,	
-	"IPsec IPv4 statistics.");
+SYSCTL_VNET_PCPUSTAT(_net_inet_ipsec, OID_AUTO, ipsecstats, struct ipsecstat,
+    ipsec4stat, "IPsec IPv4 statistics.");
 
 #ifdef REGRESSION
 /*
@@ -191,7 +196,13 @@ SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUT
 #endif
 
 #ifdef INET6 
-VNET_DEFINE(struct ipsecstat, ipsec6stat);
+VNET_PCPUSTAT_DEFINE(struct ipsecstat, ipsec6stat);
+VNET_PCPUSTAT_SYSINIT(ipsec6stat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ipsec6stat);
+#endif /* VIMAGE */
+
 VNET_DEFINE(int, ip6_esp_trans_deflev) = IPSEC_LEVEL_USE;
 VNET_DEFINE(int, ip6_esp_net_deflev) = IPSEC_LEVEL_USE;
 VNET_DEFINE(int, ip6_ah_trans_deflev) = IPSEC_LEVEL_USE;
@@ -201,10 +212,6 @@ VNET_DEFINE(int, ip6_ipsec_ecn) = 0;	/* 
 SYSCTL_DECL(_net_inet6_ipsec6);
 
 /* net.inet6.ipsec6 */
-#ifdef COMPAT_KAME
-SYSCTL_OID(_net_inet6_ipsec6, IPSECCTL_STATS, stats, CTLFLAG_RD,
-    0, 0, compat_ipsecstats_sysctl, "S", "IPsec IPv6 statistics.");
-#endif /* COMPAT_KAME */
 SYSCTL_VNET_INT(_net_inet6_ipsec6, IPSECCTL_DEF_POLICY, def_policy, CTLFLAG_RW,
 	&VNET_NAME(ip4_def_policy).policy, 0,
 	"IPsec default policy.");
@@ -226,9 +233,8 @@ SYSCTL_VNET_INT(_net_inet6_ipsec6, IPSEC
 SYSCTL_VNET_INT(_net_inet6_ipsec6, IPSECCTL_DEBUG, debug, CTLFLAG_RW,
 	&VNET_NAME(ipsec_debug), 0,
 	"Enable IPsec debugging output when set.");
-SYSCTL_VNET_STRUCT(_net_inet6_ipsec6, IPSECCTL_STATS,
-	ipsecstats, CTLFLAG_RD, &VNET_NAME(ipsec6stat), ipsecstat,
-	"IPsec IPv6 statistics.");
+SYSCTL_VNET_PCPUSTAT(_net_inet6_ipsec6, IPSECCTL_STATS, ipsecstats,
+    struct ipsecstat, ipsec6stat, "IPsec IPv6 statistics.");
 #endif /* INET6 */
 
 static int ipsec_setspidx_inpcb __P((struct mbuf *, struct inpcb *));

Modified: head/sys/netipsec/ipsec.h
==============================================================================
--- head/sys/netipsec/ipsec.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/ipsec.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -325,6 +325,8 @@ struct ipsecstat {
 }
 
 #ifdef _KERNEL
+#include 
+
 struct ipsec_output_state {
 	struct mbuf *m;
 	struct route *ro;
@@ -347,7 +349,7 @@ VNET_DECLARE(int, ipsec_integrity);
 #define	V_ipsec_integrity	VNET(ipsec_integrity)
 #endif
 
-VNET_DECLARE(struct ipsecstat, ipsec4stat);
+VNET_PCPUSTAT_DECLARE(struct ipsecstat, ipsec4stat);
 VNET_DECLARE(struct secpolicy, ip4_def_policy);
 VNET_DECLARE(int, ip4_esp_trans_deflev);
 VNET_DECLARE(int, ip4_esp_net_deflev);
@@ -359,8 +361,8 @@ VNET_DECLARE(int, ip4_ipsec_ecn);
 VNET_DECLARE(int, ip4_esp_randpad);
 VNET_DECLARE(int, crypto_support);
 
-#define	IPSECSTAT_INC(name)	V_ipsec4stat.name += 1
-#define	V_ipsec4stat		VNET(ipsec4stat)
+#define	IPSECSTAT_INC(name)	\
+    VNET_PCPUSTAT_ADD(struct ipsecstat, ipsec4stat, name, 1)
 #define	V_ip4_def_policy	VNET(ip4_def_policy)
 #define	V_ip4_esp_trans_deflev	VNET(ip4_esp_trans_deflev)
 #define	V_ip4_esp_net_deflev	VNET(ip4_esp_net_deflev)

Modified: head/sys/netipsec/ipsec6.h
==============================================================================
--- head/sys/netipsec/ipsec6.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/ipsec6.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -41,15 +41,17 @@
 #include 
 
 #ifdef _KERNEL
-VNET_DECLARE(struct ipsecstat, ipsec6stat);
+#include 
+
+VNET_PCPUSTAT_DECLARE(struct ipsecstat, ipsec6stat);
 VNET_DECLARE(int, ip6_esp_trans_deflev);
 VNET_DECLARE(int, ip6_esp_net_deflev);
 VNET_DECLARE(int, ip6_ah_trans_deflev);
 VNET_DECLARE(int, ip6_ah_net_deflev);
 VNET_DECLARE(int, ip6_ipsec_ecn);
 
-#define	IPSEC6STAT_INC(name)	V_ipsec6stat.name += 1
-#define	V_ipsec6stat		VNET(ipsec6stat)
+#define	IPSEC6STAT_INC(name)	\
+    VNET_PCPUSTAT_ADD(struct ipsecstat, ipsec6stat, name, 1)
 #define	V_ip6_esp_trans_deflev	VNET(ip6_esp_trans_deflev)
 #define	V_ip6_esp_net_deflev	VNET(ip6_esp_net_deflev)
 #define	V_ip6_ah_trans_deflev	VNET(ip6_ah_trans_deflev)

Modified: head/sys/netipsec/keysock.c
==============================================================================
--- head/sys/netipsec/keysock.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/keysock.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -77,7 +77,12 @@ static struct sockaddr key_src = { 2, PF
 
 static int key_sendup0 __P((struct rawcb *, struct mbuf *, int));
 
-VNET_DEFINE(struct pfkeystat, pfkeystat);
+VNET_PCPUSTAT_DEFINE(struct pfkeystat, pfkeystat);
+VNET_PCPUSTAT_SYSINIT(pfkeystat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(pfkeystat);
+#endif /* VIMAGE */
 
 /*
  * key_output()

Modified: head/sys/netipsec/keysock.h
==============================================================================
--- head/sys/netipsec/keysock.h	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/keysock.h	Tue Jul  9 10:08:13 2013	(r253088)
@@ -63,16 +63,18 @@ struct pfkeystat {
 #define KEY_SENDUP_REGISTERED	2
 
 #ifdef _KERNEL
+#include 
+
 struct keycb {
 	struct rawcb kp_raw;	/* rawcb */
 	int kp_promisc;		/* promiscuous mode */
 	int kp_registered;	/* registered socket */
 };
 
-VNET_DECLARE(struct pfkeystat, pfkeystat);
-#define	PFKEYSTAT_ADD(name, val)	V_pfkeystat.name += (val)
+VNET_PCPUSTAT_DECLARE(struct pfkeystat, pfkeystat);
+#define	PFKEYSTAT_ADD(name, val)	\
+    VNET_PCPUSTAT_ADD(struct pfkeystat, pfkeystat, name, (val))
 #define	PFKEYSTAT_INC(name)		PFKEYSTAT_ADD(name, 1)
-#define	V_pfkeystat		VNET(pfkeystat)
 
 extern int key_output(struct mbuf *m, struct socket *so);
 extern int key_usrreq __P((struct socket *,

Modified: head/sys/netipsec/xform_ah.c
==============================================================================
--- head/sys/netipsec/xform_ah.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/xform_ah.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -89,7 +89,12 @@
 
 VNET_DEFINE(int, ah_enable) = 1;	/* control flow of packets with AH */
 VNET_DEFINE(int, ah_cleartos) = 1;	/* clear ip_tos when doing AH calc */
-VNET_DEFINE(struct ahstat, ahstat);
+VNET_PCPUSTAT_DEFINE(struct ahstat, ahstat);
+VNET_PCPUSTAT_SYSINIT(ahstat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ahstat);
+#endif /* VIMAGE */
 
 #ifdef INET
 SYSCTL_DECL(_net_inet_ah);
@@ -97,8 +102,8 @@ SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
 	ah_enable,	CTLFLAG_RW,	&VNET_NAME(ah_enable),	0, "");
 SYSCTL_VNET_INT(_net_inet_ah, OID_AUTO,
 	ah_cleartos,	CTLFLAG_RW,	&VNET_NAME(ah_cleartos), 0, "");
-SYSCTL_VNET_STRUCT(_net_inet_ah, IPSECCTL_STATS,
-	stats,		CTLFLAG_RD,	&VNET_NAME(ahstat), ahstat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet_ah, IPSECCTL_STATS, stats, struct ahstat,
+    ahstat, "AH statistics (struct ahstat, netipsec/ah_var.h)");
 #endif
 
 static unsigned char ipseczeroes[256];	/* larger than an ip6 extension hdr */

Modified: head/sys/netipsec/xform_esp.c
==============================================================================
--- head/sys/netipsec/xform_esp.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/xform_esp.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -77,13 +77,19 @@
 #include 
 
 VNET_DEFINE(int, esp_enable) = 1;
-VNET_DEFINE(struct espstat, espstat);
+VNET_PCPUSTAT_DEFINE(struct espstat, espstat);
+VNET_PCPUSTAT_SYSINIT(espstat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(espstat);
+#endif /* VIMAGE */
 
 SYSCTL_DECL(_net_inet_esp);
 SYSCTL_VNET_INT(_net_inet_esp, OID_AUTO,
 	esp_enable,	CTLFLAG_RW,	&VNET_NAME(esp_enable),	0, "");
-SYSCTL_VNET_STRUCT(_net_inet_esp, IPSECCTL_STATS,
-	stats,		CTLFLAG_RD,	&VNET_NAME(espstat),	espstat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet_esp, IPSECCTL_STATS, stats,
+    struct espstat, espstat,
+    "ESP statistics (struct espstat, netipsec/esp_var.h");
 
 static int esp_input_cb(struct cryptop *op);
 static int esp_output_cb(struct cryptop *crp);

Modified: head/sys/netipsec/xform_ipcomp.c
==============================================================================
--- head/sys/netipsec/xform_ipcomp.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/xform_ipcomp.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -70,13 +70,19 @@
 #include 
 
 VNET_DEFINE(int, ipcomp_enable) = 1;
-VNET_DEFINE(struct ipcompstat, ipcompstat);
+VNET_PCPUSTAT_DEFINE(struct ipcompstat, ipcompstat);
+VNET_PCPUSTAT_SYSINIT(ipcompstat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ipcompstat);
+#endif /* VIMAGE */
 
 SYSCTL_DECL(_net_inet_ipcomp);
 SYSCTL_VNET_INT(_net_inet_ipcomp, OID_AUTO,
 	ipcomp_enable,	CTLFLAG_RW,	&VNET_NAME(ipcomp_enable),	0, "");
-SYSCTL_VNET_STRUCT(_net_inet_ipcomp, IPSECCTL_STATS,
-	stats,		CTLFLAG_RD,	&VNET_NAME(ipcompstat),	ipcompstat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet_ipcomp, IPSECCTL_STATS, stats,
+    struct ipcompstat, ipcompstat,
+    "IPCOMP statistics (struct ipcompstat, netipsec/ipcomp_var.h");
 
 static int ipcomp_input_cb(struct cryptop *crp);
 static int ipcomp_output_cb(struct cryptop *crp);
@@ -631,12 +637,3 @@ ipcomp_attach(void)
 }
 
 SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipcomp_attach, NULL);
-
-static void
-vnet_ipcomp_attach(const void *unused __unused)
-{
-
-}
-
-VNET_SYSINIT(vnet_ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE,
-    vnet_ipcomp_attach, NULL);

Modified: head/sys/netipsec/xform_ipip.c
==============================================================================
--- head/sys/netipsec/xform_ipip.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/sys/netipsec/xform_ipip.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -91,13 +91,19 @@
  * net.inet.ipip.allow value.  Zero means drop them, all else is acceptance.
  */
 VNET_DEFINE(int, ipip_allow) = 0;
-VNET_DEFINE(struct ipipstat, ipipstat);
+VNET_PCPUSTAT_DEFINE(struct ipipstat, ipipstat);
+VNET_PCPUSTAT_SYSINIT(ipipstat);
+
+#ifdef VIMAGE
+VNET_PCPUSTAT_SYSUNINIT(ipipstat);
+#endif /* VIMAGE */
 
 SYSCTL_DECL(_net_inet_ipip);
 SYSCTL_VNET_INT(_net_inet_ipip, OID_AUTO,
 	ipip_allow,	CTLFLAG_RW,	&VNET_NAME(ipip_allow),	0, "");
-SYSCTL_VNET_STRUCT(_net_inet_ipip, IPSECCTL_STATS,
-	stats,		CTLFLAG_RD,	&VNET_NAME(ipipstat),	ipipstat, "");
+SYSCTL_VNET_PCPUSTAT(_net_inet_ipip, IPSECCTL_STATS, stats,
+    struct ipipstat, ipipstat,
+    "IPIP statistics (struct ipipstat, netipsec/ipip_var.h)");
 
 /* XXX IPCOMP */
 #define	M_IPSEC	(M_AUTHIPHDR|M_AUTHIPDGM|M_DECRYPTED)

Modified: head/usr.bin/netstat/ipsec.c
==============================================================================
--- head/usr.bin/netstat/ipsec.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/usr.bin/netstat/ipsec.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -268,7 +268,7 @@ ipsec_stats(u_long off, const char *name
 	if (off == 0)
 		return;
 	printf ("%s:\n", name);
-	kread(off, (char *)&ipsecstat, sizeof(ipsecstat));
+	kread_counters(off, (char *)&ipsecstat, sizeof(ipsecstat));
 
 	print_ipsecstats(&ipsecstat);
 }
@@ -354,7 +354,7 @@ ah_stats(u_long off, const char *name, i
 	if (off == 0)
 		return;
 	printf ("%s:\n", name);
-	kread(off, (char *)&ahstat, sizeof(ahstat));
+	kread_counters(off, (char *)&ahstat, sizeof(ahstat));
 
 	print_ahstats(&ahstat);
 }
@@ -401,7 +401,7 @@ esp_stats(u_long off, const char *name, 
 	if (off == 0)
 		return;
 	printf ("%s:\n", name);
-	kread(off, (char *)&espstat, sizeof(espstat));
+	kread_counters(off, (char *)&espstat, sizeof(espstat));
 
 	print_espstats(&espstat);
 }
@@ -446,7 +446,7 @@ ipcomp_stats(u_long off, const char *nam
 	if (off == 0)
 		return;
 	printf ("%s:\n", name);
-	kread(off, (char *)&ipcompstat, sizeof(ipcompstat));
+	kread_counters(off, (char *)&ipcompstat, sizeof(ipcompstat));
 
 	print_ipcompstats(&ipcompstat);
 }

Modified: head/usr.bin/netstat/pfkey.c
==============================================================================
--- head/usr.bin/netstat/pfkey.c	Tue Jul  9 10:02:51 2013	(r253087)
+++ head/usr.bin/netstat/pfkey.c	Tue Jul  9 10:08:13 2013	(r253088)
@@ -119,7 +119,7 @@ pfkey_stats(u_long off, const char *name
 	if (off == 0)
 		return;
 	printf ("%s:\n", name);
-	kread(off, (char *)&pfkeystat, sizeof(pfkeystat));
+	kread_counters(off, (char *)&pfkeystat, sizeof(pfkeystat));
 
 #define	p(f, m) if (pfkeystat.f || sflag <= 1) \
     printf(m, (uintmax_t)pfkeystat.f, plural(pfkeystat.f))

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 10:20:28 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 34C1726E;
 Tue,  9 Jul 2013 10:20:28 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 27ECF1761;
 Tue,  9 Jul 2013 10:20:28 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69AKS4u047668;
 Tue, 9 Jul 2013 10:20:28 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69AKRTN047663;
 Tue, 9 Jul 2013 10:20:27 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307091020.r69AKRTN047663@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 10:20:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253089 - in head: . sys/sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 10:20:28 -0000

Author: ae
Date: Tue Jul  9 10:20:27 2013
New Revision: 253089
URL: http://svnweb.freebsd.org/changeset/base/253089

Log:
  Bump __FreeBSD_version to reflect changes in statistics structures.

Modified:
  head/UPDATING
  head/sys/sys/param.h

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Tue Jul  9 10:08:13 2013	(r253088)
+++ head/UPDATING	Tue Jul  9 10:20:27 2013	(r253089)
@@ -31,6 +31,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
 	disable the most expensive debugging functionality run
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
+20130709:
+	Most of network statistics structures were changed to be able
+	keep 64-bits counters. Thus all tools, that work with networking
+	statistics, must be rebuilded (netstat(1), bsnmpd(1), etc.)
+
 20130629:
 	Fix targets that run multiple make's to use && rather than ;
 	so that subsequent steps depend on success of previous.

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Tue Jul  9 10:08:13 2013	(r253088)
+++ head/sys/sys/param.h	Tue Jul  9 10:20:27 2013	(r253089)
@@ -58,7 +58,7 @@
  *		in the range 5 to 9.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 1000036	/* Master, propagated to newvers */
+#define __FreeBSD_version 1000037	/* Master, propagated to newvers */
 
 /*
  * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 10:27:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 96144475;
 Tue,  9 Jul 2013 10:27:26 +0000 (UTC) (envelope-from rmh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 88F9F17B1;
 Tue,  9 Jul 2013 10:27:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69ARQ5a049933;
 Tue, 9 Jul 2013 10:27:26 GMT (envelope-from rmh@svn.freebsd.org)
Received: (from rmh@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69ARQW3049932;
 Tue, 9 Jul 2013 10:27:26 GMT (envelope-from rmh@svn.freebsd.org)
Message-Id: <201307091027.r69ARQW3049932@svn.freebsd.org>
From: Robert Millan 
Date: Tue, 9 Jul 2013 10:27:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253090 - head/sys/crypto/sha2
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 10:27:26 -0000

Author: rmh
Date: Tue Jul  9 10:27:26 2013
New Revision: 253090
URL: http://svnweb.freebsd.org/changeset/base/253090

Log:
  Allow assert() to operate correctly when building userland code.

Modified:
  head/sys/crypto/sha2/sha2.c

Modified: head/sys/crypto/sha2/sha2.c
==============================================================================
--- head/sys/crypto/sha2/sha2.c	Tue Jul  9 10:20:27 2013	(r253089)
+++ head/sys/crypto/sha2/sha2.c	Tue Jul  9 10:27:26 2013	(r253090)
@@ -67,8 +67,10 @@ __FBSDID("$FreeBSD$");
  *
  */
 
-#if defined(__bsdi__) || defined(__FreeBSD__)
+#if defined(_KERNEL) && (defined(__bsdi__) || defined(__FreeBSD__))
 #define assert(x)
+#else
+#include 
 #endif
 
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 10:41:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 5F91D777;
 Tue,  9 Jul 2013 10:41:18 +0000 (UTC) (envelope-from smh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 520A1182A;
 Tue,  9 Jul 2013 10:41:18 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69AfImf054881;
 Tue, 9 Jul 2013 10:41:18 GMT (envelope-from smh@svn.freebsd.org)
Received: (from smh@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69AfHAk054879;
 Tue, 9 Jul 2013 10:41:17 GMT (envelope-from smh@svn.freebsd.org)
Message-Id: <201307091041.r69AfHAk054879@svn.freebsd.org>
From: Steven Hartland 
Date: Tue, 9 Jul 2013 10:41:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253091 - in head/sys/cam: ata scsi
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 10:41:18 -0000

Author: smh
Date: Tue Jul  9 10:41:17 2013
New Revision: 253091
URL: http://svnweb.freebsd.org/changeset/base/253091

Log:
  Added 4K QUIRK for OCZ Vertex 4 SSDs
  
  Submitted by:	Borja Marcos 
  MFC after:	2 days

Modified:
  head/sys/cam/ata/ata_da.c
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/ata/ata_da.c
==============================================================================
--- head/sys/cam/ata/ata_da.c	Tue Jul  9 10:27:26 2013	(r253090)
+++ head/sys/cam/ata/ata_da.c	Tue Jul  9 10:41:17 2013	(r253091)
@@ -396,6 +396,14 @@ static struct ada_quirk_entry ada_quirk_
 	},
 	{
 		/*
+		 * OCZ Vertex 4 SSDs
+		 * 4k optimised & trim only works in 4k requests + 4k aligned
+		 */
+		{ T_DIRECT, SIP_MEDIA_FIXED, "*", "OCZ-VERTEX4*", "*" },
+		/*quirks*/ADA_Q_4K
+	},
+	{
+		/*
 		 * Samsung 830 Series SSDs
 		 * 4k optimised
 		 */

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Tue Jul  9 10:27:26 2013	(r253090)
+++ head/sys/cam/scsi/scsi_da.c	Tue Jul  9 10:41:17 2013	(r253091)
@@ -1031,6 +1031,14 @@ static struct da_quirk_entry da_quirk_ta
 	},
 	{
 		/*
+		 * OCZ Vertex 4 SSDs
+		 * 4k optimised & trim only works in 4k requests + 4k aligned
+		 */
+		{ T_DIRECT, SIP_MEDIA_FIXED, "ATA", "OCZ-VERTEX4*", "*" },
+		/*quirks*/DA_Q_4K
+	},
+	{
+		/*
 		 * Samsung 830 Series SSDs
 		 * 4k optimised & trim only works in 4k requests + 4k aligned
 		 */

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 12:25:45 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 535BEF4B;
 Tue,  9 Jul 2013 12:25:45 +0000 (UTC)
 (envelope-from joel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 461C81CCE;
 Tue,  9 Jul 2013 12:25:45 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69CPjFh084809;
 Tue, 9 Jul 2013 12:25:45 GMT (envelope-from joel@svn.freebsd.org)
Received: (from joel@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69CPj56084808;
 Tue, 9 Jul 2013 12:25:45 GMT (envelope-from joel@svn.freebsd.org)
Message-Id: <201307091225.r69CPj56084808@svn.freebsd.org>
From: Joel Dahl 
Date: Tue, 9 Jul 2013 12:25:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253093 - head/share/man/man4
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 12:25:45 -0000

Author: joel (doc committer)
Date: Tue Jul  9 12:25:44 2013
New Revision: 253093
URL: http://svnweb.freebsd.org/changeset/base/253093

Log:
  Make mandoc lint happy.

Modified:
  head/share/man/man4/bridge.4

Modified: head/share/man/man4/bridge.4
==============================================================================
--- head/share/man/man4/bridge.4	Tue Jul  9 11:00:10 2013	(r253092)
+++ head/share/man/man4/bridge.4	Tue Jul  9 12:25:44 2013	(r253093)
@@ -151,7 +151,7 @@ The following
 .Xr rc.conf 5
 variable configures an IPv6 link-local address on
 .Li bridge0
-interface: 
+interface:
 .Bd -literal -offset indent
 ifconfig_bridge0_ipv6="up"
 .Ed
@@ -186,7 +186,7 @@ and applications use both of them.
 To prevent this situation,
 .Nm
 checks whether an link-local scoped IPv6 address is configured on
-a member interface to be added and the 
+a member interface to be added and the
 .Nm
 interface.
 When the
@@ -214,7 +214,6 @@ and/or
 .Va net.inet6.ip6.auto_linklocal
 is set to
 .Li 1 .
-.Ed
 .Sh SPANNING TREE
 The
 .Nm

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 12:36:30 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 93A4F2E3;
 Tue,  9 Jul 2013 12:36:30 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au
 [211.29.132.42])
 by mx1.freebsd.org (Postfix) with ESMTP id 432F51D45;
 Tue,  9 Jul 2013 12:36:29 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id BDDFE3C062E;
 Tue,  9 Jul 2013 22:36:22 +1000 (EST)
Date: Tue, 9 Jul 2013 22:36:20 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Andriy Gapon 
Subject: Re: svn commit: r253077 - head/sys/kern
In-Reply-To: <201307090901.r6991j64023941@svn.freebsd.org>
Message-ID: <20130709222704.L16411@besplex.bde.org>
References: <201307090901.r6991j64023941@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=Q6eKePKa c=1 sm=1 a=-fB-b2Shr38A:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=M4roAWbnUW4A:10
 a=SoqTtPcDvfIZEx2kRbQA:9 a=CjuIK1q_8ugA:10 a=GckuAJ8mm-_RZzYM:21
 a=UdTGbyzZN9Vzyiy0:21 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 12:36:30 -0000

On Tue, 9 Jul 2013, Andriy Gapon wrote:

> Log:
>  should_yield: protect from td_swvoltick being uninitialized or too stale
>
>  The distance between ticks and td_swvoltick should be calculated as
>  an unsigned number.  Previously we could end up comparing a negative
>  number with hogticks in which case should_yield() would give incorrect
>  answer.
>
>  We should probably ensure that td_swvoltick is properly initialized.
>
>  Sponsored by:	HybridCluster
>  MFC after:	5 days
>
> Modified:
>  head/sys/kern/kern_synch.c
>
> Modified: head/sys/kern/kern_synch.c
> ==============================================================================
> --- head/sys/kern/kern_synch.c	Tue Jul  9 08:59:39 2013	(r253076)
> +++ head/sys/kern/kern_synch.c	Tue Jul  9 09:01:44 2013	(r253077)
> @@ -581,7 +581,7 @@ int
> should_yield(void)
> {
>
> -	return (ticks - curthread->td_swvoltick >= hogticks);
> +	return ((unsigned int)(ticks - curthread->td_swvoltick) >= hogticks);
> }

Hrmph.  Perhaps it should be calculated as an unsigned number, but
this calculates it as a signed number, with undefined behaviour if
overflow occurs, and then bogusly casts the signed number to unsigned.

It also has a style bug in the cast -- "unsigned int" is verbose, and
even "unsigned" is too long, so it is spelled "u_int" in the kernel.

Next, after the cast the operand types are mismatched, and compilers
could reasonably warn about the possible sign extension bugs from this.
Compilers do warn about the mismatch for "i < size_t(foo)" in loops.
This warning is so annoying and it is not normally produced when both
the operands are variables.  Many "fixes" for this warning make sign
extension bugs worse by casting changing the type of the variable
instead of casting the size_t.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 12:55:01 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id E2CCBBF1;
 Tue,  9 Jul 2013 12:55:01 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BAB641E29;
 Tue,  9 Jul 2013 12:55:01 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69Ct18h093371;
 Tue, 9 Jul 2013 12:55:01 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69Ct1Yh093369;
 Tue, 9 Jul 2013 12:55:01 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307091255.r69Ct1Yh093369@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 9 Jul 2013 12:55:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253094 - head/sys/dev/usb/controller
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 12:55:02 -0000

Author: kib
Date: Tue Jul  9 12:55:01 2013
New Revision: 253094
URL: http://svnweb.freebsd.org/changeset/base/253094

Log:
  Use MSI for xhci(4), if supported.
  
  Reviewed by:	jhb
  Tested by:	dchagin
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/dev/usb/controller/xhci.h
  head/sys/dev/usb/controller/xhci_pci.c

Modified: head/sys/dev/usb/controller/xhci.h
==============================================================================
--- head/sys/dev/usb/controller/xhci.h	Tue Jul  9 12:25:44 2013	(r253093)
+++ head/sys/dev/usb/controller/xhci.h	Tue Jul  9 12:55:01 2013	(r253094)
@@ -447,6 +447,7 @@ struct xhci_softc {
 
 	struct usb_device	*sc_devices[XHCI_MAX_DEVICES];
 	struct resource		*sc_io_res;
+	int			sc_irq_rid;
 	struct resource		*sc_irq_res;
 
 	void			*sc_intr_hdl;

Modified: head/sys/dev/usb/controller/xhci_pci.c
==============================================================================
--- head/sys/dev/usb/controller/xhci_pci.c	Tue Jul  9 12:25:44 2013	(r253093)
+++ head/sys/dev/usb/controller/xhci_pci.c	Tue Jul  9 12:55:01 2013	(r253094)
@@ -146,8 +146,7 @@ static int
 xhci_pci_attach(device_t self)
 {
 	struct xhci_softc *sc = device_get_softc(self);
-	int err;
-	int rid;
+	int count, err, rid;
 
 	/* XXX check for 64-bit capability */
 
@@ -171,11 +170,21 @@ xhci_pci_attach(device_t self)
 
 	usb_callout_init_mtx(&sc->sc_callout, &sc->sc_bus.bus_mtx, 0);
 
-	rid = 0;
-	sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ, &rid,
-	    RF_SHAREABLE | RF_ACTIVE);
+	sc->sc_irq_rid = 0;
+	count = pci_msi_count(self);
+	if (count >= 1) {
+		count = 1;
+		if (pci_alloc_msi(self, &count) == 0) {
+			if (bootverbose)
+				device_printf(self, "MSI enabled\n");
+			sc->sc_irq_rid = 1;
+		}
+	}
+	sc->sc_irq_res = bus_alloc_resource_any(self, SYS_RES_IRQ,
+	    &sc->sc_irq_rid, RF_SHAREABLE | RF_ACTIVE);
 	if (sc->sc_irq_res == NULL) {
 		device_printf(self, "Could not allocate IRQ\n");
+		goto error;
 	}
 	sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
 	if (sc->sc_bus.bdev == NULL) {
@@ -249,7 +258,10 @@ xhci_pci_detach(device_t self)
 		sc->sc_intr_hdl = NULL;
 	}
 	if (sc->sc_irq_res) {
-		bus_release_resource(self, SYS_RES_IRQ, 0, sc->sc_irq_res);
+		if (sc->sc_irq_rid == 1)
+			pci_release_msi(self);
+		bus_release_resource(self, SYS_RES_IRQ, sc->sc_irq_rid,
+		    sc->sc_irq_res);
 		sc->sc_irq_res = NULL;
 	}
 	if (sc->sc_io_res) {

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 12:59:34 2013
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 3796ADC7;
 Tue,  9 Jul 2013 12:59:34 +0000 (UTC) (envelope-from ray@freebsd.org)
Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146])
 by mx1.freebsd.org (Postfix) with ESMTP id A3F241E73;
 Tue,  9 Jul 2013 12:59:33 +0000 (UTC)
Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray)
 by smtp.dlink.ua (Postfix) with ESMTPA id 9976BC4963;
 Mon,  8 Jul 2013 13:21:09 +0300 (EEST)
Date: Mon, 8 Jul 2013 13:20:52 +0300
From: Aleksandr Rybalko 
To: Bruce Evans 
Subject: Re: svn commit: r252425 - head/sys/arm/arm
Message-Id: <20130708132052.f9757df88ede1b087de9da8c@freebsd.org>
In-Reply-To: <20130701113808.F894@besplex.bde.org>
References: <201306301952.r5UJqfwf010873@svn.freebsd.org>
 <20130701113808.F894@besplex.bde.org>
X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, Aleksandr Rybalko ,
 src-committers@FreeBSD.org, svn-src-all@FreeBSD.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 12:59:34 -0000

On Mon, 1 Jul 2013 11:56:25 +1000 (EST)
Bruce Evans  wrote:

> On Sun, 30 Jun 2013, Aleksandr Rybalko wrote:
> 
> > Log:
> >  Decrypt magic numbers - define names for fields of Generic Timer's CNTKCTL reg.
> >
> >  Submitted by:	Ruslan Bukin 
> >
> > Modified:
> >  head/sys/arm/arm/generic_timer.c
> >
> > Modified: head/sys/arm/arm/generic_timer.c
> > ==============================================================================
> > --- head/sys/arm/arm/generic_timer.c	Sun Jun 30 19:36:17 2013	(r252424)
> > +++ head/sys/arm/arm/generic_timer.c	Sun Jun 30 19:52:41 2013	(r252425)
> > @@ -66,7 +66,22 @@ __FBSDID("$FreeBSD$");
> > #define	GENERIC_TIMER_REG_CTRL		0
> > #define	GENERIC_TIMER_REG_TVAL		1
> >
> > -#define	CNTPSIRQ	29
> > +#define	GENERIC_TIMER_CNTKCTL_PL0PTEN	(1 << 9) /* Physical timer registers
> > +						    access from PL0 */
> > +#define	GENERIC_TIMER_CNTKCTL_PL0VTEN	(1 << 8) /* Virtual timer registers
> 
> With names like these, the magic numbers are better.  The prefix name
> GENERIC_TIMER is especially bad.  GT would be good.

Changed in r252780.

> 
> > ...
> > +#define	GENERIC_TIMER_CNTPSIRQ	29
> 
> Here the interesting part CNTPSIRQ is fairly abbreviated, but its prefix
> is not.

GENERIC_TIMER was original prefix before timer access bits was added,
but CNTPSIRQ is original name from documentation. Name was preserved to
avoid confusion.

> 
> >
> > struct arm_tmr_softc {
> > 	struct resource		*irq_res;
> > @@ -167,7 +182,11 @@ disable_user_access(void)
> > 	uint32_t cntkctl;
> >
> > 	__asm volatile("mrc p15, 0, %0, c14, c1, 0" : "=r" (cntkctl));
> > -	cntkctl &= ~((3 << 8) | (7 << 0));
> > +	cntkctl &= ~(GENERIC_TIMER_CNTKCTL_PL0PTEN |
> > +		GENERIC_TIMER_CNTKCTL_PL0VTEN |
> > +		GENERIC_TIMER_CNTKCTL_EVNTEN |
> > +		GENERIC_TIMER_CNTKCTL_PL0VCTEN |
> > +		GENERIC_TIMER_CNTKCTL_PL0PCTEN);
> > 	__asm volatile("mcr p15, 0, %0, c14, c1, 0" : : "r" (cntkctl));
> > 	isb();
> > }
> 
> Using these verbose names takes about 15 times as much code as
> before (the statement is only 5 times longer, but the definitions
> macros are about 10 times longer), and looks like even more becayse
> the statement is misformatted with non-KNF indentation which then
> requires extra line spitting with only 1 name per line.

Now a lot of bytes saved! :)

> 
> > @@ -270,7 +289,8 @@ arm_tmr_attach(device_t dev)
> >
> > 	rid = 0;
> > 	sc->irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
> > -	    CNTPSIRQ, CNTPSIRQ, 1, RF_SHAREABLE | RF_ACTIVE);
> > +	    GENERIC_TIMER_CNTPSIRQ, GENERIC_TIMER_CNTPSIRQ,
> > +	    1, RF_SHAREABLE | RF_ACTIVE);
> >
> > 	arm_tmr_sc = sc;
> 
> For full uglyness, expand all the prefixes and names:

I will! :-D

> - SYS -> SYSTEM
> - RES -> RESOURCE
> - IRQ -> INTERRUPT_REQUEST_NUMBER
> - SYS_RES_IRQ -> SYSTEM_RESOURCE_INTERRUPT_REQUEST_NUMBER
> - RF -> RESOURCE_FLAG
> - RF_SHAREABLE_RESOURCE_FLAG_SHAREABLE 
> - RF_ACTIVE -> RESOURCE_FLAG_ACTIVE
> - CNTPSIRQ -> COUNT_PRIVATELY_SOURCED_INTERRUPT_REQUEST_NUMBER
>    (just guessing what PS means):
> 
>  	sc->irq_res = bus_alloc_resource(dev, SYS_RES_INTERRUPT_REQUEST_NUMBER,
>  	    &rid,
>  	    GENERIC_TIMER_COUNT_PRIVATELY_SOURCED_INTERRUPT_REQUEST_NUMBER,
>  	    GENERIC_TIMER_COUNT_PRIVATELY_SOURCED_INTERRUPT_REQUEST_NUMBER,
>  	    1, RESOURCE_FLAG_SHAREABLE | RESOURCE_FLAG_ACTIVE);
> 
> Next, use non-KNF indentation:
> 
>  	sc->irq_res = bus_alloc_resource(dev, SYS_RES_INTERRUPT_REQUEST_NUMBER,
>  		&rid,
>  		GENERIC_TIMER_COUNT_PRIVATELY_SOURCED_INTERRUPT_REQUEST_NUMBER,
>  		GENERIC_TIMER_COUNT_PRIVATELY_SOURCED_INTERRUPT_REQUEST_NUMBER,
>  		1, RESOURCE_FLAG_SHAREABLE | RESOURCE_FLAG_ACTIVE);
> 
> The names aren't even 80 characters long, so they actually fit on 1 line.
> 
> Bruce

Thanks Bruce!

"Long words only upset me." (c) Vinny-Pooh (USSR version) :-D

-- 
Aleksandr Rybalko 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 13:22:31 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 237EA5E8;
 Tue,  9 Jul 2013 13:22:31 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 150661F8F;
 Tue,  9 Jul 2013 13:22:31 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69DMUML002321;
 Tue, 9 Jul 2013 13:22:30 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69DMUJc002320;
 Tue, 9 Jul 2013 13:22:30 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307091322.r69DMUJc002320@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 9 Jul 2013 13:22:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253095 - head/sys/vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 13:22:31 -0000

Author: kib
Date: Tue Jul  9 13:22:30 2013
New Revision: 253095
URL: http://svnweb.freebsd.org/changeset/base/253095

Log:
  Fix typo in comment.
  
  MFC after:	3 days

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c	Tue Jul  9 12:55:01 2013	(r253094)
+++ head/sys/vm/swap_pager.c	Tue Jul  9 13:22:30 2013	(r253095)
@@ -836,7 +836,7 @@ swap_pager_freespace(vm_object_t object,
  * SWAP_PAGER_RESERVE() - reserve swap blocks in object
  *
  *	Assigns swap blocks to the specified range within the object.  The
- *	swap blocks are not zerod.  Any previous swap assignment is destroyed.
+ *	swap blocks are not zeroed.  Any previous swap assignment is destroyed.
  *
  *	Returns 0 on success, -1 on failure.
  */

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 14:23:01 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 7A44EB2D;
 Tue,  9 Jul 2013 14:23:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 6B7FA12AD;
 Tue,  9 Jul 2013 14:23:01 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69EN0UA020280;
 Tue, 9 Jul 2013 14:23:00 GMT (envelope-from pfg@svn.freebsd.org)
Received: (from pfg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69EN0n5020279;
 Tue, 9 Jul 2013 14:23:00 GMT (envelope-from pfg@svn.freebsd.org)
Message-Id: <201307091423.r69EN0n5020279@svn.freebsd.org>
From: "Pedro F. Giffuni" 
Date: Tue, 9 Jul 2013 14:23:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253098 - head/sys/fs/ext2fs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 14:23:01 -0000

Author: pfg
Date: Tue Jul  9 14:23:00 2013
New Revision: 253098
URL: http://svnweb.freebsd.org/changeset/base/253098

Log:
  Reinstate the assertion from r253045.
  
  UFS r232732 reverted the change as the real problem was to be fixed
  at the syscall level.
  
  Reported by:	bde

Modified:
  head/sys/fs/ext2fs/ext2_vnops.c

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c	Tue Jul  9 13:52:34 2013	(r253097)
+++ head/sys/fs/ext2fs/ext2_vnops.c	Tue Jul  9 14:23:00 2013	(r253098)
@@ -1598,11 +1598,11 @@ ext2_read(struct vop_read_args *ap)
 	} else if (vp->v_type != VREG && vp->v_type != VDIR)
 		panic("%s: type %d", "ext2_read", vp->v_type);
 #endif
-	if (uio->uio_resid < 0 || uio->uio_offset < 0)
-		return (EINVAL);
 	orig_resid = uio->uio_resid;
+	KASSERT(orig_resid >= 0, ("ext2_read: uio->uio_resid < 0"));
 	if (orig_resid == 0)
 		return (0);
+	KASSERT(uio->uio_offset >= 0, ("ext2_read: uio->uio_offset < 0"));
 	fs = ip->i_e2fs;
 	if (uio->uio_offset < ip->i_size &&
 	    uio->uio_offset >= fs->e2fs_maxfilesize)

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 14:38:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 9B8E2FDD;
 Tue,  9 Jul 2013 14:38:26 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 8D9D01371;
 Tue,  9 Jul 2013 14:38:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69EcQaT023849;
 Tue, 9 Jul 2013 14:38:26 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69EcQP5023848;
 Tue, 9 Jul 2013 14:38:26 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201307091438.r69EcQP5023848@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 9 Jul 2013 14:38:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253099 - head/sys/netinet
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 14:38:26 -0000

Author: tuexen
Date: Tue Jul  9 14:38:26 2013
New Revision: 253099
URL: http://svnweb.freebsd.org/changeset/base/253099

Log:
  Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics
  accounting.
  
  X-MFC with: r252026

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Tue Jul  9 14:23:00 2013	(r253098)
+++ head/sys/netinet/sctp_input.c	Tue Jul  9 14:38:26 2013	(r253099)
@@ -5705,7 +5705,7 @@ sctp_common_input_processing(struct mbuf
 #ifdef INET
 		case AF_INET:
 			if (ipsec4_in_reject(m, &inp->ip_inp.inp)) {
-				MODULE_GLOBAL(ipsec4stat).in_polvio++;
+				IPSECSTAT_INC(in_polvio);
 				SCTP_STAT_INCR(sctps_hdrops);
 				goto out;
 			}
@@ -5714,7 +5714,7 @@ sctp_common_input_processing(struct mbuf
 #ifdef INET6
 		case AF_INET6:
 			if (ipsec6_in_reject(m, &inp->ip_inp.inp)) {
-				MODULE_GLOBAL(ipsec6stat).in_polvio++;
+				IPSEC6STAT_INC(in_polvio);
 				SCTP_STAT_INCR(sctps_hdrops);
 				goto out;
 			}

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 15:10:27 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id D9E99C21;
 Tue,  9 Jul 2013 15:10:27 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id CCCA316AD;
 Tue,  9 Jul 2013 15:10:27 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69FARRd034567;
 Tue, 9 Jul 2013 15:10:27 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69FARhW034566;
 Tue, 9 Jul 2013 15:10:27 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307091510.r69FARhW034566@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 15:10:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253100 - head/sys/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 15:10:27 -0000

Author: ae
Date: Tue Jul  9 15:10:27 2013
New Revision: 253100
URL: http://svnweb.freebsd.org/changeset/base/253100

Log:
  Correct CTASSERT condition.

Modified:
  head/sys/net/vnet.h

Modified: head/sys/net/vnet.h
==============================================================================
--- head/sys/net/vnet.h	Tue Jul  9 14:38:26 2013	(r253099)
+++ head/sys/net/vnet.h	Tue Jul  9 15:10:27 2013	(r253100)
@@ -124,7 +124,8 @@ static int								\
 array##_sysctl(SYSCTL_HANDLER_ARGS)					\
 {									\
 	type s;								\
-	CTASSERT(sizeof(type) == sizeof(VNET(array)));			\
+	CTASSERT((sizeof(type) / sizeof(uint64_t)) ==			\
+	    (sizeof(VNET(array)) / sizeof(counter_u64_t)));		\
 	COUNTER_ARRAY_COPY(VNET(array), &s, sizeof(type) / sizeof(uint64_t));\
 	if (req->newptr)						\
 		COUNTER_ARRAY_ZERO(VNET(array),				\

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 15:20:47 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id F291C161;
 Tue,  9 Jul 2013 15:20:46 +0000 (UTC) (envelope-from ae@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E5CD3177F;
 Tue,  9 Jul 2013 15:20:46 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69FKkgd037608;
 Tue, 9 Jul 2013 15:20:46 GMT (envelope-from ae@svn.freebsd.org)
Received: (from ae@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69FKkBS037607;
 Tue, 9 Jul 2013 15:20:46 GMT (envelope-from ae@svn.freebsd.org)
Message-Id: <201307091520.r69FKkBS037607@svn.freebsd.org>
From: "Andrey V. Elsukov" 
Date: Tue, 9 Jul 2013 15:20:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253101 - head/sys/netinet6
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 15:20:47 -0000

Author: ae
Date: Tue Jul  9 15:20:46 2013
New Revision: 253101
URL: http://svnweb.freebsd.org/changeset/base/253101

Log:
  Correct the size of allocated memory to store array of counters.

Modified:
  head/sys/netinet6/in6.c

Modified: head/sys/netinet6/in6.c
==============================================================================
--- head/sys/netinet6/in6.c	Tue Jul  9 15:10:27 2013	(r253100)
+++ head/sys/netinet6/in6.c	Tue Jul  9 15:20:46 2013	(r253101)
@@ -2749,12 +2749,13 @@ in6_domifattach(struct ifnet *ifp)
 	ext = (struct in6_ifextra *)malloc(sizeof(*ext), M_IFADDR, M_WAITOK);
 	bzero(ext, sizeof(*ext));
 
-	ext->in6_ifstat = malloc(sizeof(struct in6_ifstat), M_IFADDR,
-	    M_WAITOK);
+	ext->in6_ifstat = malloc(sizeof(counter_u64_t) *
+	    sizeof(struct in6_ifstat) / sizeof(uint64_t), M_IFADDR, M_WAITOK);
 	COUNTER_ARRAY_ALLOC(ext->in6_ifstat,
 	    sizeof(struct in6_ifstat) / sizeof(uint64_t), M_WAITOK);
 
-	ext->icmp6_ifstat = malloc(sizeof(struct icmp6_ifstat), M_IFADDR,
+	ext->icmp6_ifstat = malloc(sizeof(counter_u64_t) *
+	    sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_IFADDR,
 	    M_WAITOK);
 	COUNTER_ARRAY_ALLOC(ext->icmp6_ifstat,
 	    sizeof(struct icmp6_ifstat) / sizeof(uint64_t), M_WAITOK);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 16:12:28 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E4AAB80E;
 Tue,  9 Jul 2013 16:12:28 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id B94971AA7;
 Tue,  9 Jul 2013 16:12:28 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7C2ABB948;
 Tue,  9 Jul 2013 12:12:27 -0400 (EDT)
From: John Baldwin 
To: Garrett Cooper 
Subject: Re: svn commit: r253048 - in head/sys/ofed: drivers/net/mlx4
 include/linux
Date: Tue, 9 Jul 2013 11:20:21 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307082125.r68LPDlY023493@svn.freebsd.org>
 <3FF894D3-ACDF-4796-A682-F9F9DD8C943D@gmail.com>
In-Reply-To: <3FF894D3-ACDF-4796-A682-F9F9DD8C943D@gmail.com>
MIME-Version: 1.0
Message-Id: <201307091120.22114.jhb@freebsd.org>
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Tue, 09 Jul 2013 12:12:27 -0400 (EDT)
Cc: svn-src-head ,
 svn-src-all ,
 src-committers , shahark@mellanox.com
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 16:12:29 -0000

On Monday, July 08, 2013 6:13:22 pm Garrett Cooper wrote:
> On Jul 8, 2013, at 2:25 PM, John Baldwin wrote:
> 
> > Author: jhb
> > Date: Mon Jul  8 21:25:12 2013
> > New Revision: 253048
> > URL: http://svnweb.freebsd.org/changeset/base/253048
> > 
> > Log:
> >  Allow mlx4 devices to switch from Ethernet to Infiniband (and vice 
versa):
> >  - Fix sysctl wrapper for sysfs attributes to properly handle new string
> >    values similar to sysctl_handle_string() (only copyin the user's
> >    supplied length and nul-terminate the string).
> >  - Don't check for a trailing newline when evaluating the desired 
operating
> >    mode of a mlx4 device.
> > 
> >  PR:		kern/179999
> >  Submitted by:	Shahar Klein 
> >  MFC after:	1 week
> 
> Was there an issue with the patch I submitted via 
http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/174213 (basically solving the 
same problem, but only with the sysfs <-> sysctl(9) handler)? I was of the 
impression that sysfs on Linux always added on trailing newlines (but I could 
be wrong because I haven't used Linux at a dev level for ages). Thanks!

I hadn't seen it.  I had wondered if the '\n' issue was a generic sysfs thing.
It sounds like it is and I'd be happy to revert the mlx4 change and alter the
sysfs bits to manage the newline directly if that is more appropriate.  I'd
also like this to use sysctl_handle_string() if at all possible.  Are you in
a position to test patches still?

If so, maybe give this a whirl.  It's similar to yours except it uses
sysctl_handle_string() and strlcat() rather than continuing to do things
by hand.  It also outputs an empty string to userland if the attribute
doesn't have a show method (your version would never pass out an old
string in that case unlike the original code).

Index: drivers/net/mlx4/main.c
===================================================================
--- drivers/net/mlx4/main.c	(revision 253096)
+++ drivers/net/mlx4/main.c	(working copy)
@@ -479,11 +479,11 @@
 	int i;
 	int err = 0;
 
-	if (!strcmp(buf, "ib"))
+	if (!strcmp(buf, "ib\n"))
 		info->tmp_type = MLX4_PORT_TYPE_IB;
-	else if (!strcmp(buf, "eth"))
+	else if (!strcmp(buf, "eth\n"))
 		info->tmp_type = MLX4_PORT_TYPE_ETH;
-	else if (!strcmp(buf, "auto"))
+	else if (!strcmp(buf, "auto\n"))
 		info->tmp_type = MLX4_PORT_TYPE_AUTO;
 	else {
 		mlx4_err(mdev, "%s is not supported port type\n", buf);
Index: include/linux/sysfs.h
===================================================================
--- include/linux/sysfs.h	(revision 253096)
+++ include/linux/sysfs.h	(working copy)
@@ -81,37 +81,35 @@
 
 	kobj = arg1;
 	attr = (struct attribute *)arg2;
-	buf = (void *)get_zeroed_page(GFP_KERNEL);
-	len = 1;	/* Copy out a NULL byte at least. */
 	if (kobj->ktype == NULL || kobj->ktype->sysfs_ops == NULL)
 		return (ENODEV);
-	ops = kobj->ktype->sysfs_ops;
+	buf = (void *)get_zeroed_page(GFP_KERNEL);
 	if (buf == NULL)
 		return (ENOMEM);
+	ops = kobj->ktype->sysfs_ops;
 	if (ops->show) {
 		len = ops->show(kobj, attr, buf);
 		/*
-		 * It's valid not to have a 'show' so we just return 1 byte
-		 * of NULL.
+		 * It's valid to not have a 'show' so just return an
+		 * empty string.
 	 	 */
 		if (len < 0) {
 			error = -len;
-			len = 1;
 			if (error != EIO)
 				goto out;
 		}
+
+		/* Trim trailing newline. */
+		len--;
+		buf[len] = '\0';
 	}
-	error = SYSCTL_OUT(req, buf, len);
-	if (error || !req->newptr || ops->store == NULL)
+
+	/* Leave one trailing byte to append a newline. */
+	error = sysctl_handle_string(oidp, buf, PAGE_SIZE - 1, req);
+	if (error != 0 || req->newptr == NULL || ops->store == NULL)
 		goto out;
-	len = req->newlen - req->newidx;
-	if (len >= PAGE_SIZE)
-		error = EINVAL;
-	else 
-		error = SYSCTL_IN(req, buf, len);
-	if (error)
-		goto out;
-	((char *)buf)[len] = '\0';
+	len = strlcat(buf, "\n", PAGE_SIZE);
+	KASSERT(len < PAGE_SIZE, ("new attribute truncated"));
 	len = ops->store(kobj, attr, buf, len);
 	if (len < 0)
 		error = -len;

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 18:16:00 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 4F35360D;
 Tue,  9 Jul 2013 18:16:00 +0000 (UTC)
 (envelope-from jkim@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4284611C8;
 Tue,  9 Jul 2013 18:16:00 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69IG0WH088420;
 Tue, 9 Jul 2013 18:16:00 GMT (envelope-from jkim@svn.freebsd.org)
Received: (from jkim@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69IFxam088417;
 Tue, 9 Jul 2013 18:15:59 GMT (envelope-from jkim@svn.freebsd.org)
Message-Id: <201307091815.r69IFxam088417@svn.freebsd.org>
From: Jung-uk Kim 
Date: Tue, 9 Jul 2013 18:15:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253102 - head/sys/dev/ixgb
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 18:16:00 -0000

Author: jkim
Date: Tue Jul  9 18:15:59 2013
New Revision: 253102
URL: http://svnweb.freebsd.org/changeset/base/253102

Log:
  Remove redundant definitions to appease tinderbox.

Modified:
  head/sys/dev/ixgb/if_ixgb.c
  head/sys/dev/ixgb/ixgb_ids.h

Modified: head/sys/dev/ixgb/if_ixgb.c
==============================================================================
--- head/sys/dev/ixgb/if_ixgb.c	Tue Jul  9 15:20:46 2013	(r253101)
+++ head/sys/dev/ixgb/if_ixgb.c	Tue Jul  9 18:15:59 2013	(r253102)
@@ -72,8 +72,8 @@ char            ixgb_copyright[] = "Copy
 static ixgb_vendor_info_t ixgb_vendor_info_array[] =
 {
 	/* Intel(R) PRO/10000 Network Connection */
-	{INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX, PCI_ANY_ID, PCI_ANY_ID, 0},
-	{INTEL_VENDOR_ID, IXGB_DEVICE_ID_82597EX_SR, PCI_ANY_ID, PCI_ANY_ID, 0},
+	{IXGB_VENDOR_ID, IXGB_DEVICE_ID_82597EX, PCI_ANY_ID, PCI_ANY_ID, 0},
+	{IXGB_VENDOR_ID, IXGB_DEVICE_ID_82597EX_SR, PCI_ANY_ID, PCI_ANY_ID, 0},
 	/* required last entry */
 	{0, 0, 0, 0, 0}
 };

Modified: head/sys/dev/ixgb/ixgb_ids.h
==============================================================================
--- head/sys/dev/ixgb/ixgb_ids.h	Tue Jul  9 15:20:46 2013	(r253101)
+++ head/sys/dev/ixgb/ixgb_ids.h	Tue Jul  9 18:15:59 2013	(r253102)
@@ -37,13 +37,9 @@
 #define _IXGB_IDS_H_
 
 /**********************************************************************
-** The Device and Vendor IDs for 10 Gigabit MACs
+** The Device IDs for 10 Gigabit MACs
 **********************************************************************/
 
-#define INTEL_VENDOR_ID         0x8086
-#define INTEL_SUBVENDOR_ID      0x8086
-
-
 #define IXGB_DEVICE_ID_82597EX      0x1048   /* Cibolo A1, -LR (1310nm) */
 #define IXGB_DEVICE_ID_82597EX_SR   0x1A48   /* Cibolo B0, -SR (850nm)  */
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 18:48:44 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 4695EFC8;
 Tue,  9 Jul 2013 18:48:44 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id 2060E1339;
 Tue,  9 Jul 2013 18:48:44 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 02110B977;
 Tue,  9 Jul 2013 14:48:43 -0400 (EDT)
From: John Baldwin 
To: Garrett Cooper 
Subject: Re: svn commit: r253002 - head
Date: Tue, 9 Jul 2013 14:10:34 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307072039.r67KdCdR028908@svn.freebsd.org>
 <201307081713.51892.jhb@freebsd.org>
 
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201307091410.35120.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Tue, 09 Jul 2013 14:48:43 -0400 (EDT)
Cc: "svn-src-head@freebsd.org" ,
 "svn-src-all@freebsd.org" ,
 Alfred Perlstein ,
 "src-committers@freebsd.org" 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 18:48:44 -0000

On Monday, July 08, 2013 7:24:04 pm Garrett Cooper wrote:
> On Mon, Jul 8, 2013 at 2:13 PM, John Baldwin  wrote:
> > On Monday, July 08, 2013 2:23:31 am Garrett Cooper wrote:
> >> On Sun, Jul 7, 2013 at 7:25 PM, Garrett Cooper 
> > wrote:
> >> > On Jul 7, 2013, at 2:15 PM, Alfred Perlstein  wrote:
> >> >
> >> >> On 7/7/13 2:01 PM, Garrett Cooper wrote:
> >> >>> Why the magic number 12?
> >> >>
> >> >> Numbers higher seem to result in worse performance as reported by some
> > members of my team.
> >> >
> >> > The suggestion is good in spirit, but this doesn't justify the reasoning
> > for this recommendation for all cases.
> >> >
> >> > Please revert this change and add a doc page or notes to the dev handbook
> > discussing what the empirical process and results were for determining this
> > value so people can come up with their own values that work best with their
> > hardware and software config. This recommendation is prone to bitrot like some
> > of the recommendations in tuning(7).
> >> >
> >> > Misinformation is sometimes more harmful than no information.
> >>
> >> I spoke with Alfred over the phone and did some more careful thought
> >> about this and I'm rescinding this request.
> >>
> >> Alfred did a good job at documenting how JFLAG works (it was
> >> previously undocumented). My concern over -j12 was performance
> >> related, and after giving things more careful thought it actually
> >> makes sense why -j12 was chosen because Westmere and newer processors
> >> have issues with NUMA and cache locality between multiple processor
> >> packages as we've seen non-empirically and empirically at Isilon with
> >> FreeBSD 7 and 10 (it's a known issue that jeffr@ and jhb@ are aware
> >> of).
> >>
> >> I'll come up with a concise patch that does what Alfred was trying to
> >> achieve and have Alfred review it.
> >>
> >> Thanks (and thank you Alfred for the contribution!!!)!
> >
> > Westmere is fine, it's post-Westmere that is more troublesome.
> 
> Even the 6-core Westmeres (I'm being completely dumb here as you and
> Jeff know a lot more about the NUMA issue than I do as I just caught
> the tail end of the conversation at BSDCan)?

Yes.  NUMA can matter some on Nehalem and Westmere, but for workloads
that involve I/O, the SB/IB generation where the I/O hub moves onto
the processor itself is much more finicky.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 19:01:39 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 54F0B4DF;
 Tue,  9 Jul 2013 19:01:39 +0000 (UTC) (envelope-from imp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 36CEE144A;
 Tue,  9 Jul 2013 19:01:39 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69J1dm1003481;
 Tue, 9 Jul 2013 19:01:39 GMT (envelope-from imp@svn.freebsd.org)
Received: (from imp@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69J1duA003480;
 Tue, 9 Jul 2013 19:01:39 GMT (envelope-from imp@svn.freebsd.org)
Message-Id: <201307091901.r69J1duA003480@svn.freebsd.org>
From: Warner Losh 
Date: Tue, 9 Jul 2013 19:01:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253103 - head/sys/mips/include
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 19:01:39 -0000

Author: imp
Date: Tue Jul  9 19:01:38 2013
New Revision: 253103
URL: http://svnweb.freebsd.org/changeset/base/253103

Log:
  Nearly a complete rewrite of elf.h.
  
  Start with NetBSD's sys/arch/mips/include/elf_machdep.h 1.18. Remove the NetBSD
  specific glue pieces (leaving mostly just relocation types).
  
  Add in FreeBSD specific glue pieces from older versions of this file, and
  move to the top of the file:
  r237430 | kib | 2012-06-22 00:38:31 -0600 (Fri, 22 Jun 2012) | 5 lines
  r232449 | jmallett | 2012-03-03 01:19:18 -0700 (Sat, 03 Mar 2012) | 18 lines
  r217097 | kib | 2011-01-07 07:22:34 -0700 (Fri, 07 Jan 2011) | 3 lines
  r211412 | kib | 2010-08-17 02:55:45 -0600 (Tue, 17 Aug 2010) | 7 lines
  r202908 | gonzo | 2010-01-23 19:59:22 -0700 (Sat, 23 Jan 2010) | 4 lines
  r195356 | imp | 2009-07-05 01:00:51 -0600 (Sun, 05 Jul 2009) | 6 lines
  r195128 | gonzo | 2009-06-27 17:27:41 -0600 (Sat, 27 Jun 2009) | 4 lines
  r197933 | kib | 2009-10-10 09:31:24 -0600 (Sat, 10 Oct 2009) | 9 lines
  r189926 | kib | 2009-03-17 06:50:16 -0600 (Tue, 17 Mar 2009) | 9 lines
  r186191 | imp | 2008-12-16 13:07:47 -0700 (Tue, 16 Dec 2008) | 7 lines
  as closely as I can tell, the projects/mips branch merge was disruptive
  to good history.
  
  This should make merges easier in the future from NetBSD and vice versa.

Modified:
  head/sys/mips/include/elf.h

Modified: head/sys/mips/include/elf.h
==============================================================================
--- head/sys/mips/include/elf.h	Tue Jul  9 18:15:59 2013	(r253102)
+++ head/sys/mips/include/elf.h	Tue Jul  9 19:01:38 2013	(r253103)
@@ -1,7 +1,5 @@
-/*	$OpenBSD: elf_abi.h,v 1.1 1998/01/28 11:14:41 pefo Exp $ */
-
-/*-
- * Copyright (c) 1996 Per Fogelstrom
+/*
+ * Copyright (c) 2013 M. Warner Losh. All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -11,18 +9,12 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed under OpenBSD by
- *	Per Fogelstrom.
- * 4. 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 ``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
+ * 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
@@ -30,190 +22,60 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	JNPR: elf.h,v 1.4 2006/12/02 09:53:40 katta
  * $FreeBSD$
+ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION 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.
+ *
+ * See below starting with the line with $NetBSD...$ for code this applies to.
  */
 
-#ifndef _MACHINE_ELF_H_
-#define	_MACHINE_ELF_H_
+#ifndef	__MIPS_ELF_H
+#define	__MIPS_ELF_H
 
-/* Information taken from MIPS ABI supplemental */
+/* FreeBSD specific bits - derived from FreeBSD specific files and changes to old elf.h */
 
+/*
+ * Define __ELF_WORD_SIZE based on the ABI, if not defined yet. This sets
+ * the proper defaults when we're not trying to do 32-bit on 64-bit systems.
+ * We include both 32 and 64 bit versions so we can support multiple ABIs.
+ */
 #ifndef __ELF_WORD_SIZE
 #if defined(__mips_n64)
-#define	__ELF_WORD_SIZE 64	/* Used by  */
+#define __ELF_WORD_SIZE 64
 #else
-#define	__ELF_WORD_SIZE 32	/* Used by  */
+#define __ELF_WORD_SIZE 32
 #endif
 #endif
-#include 	/* Definitions common to all 32 bit architectures. */
-#include 	/* Definitions common to all 64 bit architectures. */
+#include 
+#include 
 #include 
 
-#define	ELF_ARCH	EM_MIPS
-#if __ELF_WORD_SIZE == 32
-#define	ELF_ARCH32	EM_MIPS
-#endif
-#define	ELF_MACHINE_OK(x) ((x) == EM_MIPS || (x) == EM_MIPS_RS4_BE)
-
-/* Architecture dependent Segment types - p_type */
-#define	PT_MIPS_REGINFO		0x70000000 /* Register usage information */
-
-/* Architecture dependent d_tag field for Elf32_Dyn.  */
-#define	DT_MIPS_RLD_VERSION	0x70000001 /* Runtime Linker Interface ID */
-#define	DT_MIPS_TIME_STAMP	0x70000002 /* Timestamp */
-#define	DT_MIPS_ICHECKSUM	0x70000003 /* Cksum of ext str and com sizes */
-#define	DT_MIPS_IVERSION	0x70000004 /* Version string (string tbl index) */
-#define	DT_MIPS_FLAGS		0x70000005 /* Flags */
-#define	DT_MIPS_BASE_ADDRESS	0x70000006 /* Segment base address */
-#define	DT_MIPS_CONFLICT	0x70000008 /* Adr of .conflict section */
-#define	DT_MIPS_LIBLIST		0x70000009 /* Address of .liblist section */
-#define	DT_MIPS_LOCAL_GOTNO	0x7000000a /* Number of local .GOT entries */
-#define	DT_MIPS_CONFLICTNO	0x7000000b /* Number of .conflict entries */
-#define	DT_MIPS_LIBLISTNO	0x70000010 /* Number of .liblist entries */
-#define	DT_MIPS_SYMTABNO	0x70000011 /* Number of .dynsym entries */
-#define	DT_MIPS_UNREFEXTNO	0x70000012 /* First external DYNSYM */
-#define	DT_MIPS_GOTSYM		0x70000013 /* First GOT entry in .dynsym */
-#define	DT_MIPS_HIPAGENO	0x70000014 /* Number of GOT page table entries */
-#define	DT_MIPS_RLD_MAP		0x70000016 /* Address of debug map pointer */
-
-#define	DT_PROCNUM (DT_MIPS_RLD_MAP - DT_LOPROC + 1)
-
-/*
- * Legal values for e_flags field of Elf32_Ehdr.
- */
-#define	EF_MIPS_NOREORDER	1		/* .noreorder was used */
-#define	EF_MIPS_PIC		2		/* Contains PIC code */
-#define	EF_MIPS_CPIC		4		/* Uses PIC calling sequence */
-#define	EF_MIPS_ARCH		0xf0000000	/* MIPS architecture level */
-
-/*
- * Mips special sections.
- */
-#define	SHN_MIPS_ACOMMON	0xff00		/* Allocated common symbols */
-#define	SHN_MIPS_SCOMMON	0xff03		/* Small common symbols */
-#define	SHN_MIPS_SUNDEFINED	0xff04		/* Small undefined symbols */
-
-/*
- * Legal values for sh_type field of Elf32_Shdr.
- */
-#define	SHT_MIPS_LIBLIST	0x70000000 /* Shared objects used in link */
-#define	SHT_MIPS_CONFLICT	0x70000002 /* Conflicting symbols */
-#define	SHT_MIPS_GPTAB		0x70000003 /* Global data area sizes */
-#define	SHT_MIPS_UCODE		0x70000004 /* Reserved for SGI/MIPS compilers */
-#define	SHT_MIPS_DEBUG		0x70000005 /* MIPS ECOFF debugging information */
-#define	SHT_MIPS_REGINFO	0x70000006 /* Register usage information */
-
-/*
- * Legal values for sh_flags field of Elf32_Shdr.
- */
-#define	SHF_MIPS_GPREL		0x10000000 /* Must be part of global data area */
-
-/*
- * Entries found in sections of type SHT_MIPS_GPTAB.
- */
-typedef union {
-	struct {
-		Elf32_Word gt_current_g_value;	/* -G val used in compilation */
-		Elf32_Word gt_unused;	/* Not used */
-	} gt_header;			/* First entry in section */
-	struct {
-		Elf32_Word gt_g_value;	/* If this val were used for -G */
-		Elf32_Word gt_bytes;	/* This many bytes would be used */
-	} gt_entry;			/* Subsequent entries in section */
-} Elf32_gptab;
-typedef union {
-	struct {
-		Elf64_Word gt_current_g_value;	/* -G val used in compilation */
-		Elf64_Word gt_unused;	/* Not used */
-	} gt_header;			/* First entry in section */
-	struct {
-		Elf64_Word gt_g_value;	/* If this val were used for -G */
-		Elf64_Word gt_bytes;	/* This many bytes would be used */
-	} gt_entry;			/* Subsequent entries in section */
-} Elf64_gptab;
-
-/*
- * Entry found in sections of type SHT_MIPS_REGINFO.
- */
-typedef struct {
-	Elf32_Word	ri_gprmask;	/* General registers used */
-	Elf32_Word	ri_cprmask[4];	/* Coprocessor registers used */
-	Elf32_Sword	ri_gp_value;	/* $gp register value */
-} Elf32_RegInfo;
-typedef struct {
-	Elf64_Word	ri_gprmask;	/* General registers used */
-	Elf64_Word	ri_cprmask[4];	/* Coprocessor registers used */
-	Elf64_Sword	ri_gp_value;	/* $gp register value */
-} Elf64_RegInfo;
-
-
-/*
- * Mips relocations.
- */
-
-#define	R_MIPS_NONE	0	/* No reloc */
-#define	R_MIPS_16	1	/* Direct 16 bit */
-#define	R_MIPS_32	2	/* Direct 32 bit */
-#define	R_MIPS_REL32	3	/* PC relative 32 bit */
-#define	R_MIPS_26	4	/* Direct 26 bit shifted */
-#define	R_MIPS_HI16	5	/* High 16 bit */
-#define	R_MIPS_LO16	6	/* Low 16 bit */
-#define	R_MIPS_GPREL16	7	/* GP relative 16 bit */
-#define	R_MIPS_LITERAL	8	/* 16 bit literal entry */
-#define	R_MIPS_GOT16	9	/* 16 bit GOT entry */
-#define	R_MIPS_PC16	10	/* PC relative 16 bit */
-#define	R_MIPS_CALL16	11	/* 16 bit GOT entry for function */
-#define	R_MIPS_GPREL32	12	/* GP relative 32 bit */
-#define	R_MIPS_GOTHI16	21	/* GOT HI 16 bit */
-#define	R_MIPS_GOTLO16	22	/* GOT LO 16 bit */
-#define	R_MIPS_CALLHI16 30	/* upper 16 bit GOT entry for function */
-#define	R_MIPS_CALLLO16 31	/* lower 16 bit GOT entry for function */
-
-/*
- * These are from the 64-bit Irix ELF ABI
- */
-#define	R_MIPS_SHIFT5	16
-#define	R_MIPS_SHIFT6	17
-#define	R_MIPS_64	18
-#define	R_MIPS_GOT_DISP	19
-#define	R_MIPS_GOT_PAGE	20
-#define	R_MIPS_GOT_OFST	21
-#define	R_MIPS_GOT_HI16	22
-#define	R_MIPS_GOT_LO16	23
-#define	R_MIPS_SUB	24
-#define	R_MIPS_INSERT_A	25
-#define	R_MIPS_INSERT_B	26
-#define	R_MIPS_DELETE	27
-#define	R_MIPS_HIGHER	28
-#define	R_MIPS_HIGHEST	29
-#define	R_MIPS_SCN_DISP	32
-#define	R_MIPS_REL16	33
-#define	R_MIPS_ADD_IMMEDIATE 34
-#define	R_MIPS_PJUMP	35
-#define	R_MIPS_RELGOT	36
-#define	R_MIPS_JALR	37
-
-/* 
- * TLS relocations 
- */
-#define	R_MIPS_TLS_DTPMOD32	38	/* Module number 32 bit */
-#define	R_MIPS_TLS_DTPREL32	39	/* Module-relative offset 32 bit */
-#define	R_MIPS_TLS_DTPMOD64	40	/* Module number 64 bit */
-#define	R_MIPS_TLS_DTPREL64	41	/* Module-relative offset 64 bit */
-#define	R_MIPS_TLS_GD		42	/* 16 bit GOT offset for GD */
-#define	R_MIPS_TLS_LDM		43	/* 16 bit GOT offset for LDM */
-#define	R_MIPS_TLS_DTPREL_HI16	44	/* Module-relative offset, high 16 bits */
-#define	R_MIPS_TLS_DTPREL_LO16	45	/* Module-relative offset, low 16 bits */
-#define	R_MIPS_TLS_GOTTPREL	46	/* 16 bit GOT offset for IE */
-#define	R_MIPS_TLS_TPREL32	47	/* TP-relative offset, 32 bit */
-#define	R_MIPS_TLS_TPREL64	48	/* TP-relative offset, 64 bit */
-#define	R_MIPS_TLS_TPREL_HI16	49	/* TP-relative offset, high 16 bits */
-#define	R_MIPS_TLS_TPREL_LO16	50	/* TP-relative offset, low 16 bits */
-
-#define	R_MIPS_max	51
-#define	R_TYPE(name)		__CONCAT(R_MIPS_,name)
+#define ELF_ARCH	EM_MIPS
+#define ELF_ARCH32	EM_MIPS
 
 /* Define "machine" characteristics */
 #if __ELF_WORD_SIZE == 32
@@ -290,4 +152,137 @@ __ElfType(Auxinfo);
  */
 #define	SYMTAB_MAGIC	0x64656267
 
-#endif /* !_MACHINE_ELF_H_ */
+/* from NetBSD's sys/mips/include/elf_machdep.h $NetBSD: elf_machdep.h,v 1.18 2013/05/23 21:39:49 christos Exp $ */
+
+/* mips relocs. */
+
+#define	R_MIPS_NONE		0
+#define	R_MIPS_16		1
+#define	R_MIPS_32		2
+#define	R_MIPS_REL32		3
+#define	R_MIPS_REL		R_MIPS_REL32
+#define	R_MIPS_26		4
+#define	R_MIPS_HI16		5	/* high 16 bits of symbol value */
+#define	R_MIPS_LO16		6	/* low 16 bits of symbol value */
+#define	R_MIPS_GPREL16		7	/* GP-relative reference  */
+#define	R_MIPS_LITERAL		8	/* Reference to literal section  */
+#define	R_MIPS_GOT16		9	/* Reference to global offset table */
+#define	R_MIPS_GOT		R_MIPS_GOT16
+#define	R_MIPS_PC16		10	/* 16 bit PC relative reference */
+#define	R_MIPS_CALL16 		11	/* 16 bit call thru glbl offset tbl */
+#define	R_MIPS_CALL		R_MIPS_CALL16
+#define	R_MIPS_GPREL32		12
+
+/* 13, 14, 15 are not defined at this point. */
+#define	R_MIPS_UNUSED1		13
+#define	R_MIPS_UNUSED2		14
+#define	R_MIPS_UNUSED3		15
+
+/*
+ * The remaining relocs are apparently part of the 64-bit Irix ELF ABI.
+ */
+#define	R_MIPS_SHIFT5		16
+#define	R_MIPS_SHIFT6		17
+
+#define	R_MIPS_64		18
+#define	R_MIPS_GOT_DISP		19
+#define	R_MIPS_GOT_PAGE		20
+#define	R_MIPS_GOT_OFST		21
+#define	R_MIPS_GOT_HI16		22
+#define	R_MIPS_GOT_LO16		23
+#define	R_MIPS_SUB		24
+#define	R_MIPS_INSERT_A		25
+#define	R_MIPS_INSERT_B		26
+#define	R_MIPS_DELETE		27
+#define	R_MIPS_HIGHER		28
+#define	R_MIPS_HIGHEST		29
+#define	R_MIPS_CALL_HI16	30
+#define	R_MIPS_CALL_LO16	31
+#define	R_MIPS_SCN_DISP		32
+#define	R_MIPS_REL16		33
+#define	R_MIPS_ADD_IMMEDIATE	34
+#define	R_MIPS_PJUMP		35
+#define	R_MIPS_RELGOT		36
+#define	R_MIPS_JALR		37
+/* TLS relocations */
+
+#define	R_MIPS_TLS_DTPMOD32	38	/* Module number 32 bit */
+#define	R_MIPS_TLS_DTPREL32	39	/* Module-relative offset 32 bit */
+#define	R_MIPS_TLS_DTPMOD64	40	/* Module number 64 bit */
+#define	R_MIPS_TLS_DTPREL64	41	/* Module-relative offset 64 bit */
+#define	R_MIPS_TLS_GD		42	/* 16 bit GOT offset for GD */
+#define	R_MIPS_TLS_LDM		43	/* 16 bit GOT offset for LDM */
+#define	R_MIPS_TLS_DTPREL_HI16	44	/* Module-relative offset, high 16 bits */
+#define	R_MIPS_TLS_DTPREL_LO16	45	/* Module-relative offset, low 16 bits */
+#define	R_MIPS_TLS_GOTTPREL	46	/* 16 bit GOT offset for IE */
+#define	R_MIPS_TLS_TPREL32	47	/* TP-relative offset, 32 bit */
+#define	R_MIPS_TLS_TPREL64	48	/* TP-relative offset, 64 bit */
+#define	R_MIPS_TLS_TPREL_HI16	49	/* TP-relative offset, high 16 bits */
+#define	R_MIPS_TLS_TPREL_LO16	50	/* TP-relative offset, low 16 bits */
+
+#define	R_MIPS_max		51
+
+#define	R_TYPE(name)		__CONCAT(R_MIPS_,name)
+
+#define	R_MIPS16_min		100
+#define	R_MIPS16_26		100
+#define	R_MIPS16_GPREL		101
+#define	R_MIPS16_GOT16		102
+#define	R_MIPS16_CALL16		103
+#define	R_MIPS16_HI16		104
+#define	R_MIPS16_LO16		105
+#define	R_MIPS16_max		106
+
+#define	R_MIPS_COPY		126
+#define	R_MIPS_JUMP_SLOT	127
+
+/* mips dynamic tags */
+
+#define	DT_MIPS_RLD_VERSION	0x70000001
+#define	DT_MIPS_TIME_STAMP	0x70000002
+#define	DT_MIPS_ICHECKSUM	0x70000003
+#define	DT_MIPS_IVERSION	0x70000004
+#define	DT_MIPS_FLAGS		0x70000005
+#define	DT_MIPS_BASE_ADDRESS	0x70000006
+#define	DT_MIPS_CONFLICT	0x70000008
+#define	DT_MIPS_LIBLIST		0x70000009
+#define	DT_MIPS_CONFLICTNO	0x7000000b
+#define	DT_MIPS_LOCAL_GOTNO	0x7000000a	/* number of local got ents */
+#define	DT_MIPS_LIBLISTNO	0x70000010
+#define	DT_MIPS_SYMTABNO	0x70000011	/* number of .dynsym entries */
+#define	DT_MIPS_UNREFEXTNO	0x70000012
+#define	DT_MIPS_GOTSYM		0x70000013	/* first dynamic sym in got */
+#define	DT_MIPS_HIPAGENO	0x70000014
+#define	DT_MIPS_RLD_MAP		0x70000016	/* address of loader map */
+#define	DT_MIPS_PLTGOT		0x70000032
+#define	DT_MIPS_RWPLT		0x70000034
+
+/*
+ * ELF Flags
+ */
+#define	EF_MIPS_PIC		0x00000002	/* Contains PIC code */
+#define	EF_MIPS_CPIC		0x00000004	/* STD PIC calling sequence */
+#define	EF_MIPS_ABI2		0x00000020	/* N32 */
+
+#define	EF_MIPS_ARCH_ASE	0x0f000000	/* Architectural extensions */
+#define	EF_MIPS_ARCH_MDMX	0x08000000	/* MDMX multimedia extension */
+#define	EF_MIPS_ARCH_M16	0x04000000	/* MIPS-16 ISA extensions */
+
+#define	EF_MIPS_ARCH		0xf0000000	/* Architecture field */
+#define	EF_MIPS_ARCH_1		0x00000000	/* -mips1 code */
+#define	EF_MIPS_ARCH_2		0x10000000	/* -mips2 code */
+#define	EF_MIPS_ARCH_3		0x20000000	/* -mips3 code */
+#define	EF_MIPS_ARCH_4		0x30000000	/* -mips4 code */
+#define	EF_MIPS_ARCH_5		0x40000000	/* -mips5 code */
+#define	EF_MIPS_ARCH_32		0x50000000	/* -mips32 code */
+#define	EF_MIPS_ARCH_64		0x60000000	/* -mips64 code */
+#define	EF_MIPS_ARCH_32R2	0x70000000	/* -mips32r2 code */
+#define	EF_MIPS_ARCH_64R2	0x80000000	/* -mips64r2 code */
+
+#define	EF_MIPS_ABI		0x0000f000
+#define	EF_MIPS_ABI_O32		0x00001000
+#define	EF_MIPS_ABI_O64		0x00002000
+#define	EF_MIPS_ABI_EABI32	0x00003000
+#define	EF_MIPS_ABI_EABI64	0x00004000
+
+#endif /* __MIPS_ELF_H */

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 19:04:20 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 6A770749;
 Tue,  9 Jul 2013 19:04:20 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 5CC1D1480;
 Tue,  9 Jul 2013 19:04:20 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69J4K3K003992;
 Tue, 9 Jul 2013 19:04:20 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69J4KKP003991;
 Tue, 9 Jul 2013 19:04:20 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201307091904.r69J4KKP003991@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 9 Jul 2013 19:04:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253104 - head/lib/libc/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 19:04:20 -0000

Author: tuexen
Date: Tue Jul  9 19:04:19 2013
New Revision: 253104
URL: http://svnweb.freebsd.org/changeset/base/253104

Log:
  Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
  sctp_opt_info().
  
  MFC after: 3 days

Modified:
  head/lib/libc/net/sctp_sys_calls.c

Modified: head/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- head/lib/libc/net/sctp_sys_calls.c	Tue Jul  9 19:01:38 2013	(r253103)
+++ head/lib/libc/net/sctp_sys_calls.c	Tue Jul  9 19:04:19 2013	(r253104)
@@ -338,6 +338,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i
 	case SCTP_MAX_BURST:
 		((struct sctp_assoc_value *)arg)->assoc_id = id;
 		break;
+	case SCTP_ENABLE_STREAM_RESET:
+		((struct sctp_assoc_value *)arg)->assoc_id = id;
+		break;
 	default:
 		break;
 	}

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 19:12:47 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 9A027B54;
 Tue,  9 Jul 2013 19:12:47 +0000 (UTC)
 (envelope-from tuexen@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 8C56E1623;
 Tue,  9 Jul 2013 19:12:47 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69JClga007083;
 Tue, 9 Jul 2013 19:12:47 GMT (envelope-from tuexen@svn.freebsd.org)
Received: (from tuexen@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69JCl9r007082;
 Tue, 9 Jul 2013 19:12:47 GMT (envelope-from tuexen@svn.freebsd.org)
Message-Id: <201307091912.r69JCl9r007082@svn.freebsd.org>
From: Michael Tuexen 
Date: Tue, 9 Jul 2013 19:12:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253105 - head/lib/libc/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 19:12:47 -0000

Author: tuexen
Date: Tue Jul  9 19:12:47 2013
New Revision: 253105
URL: http://svnweb.freebsd.org/changeset/base/253105

Log:
  Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
  sctp_opt_info().
  
  MFC after: 3 days

Modified:
  head/lib/libc/net/sctp_sys_calls.c

Modified: head/lib/libc/net/sctp_sys_calls.c
==============================================================================
--- head/lib/libc/net/sctp_sys_calls.c	Tue Jul  9 19:04:19 2013	(r253104)
+++ head/lib/libc/net/sctp_sys_calls.c	Tue Jul  9 19:12:47 2013	(r253105)
@@ -274,6 +274,11 @@ sctp_opt_info(int sd, sctp_assoc_t id, i
 		errno = EINVAL;
 		return (-1);
 	}
+	if ((id == SCTP_CURRENT_ASSOC) ||
+	    (id == SCTP_ALL_ASSOC)) {
+		errno = EINVAL;
+		return (-1);
+	}
 	switch (opt) {
 	case SCTP_RTOINFO:
 		((struct sctp_rtoinfo *)arg)->srto_assoc_id = id;

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 19:36:03 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 2AD55671;
 Tue,  9 Jul 2013 19:36:03 +0000 (UTC) (envelope-from dim@FreeBSD.org)
Received: from tensor.andric.com (tensor.andric.com [87.251.56.140])
 by mx1.freebsd.org (Postfix) with ESMTP id E376517D2;
 Tue,  9 Jul 2013 19:36:02 +0000 (UTC)
Received: from spaceball.andric.com (spaceball.andric.com
 [IPv6:2001:7b8:3a7:0:204:4bff:fe01:de8a])
 (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))
 (No client certificate requested)
 by tensor.andric.com (Postfix) with ESMTPSA id 785F85C43;
 Tue,  9 Jul 2013 21:35:53 +0200 (CEST)
Message-ID: <51DC6617.2080500@FreeBSD.org>
Date: Tue, 09 Jul 2013 21:35:51 +0200
From: Dimitry Andric 
Organization: The FreeBSD Project
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
 rv:22.0) Gecko/20100101 Thunderbird/22.0
MIME-Version: 1.0
To: Andriy Gapon , src-committers@freebsd.org, 
 svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject: Re: svn commit: r253072 - head/sys/conf
References: <201307090842.r698g2CU017760@svn.freebsd.org>
In-Reply-To: <201307090842.r698g2CU017760@svn.freebsd.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 19:36:03 -0000

On 2013-07-09 10:42, Andriy Gapon wrote:
> Author: avg
> Date: Tue Jul  9 08:42:02 2013
> New Revision: 253072
> URL: http://svnweb.freebsd.org/changeset/base/253072
>
> Log:
>    amd64: use -mno-omit-leaf-frame-pointer in addition to -fno-omit-frame-pointer
>
>    ... in kernel builds.  This is to make behavior of clang consistent with
>    behavior of gcc.
>
>    MFC after:	2 weeks

Thanks.  This would be really nice to have in 9.2 too. :-)

-Dimitry


From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 20:49:34 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 12AC3DD2;
 Tue,  9 Jul 2013 20:49:34 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E87B81BA3;
 Tue,  9 Jul 2013 20:49:33 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69KnXKd034830;
 Tue, 9 Jul 2013 20:49:33 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69KnWuA034821;
 Tue, 9 Jul 2013 20:49:32 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307092049.r69KnWuA034821@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 9 Jul 2013 20:49:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253106 - in head/sys: geom/journal kern sys ufs/ffs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 20:49:34 -0000

Author: kib
Date: Tue Jul  9 20:49:32 2013
New Revision: 253106
URL: http://svnweb.freebsd.org/changeset/base/253106

Log:
  There are several code sequences like
        vfs_busy(mp);
        vfs_write_suspend(mp);
  which are problematic if other thread starts unmount between two
  calls.  The unmount starts a write, while vfs_write_suspend() drain
  writers.  On the other hand, unmount drains busy references, causing
  the deadlock.
  
  Add a flag argument to vfs_write_suspend and require the callers of it
  to specify VS_SKIP_UNMOUNT flag, when the call is performed not in the
  mount path, i.e. the covered vnode is not locked.  The suspension is
  not attempted if VS_SKIP_UNMOUNT is specified and unmount is in
  progress.
  
  Reported and tested by:	Andreas Longwitz 
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 weeks

Modified:
  head/sys/geom/journal/g_journal.c
  head/sys/kern/vfs_vnops.c
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_snapshot.c
  head/sys/ufs/ffs/ffs_suspend.c
  head/sys/ufs/ffs/ffs_vfsops.c

Modified: head/sys/geom/journal/g_journal.c
==============================================================================
--- head/sys/geom/journal/g_journal.c	Tue Jul  9 19:12:47 2013	(r253105)
+++ head/sys/geom/journal/g_journal.c	Tue Jul  9 20:49:32 2013	(r253106)
@@ -2960,7 +2960,7 @@ g_journal_do_switch(struct g_class *clas
 		GJ_TIMER_STOP(1, &bt, "BIO_FLUSH time of %s", sc->sc_name);
 
 		GJ_TIMER_START(1, &bt);
-		error = vfs_write_suspend(mp);
+		error = vfs_write_suspend(mp, VS_SKIP_UNMOUNT);
 		GJ_TIMER_STOP(1, &bt, "Suspend time of %s", mountpoint);
 		if (error != 0) {
 			GJ_DEBUG(0, "Cannot suspend file system %s (error=%d).",

Modified: head/sys/kern/vfs_vnops.c
==============================================================================
--- head/sys/kern/vfs_vnops.c	Tue Jul  9 19:12:47 2013	(r253105)
+++ head/sys/kern/vfs_vnops.c	Tue Jul  9 20:49:32 2013	(r253106)
@@ -1668,8 +1668,7 @@ vn_finished_secondary_write(mp)
  * Request a filesystem to suspend write operations.
  */
 int
-vfs_write_suspend(mp)
-	struct mount *mp;
+vfs_write_suspend(struct mount *mp, int flags)
 {
 	int error;
 
@@ -1680,6 +1679,21 @@ vfs_write_suspend(mp)
 	}
 	while (mp->mnt_kern_flag & MNTK_SUSPEND)
 		msleep(&mp->mnt_flag, MNT_MTX(mp), PUSER - 1, "wsuspfs", 0);
+
+	/*
+	 * Unmount holds a write reference on the mount point.  If we
+	 * own busy reference and drain for writers, we deadlock with
+	 * the reference draining in the unmount path.  Callers of
+	 * vfs_write_suspend() must specify VS_SKIP_UNMOUNT if
+	 * vfs_busy() reference is owned and caller is not in the
+	 * unmount context.
+	 */
+	if ((flags & VS_SKIP_UNMOUNT) != 0 &&
+	    (mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) {
+		MNT_IUNLOCK(mp);
+		return (EBUSY);
+	}
+
 	mp->mnt_kern_flag |= MNTK_SUSPEND;
 	mp->mnt_susp_owner = curthread;
 	if (mp->mnt_writeopcount > 0)

Modified: head/sys/sys/vnode.h
==============================================================================
--- head/sys/sys/vnode.h	Tue Jul  9 19:12:47 2013	(r253105)
+++ head/sys/sys/vnode.h	Tue Jul  9 20:49:32 2013	(r253106)
@@ -398,6 +398,9 @@ extern int		vttoif_tab[];
 #define	VR_START_WRITE	0x0001	/* vfs_write_resume: start write atomically */
 #define	VR_NO_SUSPCLR	0x0002	/* vfs_write_resume: do not clear suspension */
 
+#define	VS_SKIP_UNMOUNT	0x0001	/* vfs_write_suspend: fail if the
+				   filesystem is being unmounted */
+
 #define	VREF(vp)	vref(vp)
 
 #ifdef DIAGNOSTIC
@@ -711,7 +714,7 @@ int	vn_io_fault_pgmove(vm_page_t ma[], v
 int	vfs_cache_lookup(struct vop_lookup_args *ap);
 void	vfs_timestamp(struct timespec *);
 void	vfs_write_resume(struct mount *mp, int flags);
-int	vfs_write_suspend(struct mount *mp);
+int	vfs_write_suspend(struct mount *mp, int flags);
 int	vop_stdbmap(struct vop_bmap_args *);
 int	vop_stdfsync(struct vop_fsync_args *);
 int	vop_stdgetwritemount(struct vop_getwritemount_args *);

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Tue Jul  9 19:12:47 2013	(r253105)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Tue Jul  9 20:49:32 2013	(r253106)
@@ -423,7 +423,7 @@ restart:
 	 */
 	for (;;) {
 		vn_finished_write(wrtmp);
-		if ((error = vfs_write_suspend(vp->v_mount)) != 0) {
+		if ((error = vfs_write_suspend(vp->v_mount, 0)) != 0) {
 			vn_start_write(NULL, &wrtmp, V_WAIT);
 			vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 			goto out;

Modified: head/sys/ufs/ffs/ffs_suspend.c
==============================================================================
--- head/sys/ufs/ffs/ffs_suspend.c	Tue Jul  9 19:12:47 2013	(r253105)
+++ head/sys/ufs/ffs/ffs_suspend.c	Tue Jul  9 20:49:32 2013	(r253106)
@@ -206,7 +206,7 @@ ffs_susp_suspend(struct mount *mp)
 		return (EPERM);
 #endif
 
-	if ((error = vfs_write_suspend(mp)) != 0)
+	if ((error = vfs_write_suspend(mp, VS_SKIP_UNMOUNT)) != 0)
 		return (error);
 
 	ump->um_writesuspended = 1;

Modified: head/sys/ufs/ffs/ffs_vfsops.c
==============================================================================
--- head/sys/ufs/ffs/ffs_vfsops.c	Tue Jul  9 19:12:47 2013	(r253105)
+++ head/sys/ufs/ffs/ffs_vfsops.c	Tue Jul  9 20:49:32 2013	(r253106)
@@ -257,7 +257,7 @@ ffs_mount(struct mount *mp)
 				return (error);
 			for (;;) {
 				vn_finished_write(mp);
-				if ((error = vfs_write_suspend(mp)) != 0)
+				if ((error = vfs_write_suspend(mp, 0)) != 0)
 					return (error);
 				MNT_ILOCK(mp);
 				if (mp->mnt_kern_flag & MNTK_SUSPENDED) {
@@ -1255,7 +1255,7 @@ ffs_unmount(mp, mntflags)
 		 */
 		for (;;) {
 			vn_finished_write(mp);
-			if ((error = vfs_write_suspend(mp)) != 0)
+			if ((error = vfs_write_suspend(mp, 0)) != 0)
 				return (error);
 			MNT_ILOCK(mp);
 			if (mp->mnt_kern_flag & MNTK_SUSPENDED) {

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:02:46 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 1F297425;
 Tue,  9 Jul 2013 21:02:46 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 118F81C50;
 Tue,  9 Jul 2013 21:02:46 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69L2jqW040628;
 Tue, 9 Jul 2013 21:02:45 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69L2jEu040627;
 Tue, 9 Jul 2013 21:02:45 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092102.r69L2jEu040627@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:02:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253107 - head/sys/dev/nvme
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:02:46 -0000

Author: jimharris
Date: Tue Jul  9 21:02:45 2013
New Revision: 253107
URL: http://svnweb.freebsd.org/changeset/base/253107

Log:
  Add pci_enable_busmaster() and pci_disable_busmaster() calls in
  nvme_attach() and nvme_detach() respectively.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sys/dev/nvme/nvme.c

Modified: head/sys/dev/nvme/nvme.c
==============================================================================
--- head/sys/dev/nvme/nvme.c	Tue Jul  9 20:49:32 2013	(r253106)
+++ head/sys/dev/nvme/nvme.c	Tue Jul  9 21:02:45 2013	(r253107)
@@ -255,6 +255,8 @@ nvme_attach(device_t dev)
 
 	nvme_sysctl_initialize_ctrlr(ctrlr);
 
+	pci_enable_busmaster(dev);
+
 	ctrlr->config_hook.ich_func = nvme_ctrlr_start_config_hook;
 	ctrlr->config_hook.ich_arg = ctrlr;
 
@@ -269,6 +271,7 @@ nvme_detach (device_t dev)
 	struct nvme_controller	*ctrlr = DEVICE2SOFTC(dev);
 
 	nvme_ctrlr_destruct(ctrlr, dev);
+	pci_disable_busmaster(dev);
 	return (0);
 }
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:03:40 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 57845670;
 Tue,  9 Jul 2013 21:03:40 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4A3C51C6B;
 Tue,  9 Jul 2013 21:03:40 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69L3ecr040814;
 Tue, 9 Jul 2013 21:03:40 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69L3emA040813;
 Tue, 9 Jul 2013 21:03:40 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092103.r69L3emA040813@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:03:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253108 - head/sys/dev/nvme
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:03:40 -0000

Author: jimharris
Date: Tue Jul  9 21:03:39 2013
New Revision: 253108
URL: http://svnweb.freebsd.org/changeset/base/253108

Log:
  Do not retry failed async event requests.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sys/dev/nvme/nvme_ctrlr.c

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr.c	Tue Jul  9 21:02:45 2013	(r253107)
+++ head/sys/dev/nvme/nvme_ctrlr.c	Tue Jul  9 21:03:39 2013	(r253108)
@@ -649,12 +649,12 @@ nvme_ctrlr_async_event_cb(void *arg, con
 {
 	struct nvme_async_event_request	*aer = arg;
 
-	if (cpl->status.sc == NVME_SC_ABORTED_SQ_DELETION) {
+	if (nvme_completion_is_error(cpl)) {
 		/*
-		 *  This is simulated when controller is being shut down, to
-		 *  effectively abort outstanding asynchronous event requests
-		 *  and make sure all memory is freed.  Do not repost the
-		 *  request in this case.
+		 *  Do not retry failed async event requests.  This avoids
+		 *  infinite loops where a new async event request is submitted
+		 *  to replace the one just failed, only to fail again and
+		 *  perpetuate the loop.
 		 */
 		return;
 	}

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:14:17 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 6A08FDF3;
 Tue,  9 Jul 2013 21:14:17 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4AD161D04;
 Tue,  9 Jul 2013 21:14:17 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LEHSP044456;
 Tue, 9 Jul 2013 21:14:17 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LEGhr044445;
 Tue, 9 Jul 2013 21:14:16 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092114.r69LEGhr044445@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:14:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253109 - head/sbin/nvmecontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:14:17 -0000

Author: jimharris
Date: Tue Jul  9 21:14:15 2013
New Revision: 253109
URL: http://svnweb.freebsd.org/changeset/base/253109

Log:
  Incorporate feedback from bde@ based on r252672 changes:
  
  * Use 0/1 instead of sysexits.  Man pages are confusing on this topic,
    but 0/1 is sufficient for nvmecontrol.
  * Use err function family where possible instead of fprintf/exit.
  * Fix some typing errors.
  * Clean up some error message inconsistencies.
  
  Sponsored by:	Intel
  Submitted by:	bde (parts of firmware.c changes)
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/devlist.c
  head/sbin/nvmecontrol/firmware.c
  head/sbin/nvmecontrol/identify.c
  head/sbin/nvmecontrol/logpage.c
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/perftest.c
  head/sbin/nvmecontrol/reset.c

Modified: head/sbin/nvmecontrol/devlist.c
==============================================================================
--- head/sbin/nvmecontrol/devlist.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/devlist.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -29,13 +29,12 @@ __FBSDID("$FreeBSD$");
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -45,7 +44,7 @@ devlist_usage(void)
 {
 	fprintf(stderr, "usage:\n");
 	fprintf(stderr, DEVLIST_USAGE);
-	exit(EX_USAGE);
+	exit(1);
 }
 
 static inline uint32_t
@@ -62,9 +61,7 @@ devlist(int argc, char *argv[])
 	struct nvme_namespace_data	nsdata;
 	char				name[64];
 	uint32_t			i;
-	int				ch, ctrlr, exit_code, fd, found;
-
-	exit_code = EX_OK;
+	int				ch, ctrlr, fd, found, ret;
 
 	while ((ch = getopt(argc, argv, "")) != -1) {
 		switch ((char)ch) {
@@ -80,14 +77,14 @@ devlist(int argc, char *argv[])
 		ctrlr++;
 		sprintf(name, "%s%d", NVME_CTRLR_PREFIX, ctrlr);
 
-		exit_code = open_dev(name, &fd, 0, 0);
+		ret = open_dev(name, &fd, 0, 0);
 
-		if (exit_code == EX_NOINPUT)
-			break;
-		else if (exit_code == EX_NOPERM) {
-			printf("Could not open /dev/%s, errno = %d (%s)\n",
-			    name, errno, strerror(errno));
-			continue;
+		if (ret != 0) {
+			if (fd < 0) {
+				warnx("could not open /dev/%s\n", name);
+				continue;
+			} else
+				break;
 		}
 
 		found++;
@@ -111,5 +108,5 @@ devlist(int argc, char *argv[])
 	if (found == 0)
 		printf("No NVMe controllers found.\n");
 
-	exit(EX_OK);
+	exit(1);
 }

Modified: head/sbin/nvmecontrol/firmware.c
==============================================================================
--- head/sbin/nvmecontrol/firmware.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/firmware.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -36,14 +36,14 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-#include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -64,60 +64,58 @@ slot_has_valid_firmware(int fd, int slot
 }
 
 static void
-read_image_file(char *path, void **buf, ssize_t *size)
+read_image_file(char *path, void **buf, int32_t *size)
 {
 	struct stat	sb;
+	int32_t		filesize;
 	int		fd;
 
 	*size = 0;
 	*buf = NULL;
 
-	if ((fd = open(path, O_RDONLY)) < 0) {
-		fprintf(stderr, "Unable to open '%s'.\n", path);
-		exit(EX_IOERR);
-	}
-	if (fstat(fd, &sb) < 0) {
-		fprintf(stderr, "Unable to stat '%s'.\n", path);
-		close(fd);
-		exit(EX_IOERR);
-	}
-	if ((*buf = malloc(sb.st_size)) == NULL) {
-		fprintf(stderr, "Unable to malloc %jd bytes.\n",
-		    sb.st_size);
-		close(fd);
-		exit(EX_IOERR);
-	}
-	if ((*size = read(fd, *buf, sb.st_size)) < 0) {
-		fprintf(stderr, "Error reading '%s', errno=%d (%s)\n",
-		    path, errno, strerror(errno));
-		close(fd);
-		exit(EX_IOERR);
-	}
-	if (*size != sb.st_size) {
-		fprintf(stderr, "Error reading '%s', "
-		    "read %zd bytes, requested %jd bytes\n",
-		    path, *size, sb.st_size);
-		close(fd);
-		exit(EX_IOERR);
-	}
+	if ((fd = open(path, O_RDONLY)) < 0)
+		err(1, "unable to open '%s'", path);
+	if (fstat(fd, &sb) < 0)
+		err(1, "unable to stat '%s'", path);
+
+	/*
+	 * The NVMe spec does not explicitly state a maximum firmware image
+	 *  size, although one can be inferred from the dword size limitation
+	 *  for the size and offset fields in the Firmware Image Download
+	 *  command.
+	 *
+	 * Technically, the max is UINT32_MAX * sizeof(uint32_t), since the
+	 *  size and offsets are specified in terms of dwords (not bytes), but
+	 *  realistically INT32_MAX is sufficient here and simplifies matters
+	 *  a bit.
+	 */
+	if (sb.st_size > INT32_MAX)
+		errx(1, "size of file '%s' is too large (%jd bytes)",
+		    path, (intmax_t)sb.st_size);
+	filesize = (int32_t)sb.st_size;
+	if ((*buf = malloc(filesize)) == NULL)
+		errx(1, "unable to malloc %zd bytes", filesize);
+	if ((*size = read(fd, *buf, filesize)) < 0)
+		err(1, "error reading '%s'", path);
+	/* XXX assuming no short reads */
+	if (*size != filesize)
+		errx(1,
+		    "error reading '%s' (read %d bytes, requested %d bytes)",
+		    path, *size, filesize);
 }
 
 static void
-update_firmware(int fd, uint8_t *payload, uint32_t payload_size)
+update_firmware(int fd, uint8_t *payload, int32_t payload_size)
 {
 	struct nvme_pt_command	pt;
-	size_t			size;
+	int32_t			off, resid, size;
 	void			*chunk;
-	uint32_t		off, resid;
-	int			exit_code = EX_OK;
 
 	off = 0;
 	resid = payload_size;
 
-	if ((chunk = malloc((size_t)NVME_MAX_XFER_SIZE)) == NULL) {
-		printf("Unable to malloc %d bytes.\n", NVME_MAX_XFER_SIZE);
-		exit(EX_IOERR);
-	}
+	if ((chunk = malloc(NVME_MAX_XFER_SIZE)) == NULL)
+		errx(1, "unable to malloc %d bytes", NVME_MAX_XFER_SIZE);
 
 	while (resid > 0) {
 		size = (resid >= NVME_MAX_XFER_SIZE) ?
@@ -132,26 +130,15 @@ update_firmware(int fd, uint8_t *payload
 		pt.len = size;
 		pt.is_read = 0;
 
-		if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) {
-			printf("Firmware image download request failed. "
-			    "errno=%d (%s)\n",
-			    errno, strerror(errno));
-			exit_code = EX_IOERR;
-			break;
-		}
+		if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
+			err(1, "firmware download request failed");
 
-		if (nvme_completion_is_error(&pt.cpl)) {
-			printf("Passthrough command returned error.\n");
-			exit_code = EX_IOERR;
-			break;
-		}
+		if (nvme_completion_is_error(&pt.cpl))
+			errx(1, "firmware download request returned error");
 
 		resid -= size;
 		off += size;
 	}
-	
-	if (exit_code != EX_OK)
-		exit(exit_code);
 }
 
 static void
@@ -164,16 +151,11 @@ activate_firmware(int fd, int slot, int 
 	pt.cmd.cdw10 = (activate_action << 3) | slot;
 	pt.is_read = 0;
 
-	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) {
-		printf("Firmware activate request failed. errno=%d (%s)\n",
-		    errno, strerror(errno));
-		exit(EX_IOERR);
-	}
+	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
+		err(1, "firmware activate request failed");
 
-	if (nvme_completion_is_error(&pt.cpl)) {
-		printf("Passthrough command returned error.\n");
-		exit(EX_IOERR);
-	}
+	if (nvme_completion_is_error(&pt.cpl))
+		errx(1, "firmware activate request returned error");
 }
 
 static void
@@ -181,7 +163,7 @@ firmware_usage(void)
 {
 	fprintf(stderr, "usage:\n");
 	fprintf(stderr, FIRMWARE_USAGE);
-	exit(EX_USAGE);
+	exit(1);
 }
 
 void
@@ -192,7 +174,7 @@ firmware(int argc, char *argv[])
 	char				ch, *p, *image = NULL;
 	char				*controller = NULL, prompt[64];
 	void				*buf = NULL;
-	ssize_t				size;
+	int32_t				size = 0;
 	struct nvme_controller_data	cdata;
 
 	a_flag = s_flag = f_flag = false;
@@ -252,34 +234,24 @@ firmware(int argc, char *argv[])
 	open_dev(controller, &fd, 1, 1);
 	read_controller_data(fd, &cdata);
 
-	if (cdata.oacs.firmware == 0) {
-		fprintf(stderr, 
-		    "Controller does not support firmware "
-		    "activate/download.\n");
-		exit(EX_IOERR);
-	}
-
-	if (f_flag && slot == 1 && cdata.frmw.slot1_ro) {
-		fprintf(stderr, "Slot %d is marked as read only.\n", slot);
-		exit(EX_IOERR);
-	}
-
-	if (slot > cdata.frmw.num_slots) {
-		fprintf(stderr,
-		    "Slot %d was specified but controller only "
-		    "supports %d firmware slots.\n",
+	if (cdata.oacs.firmware == 0)
+		errx(1,
+		    "controller does not support firmware activate/download");
+
+	if (f_flag && slot == 1 && cdata.frmw.slot1_ro)
+		errx(1, "slot %d is marked as read only", slot);
+
+	if (slot > cdata.frmw.num_slots)
+		errx(1,
+		    "slot %d specified but controller only supports %d slots",
 		    slot, cdata.frmw.num_slots);
-		exit(EX_IOERR);
-	}
 
-	if (!slot_has_valid_firmware(fd, slot)) {
-		fprintf(stderr,
-		    "Slot %d does not contain valid firmware.\n"
-		    "Try 'nvmecontrol logpage -p 3 %s' to get a list "
-		    "of available firmware images.\n",
+	if (!slot_has_valid_firmware(fd, slot))
+		errx(1,
+		    "slot %d does not contain valid firmware,\n"
+		    "try 'nvmecontrol logpage -p 3 %s' to get a list "
+		    "of available images\n",
 		    slot, controller);
-		exit(EX_IOERR);
-	}
 
 	if (f_flag && a_flag)
 		printf("You are about to download and activate "
@@ -305,7 +277,7 @@ firmware(int argc, char *argv[])
 		if (strncasecmp(prompt, "yes", 3) == 0)
 			break;
 		if (strncasecmp(prompt, "no", 2) == 0)
-			exit(EX_OK);
+			exit(1);
 		printf("Please answer \"yes\" or \"no\". ");
 	}
 
@@ -331,5 +303,5 @@ firmware(int argc, char *argv[])
 	}
 
 	close(fd);
-	exit(EX_OK);
+	exit(0);
 }

Modified: head/sbin/nvmecontrol/identify.c
==============================================================================
--- head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -30,13 +30,13 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -139,7 +139,7 @@ identify_usage(void)
 {
 	fprintf(stderr, "usage:\n");
 	fprintf(stderr, IDENTIFY_USAGE);
-	exit(EX_USAGE);
+	exit(1);
 }
 
 static void
@@ -177,16 +177,16 @@ identify_ctrlr(int argc, char *argv[])
 			hexlength = offsetof(struct nvme_controller_data,
 			    reserved5);
 		print_hex(&cdata, hexlength);
-		exit(EX_OK);
+		exit(0);
 	}
 
 	if (verboseflag == 1) {
-		printf("-v not currently supported without -x.\n");
+		fprintf(stderr, "-v not currently supported without -x\n");
 		identify_usage();
 	}
 
 	print_controller(&cdata);
-	exit(EX_OK);
+	exit(0);
 }
 
 static void
@@ -231,10 +231,8 @@ identify_ns(int argc, char *argv[])
 	nsloc = strnstr(argv[optind], NVME_NS_PREFIX, 10);
 	if (nsloc != NULL)
 		nsid = strtol(nsloc + 2, NULL, 10);
-	if (nsloc == NULL || (nsid == 0 && errno != 0)) {
-		printf("Invalid namespace ID %s.\n", argv[optind]);
-		exit(EX_IOERR);
-	}
+	if (nsloc == NULL || (nsid == 0 && errno != 0))
+		errx(1, "invalid namespace ID '%s'", argv[optind]);
 
 	/*
 	 * We send IDENTIFY commands to the controller, not the namespace,
@@ -253,16 +251,16 @@ identify_ns(int argc, char *argv[])
 			hexlength = offsetof(struct nvme_namespace_data,
 			    reserved6);
 		print_hex(&nsdata, hexlength);
-		exit(EX_OK);
+		exit(0);
 	}
 
 	if (verboseflag == 1) {
-		printf("-v not currently supported without -x.\n");
+		fprintf(stderr, "-v not currently supported without -x\n");
 		identify_usage();
 	}
 
 	print_namespace(&nsdata);
-	exit(EX_OK);
+	exit(0);
 }
 
 void

Modified: head/sbin/nvmecontrol/logpage.c
==============================================================================
--- head/sbin/nvmecontrol/logpage.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/logpage.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -41,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -52,14 +52,13 @@ __FBSDID("$FreeBSD$");
 typedef void (*print_fn_t)(void *buf, uint32_t size);
 
 static void *
-get_log_buffer(size_t size)
+get_log_buffer(uint32_t size)
 {
 	void	*buf;
 
-	if ((buf = malloc(size)) == NULL) {
-		fprintf(stderr, "Unable to malloc %zd bytes\n", size);
-		exit(EX_IOERR);
-	}
+	if ((buf = malloc(size)) == NULL)
+		errx(1, "unable to malloc %u bytes", size);
+
 	memset(buf, 0, size);
 	return (buf);
 }
@@ -79,16 +78,11 @@ read_logpage(int fd, uint8_t log_page, i
 	pt.len = payload_size;
 	pt.is_read = 1;
 
-	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) {
-		printf("Get log page request failed. errno=%d (%s)\n",
-		    errno, strerror(errno));
-		exit(EX_IOERR);
-	}
+	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
+		err(1, "get log page request failed");
 
-	if (nvme_completion_is_error(&pt.cpl)) {
-		printf("Passthrough command returned error.\n");
-		exit(EX_IOERR);
-	}
+	if (nvme_completion_is_error(&pt.cpl))
+		errx(1, "get log page request returned error");
 }
 
 static void
@@ -242,7 +236,7 @@ logpage_usage(void)
 {
 	fprintf(stderr, "usage:\n");
 	fprintf(stderr, LOGPAGE_USAGE);
-	exit(EX_USAGE);
+	exit(1);
 }
 
 void
@@ -254,7 +248,7 @@ logpage(int argc, char *argv[])
 	int				allow_ns = false;
 	char				ch, *p, *nsloc = NULL;
 	char				*cname = NULL;
-	size_t				size;
+	uint32_t			size;
 	void				*buf;
 	struct logpage_function		*f;
 	struct nvme_controller_data	cdata;
@@ -313,28 +307,20 @@ logpage(int argc, char *argv[])
 	/* If a namespace id was specified, validate it's use */
 	if (strstr(argv[optind], NVME_NS_PREFIX) != NULL) {
 		if (!allow_ns) {
-			if (log_page != NVME_LOG_HEALTH_INFORMATION) {
-				fprintf(stderr,
-				    "Namespace ID not valid for log page %d.\n",
+			if (log_page != NVME_LOG_HEALTH_INFORMATION)
+				errx(1,
+				    "log page %d valid only at controller level",
 				    log_page);
-			} else if (cdata.lpa.ns_smart == 0) {
-				fprintf(stderr,
-				    "Controller does not support per "
-				    "namespace SMART/Health information.\n");
-			}
-			close(fd);
-			exit(EX_IOERR);
+			else if (cdata.lpa.ns_smart == 0)
+				errx(1,
+				    "controller does not support per "
+				    "namespace smart/health information");
 		}
 		nsloc = strnstr(argv[optind], NVME_NS_PREFIX, 10);
 		if (nsloc != NULL)
 			nsid = strtol(nsloc + 2, NULL, 10);
-		if (nsloc == NULL || (nsid == 0 && errno != 0)) {
-			fprintf(stderr,
-			    "Invalid namespace ID %s.\n",
-			    argv[optind]);
-			close(fd);
-			exit(EX_IOERR);
-		}
+		if (nsloc == NULL || (nsid == 0 && errno != 0))
+			errx(1, "invalid namespace id '%s'", argv[optind]);
 
 		/*
 		 * User is asking for per namespace log page information
@@ -384,5 +370,5 @@ logpage(int argc, char *argv[])
 	print_fn(buf, size);
 
 	close(fd);
-	exit(EX_OK);
+	exit(0);
 }

Modified: head/sbin/nvmecontrol/nvmecontrol.c
==============================================================================
--- head/sbin/nvmecontrol/nvmecontrol.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/nvmecontrol.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -32,14 +32,13 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -71,7 +70,7 @@ usage(void)
 		fprintf(stderr, "%s", f->usage);
 		f++;
 	}
-	exit(EX_USAGE);
+	exit(1);
 }
 
 static void
@@ -134,16 +133,11 @@ read_controller_data(int fd, struct nvme
 	pt.len = sizeof(*cdata);
 	pt.is_read = 1;
 
-	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) {
-		printf("Identify request failed. errno=%d (%s)\n",
-		    errno, strerror(errno));
-		exit(EX_IOERR);
-	}
+	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
+		err(1, "identify request failed");
 
-	if (nvme_completion_is_error(&pt.cpl)) {
-		printf("Passthrough command returned error.\n");
-		exit(EX_IOERR);
-	}
+	if (nvme_completion_is_error(&pt.cpl))
+		errx(1, "identify request returned error");
 }
 
 void
@@ -158,16 +152,11 @@ read_namespace_data(int fd, int nsid, st
 	pt.len = sizeof(*nsdata);
 	pt.is_read = 1;
 
-	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0) {
-		printf("Identify request failed. errno=%d (%s)\n",
-		    errno, strerror(errno));
-		exit(EX_IOERR);
-	}
+	if (ioctl(fd, NVME_PASSTHROUGH_CMD, &pt) < 0)
+		err(1, "identify request failed");
 
-	if (nvme_completion_is_error(&pt.cpl)) {
-		printf("Passthrough command returned error.\n");
-		exit(EX_IOERR);
-	}
+	if (nvme_completion_is_error(&pt.cpl))
+		errx(1, "identify request returned error");
 }
 
 int
@@ -178,38 +167,35 @@ open_dev(const char *str, int *fd, int s
 
 	if (!strnstr(str, NVME_CTRLR_PREFIX, strlen(NVME_CTRLR_PREFIX))) {
 		if (show_error)
-			fprintf(stderr,
-			    "Controller/namespace IDs must begin with '%s'.\n",
+			warnx("controller/namespace ids must begin with '%s'",
 			    NVME_CTRLR_PREFIX);
 		if (exit_on_error)
-			exit(EX_USAGE);
+			exit(1);
 		else
-			return (EX_USAGE);
+			return (1);
 	}
 
 	snprintf(full_path, sizeof(full_path), "/dev/%s", str);
 	if (stat(full_path, &devstat) != 0) {
 		if (show_error)
-			fprintf(stderr, "Could not stat %s. errno=%d (%s)\n",
-			    full_path, errno, strerror(errno));
+			warn("could not stat %s", full_path);
 		if (exit_on_error)
-			exit(EX_NOINPUT);
+			exit(1);
 		else
-			return (EX_NOINPUT);
+			return (1);
 	}
 
 	*fd = open(full_path, O_RDWR);
 	if (*fd < 0) {
 		if (show_error)
-			fprintf(stderr, "Could not open %s. errno=%d (%s)\n",
-			    full_path, errno, strerror(errno));
+			warn("could not open %s", full_path);
 		if (exit_on_error)
-			exit(EX_NOPERM);
+			exit(1);
 		else
-			return (EX_NOPERM);
+			return (1);
 	}
 
-	return (EX_OK);
+	return (0);
 }
 
 int

Modified: head/sbin/nvmecontrol/perftest.c
==============================================================================
--- head/sbin/nvmecontrol/perftest.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/perftest.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -31,14 +31,13 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -72,7 +71,7 @@ perftest_usage(void)
 {
 	fprintf(stderr, "usage:\n");
 	fprintf(stderr, PERFTEST_USAGE);
-	exit(EX_USAGE);
+	exit(1);
 }
 
 void
@@ -168,14 +167,10 @@ perftest(int argc, char *argv[])
 		perftest_usage();
 
 	open_dev(argv[optind], &fd, 1, 1);
-	if (ioctl(fd, ioctl_cmd, &io_test) < 0) {
-		fprintf(stderr, "NVME_IO_TEST failed. errno=%d (%s)\n", errno,
-		    strerror(errno));
-		close(fd);
-		exit(EX_IOERR);
-	}
+	if (ioctl(fd, ioctl_cmd, &io_test) < 0)
+		err(1, "ioctl NVME_IO_TEST failed");
 
 	close(fd);
 	print_perftest(&io_test, perthread);
-	exit(EX_OK);
+	exit(0);
 }

Modified: head/sbin/nvmecontrol/reset.c
==============================================================================
--- head/sbin/nvmecontrol/reset.c	Tue Jul  9 21:03:39 2013	(r253108)
+++ head/sbin/nvmecontrol/reset.c	Tue Jul  9 21:14:15 2013	(r253109)
@@ -30,12 +30,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include "nvmecontrol.h"
@@ -45,7 +44,7 @@ reset_usage(void)
 {
 	fprintf(stderr, "usage:\n");
 	fprintf(stderr, RESET_USAGE);
-	exit(EX_USAGE);
+	exit(1);
 }
 
 void
@@ -65,11 +64,8 @@ reset(int argc, char *argv[])
 		reset_usage();
 
 	open_dev(argv[optind], &fd, 1, 1);
-	if (ioctl(fd, NVME_RESET_CONTROLLER) < 0) {
-		printf("Reset request to %s failed. errno=%d (%s)\n",
-		    argv[optind], errno, strerror(errno));
-		exit(EX_IOERR);
-	}
+	if (ioctl(fd, NVME_RESET_CONTROLLER) < 0)
+		err(1, "reset request to %s failed", argv[optind]);
 
-	exit(EX_OK);
+	exit(0);
 }

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:18:13 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 2307D17F;
 Tue,  9 Jul 2013 21:18:13 +0000 (UTC)
 (envelope-from jim.harris@gmail.com)
Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com
 [IPv6:2a00:1450:4013:c01::22a])
 by mx1.freebsd.org (Postfix) with ESMTP id 36F8B1D36;
 Tue,  9 Jul 2013 21:18:12 +0000 (UTC)
Received: by mail-ea0-f170.google.com with SMTP id h10so4190281eaj.15
 for ; Tue, 09 Jul 2013 14:18:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=8I4CDdXGRzRZ3kAqglWKD2pJHYtbvzYYW/lYpYRHgSQ=;
 b=WrmUqhBONnWT5YUjP4XMkDO1QbvHeb1JBJ/c9d5Pz6qRYMf/fKAPC2DGfxNmO93NQ4
 KAM+7pHPoNCMJfiy/2hderWp9f7OR3abJb2vekZnpnVQb3TPOPkLQpPcD9xnaMB+HN5Y
 YCxiuFALZlQd4yD9NpeKQ41VEu6IiXJzXmNQV+mNLqznhoDu91qP2KUIJX1QKqBGHQ8g
 vq2qhDUrk1YGX/Ynpzy3hlilfYoKv6eXUh58Besw954cFNXk+ZDRAoXT/cxb6LtLYbF0
 MIkoY5DgsEFLE/NzmXkLGSRhSTcP7NQG2YQRRyi9xy3VnGtCJVwkyJKps2R3JFJfFYZg
 y+dA==
MIME-Version: 1.0
X-Received: by 10.14.204.137 with SMTP id h9mr32926383eeo.13.1373404691235;
 Tue, 09 Jul 2013 14:18:11 -0700 (PDT)
Received: by 10.15.25.7 with HTTP; Tue, 9 Jul 2013 14:18:11 -0700 (PDT)
In-Reply-To: <20130707114237.L897@besplex.bde.org>
References: <201307040026.r640QOCd079203@svn.freebsd.org>
 <20130704105843.B982@besplex.bde.org>
 <20130706184249.GD25842@garage.freebsd.pl>
 <20130706195108.GA34684@stack.nl>
 <20130707114237.L897@besplex.bde.org>
Date: Tue, 9 Jul 2013 14:18:11 -0700
Message-ID: 
Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol
From: Jim Harris 
To: Bruce Evans 
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org, Pawel Jakub Dawidek ,
 Jilles Tjoelker 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:18:13 -0000

On Sat, Jul 6, 2013 at 7:26 PM, Bruce Evans  wrote:

> On Sat, 6 Jul 2013, Jilles Tjoelker wrote:
>
>  On Sat, Jul 06, 2013 at 08:42:49PM +0200, Pawel Jakub Dawidek wrote:
>>
>>> On Thu, Jul 04, 2013 at 11:44:28AM +1000, Bruce Evans wrote:
>>>
>>>> Many style bugs are visible in this patch:
>>>>
>>> [...]
>>>
>>>> - sysexits.h is used
>>>>
>>> [...]
>>>
>>
>>  Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used,
>>> please stop calling this a bug, because you are just confusing people.
>>> At this point sysexits(3) actually even suggests it is blessed by
>>> style(9). This is how it starts:
>>>
>>
>>          According to style(9), it is not a good practice to call exit(3)
>>>         with arbitrary values to indicate a failure condition when
>>>         ending a program. Instead, the pre-defined exit codes from
>>>         sysexits should be used, so the caller of the process can get a
>>>         rough estimation about the failure class without looking up the
>>>         source code.
>>>
>>
> This is just another bug in sysexits(3).  This is not according to
> style(9), since style(9) was fixed to not say that after I complained
> previously :-).  It has never been normal practice to use sysexits(3),
> but someone who likes it added recommendations to use it to style(9) when
> they added the man pages for sysexits(3).  Before that, it was
> so rarely used that it had no man page.
>

To add to the areas of confusion already stated in this thread, err(3)
explicitly recommends using sysexits(3) and uses it in all of the examples.

I decided to use 0/1 instead of sysexits since it seems most appropriate
based on the discussion here and other examples in sbin.  I incorporated
these changes as well as addressing some of Bruce's other feedback in
r253109.

Thanks,

-Jim

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:20:08 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id C2C4D336;
 Tue,  9 Jul 2013 21:20:08 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B038E1D61;
 Tue,  9 Jul 2013 21:20:08 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LK8mQ045463;
 Tue, 9 Jul 2013 21:20:08 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LK8br045462;
 Tue, 9 Jul 2013 21:20:08 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092120.r69LK8br045462@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:20:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253110 - head/sbin/nvmecontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:20:08 -0000

Author: jimharris
Date: Tue Jul  9 21:20:08 2013
New Revision: 253110
URL: http://svnweb.freebsd.org/changeset/base/253110

Log:
  Try to read firmware image before prompting the user to confirm
  firmware download.  This correctly prints an error and exits for
  an incorrect firmware image name before prompting the user to
  confirm the download.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/firmware.c

Modified: head/sbin/nvmecontrol/firmware.c
==============================================================================
--- head/sbin/nvmecontrol/firmware.c	Tue Jul  9 21:14:15 2013	(r253109)
+++ head/sbin/nvmecontrol/firmware.c	Tue Jul  9 21:20:08 2013	(r253110)
@@ -253,6 +253,9 @@ firmware(int argc, char *argv[])
 		    "of available images\n",
 		    slot, controller);
 
+	if (f_flag)
+		read_image_file(image, &buf, &size);
+
 	if (f_flag && a_flag)
 		printf("You are about to download and activate "
 		       "firmware image (%s) to controller %s.\n"
@@ -282,7 +285,6 @@ firmware(int argc, char *argv[])
 	}
 
 	if (f_flag) {
-		read_image_file(image, &buf, &size);
 		update_firmware(fd, buf, size);
 		if (a_flag)
 			activate_firmware(fd, slot,

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:21:30 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 63AD2626;
 Tue,  9 Jul 2013 21:21:30 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 3BA0A1D7D;
 Tue,  9 Jul 2013 21:21:30 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LLUwD047252;
 Tue, 9 Jul 2013 21:21:30 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LLTV5047249;
 Tue, 9 Jul 2013 21:21:29 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092121.r69LLTV5047249@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:21:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253111 - head/share/man/man4
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:21:30 -0000

Author: jimharris
Date: Tue Jul  9 21:21:29 2013
New Revision: 253111
URL: http://svnweb.freebsd.org/changeset/base/253111

Log:
  Update nvme(4) and nvd(4) to reflect recent work and upcoming inclusion
  in 9.2 release.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/share/man/man4/nvd.4
  head/share/man/man4/nvme.4

Modified: head/share/man/man4/nvd.4
==============================================================================
--- head/share/man/man4/nvd.4	Tue Jul  9 21:20:08 2013	(r253110)
+++ head/share/man/man4/nvd.4	Tue Jul  9 21:21:29 2013	(r253111)
@@ -1,5 +1,5 @@
 .\"
-.\" Copyright (c) 2012 Intel Corporation
+.\" Copyright (c) 2012-2013 Intel Corporation
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -66,6 +66,11 @@ I/O commands.
 .Xr nvme 4 ,
 .Xr nvmecontrol 8 ,
 .Xr disk 9 .
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 9.2.
 .Sh AUTHORS
 .An -nosplit
 The
@@ -76,15 +81,3 @@ with contributions from Joe Golio at EMC
 .Pp
 This man page was written by
 .An Jim Harris Aq jimharris@FreeBSD.org .
-.Sh BUGS
-The
-.Nm
-driver is considered experimental.
-Development and testing have been primarily focused on amd64.
-The following areas of development and testing are in progress:
-.Bl -bullet
-.It
-testing on i386
-.It
-command timeout error handling
-.El

Modified: head/share/man/man4/nvme.4
==============================================================================
--- head/share/man/man4/nvme.4	Tue Jul  9 21:20:08 2013	(r253110)
+++ head/share/man/man4/nvme.4	Tue Jul  9 21:21:29 2013	(r253111)
@@ -1,5 +1,5 @@
 .\"
-.\" Copyright (c) 2012 Intel Corporation
+.\" Copyright (c) 2012-2013 Intel Corporation
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -147,6 +147,11 @@ and completion queues to the console.
 .Xr pci 4 ,
 .Xr nvmecontrol 8 ,
 .Xr disk 9 .
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Fx 9.2.
 .Sh AUTHORS
 .An -nosplit
 The
@@ -157,19 +162,3 @@ with contributions from Joe Golio at EMC
 .Pp
 This man page was written by
 .An Jim Harris Aq jimharris@FreeBSD.org .
-.Sh BUGS
-The
-.Nm
-driver is considered experimental.
-Development and testing have been primarily focused on amd64.
-The following areas of development and testing are in progress:
-.Bl -bullet
-.It
-testing on i386
-.It
-asynchronous error reporting
-.It
-command timeout error handling
-.It
-controller-level resets
-.El

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:22:20 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 6E3A0762;
 Tue,  9 Jul 2013 21:22:20 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4E86B1D86;
 Tue,  9 Jul 2013 21:22:20 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LMKmd047448;
 Tue, 9 Jul 2013 21:22:20 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LMIIG047430;
 Tue, 9 Jul 2013 21:22:18 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092122.r69LMIIG047430@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:22:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253112 - in head/sys/dev: nvd nvme
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:22:20 -0000

Author: jimharris
Date: Tue Jul  9 21:22:17 2013
New Revision: 253112
URL: http://svnweb.freebsd.org/changeset/base/253112

Log:
  Update copyright dates.
  
  MFC after:	3 days

Modified:
  head/sys/dev/nvd/nvd.c
  head/sys/dev/nvme/nvme.c
  head/sys/dev/nvme/nvme.h
  head/sys/dev/nvme/nvme_ctrlr.c
  head/sys/dev/nvme/nvme_ctrlr_cmd.c
  head/sys/dev/nvme/nvme_ns.c
  head/sys/dev/nvme/nvme_private.h
  head/sys/dev/nvme/nvme_qpair.c
  head/sys/dev/nvme/nvme_sysctl.c
  head/sys/dev/nvme/nvme_test.c

Modified: head/sys/dev/nvd/nvd.c
==============================================================================
--- head/sys/dev/nvd/nvd.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvd/nvd.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme.c
==============================================================================
--- head/sys/dev/nvme/nvme.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme.h
==============================================================================
--- head/sys/dev/nvme/nvme.h	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme.h	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_ctrlr.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_ctrlr.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_ctrlr_cmd.c
==============================================================================
--- head/sys/dev/nvme/nvme_ctrlr_cmd.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_ctrlr_cmd.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_ns.c
==============================================================================
--- head/sys/dev/nvme/nvme_ns.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_ns.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_private.h
==============================================================================
--- head/sys/dev/nvme/nvme_private.h	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_private.h	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_qpair.c
==============================================================================
--- head/sys/dev/nvme/nvme_qpair.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_qpair.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_sysctl.c
==============================================================================
--- head/sys/dev/nvme/nvme_sysctl.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_sysctl.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: head/sys/dev/nvme/nvme_test.c
==============================================================================
--- head/sys/dev/nvme/nvme_test.c	Tue Jul  9 21:21:29 2013	(r253111)
+++ head/sys/dev/nvme/nvme_test.c	Tue Jul  9 21:22:17 2013	(r253112)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (C) 2012 Intel Corporation
+ * Copyright (C) 2012-2013 Intel Corporation
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:24:19 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 92E448D4;
 Tue,  9 Jul 2013 21:24:19 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 84CE11D9C;
 Tue,  9 Jul 2013 21:24:19 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LOJLI047713;
 Tue, 9 Jul 2013 21:24:19 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LOJTs047712;
 Tue, 9 Jul 2013 21:24:19 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092124.r69LOJTs047712@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:24:19 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253113 - head/sys/dev/nvme
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:24:19 -0000

Author: jimharris
Date: Tue Jul  9 21:24:19 2013
New Revision: 253113
URL: http://svnweb.freebsd.org/changeset/base/253113

Log:
  Add comment explaining why CACHE_LINE_SIZE is defined in nvme_private.h
  if not already defined elsewhere.
  
  Requested by:	attilio
  MFC after:	3 days

Modified:
  head/sys/dev/nvme/nvme_private.h

Modified: head/sys/dev/nvme/nvme_private.h
==============================================================================
--- head/sys/dev/nvme/nvme_private.h	Tue Jul  9 21:22:17 2013	(r253112)
+++ head/sys/dev/nvme/nvme_private.h	Tue Jul  9 21:24:19 2013	(r253113)
@@ -109,6 +109,10 @@ MALLOC_DECLARE(M_NVME);
 /* Maximum log page size to fetch for AERs. */
 #define NVME_MAX_AER_LOG_SIZE		(4096)
 
+/*
+ * Define CACHE_LINE_SIZE here for older FreeBSD versions that do not define
+ *  it.
+ */
 #ifndef CACHE_LINE_SIZE
 #define CACHE_LINE_SIZE		(64)
 #endif

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:31:23 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 06B2BE05;
 Tue,  9 Jul 2013 21:31:23 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id ECB4D1E05;
 Tue,  9 Jul 2013 21:31:22 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LVMVj051015;
 Tue, 9 Jul 2013 21:31:22 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LVM1i051009;
 Tue, 9 Jul 2013 21:31:22 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092131.r69LVM1i051009@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:31:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253114 - head/sbin/nvmecontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:31:23 -0000

Author: jimharris
Date: Tue Jul  9 21:31:21 2013
New Revision: 253114
URL: http://svnweb.freebsd.org/changeset/base/253114

Log:
  Send per-namespace logpage commands to the controller devnode, so they
  are processed as admin commands, not I/O commands.
  
  As part of this change, pull out the code for parsing a namespace node
  string into a separate function, since it is used for both identify and
  logpage commands.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/identify.c
  head/sbin/nvmecontrol/logpage.c
  head/sbin/nvmecontrol/nvmecontrol.c
  head/sbin/nvmecontrol/nvmecontrol.h

Modified: head/sbin/nvmecontrol/identify.c
==============================================================================
--- head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:24:19 2013	(r253113)
+++ head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:31:21 2013	(r253114)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -194,7 +193,6 @@ identify_ns(int argc, char *argv[])
 {
 	struct nvme_namespace_data	nsdata;
 	char				path[64];
-	char				*nsloc;
 	int				ch, fd, hexflag = 0, hexlength, nsid;
 	int				verboseflag = 0;
 
@@ -224,22 +222,12 @@ identify_ns(int argc, char *argv[])
 	close(fd);
 
 	/*
-	 * Pull the namespace id from the string. +2 skips past the "ns" part
-	 *  of the string.  Don't search past 10 characters into the string,
-	 *  otherwise we know it is malformed.
-	 */
-	nsloc = strnstr(argv[optind], NVME_NS_PREFIX, 10);
-	if (nsloc != NULL)
-		nsid = strtol(nsloc + 2, NULL, 10);
-	if (nsloc == NULL || (nsid == 0 && errno != 0))
-		errx(1, "invalid namespace ID '%s'", argv[optind]);
-
-	/*
 	 * We send IDENTIFY commands to the controller, not the namespace,
-	 *  since it is an admin cmd.  So the path should only include the
-	 *  nvmeX part of the nvmeXnsY string.
+	 *  since it is an admin cmd.  The namespace ID will be specified in
+	 *  the IDENTIFY command itself.  So parse the namespace's device node
+	 *  string to get the controller substring and namespace ID.
 	 */
-	snprintf(path, nsloc - argv[optind] + 1, "%s", argv[optind]);
+	parse_ns_str(argv[optind], path, &nsid);
 	open_dev(path, &fd, 1, 1);
 	read_namespace_data(fd, nsid, &nsdata);
 	close(fd);

Modified: head/sbin/nvmecontrol/logpage.c
==============================================================================
--- head/sbin/nvmecontrol/logpage.c	Tue Jul  9 21:24:19 2013	(r253113)
+++ head/sbin/nvmecontrol/logpage.c	Tue Jul  9 21:31:21 2013	(r253114)
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -242,12 +241,11 @@ logpage_usage(void)
 void
 logpage(int argc, char *argv[])
 {
-	int				fd, nsid, len;
+	int				fd, nsid;
 	int				log_page = 0, pageflag = false;
-	int				hexflag = false;
-	int				allow_ns = false;
-	char				ch, *p, *nsloc = NULL;
-	char				*cname = NULL;
+	int				hexflag = false, ns_specified;
+	char				ch, *p;
+	char				cname[64];
 	uint32_t			size;
 	void				*buf;
 	struct logpage_function		*f;
@@ -290,46 +288,31 @@ logpage(int argc, char *argv[])
 	if (optind >= argc)
 		logpage_usage();
 
+	if (strstr(argv[optind], NVME_NS_PREFIX) != NULL) {
+		ns_specified = true;
+		parse_ns_str(argv[optind], cname, &nsid);
+		open_dev(cname, &fd, 1, 1);
+	} else {
+		ns_specified = false;
+		nsid = NVME_GLOBAL_NAMESPACE_TAG;
+		open_dev(argv[optind], &fd, 1, 1);
+	}
+
 	/*
 	 * The log page attribtues indicate whether or not the controller
 	 * supports the SMART/Health information log page on a per
 	 * namespace basis.
 	 */
-	cname = malloc(strlen(NVME_CTRLR_PREFIX) + 2);
-	len = strlen(NVME_CTRLR_PREFIX) + 1;
-	cname = strncpy(cname, argv[optind], len);
-	open_dev(cname, &fd, 1, 1);
-	read_controller_data(fd, &cdata);
-
-	if (log_page == NVME_LOG_HEALTH_INFORMATION && cdata.lpa.ns_smart != 0)
-		allow_ns = true;
-
-	/* If a namespace id was specified, validate it's use */
-	if (strstr(argv[optind], NVME_NS_PREFIX) != NULL) {
-		if (!allow_ns) {
-			if (log_page != NVME_LOG_HEALTH_INFORMATION)
-				errx(1,
-				    "log page %d valid only at controller level",
-				    log_page);
-			else if (cdata.lpa.ns_smart == 0)
-				errx(1,
-				    "controller does not support per "
-				    "namespace smart/health information");
-		}
-		nsloc = strnstr(argv[optind], NVME_NS_PREFIX, 10);
-		if (nsloc != NULL)
-			nsid = strtol(nsloc + 2, NULL, 10);
-		if (nsloc == NULL || (nsid == 0 && errno != 0))
-			errx(1, "invalid namespace id '%s'", argv[optind]);
-
-		/*
-		 * User is asking for per namespace log page information
-		 * so close the controller and open up the namespace.
-		 */
-		close(fd);
-		open_dev(argv[optind], &fd, 1, 1);
-	} else
-		nsid = NVME_GLOBAL_NAMESPACE_TAG;
+	if (ns_specified) {
+		if (log_page != NVME_LOG_HEALTH_INFORMATION)
+			errx(1, "log page %d valid only at controller level",
+			    log_page);
+		read_controller_data(fd, &cdata);
+		if (cdata.lpa.ns_smart == 0)
+			errx(1,
+			    "controller does not support per namespace "
+			    "smart/health information");
+	}
 
 	print_fn = print_hex;
 	if (!hexflag) {

Modified: head/sbin/nvmecontrol/nvmecontrol.c
==============================================================================
--- head/sbin/nvmecontrol/nvmecontrol.c	Tue Jul  9 21:24:19 2013	(r253113)
+++ head/sbin/nvmecontrol/nvmecontrol.c	Tue Jul  9 21:31:21 2013	(r253114)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -198,6 +199,29 @@ open_dev(const char *str, int *fd, int s
 	return (0);
 }
 
+void
+parse_ns_str(const char *ns_str, char *ctrlr_str, int *nsid)
+{
+	char	*nsloc;
+
+	/*
+	 * Pull the namespace id from the string. +2 skips past the "ns" part
+	 *  of the string.  Don't search past 10 characters into the string,
+	 *  otherwise we know it is malformed.
+	 */
+	nsloc = strnstr(ns_str, NVME_NS_PREFIX, 10);
+	if (nsloc != NULL)
+		*nsid = strtol(nsloc + 2, NULL, 10);
+	if (nsloc == NULL || (*nsid == 0 && errno != 0))
+		errx(1, "invalid namespace ID '%s'", ns_str);
+
+	/*
+	 * The controller string will include only the nvmX part of the
+	 *  nvmeXnsY string.
+	 */
+	snprintf(ctrlr_str, nsloc - ns_str + 1, "%s", ns_str);
+}
+
 int
 main(int argc, char *argv[])
 {

Modified: head/sbin/nvmecontrol/nvmecontrol.h
==============================================================================
--- head/sbin/nvmecontrol/nvmecontrol.h	Tue Jul  9 21:24:19 2013	(r253113)
+++ head/sbin/nvmecontrol/nvmecontrol.h	Tue Jul  9 21:31:21 2013	(r253114)
@@ -63,6 +63,7 @@ void logpage(int argc, char *argv[]);
 void firmware(int argc, char *argv[]);
 
 int open_dev(const char *str, int *fd, int show_error, int exit_on_error);
+void parse_ns_str(const char *ns_str, char *ctrlr_str, int *nsid);
 void read_controller_data(int fd, struct nvme_controller_data *cdata);
 void read_namespace_data(int fd, int nsid, struct nvme_namespace_data *nsdata);
 void print_hex(void *data, uint32_t length);

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:31:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E5EE6F4E;
 Tue,  9 Jul 2013 21:31:58 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id D82551E0F;
 Tue,  9 Jul 2013 21:31:58 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LVwPG051104;
 Tue, 9 Jul 2013 21:31:58 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LVwm0051103;
 Tue, 9 Jul 2013 21:31:58 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092131.r69LVwm0051103@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:31:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253115 - head/sbin/nvmecontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:31:59 -0000

Author: jimharris
Date: Tue Jul  9 21:31:58 2013
New Revision: 253115
URL: http://svnweb.freebsd.org/changeset/base/253115

Log:
  Condense the output for displaying LBA formats.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/identify.c

Modified: head/sbin/nvmecontrol/identify.c
==============================================================================
--- head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:31:21 2013	(r253114)
+++ head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:31:58 2013	(r253115)
@@ -124,13 +124,11 @@ print_namespace(struct nvme_namespace_da
 	printf("Thin Provisioning:           %s\n",
 		nsdata->nsfeat.thin_prov ? "Supported" : "Not Supported");
 	printf("Number of LBA Formats:       %d\n", nsdata->nlbaf+1);
-	printf("Current LBA Format:          LBA Format #%d\n",
+	printf("Current LBA Format:          LBA Format #%02d\n",
 		nsdata->flbas.format);
-	for (i = 0; i <= nsdata->nlbaf; i++) {
-		printf("LBA Format #%d:\n", i);
-		printf("  LBA Data Size:             %d\n",
-			1 << nsdata->lbaf[i].lbads);
-	}
+	for (i = 0; i <= nsdata->nlbaf; i++)
+		printf("LBA Format #%02d: Data Size: %5d  Metadata Size: %5d\n",
+		    i, 1 << nsdata->lbaf[i].lbads, nsdata->lbaf[i].ms);
 }
 
 static void

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:33:13 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 54E341E7;
 Tue,  9 Jul 2013 21:33:13 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4706B1E25;
 Tue,  9 Jul 2013 21:33:13 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LXDoO051351;
 Tue, 9 Jul 2013 21:33:13 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LXCht051349;
 Tue, 9 Jul 2013 21:33:12 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307092133.r69LXCht051349@svn.freebsd.org>
From: Jim Harris 
Date: Tue, 9 Jul 2013 21:33:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253116 - head/sbin/nvmecontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:33:13 -0000

Author: jimharris
Date: Tue Jul  9 21:33:12 2013
New Revision: 253116
URL: http://svnweb.freebsd.org/changeset/base/253116

Log:
  Ensure controller or namespace node name is specified before trying to
  access it.
  
  While here, also fix the identify usage message to show the -v and -x
  parameters.
  
  Sponsored by:	Intel
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/identify.c
  head/sbin/nvmecontrol/nvmecontrol.h

Modified: head/sbin/nvmecontrol/identify.c
==============================================================================
--- head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:31:58 2013	(r253115)
+++ head/sbin/nvmecontrol/identify.c	Tue Jul  9 21:33:12 2013	(r253116)
@@ -259,6 +259,10 @@ identify(int argc, char *argv[])
 
 	while (getopt(argc, argv, "vx") != -1) ;
 
+	/* Check that a controller or namespace was specified. */
+	if (optind >= argc)
+		identify_usage();
+
 	target = argv[optind];
 
 	optreset = 1;

Modified: head/sbin/nvmecontrol/nvmecontrol.h
==============================================================================
--- head/sbin/nvmecontrol/nvmecontrol.h	Tue Jul  9 21:31:58 2013	(r253115)
+++ head/sbin/nvmecontrol/nvmecontrol.h	Tue Jul  9 21:33:12 2013	(r253116)
@@ -38,7 +38,7 @@
 "       nvmecontrol devlist\n"
 
 #define IDENTIFY_USAGE							       \
-"       nvmecontrol identify \n"
+"       nvmecontrol identify [-x [-v]] \n"
 
 #define PERFTEST_USAGE							       \
 "       nvmecontrol perftest <-n num_threads> <-o read|write>\n"	       \

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 21:53:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 24FB9CCA;
 Tue,  9 Jul 2013 21:53:58 +0000 (UTC)
 (envelope-from dteske@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 170511F3D;
 Tue,  9 Jul 2013 21:53:58 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69LrviS058972;
 Tue, 9 Jul 2013 21:53:57 GMT (envelope-from dteske@svn.freebsd.org)
Received: (from dteske@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69LrvWY058971;
 Tue, 9 Jul 2013 21:53:57 GMT (envelope-from dteske@svn.freebsd.org)
Message-Id: <201307092153.r69LrvWY058971@svn.freebsd.org>
From: Devin Teske 
Date: Tue, 9 Jul 2013 21:53:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253117 - head/usr.sbin/bsdconfig/share
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 21:53:58 -0000

Author: dteske
Date: Tue Jul  9 21:53:57 2013
New Revision: 253117
URL: http://svnweb.freebsd.org/changeset/base/253117

Log:
  Do two things: First, don't obscure the backtitle. Second, read ~/.dialogrc
  if it exists to determine if use_shadow is true (ON) or false (OFF).
  
  The purpose of determining the value of use_shadow is to know how many lines
  to subtract from the maximum height value in assuring that the backtitle is
  not obscured.
  
  The detriment of obscuring the backtitle is that it provides information
  that is not easily obtained elsewhere. That is the command-line shortcut
  used to access the current menu. As you navigate from one dialog to the
  next, invariably transparently corssing module boundaries, the backtitle
  represents the command-line argument used to get there. Obscuring this
  information with a widget that is too-tall and/or too-wide would see that
  data go unnoticed (leaving few other ways to get that information in the
  same helpful context).
  
  So despite the fact that this change reduces the standard maximum height for
  all widgets, there is a trap-door to prevent this calculation. If you want
  to utilize the full screen height on the terminal (remember, this adjustment
  is not made for Xdialog(1)) you can set $NO_BACKTITLE to 1 (or any non-NULL
  value for that matter) and this calculation will be skipped. You will be
  able to draw a widget that partially obscures the backtitle if-necessary.
  
  MFC after:	1 day

Modified:
  head/usr.sbin/bsdconfig/share/dialog.subr

Modified: head/usr.sbin/bsdconfig/share/dialog.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/dialog.subr	Tue Jul  9 21:33:12 2013	(r253116)
+++ head/usr.sbin/bsdconfig/share/dialog.subr	Tue Jul  9 21:53:57 2013	(r253117)
@@ -292,7 +292,31 @@ f_dialog_max_size()
 		__max_size=$( stty size 2> /dev/null ) # usually "24 80"
 		: ${__max_size:=$DEFAULT_TERMINAL_SIZE}
 	fi
-	[ "$__var_height" ] && setvar "$__var_height" "${__max_size%%[$IFS]*}"
+	if [ "$__var_height" ]; then
+		local __height="${__max_size%%[$IFS]*}"
+		#
+		# If we're not using Xdialog(1), we should assume that $DIALOG
+		# will render --backtitle behind the widget. In such a case, we
+		# should prevent the widget from obscuring the backtitle (unless
+		# $NO_BACKTITLE is set and non-NULL, allowing a trap-door).
+		#
+		if [ ! "$USE_XDIALOG" ] && [ ! "$NO_BACKTITLE" ]; then
+			#
+			# If use_shadow (in ~/.dialogrc) is OFF, we need to
+			# subtract 4, otherwise 5. However, don't check this
+			# every time, rely on an initialization variable set
+			# by f_dialog_init().
+			#
+			local __adjust=5
+			[ "$NO_SHADOW" ] && __adjust=4
+
+			# Don't adjust the height if already too small (allowing
+			# obscured backtitle for small values of __height).
+			[ ${__height:-0} -gt 11 ] &&
+				__height=$(( $__height - $__adjust ))
+		fi
+		setvar "$__var_height" "$__height"
+	fi
 	[ "$__var_width" ] && setvar "$__var_width" "${__max_size##*[$IFS]}"
 }
 
@@ -1999,6 +2023,12 @@ f_dialog_menutag2index_with_help()
 # 	              that (while running as root) sudo(8) authentication is
 # 	              required to proceed.
 #
+# Also reads ~/.dialogrc for the following information:
+#
+# 	NO_SHADOW     Either NULL or Non-NULL. If use_shadow is OFF (case-
+# 	              insensitive) in ~/.dialogrc this is set to "1" (otherwise
+# 	              unset).
+#
 f_dialog_init()
 {
 	DIALOG_SELF_INITIALIZE=
@@ -2058,6 +2088,22 @@ f_dialog_init()
 	fi
 
 	#
+	# Read ~/.dialogrc (unless using Xdialog(1)) for properties
+	#
+	if [ -f ~/.dialogrc ]; then
+		eval "$(
+			awk -v param=use_shadow -v expect=OFF \
+			    -v set="NO_SHADOW=1" '
+			!/^[[:space:]]*(#|$)/ && \
+			tolower($1) ~ "^"param"(=|$)" && \
+			/[^#]*=/ {
+				sub(/^[^=]*=[[:space:]]*/, "")
+				if ( toupper($1) == expect ) print set";"
+			}' ~/.dialogrc
+		)"
+	fi
+
+	#
 	# If we're already running as root but we got there by way of sudo(8)
 	# and we have X11, we should merge the xauth(1) credentials from our
 	# original user.

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 22:01:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E87D6236;
 Tue,  9 Jul 2013 22:01:05 +0000 (UTC)
 (envelope-from dteske@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id DB0781F91;
 Tue,  9 Jul 2013 22:01:05 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69M15hO061654;
 Tue, 9 Jul 2013 22:01:05 GMT (envelope-from dteske@svn.freebsd.org)
Received: (from dteske@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69M1554061653;
 Tue, 9 Jul 2013 22:01:05 GMT (envelope-from dteske@svn.freebsd.org)
Message-Id: <201307092201.r69M1554061653@svn.freebsd.org>
From: Devin Teske 
Date: Tue, 9 Jul 2013 22:01:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253118 - head/usr.sbin/bsdconfig/share
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 22:01:06 -0000

Author: dteske
Date: Tue Jul  9 22:01:05 2013
New Revision: 253118
URL: http://svnweb.freebsd.org/changeset/base/253118

Log:
  Fix conditional (der should match the comment above it).
  
  MFC after:	1 day

Modified:
  head/usr.sbin/bsdconfig/share/dialog.subr

Modified: head/usr.sbin/bsdconfig/share/dialog.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/dialog.subr	Tue Jul  9 21:53:57 2013	(r253117)
+++ head/usr.sbin/bsdconfig/share/dialog.subr	Tue Jul  9 22:01:05 2013	(r253118)
@@ -2090,7 +2090,7 @@ f_dialog_init()
 	#
 	# Read ~/.dialogrc (unless using Xdialog(1)) for properties
 	#
-	if [ -f ~/.dialogrc ]; then
+	if [ -f ~/.dialogrc -a ! "$USE_XDIALOG" ]; then
 		eval "$(
 			awk -v param=use_shadow -v expect=OFF \
 			    -v set="NO_SHADOW=1" '

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 22:04:36 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 43ADE3CD;
 Tue,  9 Jul 2013 22:04:36 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 365C51FBE;
 Tue,  9 Jul 2013 22:04:36 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69M4aDO062163;
 Tue, 9 Jul 2013 22:04:36 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69M4Zgn062161;
 Tue, 9 Jul 2013 22:04:35 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201307092204.r69M4Zgn062161@svn.freebsd.org>
From: Xin LI 
Date: Tue, 9 Jul 2013 22:04:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253119 - head/sys/crypto/sha2
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 22:04:36 -0000

Author: delphij
Date: Tue Jul  9 22:04:35 2013
New Revision: 253119
URL: http://svnweb.freebsd.org/changeset/base/253119

Log:
  Sync with KAME.
  
  MFC after:	1 month

Modified:
  head/sys/crypto/sha2/sha2.c
  head/sys/crypto/sha2/sha2.h

Modified: head/sys/crypto/sha2/sha2.c
==============================================================================
--- head/sys/crypto/sha2/sha2.c	Tue Jul  9 22:01:05 2013	(r253118)
+++ head/sys/crypto/sha2/sha2.c	Tue Jul  9 22:04:35 2013	(r253119)
@@ -1,4 +1,4 @@
-/*	$KAME: sha2.c,v 1.8 2001/11/08 01:07:52 itojun Exp $	*/
+/*	$KAME: sha2.c,v 1.11 2004/06/02 09:52:45 itojun Exp $	*/
 
 /*
  * sha2.c
@@ -32,6 +32,7 @@
  * 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 
@@ -67,7 +68,7 @@ __FBSDID("$FreeBSD$");
  *
  */
 
-#if defined(_KERNEL) && (defined(__bsdi__) || defined(__FreeBSD__))
+#if defined(_KERNEL) && defined(__FreeBSD__)
 #define assert(x)
 #else
 #include 
@@ -1051,4 +1052,3 @@ char* SHA384_Data(const sha2_byte* data,
 	SHA384_Update(&context, data, len);
 	return SHA384_End(&context, digest);
 }
-

Modified: head/sys/crypto/sha2/sha2.h
==============================================================================
--- head/sys/crypto/sha2/sha2.h	Tue Jul  9 22:01:05 2013	(r253118)
+++ head/sys/crypto/sha2/sha2.h	Tue Jul  9 22:04:35 2013	(r253119)
@@ -1,5 +1,5 @@
 /*	$FreeBSD$	*/
-/*	$KAME: sha2.h,v 1.3 2001/03/12 08:27:48 itojun Exp $	*/
+/*	$KAME: sha2.h,v 1.5 2007/06/14 12:09:41 itojun Exp $	*/
 
 /*
  * sha2.h
@@ -138,4 +138,3 @@ char* SHA512_Data(const u_int8_t*, size_
 #endif /* __cplusplus */
 
 #endif /* __SHA2_H__ */
-

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 23:12:27 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id A2BCB5A2;
 Tue,  9 Jul 2013 23:12:27 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 9513712D1;
 Tue,  9 Jul 2013 23:12:27 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69NCRJo082908;
 Tue, 9 Jul 2013 23:12:27 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69NCQY1082902;
 Tue, 9 Jul 2013 23:12:26 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201307092312.r69NCQY1082902@svn.freebsd.org>
From: Marius Strobl 
Date: Tue, 9 Jul 2013 23:12:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253120 - head/sys/dev/pci
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 23:12:27 -0000

Author: marius
Date: Tue Jul  9 23:12:26 2013
New Revision: 253120
URL: http://svnweb.freebsd.org/changeset/base/253120

Log:
  - As it turns out, not only MSI-X is broken for devices passed through by
    VMware up to at least ESXi 5.1. Actually, using INTx in that case instead
    may still result in interrupt storms, with MSI being the only working
    option in some configurations. So introduce a PCI_QUIRK_DISABLE_MSIX quirk
    which only blacklists MSI-X but not also MSI and use it for the VMware
    PCI-PCI-bridges. Note that, currently, we still assume that if MSI doesn't
    work, MSI-X won't work either - but that's part of the internal logic and
    not guaranteed as part of the API contract. While at it, add and employ
    a pci_has_quirk() helper.
    Reported and tested by: Paul Bucher
  - Use NULL instead of 0 for pointers.
  
  Submitted by:	jhb (mostly)
  Approved by:	jhb
  MFC after:	3 days

Modified:
  head/sys/dev/pci/pci.c
  head/sys/dev/pci/pci_pci.c
  head/sys/dev/pci/pcib_private.h
  head/sys/dev/pci/pcivar.h

Modified: head/sys/dev/pci/pci.c
==============================================================================
--- head/sys/dev/pci/pci.c	Tue Jul  9 22:04:35 2013	(r253119)
+++ head/sys/dev/pci/pci.c	Tue Jul  9 23:12:26 2013	(r253120)
@@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$");
 	(((cfg)->hdrtype == PCIM_HDRTYPE_NORMAL && reg == PCIR_BIOS) ||	\
 	 ((cfg)->hdrtype == PCIM_HDRTYPE_BRIDGE && reg == PCIR_BIOS_1))
 
+static int		pci_has_quirk(uint32_t devid, int quirk);
 static pci_addr_t	pci_mapbase(uint64_t mapreg);
 static const char	*pci_maptype(uint64_t mapreg);
 static int		pci_mapsize(uint64_t testval);
@@ -119,6 +120,7 @@ static void		pci_enable_msix(device_t de
 static void		pci_mask_msix(device_t dev, u_int index);
 static void		pci_unmask_msix(device_t dev, u_int index);
 static int		pci_msi_blacklisted(void);
+static int		pci_msix_blacklisted(void);
 static void		pci_resume_msi(device_t dev);
 static void		pci_resume_msix(device_t dev);
 static int		pci_remap_intr_method(device_t bus, device_t dev,
@@ -185,7 +187,7 @@ static device_method_t pci_methods[] = {
 DEFINE_CLASS_0(pci, pci_driver, pci_methods, sizeof(struct pci_softc));
 
 static devclass_t pci_devclass;
-DRIVER_MODULE(pci, pcib, pci_driver, pci_devclass, pci_modevent, 0);
+DRIVER_MODULE(pci, pcib, pci_driver, pci_devclass, pci_modevent, NULL);
 MODULE_VERSION(pci, 1);
 
 static char	*pci_vendordata;
@@ -195,15 +197,16 @@ struct pci_quirk {
 	uint32_t devid;	/* Vendor/device of the card */
 	int	type;
 #define	PCI_QUIRK_MAP_REG	1 /* PCI map register in weird place */
-#define	PCI_QUIRK_DISABLE_MSI	2 /* MSI/MSI-X doesn't work */
+#define	PCI_QUIRK_DISABLE_MSI	2 /* Neither MSI nor MSI-X work */
 #define	PCI_QUIRK_ENABLE_MSI_VM	3 /* Older chipset in VM where MSI works */
 #define	PCI_QUIRK_UNMAP_REG	4 /* Ignore PCI map register */
+#define	PCI_QUIRK_DISABLE_MSIX	5 /* MSI-X doesn't work */
 	int	arg1;
 	int	arg2;
 };
 
 static const struct pci_quirk pci_quirks[] = {
-	/* The Intel 82371AB and 82443MX has a map register at offset 0x90. */
+	/* The Intel 82371AB and 82443MX have a map register at offset 0x90. */
 	{ 0x71138086, PCI_QUIRK_MAP_REG,	0x90,	 0 },
 	{ 0x719b8086, PCI_QUIRK_MAP_REG,	0x90,	 0 },
 	/* As does the Serverworks OSB4 (the SMBus mapping register) */
@@ -238,8 +241,8 @@ static const struct pci_quirk pci_quirks
 	 * MSI-X allocation doesn't work properly for devices passed through
 	 * by VMware up to at least ESXi 5.1.
 	 */
-	{ 0x079015ad, PCI_QUIRK_DISABLE_MSI,	0,	0 }, /* PCI/PCI-X */
-	{ 0x07a015ad, PCI_QUIRK_DISABLE_MSI,	0,	0 }, /* PCIe */
+	{ 0x079015ad, PCI_QUIRK_DISABLE_MSIX,	0,	0 }, /* PCI/PCI-X */
+	{ 0x07a015ad, PCI_QUIRK_DISABLE_MSIX,	0,	0 }, /* PCIe */
 
 	/*
 	 * Some virtualization environments emulate an older chipset
@@ -321,7 +324,7 @@ SYSCTL_INT(_hw_pci, OID_AUTO, enable_msi
 static int pci_honor_msi_blacklist = 1;
 TUNABLE_INT("hw.pci.honor_msi_blacklist", &pci_honor_msi_blacklist);
 SYSCTL_INT(_hw_pci, OID_AUTO, honor_msi_blacklist, CTLFLAG_RD,
-    &pci_honor_msi_blacklist, 1, "Honor chipset blacklist for MSI");
+    &pci_honor_msi_blacklist, 1, "Honor chipset blacklist for MSI/MSI-X");
 
 #if defined(__i386__) || defined(__amd64__)
 static int pci_usb_takeover = 1;
@@ -334,6 +337,18 @@ SYSCTL_INT(_hw_pci, OID_AUTO, usb_early_
 Disable this if you depend on BIOS emulation of USB devices, that is\n\
 you use USB devices (like keyboard or mouse) but do not load USB drivers");
 
+static int
+pci_has_quirk(uint32_t devid, int quirk)
+{
+	const struct pci_quirk *q;
+
+	for (q = &pci_quirks[0]; q->devid; q++) {
+		if (q->devid == devid && q->type == quirk)
+			return (1);
+	}
+	return (0);
+}
+
 /* Find a device_t by bus/slot/function in domain 0 */
 
 device_t
@@ -1426,8 +1441,8 @@ pci_alloc_msix_method(device_t dev, devi
 	if (cfg->msi.msi_alloc != 0 || cfg->msix.msix_alloc != 0)
 		return (ENXIO);
 
-	/* If MSI is blacklisted for this system, fail. */
-	if (pci_msi_blacklisted())
+	/* If MSI-X is blacklisted for this system, fail. */
+	if (pci_msix_blacklisted())
 		return (ENXIO);
 
 	/* MSI-X capability present? */
@@ -1983,38 +1998,15 @@ pci_remap_intr_method(device_t bus, devi
 int
 pci_msi_device_blacklisted(device_t dev)
 {
-	const struct pci_quirk *q;
 
 	if (!pci_honor_msi_blacklist)
 		return (0);
 
-	for (q = &pci_quirks[0]; q->devid; q++) {
-		if (q->devid == pci_get_devid(dev) &&
-		    q->type == PCI_QUIRK_DISABLE_MSI)
-			return (1);
-	}
-	return (0);
-}
-
-/*
- * Returns true if a specified chipset supports MSI when it is
- * emulated hardware in a virtual machine.
- */
-static int
-pci_msi_vm_chipset(device_t dev)
-{
-	const struct pci_quirk *q;
-
-	for (q = &pci_quirks[0]; q->devid; q++) {
-		if (q->devid == pci_get_devid(dev) &&
-		    q->type == PCI_QUIRK_ENABLE_MSI_VM)
-			return (1);
-	}
-	return (0);
+	return (pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_DISABLE_MSI));
 }
 
 /*
- * Determine if MSI is blacklisted globally on this sytem.  Currently,
+ * Determine if MSI is blacklisted globally on this system.  Currently,
  * we just check for blacklisted chipsets as represented by the
  * host-PCI bridge at device 0:0:0.  In the future, it may become
  * necessary to check other system attributes, such as the kenv values
@@ -2031,9 +2023,14 @@ pci_msi_blacklisted(void)
 	/* Blacklist all non-PCI-express and non-PCI-X chipsets. */
 	if (!(pcie_chipset || pcix_chipset)) {
 		if (vm_guest != VM_GUEST_NO) {
+			/*
+			 * Whitelist older chipsets in virtual
+			 * machines known to support MSI.
+			 */
 			dev = pci_find_bsf(0, 0, 0);
 			if (dev != NULL)
-				return (pci_msi_vm_chipset(dev) == 0);
+				return (!pci_has_quirk(pci_get_devid(dev),
+					PCI_QUIRK_ENABLE_MSI_VM));
 		}
 		return (1);
 	}
@@ -2045,6 +2042,45 @@ pci_msi_blacklisted(void)
 }
 
 /*
+ * Returns true if the specified device is blacklisted because MSI-X
+ * doesn't work.  Note that this assumes that if MSI doesn't work,
+ * MSI-X doesn't either.
+ */
+int
+pci_msix_device_blacklisted(device_t dev)
+{
+
+	if (!pci_honor_msi_blacklist)
+		return (0);
+
+	if (pci_has_quirk(pci_get_devid(dev), PCI_QUIRK_DISABLE_MSIX))
+		return (1);
+
+	return (pci_msi_device_blacklisted(dev));
+}
+
+/*
+ * Determine if MSI-X is blacklisted globally on this system.  If MSI
+ * is blacklisted, assume that MSI-X is as well.  Check for additional
+ * chipsets where MSI works but MSI-X does not.
+ */
+static int
+pci_msix_blacklisted(void)
+{
+	device_t dev;
+
+	if (!pci_honor_msi_blacklist)
+		return (0);
+
+	dev = pci_find_bsf(0, 0, 0);
+	if (dev != NULL && pci_has_quirk(pci_get_devid(dev),
+	    PCI_QUIRK_DISABLE_MSIX))
+		return (1);
+
+	return (pci_msi_blacklisted());
+}
+
+/*
  * Attempt to allocate *count MSI messages.  The actual number allocated is
  * returned in *count.  After this function returns, each message will be
  * available to the driver as SYS_RES_IRQ resources starting at a rid 1.

Modified: head/sys/dev/pci/pci_pci.c
==============================================================================
--- head/sys/dev/pci/pci_pci.c	Tue Jul  9 22:04:35 2013	(r253119)
+++ head/sys/dev/pci/pci_pci.c	Tue Jul  9 23:12:26 2013	(r253120)
@@ -100,7 +100,7 @@ static device_method_t pcib_methods[] = 
 static devclass_t pcib_devclass;
 
 DEFINE_CLASS_0(pcib, pcib_driver, pcib_methods, sizeof(struct pcib_softc));
-DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, 0, 0);
+DRIVER_MODULE(pcib, pci, pcib_driver, pcib_devclass, NULL, NULL);
 
 #ifdef NEW_PCIB
 /*
@@ -624,6 +624,9 @@ pcib_attach_common(device_t dev)
     if (pci_msi_device_blacklisted(dev))
 	sc->flags |= PCIB_DISABLE_MSI;
 
+    if (pci_msix_device_blacklisted(dev))
+	sc->flags |= PCIB_DISABLE_MSIX;
+
     /*
      * Intel 815, 845 and other chipsets say they are PCI-PCI bridges,
      * but have a ProgIF of 0x80.  The 82801 family (AA, AB, BAM/CAM,
@@ -1379,7 +1382,7 @@ pcib_alloc_msix(device_t pcib, device_t 
 	struct pcib_softc *sc = device_get_softc(pcib);
 	device_t bus;
 
-	if (sc->flags & PCIB_DISABLE_MSI)
+	if (sc->flags & PCIB_DISABLE_MSIX)
 		return (ENXIO);
 	bus = device_get_parent(pcib);
 	return (PCIB_ALLOC_MSIX(device_get_parent(bus), dev, irq));

Modified: head/sys/dev/pci/pcib_private.h
==============================================================================
--- head/sys/dev/pci/pcib_private.h	Tue Jul  9 22:04:35 2013	(r253119)
+++ head/sys/dev/pci/pcib_private.h	Tue Jul  9 23:12:26 2013	(r253120)
@@ -91,6 +91,7 @@ struct pcib_softc 
     uint32_t	flags;		/* flags */
 #define	PCIB_SUBTRACTIVE	0x1
 #define	PCIB_DISABLE_MSI	0x2
+#define	PCIB_DISABLE_MSIX	0x4
     uint16_t	command;	/* command register */
     u_int	domain;		/* domain number */
     u_int	pribus;		/* primary bus number */

Modified: head/sys/dev/pci/pcivar.h
==============================================================================
--- head/sys/dev/pci/pcivar.h	Tue Jul  9 22:04:35 2013	(r253119)
+++ head/sys/dev/pci/pcivar.h	Tue Jul  9 23:12:26 2013	(r253120)
@@ -490,6 +490,7 @@ device_t pci_find_class(uint8_t class, u
 int	pci_pending_msix(device_t dev, u_int index);
 
 int	pci_msi_device_blacklisted(device_t dev);
+int	pci_msix_device_blacklisted(device_t dev);
 
 void	pci_ht_map_msi(device_t dev, uint64_t addr);
 

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 23:21:57 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id A73A696D;
 Tue,  9 Jul 2013 23:21:57 +0000 (UTC)
 (envelope-from dteske@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 9AB2E134D;
 Tue,  9 Jul 2013 23:21:57 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69NLvUk085735;
 Tue, 9 Jul 2013 23:21:57 GMT (envelope-from dteske@svn.freebsd.org)
Received: (from dteske@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69NLvjU085734;
 Tue, 9 Jul 2013 23:21:57 GMT (envelope-from dteske@svn.freebsd.org)
Message-Id: <201307092321.r69NLvjU085734@svn.freebsd.org>
From: Devin Teske 
Date: Tue, 9 Jul 2013 23:21:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253121 - head/usr.sbin/bsdconfig/share
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 23:21:57 -0000

Author: dteske
Date: Tue Jul  9 23:21:57 2013
New Revision: 253121
URL: http://svnweb.freebsd.org/changeset/base/253121

Log:
  Adjust comments to fit within 80-columns.

Modified:
  head/usr.sbin/bsdconfig/share/dialog.subr

Modified: head/usr.sbin/bsdconfig/share/dialog.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/dialog.subr	Tue Jul  9 23:12:26 2013	(r253120)
+++ head/usr.sbin/bsdconfig/share/dialog.subr	Tue Jul  9 23:21:57 2013	(r253121)
@@ -195,8 +195,8 @@ f_dialog_line_sanitize()
 # argument is NULL, the current title is returned.
 #
 # Each time this function is called, a backup of the current values is made
-# allowing a one-time (single-level) restoration of the previous title using the
-# f_dialog_title_restore() function (below).
+# allowing a one-time (single-level) restoration of the previous title using
+# the f_dialog_title_restore() function (below).
 #
 f_dialog_title()
 {
@@ -297,7 +297,7 @@ f_dialog_max_size()
 		#
 		# If we're not using Xdialog(1), we should assume that $DIALOG
 		# will render --backtitle behind the widget. In such a case, we
-		# should prevent the widget from obscuring the backtitle (unless
+		# should prevent a widget from obscuring the backtitle (unless
 		# $NO_BACKTITLE is set and non-NULL, allowing a trap-door).
 		#
 		if [ ! "$USE_XDIALOG" ] && [ ! "$NO_BACKTITLE" ]; then
@@ -310,7 +310,7 @@ f_dialog_max_size()
 			local __adjust=5
 			[ "$NO_SHADOW" ] && __adjust=4
 
-			# Don't adjust the height if already too small (allowing
+			# Don't adjust height if already too small (allowing
 			# obscured backtitle for small values of __height).
 			[ ${__height:-0} -gt 11 ] &&
 				__height=$(( $__height - $__adjust ))

From owner-svn-src-head@FreeBSD.ORG  Tue Jul  9 23:47:29 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D57DDF1F;
 Tue,  9 Jul 2013 23:47:29 +0000 (UTC)
 (envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C821E1691;
 Tue,  9 Jul 2013 23:47:29 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r69NlTmF092047;
 Tue, 9 Jul 2013 23:47:29 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r69NlTVK092043;
 Tue, 9 Jul 2013 23:47:29 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <201307092347.r69NlTVK092043@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Tue, 9 Jul 2013 23:47:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253122 - head/sys/dev/random
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Tue, 09 Jul 2013 23:47:29 -0000

Author: obrien
Date: Tue Jul  9 23:47:28 2013
New Revision: 253122
URL: http://svnweb.freebsd.org/changeset/base/253122

Log:
  Refactor random_systat to be a *random_systat. This avoids unnecessary
  structure copying in random_ident_hardware(). This change will also help
  further modularization of random(4) subsystem.
  
  Submitted by: arthurmesh@gmail.com
  Reviewed by: obrien
  Obtained from: Juniper Networks

Modified:
  head/sys/dev/random/probe.c
  head/sys/dev/random/randomdev.c
  head/sys/dev/random/randomdev.h
  head/sys/dev/random/randomdev_soft.c

Modified: head/sys/dev/random/probe.c
==============================================================================
--- head/sys/dev/random/probe.c	Tue Jul  9 23:21:57 2013	(r253121)
+++ head/sys/dev/random/probe.c	Tue Jul  9 23:47:28 2013	(r253122)
@@ -61,11 +61,11 @@ extern struct random_systat random_ivy;
 #endif
 
 void
-random_ident_hardware(struct random_systat *systat)
+random_ident_hardware(struct random_systat **systat)
 {
 
 	/* Set default to software */
-	*systat = random_yarrow;
+	*systat = &random_yarrow;
 
 	/* Then go looking for hardware */
 #if defined(__amd64__) || (defined(__i386__) && !defined(PC98))
@@ -76,7 +76,7 @@ random_ident_hardware(struct random_syst
 		enable = 1;
 		TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable);
 		if (enable)
-			*systat = random_nehemiah;
+			*systat = &random_nehemiah;
 	}
 #endif
 #ifdef RDRAND_RNG
@@ -86,7 +86,7 @@ random_ident_hardware(struct random_syst
 		enable = 1;
 		TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable);
 		if (enable)
-			*systat = random_ivy;
+			*systat = &random_ivy;
 	}
 #endif
 #endif

Modified: head/sys/dev/random/randomdev.c
==============================================================================
--- head/sys/dev/random/randomdev.c	Tue Jul  9 23:21:57 2013	(r253121)
+++ head/sys/dev/random/randomdev.c	Tue Jul  9 23:47:28 2013	(r253122)
@@ -70,7 +70,7 @@ static struct cdevsw random_cdevsw = {
 	.d_name = "random",
 };
 
-struct random_systat random_systat;
+struct random_systat *random_systat;
 
 /* For use with make_dev(9)/destroy_dev(9). */
 static struct cdev *random_dev;
@@ -88,8 +88,8 @@ random_close(struct cdev *dev __unused, 
 {
 	if ((flags & FWRITE) && (priv_check(td, PRIV_RANDOM_RESEED) == 0)
 	    && (securelevel_gt(td->td_ucred, 0) == 0)) {
-		(*random_systat.reseed)();
-		random_systat.seeded = 1;
+		(*random_systat->reseed)();
+		random_systat->seeded = 1;
 		arc4rand(NULL, 0, 1);	/* Reseed arc4random as well. */
 	}
 
@@ -104,8 +104,8 @@ random_read(struct cdev *dev __unused, s
 	void *random_buf;
 
 	/* Blocking logic */
-	if (!random_systat.seeded)
-		error = (*random_systat.block)(flag);
+	if (!random_systat->seeded)
+		error = (*random_systat->block)(flag);
 
 	/* The actual read */
 	if (!error) {
@@ -114,7 +114,7 @@ random_read(struct cdev *dev __unused, s
 
 		while (uio->uio_resid > 0 && !error) {
 			c = MIN(uio->uio_resid, PAGE_SIZE);
-			c = (*random_systat.read)(random_buf, c);
+			c = (*random_systat->read)(random_buf, c);
 			error = uiomove(random_buf, c, uio);
 		}
 
@@ -139,7 +139,7 @@ random_write(struct cdev *dev __unused, 
 		error = uiomove(random_buf, c, uio);
 		if (error)
 			break;
-		(*random_systat.write)(random_buf, c);
+		(*random_systat->write)(random_buf, c);
 	}
 
 	free(random_buf, M_TEMP);
@@ -172,10 +172,10 @@ random_poll(struct cdev *dev __unused, i
 	int revents = 0;
 
 	if (events & (POLLIN | POLLRDNORM)) {
-		if (random_systat.seeded)
+		if (random_systat->seeded)
 			revents = events & (POLLIN | POLLRDNORM);
 		else
-			revents = (*random_systat.poll) (events,td);
+			revents = (*random_systat->poll) (events,td);
 	}
 	return (revents);
 }
@@ -189,11 +189,11 @@ random_modevent(module_t mod __unused, i
 	switch (type) {
 	case MOD_LOAD:
 		random_ident_hardware(&random_systat);
-		(*random_systat.init)();
+		(*random_systat->init)();
 
 		if (bootverbose)
 			printf("random: \n",
-			    random_systat.ident);
+			    random_systat->ident);
 
 		random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw,
 		    RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random");
@@ -202,7 +202,7 @@ random_modevent(module_t mod __unused, i
 		break;
 
 	case MOD_UNLOAD:
-		(*random_systat.deinit)();
+		(*random_systat->deinit)();
 
 		destroy_dev(random_dev);
 

Modified: head/sys/dev/random/randomdev.h
==============================================================================
--- head/sys/dev/random/randomdev.h	Tue Jul  9 23:21:57 2013	(r253121)
+++ head/sys/dev/random/randomdev.h	Tue Jul  9 23:47:28 2013	(r253122)
@@ -51,7 +51,7 @@ struct random_systat {
 	random_reseed_func_t	*reseed;
 };
 
-extern struct random_systat random_systat;
+extern struct random_systat *random_systat;
 
-extern void random_ident_hardware(struct random_systat *);
+extern void random_ident_hardware(struct random_systat **);
 extern void random_null_func(void);

Modified: head/sys/dev/random/randomdev_soft.c
==============================================================================
--- head/sys/dev/random/randomdev_soft.c	Tue Jul  9 23:21:57 2013	(r253121)
+++ head/sys/dev/random/randomdev_soft.c	Tue Jul  9 23:47:28 2013	(r253122)
@@ -138,7 +138,7 @@ random_yarrow_init(void)
 	SYSCTL_ADD_PROC(&random_clist,
 	    SYSCTL_CHILDREN(random_sys_o),
 	    OID_AUTO, "seeded", CTLTYPE_INT | CTLFLAG_RW,
-	    &random_systat.seeded, 1, random_check_boolean, "I",
+	    &random_systat->seeded, 1, random_check_boolean, "I",
 	    "Seeded State");
 
 	random_sys_harvest_o = SYSCTL_ADD_NODE(&random_clist,
@@ -362,10 +362,10 @@ random_yarrow_write(void *buf, int count
 void
 random_yarrow_unblock(void)
 {
-	if (!random_systat.seeded) {
-		random_systat.seeded = 1;
-		selwakeuppri(&random_systat.rsel, PUSER);
-		wakeup(&random_systat);
+	if (!random_systat->seeded) {
+		random_systat->seeded = 1;
+		selwakeuppri(&random_systat->rsel, PUSER);
+		wakeup(random_systat);
 	}
 	(void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE,
 	    ARC4_ENTR_HAVE);
@@ -377,10 +377,10 @@ random_yarrow_poll(int events, struct th
 	int revents = 0;
 	mtx_lock(&random_reseed_mtx);
 
-	if (random_systat.seeded)
+	if (random_systat->seeded)
 		revents = events & (POLLIN | POLLRDNORM);
 	else
-		selrecord(td, &random_systat.rsel);
+		selrecord(td, &random_systat->rsel);
 
 	mtx_unlock(&random_reseed_mtx);
 	return revents;
@@ -394,12 +394,12 @@ random_yarrow_block(int flag)
 	mtx_lock(&random_reseed_mtx);
 
 	/* Blocking logic */
-	while (!random_systat.seeded && !error) {
+	while (!random_systat->seeded && !error) {
 		if (flag & O_NONBLOCK)
 			error = EWOULDBLOCK;
 		else {
 			printf("Entropy device is blocking.\n");
-			error = msleep(&random_systat,
+			error = msleep(random_systat,
 			    &random_reseed_mtx,
 			    PUSER | PCATCH, "block", 0);
 		}

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 04:48:48 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 2086D69;
 Wed, 10 Jul 2013 04:48:48 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au
 [211.29.132.249])
 by mx1.freebsd.org (Postfix) with ESMTP id 8DDB61263;
 Wed, 10 Jul 2013 04:48:47 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 26F2A104287D;
 Wed, 10 Jul 2013 14:48:35 +1000 (EST)
Date: Wed, 10 Jul 2013 14:48:34 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Jim Harris 
Subject: Re: svn commit: r252672 - head/sbin/nvmecontrol
In-Reply-To: 
Message-ID: <20130710132921.C1142@besplex.bde.org>
References: <201307040026.r640QOCd079203@svn.freebsd.org>
 <20130704105843.B982@besplex.bde.org>
 <20130706184249.GD25842@garage.freebsd.pl>
 <20130706195108.GA34684@stack.nl> <20130707114237.L897@besplex.bde.org>
 
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=eqSHVfVX c=1 sm=1 a=RvpeemXtX5oA:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=X2rCv88ZkwkA:10
 a=AfsLrsXV64LQ2t5jXzMA:9 a=CjuIK1q_8ugA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: src-committers@freebsd.org, Pawel Jakub Dawidek ,
 Jilles Tjoelker , svn-src-all@freebsd.org,
 Bruce Evans , svn-src-head@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 04:48:48 -0000

On Tue, 9 Jul 2013, Jim Harris wrote:

> On Sat, Jul 6, 2013 at 7:26 PM, Bruce Evans  wrote:
>
>> On Sat, 6 Jul 2013, Jilles Tjoelker wrote:
>>
>>  On Sat, Jul 06, 2013 at 08:42:49PM +0200, Pawel Jakub Dawidek wrote:
>[>]* ...
>>>  Bruce, until sysexits(3) doesn't explicitly say it shouldn't be used,
>>>> please stop calling this a bug, because you are just confusing people.
>>>> At this point sysexits(3) actually even suggests it is blessed by
>>>> style(9). This is how it starts:
>>>
>>>          According to style(9), it is not a good practice to call exit(3)
>>>>         with arbitrary values to indicate a failure condition when
>>>>         ending a program. Instead, the pre-defined exit codes from
>>>>         sysexits should be used, so the caller of the process can get a
>>>>         rough estimation about the failure class without looking up the
>>>>         source code.
>>>
>> This is just another bug in sysexits(3).  This is not according to
>> style(9), since style(9) was fixed to not say that after I complained
>> previously :-).  It has never been normal practice to use sysexits(3),
>> but someone who likes it added recommendations to use it to style(9) when
>> they added the man pages for sysexits(3).  Before that, it was
>> so rarely used that it had no man page.
>
> To add to the areas of confusion already stated in this thread, err(3)
> explicitly recommends using sysexits(3) and uses it in all of the examples.

Hmm, that isn't in err(3) in the old version of FreeBSD that I use.

> I decided to use 0/1 instead of sysexits since it seems most appropriate
> based on the discussion here and other examples in sbin.  I incorporated
> these changes as well as addressing some of Bruce's other feedback in
> r253109.

Thanks.

The examples in err(3) always were bad.  They currently are:

% EXAMPLES
%      Display the current errno information string and exit:
% 
%            if ((p = malloc(size)) == NULL)
%                    err(EX_OSERR, NULL);

This has no string at all.  Use of err() and EX_OSERR are wrong too,
or at least a style bug and gratuitously unportable.  In Standard C,
malloc() is not specified to set errno.  In POSIX it is specified to
set errno to ENOMEM iff it fails.  The POSIX setting of errno just
allows sloppy code like the above to work -- ENOMEM will be translated
to "Cannot allocate memory" by err().

Normal style is to not depend on this and print the more specific
message "malloc failed" using errx().  Note that err() is not
sophisticated enough to print a good message following "malloc failed".
'err(1, "malloc failed")' would print "foo: malloc failed: Cannot
allocate memory\n").  This is missing a " (duh)" after the redundant
"Cannot allocate memory".

In $(find /usr/src/*bin -name *.c), there are 136 lines matching
"malloc f":
- 17 of these lines use precisely warnx("malloc failed").
- 49 use precisely errx(1, "malloc failed").
All these have normal style.
- 13 mire use errx(), with assorted bugs and style bugs:
   - 2 have a bogus newline at the end of the string
   - 4 say "failure" instead of "failed"
   - 1 says "malloc for continent submenu"
   - 1 says "malloc for submenu"
   - 1 says "kern.consile malloc failed"
   - 3 use EX_OSERR
   - 1 uses unusual whitespace
- 10 use printf or fprintf.  Most of these print the normal message
   "malloc failed" and not much more.  The only obvious stle bug is
   that 4 of these terminate the message with a "."
Most of the remaining 47 have style bugs:
- 4 use precisely err(1, "malloc failed")
- 6 in ar use precisely bsdar_errc(bsdar, EX_SOFTWARE, errno, "malloc failed")
- 2 in ar use "malloc failed" on a line by itself, presumably because the
   verboseness is large enough to defeat my simple regexp
- 3 in gzip use maybe_error("malloc failed")
- 1 uses precisely warn(1, "malloc failed")
- 13 use syslog(LOG_ERR, ...).  Mostly with "malloc failed" annotated
   inconsistently.  bsnmpd uses strerror(errno) a lot. It should use %m
   unless that is too unportable.  It mostly formats this using ": %s",
   but it sometimes uses " - %s" and sometimes doesn't print the errno.
   - 5 of the 13 don't print the redundant errno, so don't have any obvious
     style bugs
- 2 are in comments, with the bad grammar "If the malloc fail".
- 1 is in a comment, with the less bad grammar "malloc fail"
- 3 use precisely fatal(EX_UNAVAIL, "malloc faield"
- 3 more use strerror(errno) to add nothing
- 2 more seem to use syslog via a utility function (no errno, so OK)
- 3 use yp_error("malloc failed" or similar
- the remaining 4 use "[...] malloc [...] failed" to add something.

The example used to be worse.   It said just err(1, NULL).  No hint about
the source of the error.

%            if ((fd = open(file_name, O_RDONLY, 0)) == -1)
%                    err(EX_NOINPUT, "%s", file_name);

Error messages for open failure are more varied than for malloc failure.
I like to put at least the syscall or function name in all error messages
when not trying hard to write a very detailed but concise message.

% 
%      Display an error message and exit:
% 
%            if (tm.tm_hour < START_TIME)
%                    errx(EX_DATAERR, "too early, wait until %s",
%                        start_time_string);

Might be precise enough in context.

The message has a grammar error (comma splice).

Timing errors are unlikely to be related to data errors.  EX_TEMPFAIL
would be better, but I prefer 1 with a better message of course.

% 
%      Warn of an error:
% 
%            if ((fd = open(raw_device, O_RDONLY, 0)) == -1)
%                    warnx("%s: %s: trying the block device",
%                        raw_device, strerror(errno));

This is really an example of how to print the errno when you want it
but don't want it in the standard position given by warn().

%            if ((fd = open(block_device, O_RDONLY, 0)) == -1)
%                    err(EX_OSFILE, "%s", block_device);

This is not a warning, but a fatal error.

Both examples could be improved by giving the function name, possibly
by using "opening" instead of "trying".

Bruce

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 06:46:46 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 91D08B00;
 Wed, 10 Jul 2013 06:46:46 +0000 (UTC)
 (envelope-from yongari@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 848D717A7;
 Wed, 10 Jul 2013 06:46:46 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6A6kkau021914;
 Wed, 10 Jul 2013 06:46:46 GMT (envelope-from yongari@svn.freebsd.org)
Received: (from yongari@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6A6kkMC021913;
 Wed, 10 Jul 2013 06:46:46 GMT (envelope-from yongari@svn.freebsd.org)
Message-Id: <201307100646.r6A6kkMC021913@svn.freebsd.org>
From: Pyun YongHyeon 
Date: Wed, 10 Jul 2013 06:46:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253134 - head/sys/dev/hme
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 06:46:46 -0000

Author: yongari
Date: Wed Jul 10 06:46:46 2013
New Revision: 253134
URL: http://svnweb.freebsd.org/changeset/base/253134

Log:
  Avoid controller reinitialization which could be triggered by
  dhclient(8) or alias addresses are added.
  
  Tested by:	dcx dcy 

Modified:
  head/sys/dev/hme/if_hme.c

Modified: head/sys/dev/hme/if_hme.c
==============================================================================
--- head/sys/dev/hme/if_hme.c	Wed Jul 10 04:59:10 2013	(r253133)
+++ head/sys/dev/hme/if_hme.c	Wed Jul 10 06:46:46 2013	(r253134)
@@ -742,6 +742,10 @@ hme_init_locked(struct hme_softc *sc)
 	u_int32_t n, v;
 
 	HME_LOCK_ASSERT(sc, MA_OWNED);
+
+	if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+		return;
+
 	/*
 	 * Initialization sequence. The numbered steps below correspond
 	 * to the sequence outlined in section 6.3.5.1 in the Ethernet
@@ -1324,6 +1328,7 @@ hme_eint(struct hme_softc *sc, u_int sta
 	/* check for fatal errors that needs reset to unfreeze DMA engine */
 	if ((status & HME_SEB_STAT_FATAL_ERRORS) != 0) {
 		HME_WHINE(sc->sc_dev, "error signaled, status=%#x\n", status);
+		sc->sc_ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 		hme_init_locked(sc);
 	}
 }
@@ -1370,6 +1375,7 @@ hme_watchdog(struct hme_softc *sc)
 		device_printf(sc->sc_dev, "device timeout (no link)\n");
 	++ifp->if_oerrors;
 
+	ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
 	hme_init_locked(sc);
 	hme_start_locked(ifp);
 	return (EJUSTRETURN);

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 07:15:40 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 42EF67FC;
 Wed, 10 Jul 2013 07:15:40 +0000 (UTC)
 (envelope-from kevlo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 35B3718CC;
 Wed, 10 Jul 2013 07:15:40 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6A7Feld032066;
 Wed, 10 Jul 2013 07:15:40 GMT (envelope-from kevlo@svn.freebsd.org)
Received: (from kevlo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6A7FedG032065;
 Wed, 10 Jul 2013 07:15:40 GMT (envelope-from kevlo@svn.freebsd.org)
Message-Id: <201307100715.r6A7FedG032065@svn.freebsd.org>
From: Kevin Lo 
Date: Wed, 10 Jul 2013 07:15:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253136 - head/sys/sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 07:15:40 -0000

Author: kevlo
Date: Wed Jul 10 07:15:39 2013
New Revision: 253136
URL: http://svnweb.freebsd.org/changeset/base/253136

Log:
  Add the ARM processor-specific section types.
  
  Reviewed by:	imp

Modified:
  head/sys/sys/elf_common.h

Modified: head/sys/sys/elf_common.h
==============================================================================
--- head/sys/sys/elf_common.h	Wed Jul 10 07:12:55 2013	(r253135)
+++ head/sys/sys/elf_common.h	Wed Jul 10 07:15:39 2013	(r253136)
@@ -296,6 +296,13 @@ typedef struct {
 #define	SHT_HIOS		0x6fffffff	/* Last of OS specific semantics */
 #define	SHT_LOPROC		0x70000000	/* reserved range for processor */
 #define	SHT_AMD64_UNWIND	0x70000001	/* unwind information */
+#define	SHT_ARM_EXIDX		0x70000001	/* Exception index table. */
+#define	SHT_ARM_PREEMPTMAP	0x70000002	/* BPABI DLL dynamic linking 
+						   pre-emption map. */
+#define	SHT_ARM_ATTRIBUTES	0x70000003	/* Object file compatibility 
+						   attributes. */
+#define	SHT_ARM_DEBUGOVERLAY	0x70000004	/* See DBGOVL for details. */
+#define	SHT_ARM_OVERLAYSECTION	0x70000005	/* See DBGOVL for details. */
 #define	SHT_MIPS_REGINFO	0x70000006
 #define	SHT_MIPS_OPTIONS	0x7000000d
 #define	SHT_MIPS_DWARF		0x7000001e	/* MIPS gcc uses MIPS_DWARF */

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 07:40:31 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 659DE332;
 Wed, 10 Jul 2013 07:40:31 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 3F19519D7;
 Wed, 10 Jul 2013 07:40:31 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6A7eViR040040;
 Wed, 10 Jul 2013 07:40:31 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6A7eVnd040039;
 Wed, 10 Jul 2013 07:40:31 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201307100740.r6A7eVnd040039@svn.freebsd.org>
From: Dag-Erling Smørgrav 
Date: Wed, 10 Jul 2013 07:40:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253138 - head/usr.sbin/authpf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 07:40:31 -0000

Author: des
Date: Wed Jul 10 07:40:30 2013
New Revision: 253138
URL: http://svnweb.freebsd.org/changeset/base/253138

Log:
  Install authpf-noip.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/authpf/Makefile

Modified: head/usr.sbin/authpf/Makefile
==============================================================================
--- head/usr.sbin/authpf/Makefile	Wed Jul 10 07:21:59 2013	(r253137)
+++ head/usr.sbin/authpf/Makefile	Wed Jul 10 07:40:30 2013	(r253138)
@@ -18,4 +18,7 @@ DPADD+= ${LIBM} ${LIBMD} ${LIBUTIL}
 
 WARNS?=	3
 
+LINKS=	${BINDIR}/authpf ${BINDIR}/authpf-noip
+MLINKS=	authpf.8 authpf-noip.8
+
 .include 

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 08:21:12 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id C3156C3B;
 Wed, 10 Jul 2013 08:21:12 +0000 (UTC)
 (envelope-from hiren@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B309C1B44;
 Wed, 10 Jul 2013 08:21:12 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6A8LCWh052448;
 Wed, 10 Jul 2013 08:21:12 GMT (envelope-from hiren@svn.freebsd.org)
Received: (from hiren@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6A8LADo052432;
 Wed, 10 Jul 2013 08:21:10 GMT (envelope-from hiren@svn.freebsd.org)
Message-Id: <201307100821.r6A8LADo052432@svn.freebsd.org>
From: Hiren Panchasara 
Date: Wed, 10 Jul 2013 08:21:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253139 - in head: share/doc/legal
 share/doc/legal/realtek sys/conf sys/contrib/dev/urtwn sys/dev/usb/wlan
 sys/modules/usb/urtwnfw sys/modules/usb/urtwnfw/urtwnrtl8192cT
 sys/modules/usb...
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 08:21:12 -0000

Author: hiren
Date: Wed Jul 10 08:21:09 2013
New Revision: 253139
URL: http://svnweb.freebsd.org/changeset/base/253139

Log:
  Adding urtwn(4) firmware and related changes.
  
  Reviewed by:	rpaulo
  Approved by:	sbruno (mentor)

Added:
  head/share/doc/legal/realtek/
  head/share/doc/legal/realtek/Makefile   (contents, props changed)
  head/sys/contrib/dev/urtwn/
  head/sys/contrib/dev/urtwn/LICENSE
  head/sys/contrib/dev/urtwn/urtwn-rtl8192cfwT.fw.uu
  head/sys/contrib/dev/urtwn/urtwn-rtl8192cfwU.fw.uu
  head/sys/modules/usb/urtwnfw/
  head/sys/modules/usb/urtwnfw/Makefile   (contents, props changed)
  head/sys/modules/usb/urtwnfw/Makefile.inc   (contents, props changed)
  head/sys/modules/usb/urtwnfw/urtwnrtl8192cT/
  head/sys/modules/usb/urtwnfw/urtwnrtl8192cT/Makefile   (contents, props changed)
  head/sys/modules/usb/urtwnfw/urtwnrtl8192cU/
  head/sys/modules/usb/urtwnfw/urtwnrtl8192cU/Makefile   (contents, props changed)
Modified:
  head/share/doc/legal/Makefile
  head/sys/conf/WITHOUT_SOURCELESS_UCODE
  head/sys/conf/files
  head/sys/dev/usb/wlan/if_urtwn.c

Modified: head/share/doc/legal/Makefile
==============================================================================
--- head/share/doc/legal/Makefile	Wed Jul 10 07:40:30 2013	(r253138)
+++ head/share/doc/legal/Makefile	Wed Jul 10 08:21:09 2013	(r253139)
@@ -3,6 +3,7 @@
 SUBDIR=	intel_ipw \
 	intel_iwi \
 	intel_iwn \
-	intel_wpi
+	intel_wpi \
+	realtek
 
 .include 

Added: head/share/doc/legal/realtek/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/doc/legal/realtek/Makefile	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+NO_OBJ=
+FILES=		${.CURDIR}/../../../../sys/contrib/dev/urtwn/LICENSE
+FILESDIR=	${SHAREDIR}/doc/legal/realtek
+
+.include 

Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE
==============================================================================
--- head/sys/conf/WITHOUT_SOURCELESS_UCODE	Wed Jul 10 07:40:30 2013	(r253138)
+++ head/sys/conf/WITHOUT_SOURCELESS_UCODE	Wed Jul 10 08:21:09 2013	(r253139)
@@ -39,3 +39,4 @@ nodevice	rum
 nodevice	uath
 nodevice	zyd
 nodevice	kue
+nodevice	urtwnfw

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Wed Jul 10 07:40:30 2013	(r253138)
+++ head/sys/conf/files	Wed Jul 10 08:21:09 2013	(r253139)
@@ -2327,6 +2327,35 @@ dev/usb/wlan/if_upgt.c		optional upgt
 dev/usb/wlan/if_ural.c		optional ural
 dev/usb/wlan/if_urtw.c		optional urtw
 dev/usb/wlan/if_urtwn.c		optional urtwn
+urtwnrtl8192cfwT.c		optional urtwn-rtl8192cfwT | urtwnfw	\
+	compile-with	"${AWK} -f $S/tools/fw_stub.awk urtwnrtl8192cT.fw:urtwnrtl8192cfwT -murtwnrtl8192cfwT -c${.TARGET}" \
+	no-implicit-rule before-depend local				\
+	clean		"urtwnrtl8192cfwT.c"
+urtwnrtl8192cfwT.fwo		optional urtwn-rtl8192cfwT | urtwnfw	\
+	dependency	"urtwnrtl8192cT.fw"				\
+	compile-with	"${NORMAL_FWO}"					\
+	no-implicit-rule						\
+	clean		"urtwnrtl8192cfwT.fwo"
+urtwnrtl8192cT.fw		optional urtwn-rtl8192cfwT | urtwnfw	\
+	dependency	"$S/contrib/dev/urtwn/urtwn-rtl8192cfwT.fw.uu"	\
+	compile-with	"${NORMAL_FW}"					\
+	no-obj no-implicit-rule						\
+	clean		"urtwnrtl8192cT.fw"
+urtwnrtl8192cfwU.c		optional urtwn-rtl8192cfwU | urtwnfw	\
+	compile-with	"${AWK} -f $S/tools/fw_stub.awk urtwnrtl8192cU.fw:urtwnrtl8192cfwU -murtwnrtl8192cfwU -c${.TARGET}" \
+	no-implicit-rule before-depend local				\
+	clean		"urtwnrtl8192cfwU.c"
+urtwnrtl8192cfwU.fwo		optional urtwn-rtl8192cfwU | urtwnfw	\
+	dependency	"urtwnrtl8192cU.fw"				\
+	compile-with	"${NORMAL_FWO}"					\
+	no-implicit-rule						\
+	clean		"urtwnrtl8192cfwU.fwo"
+urtwnrtl8192cU.fw		optional urtwn-rtl8192cfwU | urtwnfw	\
+	dependency	"$S/contrib/dev/urtwn/urtwn-rtl8192cfwU.fw.uu"	\
+	compile-with	"${NORMAL_FW}"					\
+	no-obj no-implicit-rule						\
+	clean		"urtwnrtl8192cU.fw"
+
 dev/usb/wlan/if_zyd.c		optional zyd
 #
 # USB serial and parallel port drivers

Added: head/sys/contrib/dev/urtwn/LICENSE
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/urtwn/LICENSE	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,39 @@
+Copyright (c) 2010, Realtek Semiconductor Corporation 
+All rights reserved.
+
+Redistribution.  Redistribution and use in binary form, without 
+modification, are permitted provided that the following conditions are 
+met:
+
+* Redistributions must reproduce the above copyright notice and the 
+  following disclaimer in the documentation and/or other materials 
+  provided with the distribution. 
+* Neither the name of Realtek Semiconductor Corporation nor the names of its
+  suppliers may be used to endorse or promote products derived from this
+  software without specific prior written permission. 
+* No reverse engineering, decompilation, or disassembly of this software 
+  is permitted.
+
+Limited patent license. Realtek Semiconductor Corporation grants a world-wide, 
+royalty-free, non-exclusive license under patents it now or hereafter 
+owns or controls to make, have made, use, import, offer to sell and 
+sell ("Utilize") this software, but solely to the extent that any 
+such patent is necessary to Utilize the software alone, or in 
+combination with an operating system licensed under an approved Open 
+Source license as listed by the Open Source Initiative at 
+http://opensource.org/licenses.  The patent license shall not apply to 
+any other combinations which include this software.  No hardware per 
+se is licensed hereunder.
+
+DISCLAIMER.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, 
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 
+OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
+USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
+DAMAGE.

Added: head/sys/contrib/dev/urtwn/urtwn-rtl8192cfwT.fw.uu
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/urtwn/urtwn-rtl8192cfwT.fw.uu	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,285 @@
+begin-base64 644 urtwn-rtl8192cfwT.fw.uu
+wYgCADwAAAAKKBQZrD4AAEM0AQAAAAAAAAAAAAAAAAACdFwAAAAAAAAAAAAAAAAAAAAAAlmZAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnK6AAAAAAACaAEAAAUE
+AwIAAwYFBAMABAYFBAIABAgHBgQABgoJCAYACAoJCAQACAoJCAIACAoJCAAACBIREAgAEBoZGBAA
+GCIhIBgAICIhIBAAICIhIAgAICIhHAgAICIhFAgAICIgGAgAIDEwIBAAMDEwGAAAMDEvEBAAMDEs
+EBAAMDEoEAAAMDEgEAAAMDEQEAAAMAQEBAUEBAUHBwcICgQEBAQGCg0OBQUHBwgMFBQEBAQFBwcJ
+CQwOExMEBAQEBQoREwkJCQkMExQVBQUFBQUFBQYGBgYGBQUFBgYGBgYFBQYGBgYGBgUFBQUJCQkJ
+Cw0QEgUJCgwNDhASCQkODhAQEhIAAAAAAAAAAAAkJioYGh0fIScpKgAAAB8jKCosAAQABAAIABAA
+GAAkADAASABgAJAAwADYAFAAeACgAMgBQAGQAeACMAEsAUAB4ALQA+gEsAZAB9AAAgACAAQACAAM
+ABIAGAAkADAASABgAGwAKAA8AFAAZACgAMgA8AEYAGQAoADwAWgB9AJYAyAD6AAAAAABAgICAwQF
+CAECAgIEBw8eBQYHDxIjRmQBAQEBAQIDBAUGBwgBAgMEBQYHCAUGBwgJCgsMIh8eGAAgAAAAAAAA
+AAAAAAAAqwd0hCv1guQ0BPWD4FR/kJd08OBUH6Pw+nXwCeukJGf1guXwNJP1g+D5kJd38Osl4CSB
+9YLkNJL1g+D/o+CQl3jP8KPv8Osl4CQE9YLkNJb1g+D/o+CQl3rP8KPv8Ool4CRm9YLkNEH1g+ST
+/nQBk//k/P3rJeAl4CTh9YLkNJL1gxIqf+rDmUADAkNZkJd14P90xSv1guQ0lvWD7/DvBJCXdvCQ
+l3fg/5CXduD+059AAwJDmO7DlBBAIe4k8P90AX4AqAcIgAXDM84zztj5/5CXeOBe/qPgX05wJ5CX
+duD/w5QQUEp0AX4AqAcIgAXDM84zztj5/5CXeuBe/qPgX05gLZCXduD/ZBNgCe9kEmAE77QRDZCX
+eOAw4AaQl3Z0GPCQl3bgkJd18JCXdPCASJCXduAE8AJCxJCXd+D6kJd14P9qcHl0xSv1guQ0lvWD
+7/B18AnrpCRp9YLl8DST9YPgtAETkJd04P8w5gEikJd14ERAkJd08JCXdeD/JeAknvWC5DRB9YPk
+k/x0AZP97yXgJGb1guQ0QfWDdAGTLf/kkzzDE/7vE//k/P3rJeAl4CTh9YLkNJL1gxIqf4BpkJd1
+4NOaQGGQl3fg/3TFK/WC5DSW9YPv8JCXde/wkJd08Pqj4P8l4CSe9YLkNEH1g+ST/HQBk/3vJeAk
+ZvWC5DRB9YN0AZMt/+STPMMT/u8T/+T8/esl4CXgJOH1guQ0kvWDEip/rwIidAEr9YLkNJL1g+Tw
+kJd04ESA/3SEK/WC5DQE9YPv8CKQl2br8KPq8KPp8KKv5DOj8MKvkJdm4Puj4Pqj4PmQAAESYzf6
+5fAkAP/kOv6Ql2aj4PqQAAHuj/ASY44SKdn/YDe1IhuQl2bg+6Pg+qPg+ZAAARJjN2UkcATlI2Xw
+YC6Ql2bg+6Pg+qPg+ZAAARJjN/+u8BJ79IAVkJdm4Puj4Pqj4PkSKdllImADEn6CkJdp4CT/kq8i
+5PUlIgJ+lQJ+nOSQl1rwkJda4P/DlCBAAwJOXHXwCe+kJGr1guXwNJP1g+BkAWADAk5TkJda4CXg
+JMD1guQ0kfWD4Pyj4NOUAOyUAFADAk5T73XwCqQkAPl0kDXw+nsBixT1FYkWkJda4CXgJMD1guQ0
+kfWD4P2j4JCXZs3wo+3w7yXgJIP1guQ0lPWD4P+j4JCXaM/wo+/wkAACEmM3/67wEmMML//l8D6Q
+l2/wo+/wkAAGEmM3/67wkAAEEmM3L//l8D6Ql23wo+/wkAAIEmM3/5CXa+Xw8KPv8JCXWuD+JIT1
+guQ0BPWD4FQ/kJdc8OD9VB+j8HXwCe6kJGf1guXwNJP1g+CQl3HwkJda4PskhPWC5DSW9YPgw5QF
+QAMCSbqQl3Hg/pCXXeCeQBOQl3HgkJdd8O1UQP2Ql1zw7k3wkAT94GQBcCiQl13g/5BBSpP+dEMr
+9YLkNJX1g+DDnkAG75BBEoAykJdd4JBBLoApkJdd4P+QQUqT/pCXWuAkQ/WC5DSV9YPgw55ABu+Q
+QNqAB5CXXeCQQPaTkJdq8JCXauB18AakJFD5dEA18HUR//USiROQl1zgkEHyk//TkJdp4J+Ql2jg
+lABADZCXWuD/5P0SXzICTemQl1rgJeAl4CTh9YLkNJL1g+D8o+D9o+D+o+D/kJdeEip/kJde4Pij
+4Pmj4Pqj4PvAAMABwALAA6sRqhKpExIp2f9+AKsUqhWpFhJjDP2s8BIp8uT8/dAD0ALQAdAA6y//
+6j7+7Tn97Dj8kJdeEip/kJde4Pij4Pmj4Pqj4PvAAMABwALAA6sRqhKpE5AAARJif/9+AKsUqhWp
+FpAAAhJjN/2s8BIp8uT8/dAD0ALQAdAA6y//6j7+7Tn97Dj8kJdeEip/kJde4Pij4Pmj4Pqj4PvA
+AMABwALAA6sRqhKpE5AAAhJif/9+AKsUqhWpFpAABBJjN/2s8BIp8uT8/dAD0ALQAdAA6y//6j7+
+7Tn97Dj8kJdeEip/kJde4Pij4Pmj4Pqj4PvAAMABwALAA6sRqhKpE5AAAxJif/9+AKsUqhWpFpAA
+BhJjN/2s8BIp8uT8/dAD0ALQAdAA6y//6j7+7Tn97Dj8kJdeEip/kJde4Pij4Pmj4Pqj4PvAAMAB
+wALAA6sRqhKpE5AABBJif/9+AKsUqhWpFpAACBJjN/2s8BIp8uT8/dAD0ALQAdAA6y//6j7+7Tn9
+7Dj8kJdeEip/qxGqEqkTkAAFEmJ//34AkJdm4Pyj4P0SKfLk/P2Ql17g+KPg+aPg+qPg+9MSY7uQ
+l15AUOD8o+D9o+D+o+D/wATABcAGwAerEaoSqROQAAUSYn//fgCQl2bg/KPg/RIp8qsHqgbQB9AG
+0AXQBMPvm//umv7tlAD97JQA/JCXXhIqf4AHEiqLAAAAAJCXXuD8o+D9o+D+o+D/kJda4CXgJeAk
+4fWC5DSS9YMSKn+Ql1zgJeAkZvWC5DRB9YPkk/50AZP/5Pz9kJde4Pij4Pmj4Pqj4PvTEmO7QAuQ
+l1rg/xJCIAJNYJCXXOAl4CSe9YLkNEH1g+ST/nQBk//k/P2Ql17g+KPg+aPg+qPg+8MSY7tAAwJN
+YJCXWuD/fQESXzICTWCQl1rg/ySE9YLkNJb1g+BkBWADAkujdfAJ76Qka/WC5fA0k/WD4GQBcAMC
+S6OQk2Lg/7QDC5CXXeDDlBlAPYAu77QCC5CXXeDDlBFALoAfkJNi4P+0AQuQl13gw5QKQBuADO9w
+EZCXXeDDlANADZCVY3QB8IAF5JCVY/CQl1rg/yRD9YLkNJX1g+D+w5QwUAvkkJdy8HSELwJLTZCV
+Y+BkAWADAktCkJda4CRk9YLkNJX1g+BkCmBbkJda4P/uJAX95DP8dCEv9YLkNJL1g+D/053sZID4
+dICYUDiQl1rg/u8kBf3kM/x0Qy71guQ0lfWD4NOd7GSA+HSAmFAWkJda4CSk9YLkNJb1g+D/kJdd
+4G9gVpCXWuAkQ/WC5DSV9YPg/9OURkAIkJdydAXwgBHv05Q8kJdyQAV0A/CAA3QB8JCXWuD/JEP1
+guQ0lfWD4P50IS/1guQ0kvWD7vCQl1rgJGT1guQ0lYAvkJda4P8khPWC5DSW9YPk8HRkL/WC5DSV
+9YPgBPCAFOSQl3LwkJda4CSE9YLkNJb1g+TwkJdd4P+Ql1rg/iSk9YLkNJb1g+/w7jDgHpCXcuDE
+VPDwkJda4MMT/ySk9YLkNAT1g+BUDwJNQ5CXWuDDE/8kpPWC5DQE9YPgVPACTUOQl1rg/ySE9YLk
+NJb1g+BkBmADAk1gdfAJ76Qka/WC5fA0k/WD4GQBcAMCTWCQl14SKosAAAAAkEIT5JP/fgCQl2bg
+/KPg/RIp8uT8/ZCXYhIqf+SQl1vwkJde4Pij4Pmj4Pqj4PvAAMABwALAA6sUqhWpFpCXW+D/dfAC
+pPWChfCDEmM3/azw75BCDpP/fgASKfLk/P3QA9AC0AHQAOsv/+o+/u05/ew4/JCXXhIqf5CXYuD8
+o+D9o+D+o+D/kJde4Pij4Pmj4Pqj4PvTEmO7UA6Ql1vgBPDgZAVgAwJL+5CXW+DDE/CQl3Lg/7QB
+DZCXW+BwXZCXcgTwgFvvtAMdkJdb4P9wCJCXcnQD8IBI77QBCJCXcnQB8IA8gDWQl3LgZAVwMpCX
+W+D/cAiQl3J0BfCAD++Ql3K0AQV0A/CAA3QB8NOQl2nglAOQl2jglABABeSQl3Lw05CXaeCUA5CX
+aOCUAEAF5JCXcvCQl1rg/zDgGpCXcuDEVPDw78MT/ySk9YLkNAT1g+BUD4ATkJda4MMT/ySk9YLk
+NAT1g+BU8PB0pC/1guQ0BPWDwIPAguD/kJdy4P7vTtCC0IPwkJda4P8khPWC5DSW9YPg05QFUA90
+hC/1guQ0lvWD4ATwgA+Ql1rgJIT1guQ0lvWD5PCQl1rg/ySE9YLkNAT1g+BUH8OUCVAFkJIAgBF0
+hC/1guQ0BPWD4JCSACDiBXQI8IADdATwkJda4GANkJbE4P+QkgDgw59QCJCSAOCQlsTwkJbE4JAE
+gPCrFKoVqRbk9fASY2+rFKoVqRaQAALk9fASY46QAATk9fASY46QAAbk9fASY46QAAjk9fASY46Q
+l1rg/yXgJMD1guQ0kfWD5PCj8O8l4CSD9YLkNJT1g+Two/DvJeAkw/WC5DSU9YPk8KPwkJda4ATw
+AkUOIu9wAwJQxZCXTeBgAwJVB5CXOeD8o+D9o+D+o+D/kICFEip/f4x+CBIv2ZCW5eD8o+D9o+D+
+o+D/kICFEip/f0R+CBIv2ZCW6eD8o+D9o+D+o+D/kICFEip/f1x+CBIv2ZCW7eD8o+D9o+D+o+D/
+kICFEip/f2x+DhIv2ZCW8eD8o+D9o+D+o+D/kICFEip/f3B+DhIv2ZCW9eD8o+D9o+D+o+D/kICF
+Eip/f3R+DhIv2ZCW+eD8o+D9o+D+o+D/kICFEip/f3h+DhIv2ZCW/eD8o+D9o+D+o+D/kICFEip/
+f3x+DhIv2ZCXAeD8o+D9o+D+o+D/kICFEip/f4B+DhIv2ZCXBeD8o+D9o+D+o+D/kICFEip/f4R+
+DhIv2ZCXCeD8o+D9o+D+o+D/kICFEip/f4h+DhIv2ZCXDeD8o+D9o+D+o+D/kICFEip/f4x+DhIv
+2ZCXEeD8o+D9o+D+o+D/kICFEip/f9B+DhIv2ZCXFeD8o+D9o+D+o+D/kICFEip/f9R+DhIv2ZCX
+GeD8o+D9o+D+o+D/kICFEip/f9h+DhIv2ZCXHeD8o+D9o+D+o+D/kICFEip/f9x+DhIv2ZCXIeD8
+o+D9o+D+o+D/kICFEip/f+B+DhIv2ZCXJeD8o+D9o+D+o+D/kICFEip/f+x+DhIv2ZCXKeD8o+D9
+o+D+o+D/kICFEip/fwR+DBIv2ZCXLeD8o+D9o+D+o+D/kICFEip/fwR+DRIv2ZCXMeD8o+D9o+D+
+o+D/kICFEip/fwx+CRIv2ZCXNeD8o+D9o+D+o+D/kICFEip/fwR+CBIv2ZCXTXQB8CKQl03gZAFg
+AwJVB3+MfggSJ96QlzkSKn9/RH4IEifekJblEip/f1x+CBIn3pCW6RIqf39sfg4SJ96Qlu0SKn9/
+cH4OEifekJbxEip/f3R+DhIn3pCW9RIqf394fg4SJ96QlvkSKn9/fH4OEifekJb9Eip/f4B+DhIn
+3pCXARIqf3+Efg4SJ96QlwUSKn9/iH4OEifekJcJEip/f4x+DhIn3pCXDRIqf3/Qfg4SJ96QlxES
+Kn9/1H4OEifekJcVEip/f9h+DhIn3pCXGRIqf3/cfg4SJ96Qlx0SKn9/4H4OEifekJchEip/f+x+
+DhIn3pCXJRIqf38EfgwSJ96QlykSKn9/BH4NEifekJctEip/fwx+CRIn3pCXMRIqf38EfggSJ96Q
+lzUSKn9/jH4IEifekJfDEip/kJfD4Pyj4P2j4P6j4P/tRMD97JCXwxIqf5CXw+D8o+D9o+D+o+D/
+kICFEip/f4x+CBIv2ZCAhRIqiwABAAB/RH4IEi/ZkICFEiqLANslpH9cfggSL9mQgIUSKosg2yWk
+f2x+DhIv2ZCAhRIqiyDbJaR/cH4OEi/ZkICFEiqLBBslpH90fg4SL9mQgIUSKosEGyWkf3h+DhIv
+2ZCAhRIqiwQbJaR/fH4OEi/ZkICFEiqLBBslpH+Afg4SL9mQgIUSKotj2yWkf4R+DhIv2ZCAhRIq
+iwQbJaR/iH4OEi/ZkICFEiqLINslpH+Mfg4SL9mQgIUSKosg2yWkf9B+DhIv2ZCAhRIqiyDbJaR/
+1H4OEi/ZkICFEiqLINslpH/Yfg4SL9mQgIUSKosAGyWkf9x+DhIv2ZCAhRIqiwAbJaR/4H4OEi/Z
+kICFEiqLJNslpH/sfg4SL9l/BH4MEifekJfDEip/kJfD4Pyj4P2j4P7k/+yQl8MSKn+Ql8Pg/KPg
+/aPg/qPgRBH/7JCXwxIqf5CXw+D8o+D9o+D+o+D/kICFEip/fwR+DBIv2X8Efg0SJ96Ql8MSKn+Q
+l8Pg/KPg/aPg/qPgVPD/7JCXwxIqf5CXw+D8o+D9o+D+o+BEAf/skJfDEip/kJfD4Pyj4P2j4P6j
+4P+QgIUSKn9/BH4NEi/Zfwx+CRIn3pCXwxIqf5CXw+D8o+D9o+D+5P/skJfDEip/kJfD4Pyj4P2j
+4P6j4EQR/+yQl8MSKn+Ql8Pg/KPg/aPg/qPg/5CAhRIqf38MfgkSL9l/DH4JEifekJfDEip/kJfD
+4Pyj4P2j4P6j4P/tVA/97FTw/JCXwxIqf5CXw+D8o+D9o+D+o+D/7UQQ/exEAfyQl8MSKn+Ql8Pg
+/KPg/aPg/qPg/5CAhRIqf38MfgkSL9l/BH4IEifekJfDEip/kJfD4Pyj4P2j4P6j4FTw/+yQl8MS
+Kn+Ql8Pg/KPg/aPg/qPgRAH/7JCXwxIqf5CXw+D8o+D9o+D+o+D/kICFEip/fwR+CBIv2eSQl03w
+Io8R7yXgJAT1guQ0lq+C9RKPE+URdfACpCSB+XSSNfB1FAH1FYkWdfAJ5RGkJGX1guXwNJOvgvUX
+jxjlEXXwCaQkY/l0kzXwdRkB9RqJG3TBJRH1guQ0kvWD4BJj2FWKAFWfAVW0AlXJA1XzBFYIBVYd
+BlZEDFZyDVafDlbMDwAAVwDlESXgJAT1guQ0lvWDdPDwo3QVgDzlESXgJAT1guQ0lvWDdPDwo3QQ
+gCflESXgJAT1guQ0lvWDdPDwo3QFgBLlESXgJAT1guQ0lvWDdPDwo+Tw5REl4CSB9YLkNJL1g3QP
+8KN0j/ACVwDlESXgJAT1guQ0lvWDdA/wo3T1gCflESXgJAT1guQ0lvWDdA/wo3TwgBLlESXgJAT1
+guQ0lvWD5PCjdA3w5REl4CSB9YLkNJL1g+Two/ACVwCQBEfgqxSqFakWEmKskARG4KsUqhWpFpAA
+ARJivpAEReCFE4KFEoPwkAREAlb3kARL4KsUqhWpFhJirJAESuCrFKoVqRaQAAESYr6QBEnghROC
+hRKD8JAESIBYkARP4KsUqhWpFhJirJAETuCrFKoVqRaQAAESYr6QBE3ghROChRKD8JAETIArkART
+4KsUqhWpFhJirJAEUuCrFKoVqRaQAAESYr6QBFHghROChRKD8JAEUOCFE4KFEoOj8KsUqhWpFsAD
+wALAARIp2f+rGaoaqRsSKdlf0AHQAtADEmKsqxTlFiQB+eQ1FfrAA8ACwAESKdn/qxmqGqkbkAAB
+EmJ/X9AB0ALQAxJirIUTgoUSg8CDwILg/4UYgoUXg+D+717QgtCD8IUTgoUSg6PAg8CC4P+FGIKF
+F4Oj4P7vXtCC0IPw5REl4CSB9YLkNJL1g+D+o+BOYEyQl3J0C/CQl3Lg/8OUAFADAlhGdAF+AKgH
+CIAFwzPOM87Y+f/lESXgJIH1guQ0kvWD4F7+o+BfTmAKkJdy4CQQo/CAaJCXcuAU8IC65REl4CQE
+9YLkNJb1g+D+o+BOYEeQl3J0D/CQl3Lg/8OUAEA8dAF+AKgHCIAFwzPOM87Y+f/lESXgJAT1guQ0
+lvWD4F7+o+BfTmAIkJdy4KPwgA2Ql3LgFPCAv+SQl3Pw5REl4CQE9YLkNJb1g+D+o+BOYEfkkJdy
+8JCXcuD/w5QQQAMCWQB0AX4AqAcIgAXDM84zztj5/+URJeAkBPWC5DSW9YPgXv6j4F9OYAaQl3Lg
+gGOQl3LgBPCAvuURJeAkgfWC5DSS9YPg/qPgTmBG5JCXcvCQl3Lg/8OUDFA8dAF+AKgHCIAFwzPO
+M87Y+f/lESXgJIH1guQ0kvWD4F7+o+BfTmAIkJdy4CQQgAmQl3LgBPCAv+SQl3TwkJdz4P918Anl
+EaQkZ/WC5fA0k/WD7/CQl3Tg/nXwCeURpCRo9YLl8DST9YPu8HSEJRH1guQ0BPWD4NOfQB+Ql3Pg
+/3SkJRH1guQ0lvWD7/B0hCUR9YLkNAT1g+/wkJdz4P/TlBNACJCTYnQD8IAh79OUC0AIkJNidALw
+gBPv05QDQAiQk2J0AfCABeSQk2LwkJNi4JAEsfAiwODA8MCDwILA0HXQAMAAwAHAAsADwATABcAG
+wAeQAcR0mfB0WaPwkAE34FUr9S+QATTgVSj1LJABNuBVKvUu5Swg4AMCW0uQATR0AfCF0U2F0k6F
+00+F1FCF1VGF1lKF11OF2VTlVFRAwxP/5VNUIG9wAwJa+OVUMOUDAlr45VJUH/UI5U1UP/UJ5VFU
+H//lCCXgJAP1guQ0lfWD5I/wEmLg5VNUH//lCCXgJMD1guQ0kfWD5I/wEmLg5QnTlARAA3UJBHXw
+CuUIpCQA9YLl8DSQ9YN18ALlCRJjzOD+o+D/5VNUHy//5D7+dfAK5QikJAD1guXwNJD1g3XwAuUJ
+EmPM7vCj7/DlVCDmJOVTVB//5Qgl4CSD9YLkNJT1g+SP8BJi4OVPMOc2rwgSddiAL+VTVB//5Qgl
+4CTD9YLkNJT1g+SP8BJi4OVPMOcS5U9Uf/3lU1Qf9Q2rCa8IEna65WZgT5CXreBgNZABW+TwkAE8
+dATwkAQb4FR/ZH9wNHVEFPVF+/1/WH4BEjWrkAFbdAXwkAaSdAHwkJen8IAUkAQb4FR//79/CpCX
+q+D/fQESb0nlLDDhIZABNHQC8IXRVoXSV4XTWIXUWYXVWoXWW4XXXIXZXRJ82eUsMOMGkAE0dAjw
+5Sww5AmQATR0EPBDVRDlLDDlIZABz+Aw5RrgVN/wkAE0dCDwkAAD4FT78H8QfgASN1SA/uUsMOYG
+kAE0dEDw5S4w4QmQATZ0AvBDVUDlLjDgCZABNnQB8BJ1YuUuMOJjkAE2dATw5WVkAXBX5WZgU+Vm
+ZAJwJ5AGq+CQl5/wkAaq4JCXqvCQl5/gcAeQl6rg/4AFkJef4P+Ql5/v8JCXoeBgA+AU8JCXoOTw
+kAFX8JABPHQC8JCXr+BU/fDgVO/wEnZO5S4w4zGQATZ0CPDlZWQBcCXlZmAhkAFX5PCQATx0AvB1
+RAN1RQDk+/1/VH4BEjWrkAFXdAXw5S4w5DqQATZ0EPDlZWQBcC7lZmAqkAFX5PCQATx0AvCQl67k
+8JCXr+BU/fDgVANwDpCXqfCQl6vg/30BEm9J5S4w5RKQATZ0IPDlZbQBB+VmYAMSffrlLjDmKpAB
+NnRA8OVlZAFwHuVmYBqQl6/gVP7w4FQDcA6Ql6nwkJer4P99ARJvSeUvMOEJkAE3dALwEnwodJkE
+kAHE8HRZo/DQB9AG0AXQBNAD0ALQAdAA0NDQgtCD0PDQ4DKQBER0EfCjdPDwo3QP8KPk8JCXWvCQ
+l1rg/8OUEFAUdKQv9YLkNAT1g+TwkJda4ATwgOLkkJda8JCXWuD7w5QgQAMCXzHg/3XwCqQkAPWC
+5fA0kPWD5PCj8HXwCu+kJAL1guXwNJD1g+Two/B18ArvpCQE9YLl8DSQ9YPk8KPwdfAK76QkBvWC
+5fA0kPWD5PCj8HXwCu+kJAj1guXwNJD1g+Two/B0pC/1guQ0lvWDdBPwdGQv9YLkNJX1g+Tw7yXg
+JMD1guQ0kfWD5PCj8O8l4CSD9YLkNJT1g+Two/DvJeAkA/WC5DSV9YPk8KPw7yXgJMP1guQ0lPWD
+5PCj8O8l4CSE9YLkNJX1g+Two/DvJeAkxPWC5DSV9YPk8KPwdGQv9YLkNJb1g+TwdEQv9YLkNJb1
+g+TwdIQv9YLkNJb1g+TwkEHEk/50AZP/kEGMdAGTL//kkz7DE/7vE//k/P3rJeAl4CTh9YLkNJL1
+gxIqf3XwCeukJGr1guXwNJP1g3QB8HXwCeukJGn1guXwNJP1g3QB8HTBK/WC5DSS9YN0DPB18Anr
+pCRl9YLl8DST9YN0//Cj8HXwCeukJGP1guXwNJP1g+Two3QP8HXwCeukJGf1guXwNJP1g3QT8HXw
+CeukJGj1guXwNJP1g+TwdIQr9YLkNAT1g3QT8JCXWuAE8AJdZiKpB3SEKfWC5DQE9YPgVH+Ql3Tw
+4FQf/5CXd/B18AnppCRo9YLl8DST9YPgkJd58HXwCemkJGf1guXwNJP1g+D+kJd68Okl4CQE9YLk
+NJb1g+D7o+CQl3vL8KPr8Okl4CSB9YLkNJL1g+D7o+CQl33L8KPr8O/TnkAMkJd64JCXd/CQl3Tw
+7XADAmCRkJd47fCQl3TgMOYOkJd34JCXdPCQl3jgFPCQl3jgcAMCYJGQl3fg/9OUAFADAmCR5JCX
+dvDvFJCXdfCQl3ng/ZCXdeD/051Ab++UEEAh7yTw/3QBfgCoBwiABcMzzjPO2Pn/kJd94F7+o+Bf
+TnAnkJd14P/DlBBQN3QBfgCoBwiABcMzzjPO2Pn/kJd74F7+o+BfTmAakJd14JCXdPCQl3bgBPCQ
+l3jg/5CXduBvYAiQl3XgFPCAg5CXeOD/kJd24MOfUA+Ql3XgtQUIkJd54JCXdPCQl3Tg/yXgJJ71
+guQ0QfWD5JP8dAGT/e8l4CRm9YLkNEH1g3QBky3/5JM8wxP+7xP/5Pz96SXgJeAk4fWC5DSS9YMS
+Kn+Ql3Tg/3SEKfWC5DQE9YPv8CKQAczgVA+Ql1rwkJda4P1wAwJifpCX0eD/dAF+AKgHCIAFwzPO
+M87Y+f/vXXADAmJfkJfR4HXwBKQk0PWC5fA0AfWD4JCXW/Cir+Qzo/DCr3VhAXVil3VjW3VkAXsB
+epd5XRJ4j5CXXOAk/5Kvo+D/xBMTE1QBkJfRMOBw4HXwAqQkiPWC5DXw9YPgkJde8JCX0eB18AKk
+JIn1guQ18PWD4JCXX/CQl9HgdfAEpCTR9YLl8DQB9YPgkJdg8JCX0eB18ASkJNL1guXwNAH1g+CQ
+l2HwkJfR4HXwBKQk0/WC5fA0AfWD4JCXYvCAQuB18ASkJNH1guXwNAH1g+CQl17wkJfR4HXwBKQk
+0vWC5fA0AfWD4JCXX/CQl9HgdfAEpCTT9YLl8DQB9YPgkJdg8O9Uf/97AXqXeV4SbbmQl1rg/5CX
+0eD+dAGoBgiAAsMz2Pz0X5CXWvCQl9Hg/3QBqAcIgALDM9j8kAHM8JCX0eAE8OBUA/ACYPLCr3To
+BJABxPB0YKPwkJda4JABxvCQl9HgkAHH8ID+IrsBDOWCKfWC5YM69YPgIlAG6SWC+OYiu/4G6SWC
++OIi5YIp9YLlgzr1g+STIrsBBomCioPwIlAC9yK7/gHzIvi7AQ3lgin1guWDOvWD6PAiUAbpJYLI
+9iK7/gXpJYLI8iLF8Pij4CjwxfD45YIVgnACFYPgOPAio/jgxfAl8PDlghWCcAIVg+DIOPDoIrsB
+ComCioPg9fCj4CJQBofwCecZIrv+B+P18AnjGSKJgoqD5JP18HQBkyK7ARDlgin1guWDOvWD4PXw
+o+AiUAnpJYL4hvAI5iK7/grpJYL44vXwCOIi5YMq9YPpk/Xwo+mTIrsBComCioPw5fCj8CJQBvcJ
+p/AZIrv+BvPl8AnzGSL4uwER5YIp9YLlgzr1g+jw5fCj8CJQCeklgsj2CKbwIrv+Ceklgsjy5fAI
+8iLrn/Xw6p5C8OmdQvDonEXwIqQlgvWC5fA1g/WDItCD0IL45JNwEnQBk3ANo6OT+HQBk/WCiIPk
+c3QCk2hg76Ojo4Df5JCXV/Cj8BJ5hZAAAuBU4JCXtmAFdAHwgAN0AvCQAPPgMOMIkJe3dAHwgAXk
+kJe38JCXt+C0AROQAPLgMOcMkJewdP3wo3Qz8IAKkJewdP3wo3Qv8OT1VRJdLhJ+jBJ5NhIyPRJE
+/3UoM+T1KXUqAvUrkAEw5Sjwo+Up8KPlKvCj5SvwkADz4DDiDZAFQXQQ8JAFWvCj5PCQAWR0oPB1
+RP/k9UX7fQF/UH4BEjWrdTAfdTEB5PUykAE45TDwo+Ux8KPlMvASeDiQl1nl2fCQATx0//Cj8KPw
+kAE08KPwo/Cj8MKvkACA4ERA8H8QfgASN1R16ANDqIXSr5ABwOTwo/Cj8KPwkAHG8KPwkJdX4GQB
+8CT+kAHE8HRjo/DlVTDmF8KvU1W/0q8SRQmQl43g/2ADtAEDEmkS5VUw5wfCr1NVf9Kv5VUw5ArC
+r1NV79KvEmDokJeN4HADEmwKEnyFgKqQAAISYn+Ql4vwkAABEmJ/JeAl4JCXivASKdkl4CXgkJeO
+8JCXi+CQBJjwkJeK4BMTVD+QBJnwkJeO4BMTVD+QBJrwkAVg4JCXmfCQBWHgkJea8JAFYuCQl5vw
+kAVj4JCXnPCir+QzkJdp8MKvkJeK4P8SeOSQl2ngJP+Sr5CXi+BwAwJmjJCXiuBwAwJmjJCXjuBw
+AwJmjKKv5DOQl2nwwq+Ql510AfCQl2ngJP+Sr5AAReBU/vCj4EQB8JCXg+BgHZCXj+D8o+D9o+D+
+o+D/kICFEip/f4B+CBIv2YAGkAUidH/wkABF4FTv8JAFh+BkgPCQl5ngkAWE8JCXmuCQBYXwkJeb
+4JAFhvCQl5zgkAWH8KKv5DOQl2nwwq+QATzgRCDwfSDk/xI3AIArkJeL4HAtkJed8JAAReBU/vCj
+4FT+8JAFIuTwoq8zkJdp8MKvfSDk/xI2kpCXaeAk/5KvIpCXZuvwo+rwo+nwkJdm4Puj4Pqj4PmQ
+AAQSYn//VB+Ql2nwkAADEmJ/VPDEVA+Ql2rw71QgxBNUB6PwkAAEEmJ/VEDEExNUA5CXbPCQl2ng
+/3XwCaQkZfWC5fA0k62CkJdt8KPt8O918AmkJGP5dJM18PqjdAHwo+rwo+nwkJdmo+D6o+D5kAAD
+EmJ/VA//kJdv4Puj4Pqj4PnvEmKskJdm4Puj4Pqj4PmQAAISYn//kJdv4Puj4Pqj4PmQAAHvEmK+
+kJdm4Puj4Pqj4PmQAAESYn//kJdt4Pyj4P31goyD7/ASKdmNgoyDo/CQl2rg/pCXaeD/JMH1guQ0
+kvWD7vCQl2vg/nXwCe+kJGn1guXwNJP1g+7wdfAJ76QkavWC5fA0k/WDdAHwkJds4P518AnvpCRr
+9YLl8DST9YPu8AJVCMDgwPDAg8CCwNB10ADAAMABwALAA8AEwAXABsAHkAHEdAHwdGij8FOR35AB
+POBVMPU0o+BVMfU1o+BVMvU25TQw4A+QATx0AfCQAVN0B/BDVYDlNDDhCZABPHQC8BJ50eU0MOI6
+kAE8dATwkAaS4DDgHnVEFHVFAOT7/X9YfgESNauQAVt0BfCQBpJ0AfCAD5CXp+TwkJer4P99ARJv
+SeU0MOMGkAE8dAjw5TQw5AmQATx0EPASfgvlNDDlCZABPHQg8BJuheU1MOAVkAE9dAHwkACD4JCX
+q/Dg/30BEm9J5TYw4waQAT50CPB0AQSQAcTwdGij8NAH0AbQBdAE0APQAtAB0ADQ0NCC0IPQ8NDg
+MpCXhODDlBRQBuAE8AJpzJCXhOBkFGADAmnMkJeT4HAlkJeW4HAfkJeU4HAZkJeX4HATkJeV4HAN
+kJeY4HAHkAT94FT+8JCXk+CQBIjwkJeU4JAEifCQl5XgkASK8KPk8JCXluCQBIzwkJeX4JAEjfCQ
+l5jgkASO8KPk8JCXf+CQBJDwkJeA4JAEkfCQl4HgkASS8JCXguCQBJPw5JCXhPCQl38E8OSj8KPw
+o/CQl5Pwo/Cj8KPwo/Cj8JAFYOCQl1rwkAVh4JCXW/CQBWLgkJdc8JAFY+CQl13wkJec4P+Ql13g
+/tOfUAuQl5zgw57TlAFAEZCXiuC0AQKAA5CXjuD/EnjkIpCX0O3wkJfP7/DTlAdQbeD/dAGoBwiA
+AsMz2Pz0/5AAR+Bf8H8QfgASN1SQl8/g/3QBqAcIgALDM9j8/5AARuBP8H8QfgASN1SQl9DgYBaQ
+l8/g/3QBqAcIgALDM9j8/5AARYB4kJfP4P90AagHCIACwzPY/PT/kABFgH2Ql8/gJPjw4P90AagH
+CIACwzPY/MRU8PT/kABD4F/wfxB+ABI3VJCXz+D/dAGoBwiAAsMz2Pz/kABD4E/wfxB+ABI3VJCX
+0OBgG5CXz+D/dAGoBwiAAsMz2PzEVPD/kABC4E+AGpCXz+D/dAGoBwiAAsMz2PzEVPD0/5AAQuBf
+8H8QfgASN1Qif3h+CBIn3pCXPRIqf38EfgwSJ96Ql0ESKn9/AH4IEifekJdFEip/kJe34JCXPbQB
+E+D8o+D9o+D+o+BUx//tVMf9gA3g/KPg/aPg/qPgVMf/7JCAhRIqf394fggSL9mQl0Hg/KPg/aPg
+/qPgVA//7JCAhRIqf38EfgwSL9mQl0Xg/KPg/aPg/qPgRAL/7JCAhRIqf38AfggSL9l/cH4OEife
+kJdJEip/kICFEiqLABsloH9wfg4SL9mQgFkSKosAAAAA5P3/EjSBkJe34LQBEZCAWRIqiwAAAADk
+/X8BEjSBkAAR4FT28H8QfgACN1SQl53gZAFgCZCXi+BgAwJs4pCXf+DDlP9QBeAE8IA7kJeA4MOU
+/1AG4ATw5IAokJeB4MOU/1AK4ATw5JCXgPCAFZCXguDDlP9QEOAE8OSQl4HwkJeA8JCXf/CQAETg
+VAxgduAw4jKQl5Pgw5T/UAXgBPCAJJCXlODDlP9QBuAE8OSAEZCXleDDlP9QDOAE8OSQl5TwkJeT
+8JAAROAw4zKQl5bgw5T/UAXgBPCAJJCXl+DDlP9QBuAE8OSAEZCXmODDlP9QDOAE8OSQl5fwkJeW
+8JAE/eBEAfAiixGKEokTkAACEmJ/kJeM8OAw4FyQl4N0AfB/gH4IEifekJeFEip/qxGqEqkTkAAB
+EmJ//+T8/f54GhIqbKgEqQWqBqsHkJeF4Pyj4P2j4P6j4P/sVAP860//6k7+6U396Ez8kJePEip/
+kAUi5PCANeSQl4Pwf4B+CBIn3uxUA/zsRMD8kJeFEip/kJeF4Pyj4P2j4P6j4P+QgIUSKn9/gH4I
+Ei/ZkJeM4JAARzDhEXQM8KPgRAzwkABG4EQQ8IAQ4FTz8KPgVPPwkABG4FTv8OSQl4nwIpCXY+vw
+o+rwo+nw7xJj2G3qAW34Am4GA24UBW4iBm4wB24+CW5MDG5aDW5oDgAAbnaQl2Pg+6Pg+qPg+QJ8
+spCXY+D7o+D6o+D5An6jkJdj4Puj4Pqj4PkCfFeQl2Pg+6Pg+qPg+QJ63pCXY+D7o+D6o+D5AmbA
+kJdj4Puj4Pqj4PkCflSQl2Pg+6Pg+qPg+QJEaJCXY+D7o+D6o+D5AmVfkJdj4Puj4Pqj4PkCe4mQ
+l2Pg+6Pg+qPg+QJs48KvdLkEkAHE8HRto/CA/pCXi+BkAWADAm9IkABG4EQB8JCXneBwQJCXg+Bg
+HZCXj+D8o+D9o+D+o+D/kICFEip/f4B+CBIv2YAGkAUidH/wkJeK4P8SeOSQl510AfCQAEXgVP7w
+gESQl53gZAFwPJCXjuD/Enjk5JCXnfCQAEXgRAHwkJeD4GAdkJeF4Pyj4P2j4P6j4P+QgIUSKn9/
+gH4IEi/ZgAWQBSLk8JAFh+BkgPCQl5ngkAWE8JCXmuCQBYXwkJeb4JAFhvCQl5zgkAWH8CKPJo0n
+5SZUD/+Ql6jgVA9vYHjlJjDiMJCXqOAg4gV/ARJ9PpCXqOAw4wrlJiDjBRJ9XYBWkJeo4CDjT+Um
+MONKrycSfR6AQ5CXqOBUD/+/DA7lJiDjCRJ8/e9gLhJ9XZCXqOBUD/+/BA7lJiDiCRJ7Gu9gFhJ7
+UpCXqOBUD/+/AgkSeqDvYAMSfXqQl6jgVA//kJer4FQPb3Aj4DDmH5CXqOBUD/+Ql57g/k+QAS/w
+7mSAkJee8JCXq+BUv/AikJdQ6/Cj6vCj6fCQl7bgZAJwAwJwvJABr+BgCZABx+AE8PCA8ZCX0+D/
+BPCQl1Dg+6Pg+qPg+ZAAAe8SYr6ir+QzkJdW8MKvkJdQ4Puj4Pqj4IthimL1Y3VkAnsBegF5oBJ4
+j5CXVuAk/5Kvoq/kM/DCr5CXU+D7o+D6o+CLYYpi9WOQl1Dg+6Pg+qPg+RIp2f/EVA/1ZHsBegF5
+ohJ4j5CXVuAk/5KvkAGvdP/wkAHL4GSA8CKQl77v8KPt8OSj8KPw5WZgBeT/En20kJe+4DDgCZCX
+wOTwo3SA8JAEHeBgHZAFIuCQl8Lw4P9UkGDskAHIdPzw71RvkAUi8IDdkJe+4P/DE5D9EPCQBCXv
+8JCXv+BgH6Oj4P8kD/WC5DT89YPgRIDwdBAv9YLkNPz1g+BEgPCQl8Cj4P/9JAj1guQ0/PWD5PB0
+CS31guQ0/PWD4FTw8HQhL/WC5DT89YPgVPfwkJfA4P6j4P8ikJfV7/DTlAdQSuD/dAGoBwiAAsMz
+2Pz0/5AARuBf8H8QfgASN1SQl9Xg/XQBfgCoBQiABcMzzjPO2Pn/kABE4Pvk/u9bqAUIgAbOoucT
+zhPY+P8ikJfV4CT48OD/dAGoBwiAAsMz2Pz0/5AAQ+Bf8H8QfgASN1SQl9Xg/XQBfgCoBQiABcMz
+zjPO2Pn/kABC4Pvk/u9bqAUIgAbOoucTzhPY+P8ikAAR4EQJ8H8QfgASN1SQlz3g/KPg/aPg/qPg
+/5CAhRIqf394fggSL9mQl0Hg/KPg/aPg/qPg/5CAhRIqf38EfgwSL9mQl0Xg/KPg/aPg/qPg/5CA
+hRIqf38AfggSL9mQl0ng/KPg/aPg/qPg/5CAhRIqf39wfg4SL9mQgFkSKosAAy2V5P3/EjSBkJe3
+4LQBEZCAWRIqiwADLZXk/X8BEjSBIsDgwPDAg8CCwNB10ADAAMABwALAA8AEwAXABsAHkAHEdLrw
+dHKj8FOR75AAUeD/kABV4F/1PeU9MOYYdEDwkJeM4FQD/78DC5CXieBgBX8BEnPY5T0w5xWQAFV0
+gPCQl4zgVAP/vwMFfwISc9iQAcR0uvB0cqPw0AfQBtAF0ATQA9AC0AHQANDQ0ILQg9Dw0OAy72A0
+fX1/AhI2dX0CfwMSNnWQAVfk8JABPHQC8H0BfwwSb0nk/xJ9tJAGBOBUf/CQBgrgVPjwIpABNnR9
+8KN0AvB9ff8SNuZ9An8DEjbmkAYE4ESA8JAGCuBEB/CQl6Pgo+CQBVjw5WUw4BuQl6HgcBrgBPCQ
+l6jgVA/DlARQDH0BfwQCb0nkkJeh8CLvFGAgFGBLJAJweJCXiXQC8JAASOBEDPCQAEfgRAjwkABF
+gFvkkJeJ8JCXheD8o+D9o+D+o+D/kICFEip/f4B+CBIv2ZAAReBE7/DgVO/wo4AtkJeJdAHwkJeP
+4Pyj4P2j4P6j4P+QgIUSKn9/gH4IEi/ZkABF4EQg8OBEEPCj4EQQ8CICdJoCY/7kk6P45JOjQAP2
+gAHyCN/0gCnkk6P4VAckDMjDM8RUD0QgyINABPRWgAFG9t/kgAsBAgQIECBAgJB+OuR+AZNgvKP/
+VD8w5QlUH/7kk6NgAQ7PVMAl4GCoQLjkk6P65JOj+OSTo8jFgsjKxYPK8KPIxYLIysWDyt/p3ueA
+vpCXbO/w05QHUDPg/3QBqAcIgALDM9j89P+QAEfgX/B/EH4AEjdUkJds4P90AagHCIACwzPY/PT/
+kABGgDuQl2zgJPjw4P90AagHCIACwzPY/MRU8PT/kABD4F/wfxB+ABI3VJCXbOD/dAGoBwiAAsMz
+2Pz0/5AAQ+Bf8H8QfgASN1Qi5JCXTvDlZmBs5WVkAXBm5WZkAmAG5WZkA3AdkJef4BTw4GAEo+Bg
+FpCXn+BwCpCXquCQl5/wgACQl050AfCQl07gYDGQl6/gRBDwkJel4PVE5PVF+/1/VH4BEjWrkAFX
+dAXwkJeo4FQPw5QEUAd9AX8EEm9JIqsHdfAJ66QkZ/WC5fA0k/WD4P90xSv1guQ0lvWD4FQf+tOf
+QAKqB+ol4CSe9YLkNEH1g+ST/nQBk//qJeAkZvWC5DRB9YN0AZMv/+STPsMT/u8T/+T8/esl4CXg
+JOH1guQ0kvWDEip/dIQr9YLkNAT1g+rw/yKQBqng9QpUwHAOkJep8JCXq+D/fQECb0nlCjDmEpCX
+qXQB8JCXr+BEAfASffqAB5CXr+BU/vDlCjDnKZCXqXQB8JCXr+BEAvB1RAPk9UX7/X9UfgESNauQ
+AVd0BfCQl650AfAikJev4FT98CKNC+ULVB/1D3QBL/WC5DSS9YPg9Q6QBP3gtAEFdRADgAN1EAHr
+05UQQAMCddjlDiUN/uUPkEHWk/3u0510AUAYL/WC5DSS9YPk8HSEL/WC5DQE9YPlC/AiL/WC5DSS
+9YPu8CKQACvgRAHwf+h+AxI3VJAACOBEEPB/EH4AEjdUkAAJ4FT38H8QfgASN1SQACjgVP7wfxB+
+ABI3VJAAIOBU/vB/EH4AEjdUkAAl4ERA8H8QfgASN1SQAAngVO/wfxB+AAI3VIsRihKJExJ96KsR
+qhKpExIp2fVmFGAOFGAPFGAaJANwPH8BgDXk/4AxkJeqdAHwkJef8OT/gCOrEaoSqROQAAISYn//
+kJeqcAV0BfCAAu/wkJeq4JCXn/Dk/xJzTCKQACXgVL/wfxB+ABI3VJAAIOBEAfB/EH4AEjdUkAAo
+4EQB8H8QfgASN1SQAPDgMOH5kAAJ4EQI8H8QfgASN1SQAAjgVO/wfxB+ABI3VJAAK+BU/vB/6H4D
+AjdUkABF5PCQBP3wo/CQl43wkJeT8JCXlvCQl5TwkJeX8JCXlfCQl5jwkJd/BPDko/Cj8KPwkJeE
+8JCXifCQl4vwkJed8JCXjvCQl4rwkJeD8JAAUeBEwPAii16KX4lgkJe46/Cj6vCj6fCj5WHwo+Vi
+8KPlY/CvZBVk72AqkJe74Puj5HXwARJi9qnw+hIp2f+Ql7jg+6PkdfABEmL2qfD67xJirIDPq16q
+X6lgIpAFYOCQl5nwkAVh4JCXmvCQBWLgkJeb8JAFY+CQl5zww3T/n/6Ql5rg055AHuAv8KPgtP8P
+5PCj4LT/A+TwIpCXnIADkJeb4ATwIpCXmuAv8CLk9WWQl6/w9WaQl6t0DPCQl6jw5JCXrfCQl6fw
+kJem8JCXqgTwkJef8OSQl67wkJep8JCXofCQl6V0B/DkkJeg8JCXo/CjdALw5JCXrPAi5JCXtfCi
+rzOQl1vwkACA4CDhGhI3ehI3epCXWuBkAfDgJIWQAcTwdHmj8IDfkAYwdAHwwq+QAIDgRIDwfxB+
+ABI3VJCXW+Ak/5KvIpCXruBgEuTwo+BU/fDgVANwM5CXqfCAI5CXoOAE8JCXr+BU7/CQl6Dg05QB
+QA3lZbQBEqPgcA7gBPAikJer4P99ARJvSSLkkJfN8KPwkAX44HAPo+BwC6PgcAej4HADfwEi05CX
+zuCU6JCXzeCUA0ADfwAifzJ+ABI3VJCXzuAE8HDKkJfN4ATwgMLkkJda8O+QADHw7lQD/6PgVPxP
+8KPgVH/wkAAw4CDnDpCXWuDDlGRQBeAE8IDrkJda4MOUZFAKkAAw4BJirH8BIn8AIuVVcDeQl6vg
+VA/TlAFQLJACh+BwJpCXtuC0AhCQl7Dg/qPg9YKOg+BgCIAPkAGv4HAJkJes4GADfwEifwAiEinZ
+/8OUIFAVkAACEmJ//nRDL/WC5DSV9YPu8IAO77QgCpAAAhJif5CTYfB0Qy/1guQ0lfWD4JAEsvAi
+kAQb4FR/ZH9wK5CXqeBkAWAjkJer4FQP05QCUBiQl6/gIOQRkJen4GQBYAmQl6HgcAN/ASJ/ACKQ
+ATd0AvCQBSJ0//ASehfvcAaQAch0/fB9An8DEjbm5WZgBX8BEn20EmsbkJeo4FTw8OBEAvAikAAC
+EmJ/kJeN8OCQBJvwkJeN4GAE4LT/HKKv5DP1EcKvkABH4FT78H1AfwESNq/lEST/kq8ij2eQl7Tg
+/30BEnC95WdgEHQhL/WC5DT89YPgRBDwgA50IS/1guQ0/PWD4FTv8JAEH3QB8CKQl2ru8KPv8HUi
+AY4j9SR/CxJ03xJ9l+T/En5HkJdq4Pyj4P3s+41E5PVFfQF/YH4BAjWrfQJ/AxI2deVmYCOQl63g
+YAZ9AX8MgA+Ql6jgVA/DlARQB30BfwQSb0nk/xJ9tCKQAgng/RIp2f6vBe0ukJey8JAAARJif//t
+L5CXs/CQAAISYn//rgXtL5CXtPAikAY04GAmFHAbewF6Bnk1f/l+ARJ6XL8BCZAGNeBUD/CABYAA
+An4s5JAGNPAikAABEmJ/kJet8BIp2WVmYBWir+QzkJdm8MKvEnd/kJdm4CT/kq8ikJdO4FTwRAPw
+VA9EgPCQl1Pk8KN0APCjdFbwewF6l3lOAnAHkAQb4FR//79/FJCXp+BwDpCXq+BUD9OUBFADfwEi
+fwAikAYE4FS/8O9gCuVltAEF5P8Se7+Ql6jgVPDw4EQM8CKQl9Lv8BJyF5CX0uBgBZAFIuTwkJeo
+4FTw8OBEBPAikAYE4ERA8OVltAEFfwESe7+Ql6jgVPDw4EQE8CKQl6jgVPDw4EQB8BJ3HRJ33ZCX
+qOBU8PDgRALwIn8LEnFy72UlYBDlJbQBBeT1JYADdSUBfwEifwAi72ALkJe34LQBEOT/gAmQl7fg
+tAEFfwESTl0ikABJ4JCX1PDgVA/w4P9E8JAASfDvRLDwIuSQl67wkJeg8JCXqfCQl6/wIpCXs+D/
+5P0ScL2QBB90AfAi5SK0AQsSfZe/AQV/ARJ+RyKQCSjv8KPwo/Cj8KPwo/AikAY0dP/w5KPwo/Cj
+8CJBl9EAQZeegEGX0wAAkAHK5SXw72ADEn3PIpCXZuvwo+rwo+nwIpCXx+vwo+rwo+nwIpCXyuvw
+o+rwo+nwIo+CjoOjo6Pk8CLk9SJ/YH4BAn54kJe34JCXTfAijxyMHY0eIo8fjCCNISISKdn1ZSIi
+4fs=
+====

Added: head/sys/contrib/dev/urtwn/urtwn-rtl8192cfwU.fw.uu
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/urtwn/urtwn-rtl8192cfwU.fw.uu	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,285 @@
+begin-base64 644 urtwn-rtl8192cfwU.fw.uu
+wYgCADwAAAAKKBQkrD4BAEM0AQAAAAAAAAAAAAAAAAACdFwAAAAAAAAAAAAAAAAAAAAAAlmZAAAA
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnK6AAAAAAACaAEAAAUE
+AwIAAwYFBAMABAYFBAIABAgHBgQABgoJCAYACAoJCAQACAoJCAIACAoJCAAACBIREAgAEBoZGBAA
+GCIhIBgAICIhIBAAICIhIAgAICIhHAgAICIhFAgAICIgGAgAIDEwIBAAMDEwGAAAMDEvEBAAMDEs
+EBAAMDEoEAAAMDEgEAAAMDEQEAAAMAQEBAUEBAUHBwcICgQEBAQGCg0OBQUHBwgMFBQEBAQFBwcJ
+CQwOExMEBAQEBQoREwkJCQkMExQVBQUFBQUFBQYGBgYGBQUFBgYGBgYFBQYGBgYGBgUFBQUJCQkJ
+Cw0QEgUJCgwNDhASCQkODhAQEhIAAAAAAAAAAAAkJioYGh0fIScpKgAAAB8jKCosAAQABAAIABAA
+GAAkADAASABgAJAAwADYAFAAeACgAMgBQAGQAeACMAEsAUAB4ALQA+gEsAZAB9AAAgACAAQACAAM
+ABIAGAAkADAASABgAGwAKAA8AFAAZACgAMgA8AEYAGQAoADwAWgB9AJYAyAD6AAAAAABAgICAwQF
+CAECAgIEBw8eBQYHDxIjRmQBAQEBAQIDBAUGBwgBAgMEBQYHCAUGBwgJCgsMIh8eGAAgAAAAAAAA
+AAAAAAAAqwd0hCv1guQ0BPWD4FR/kJd08OBUH6Pw+nXwCeukJGf1guXwNJP1g+D5kJd38Osl4CSB
+9YLkNJL1g+D/o+CQl3jP8KPv8Osl4CQE9YLkNJb1g+D/o+CQl3rP8KPv8Ool4CRm9YLkNEH1g+ST
+/nQBk//k/P3rJeAl4CTh9YLkNJL1gxIlCOrDmUADAkNZkJd14P90xSv1guQ0lvWD7/DvBJCXdvCQ
+l3fg/5CXduD+059AAwJDmO7DlBBAIe4k8P90AX4AqAcIgAXDM84zztj5/5CXeOBe/qPgX05wJ5CX
+duD/w5QQUEp0AX4AqAcIgAXDM84zztj5/5CXeuBe/qPgX05gLZCXduD/ZBNgCe9kEmAE77QRDZCX
+eOAw4AaQl3Z0GPCQl3bgkJd18JCXdPCASJCXduAE8AJCxJCXd+D6kJd14P9qcHl0xSv1guQ0lvWD
+7/B18AnrpCRp9YLl8DST9YPgtAETkJd04P8w5gEikJd14ERAkJd08JCXdeD/JeAknvWC5DRB9YPk
+k/x0AZP97yXgJGb1guQ0QfWDdAGTLf/kkzzDE/7vE//k/P3rJeAl4CTh9YLkNJL1gxIlCIBpkJd1
+4NOaQGGQl3fg/3TFK/WC5DSW9YPv8JCXde/wkJd08Pqj4P8l4CSe9YLkNEH1g+ST/HQBk/3vJeAk
+ZvWC5DRB9YN0AZMt/+STPMMT/u8T/+T8/esl4CXgJOH1guQ0kvWDEiUIrwIidAEr9YLkNJL1g+Tw
+kJd04ESA/3SEK/WC5DQE9YPv8CKQl2br8KPq8KPp8KKv5DOj8MKvkJdm4Puj4Pqj4PmQAAESYzf6
+5fAkAP/kOv6Ql2aj4PqQAAHuj/ASY44SJGL/YDe1IhuQl2bg+6Pg+qPg+ZAAARJjN2UkcATlI2Xw
+YC6Ql2bg+6Pg+qPg+ZAAARJjN/+u8BJ79IAVkJdm4Puj4Pqj4PkSJGJlImADEn6CkJdp4CT/kq8i
+5PUlIgJ+lQJ+nOSQl1rwkJda4P/DlCBAAwJOXHXwCe+kJGr1guXwNJP1g+BkAWADAk5TkJda4CXg
+JMD1guQ0kfWD4Pyj4NOUAOyUAFADAk5T73XwCqQkAPl0kDXw+nsBixT1FYkWkJda4CXgJMD1guQ0
+kfWD4P2j4JCXZs3wo+3w7yXgJIP1guQ0lPWD4P+j4JCXaM/wo+/wkAACEmM3/67wEmMML//l8D6Q
+l2/wo+/wkAAGEmM3/67wkAAEEmM3L//l8D6Ql23wo+/wkAAIEmM3/5CXa+Xw8KPv8JCXWuD+JIT1
+guQ0BPWD4FQ/kJdc8OD9VB+j8HXwCe6kJGf1guXwNJP1g+CQl3HwkJda4PskhPWC5DSW9YPgw5QF
+QAMCSbqQl3Hg/pCXXeCeQBOQl3HgkJdd8O1UQP2Ql1zw7k3wkAT94GQBcCiQl13g/5BBSpP+dEMr
+9YLkNJX1g+DDnkAG75BBEoAykJdd4JBBLoApkJdd4P+QQUqT/pCXWuAkQ/WC5DSV9YPgw55ABu+Q
+QNqAB5CXXeCQQPaTkJdq8JCXauB18AakJFD5dEA18HUR//USiROQl1zgkEHyk//TkJdp4J+Ql2jg
+lABADZCXWuD/5P0SXzICTemQl1rgJeAl4CTh9YLkNJL1g+D8o+D9o+D+o+D/kJdeEiUIkJde4Pij
+4Pmj4Pqj4PvAAMABwALAA6sRqhKpExIkYv9+AKsUqhWpFhJjDP2s8BIke+T8/dAD0ALQAdAA6y//
+6j7+7Tn97Dj8kJdeEiUIkJde4Pij4Pmj4Pqj4PvAAMABwALAA6sRqhKpE5AAARJif/9+AKsUqhWp
+FpAAAhJjN/2s8BIke+T8/dAD0ALQAdAA6y//6j7+7Tn97Dj8kJdeEiUIkJde4Pij4Pmj4Pqj4PvA
+AMABwALAA6sRqhKpE5AAAhJif/9+AKsUqhWpFpAABBJjN/2s8BIke+T8/dAD0ALQAdAA6y//6j7+
+7Tn97Dj8kJdeEiUIkJde4Pij4Pmj4Pqj4PvAAMABwALAA6sRqhKpE5AAAxJif/9+AKsUqhWpFpAA
+BhJjN/2s8BIke+T8/dAD0ALQAdAA6y//6j7+7Tn97Dj8kJdeEiUIkJde4Pij4Pmj4Pqj4PvAAMAB
+wALAA6sRqhKpE5AABBJif/9+AKsUqhWpFpAACBJjN/2s8BIke+T8/dAD0ALQAdAA6y//6j7+7Tn9
+7Dj8kJdeEiUIqxGqEqkTkAAFEmJ//34AkJdm4Pyj4P0SJHvk/P2Ql17g+KPg+aPg+qPg+9MSY7uQ
+l15AUOD8o+D9o+D+o+D/wATABcAGwAerEaoSqROQAAUSYn//fgCQl2bg/KPg/RIke6sHqgbQB9AG
+0AXQBMPvm//umv7tlAD97JQA/JCXXhIlCIAHEiUUAAAAAJCXXuD8o+D9o+D+o+D/kJda4CXgJeAk
+4fWC5DSS9YMSJQiQl1zgJeAkZvWC5DRB9YPkk/50AZP/5Pz9kJde4Pij4Pmj4Pqj4PvTEmO7QAuQ
+l1rg/xJCIAJNYJCXXOAl4CSe9YLkNEH1g+ST/nQBk//k/P2Ql17g+KPg+aPg+qPg+8MSY7tAAwJN
+YJCXWuD/fQESXzICTWCQl1rg/ySE9YLkNJb1g+BkBWADAkujdfAJ76Qka/WC5fA0k/WD4GQBcAMC
+S6OQk2Lg/7QDC5CXXeDDlBlAPYAu77QCC5CXXeDDlBFALoAfkJNi4P+0AQuQl13gw5QKQBuADO9w
+EZCXXeDDlANADZCVY3QB8IAF5JCVY/CQl1rg/yRD9YLkNJX1g+D+w5QwUAvkkJdy8HSELwJLTZCV
+Y+BkAWADAktCkJda4CRk9YLkNJX1g+BkCmBbkJda4P/uJAX95DP8dCEv9YLkNJL1g+D/053sZID4
+dICYUDiQl1rg/u8kBf3kM/x0Qy71guQ0lfWD4NOd7GSA+HSAmFAWkJda4CSk9YLkNJb1g+D/kJdd
+4G9gVpCXWuAkQ/WC5DSV9YPg/9OURkAIkJdydAXwgBHv05Q8kJdyQAV0A/CAA3QB8JCXWuD/JEP1
+guQ0lfWD4P50IS/1guQ0kvWD7vCQl1rgJGT1guQ0lYAvkJda4P8khPWC5DSW9YPk8HRkL/WC5DSV
+9YPgBPCAFOSQl3LwkJda4CSE9YLkNJb1g+TwkJdd4P+Ql1rg/iSk9YLkNJb1g+/w7jDgHpCXcuDE
+VPDwkJda4MMT/ySk9YLkNAT1g+BUDwJNQ5CXWuDDE/8kpPWC5DQE9YPgVPACTUOQl1rg/ySE9YLk
+NJb1g+BkBmADAk1gdfAJ76Qka/WC5fA0k/WD4GQBcAMCTWCQl14SJRQAAAAAkEIT5JP/fgCQl2bg
+/KPg/RIke+T8/ZCXYhIlCOSQl1vwkJde4Pij4Pmj4Pqj4PvAAMABwALAA6sUqhWpFpCXW+D/dfAC
+pPWChfCDEmM3/azw75BCDpP/fgASJHvk/P3QA9AC0AHQAOsv/+o+/u05/ew4/JCXXhIlCJCXYuD8
+o+D9o+D+o+D/kJde4Pij4Pmj4Pqj4PvTEmO7UA6Ql1vgBPDgZAVgAwJL+5CXW+DDE/CQl3Lg/7QB
+DZCXW+BwXZCXcgTwgFvvtAMdkJdb4P9wCJCXcnQD8IBI77QBCJCXcnQB8IA8gDWQl3LgZAVwMpCX
+W+D/cAiQl3J0BfCAD++Ql3K0AQV0A/CAA3QB8NOQl2nglAOQl2jglABABeSQl3Lw05CXaeCUA5CX
+aOCUAEAF5JCXcvCQl1rg/zDgGpCXcuDEVPDw78MT/ySk9YLkNAT1g+BUD4ATkJda4MMT/ySk9YLk
+NAT1g+BU8PB0pC/1guQ0BPWDwIPAguD/kJdy4P7vTtCC0IPwkJda4P8khPWC5DSW9YPg05QFUA90
+hC/1guQ0lvWD4ATwgA+Ql1rgJIT1guQ0lvWD5PCQl1rg/ySE9YLkNAT1g+BUH8OUCVAFkJIAgBF0
+hC/1guQ0BPWD4JCSACDiBXQI8IADdATwkJda4GANkJbE4P+QkgDgw59QCJCSAOCQlsTwkJbE4JAE
+gPCrFKoVqRbk9fASY2+rFKoVqRaQAALk9fASY46QAATk9fASY46QAAbk9fASY46QAAjk9fASY46Q
+l1rg/yXgJMD1guQ0kfWD5PCj8O8l4CSD9YLkNJT1g+Two/DvJeAkw/WC5DSU9YPk8KPwkJda4ATw
+AkUOIu9wAwJQxZCXTeBgAwJVB5CXOeD8o+D9o+D+o+D/kICWEiUIf4x+CBIrCJCW5eD8o+D9o+D+
+o+D/kICWEiUIf0R+CBIrCJCW6eD8o+D9o+D+o+D/kICWEiUIf1x+CBIrCJCW7eD8o+D9o+D+o+D/
+kICWEiUIf2x+DhIrCJCW8eD8o+D9o+D+o+D/kICWEiUIf3B+DhIrCJCW9eD8o+D9o+D+o+D/kICW
+EiUIf3R+DhIrCJCW+eD8o+D9o+D+o+D/kICWEiUIf3h+DhIrCJCW/eD8o+D9o+D+o+D/kICWEiUI
+f3x+DhIrCJCXAeD8o+D9o+D+o+D/kICWEiUIf4B+DhIrCJCXBeD8o+D9o+D+o+D/kICWEiUIf4R+
+DhIrCJCXCeD8o+D9o+D+o+D/kICWEiUIf4h+DhIrCJCXDeD8o+D9o+D+o+D/kICWEiUIf4x+DhIr
+CJCXEeD8o+D9o+D+o+D/kICWEiUIf9B+DhIrCJCXFeD8o+D9o+D+o+D/kICWEiUIf9R+DhIrCJCX
+GeD8o+D9o+D+o+D/kICWEiUIf9h+DhIrCJCXHeD8o+D9o+D+o+D/kICWEiUIf9x+DhIrCJCXIeD8
+o+D9o+D+o+D/kICWEiUIf+B+DhIrCJCXJeD8o+D9o+D+o+D/kICWEiUIf+x+DhIrCJCXKeD8o+D9
+o+D+o+D/kICWEiUIfwR+DBIrCJCXLeD8o+D9o+D+o+D/kICWEiUIfwR+DRIrCJCXMeD8o+D9o+D+
+o+D/kICWEiUIfwx+CRIrCJCXNeD8o+D9o+D+o+D/kICWEiUIfwR+CBIrCJCXTXQB8CKQl03gZAFg
+AwJVB3+MfggSImWQlzkSJQh/RH4IEiJlkJblEiUIf1x+CBIiZZCW6RIlCH9sfg4SImWQlu0SJQh/
+cH4OEiJlkJbxEiUIf3R+DhIiZZCW9RIlCH94fg4SImWQlvkSJQh/fH4OEiJlkJb9EiUIf4B+DhIi
+ZZCXARIlCH+Efg4SImWQlwUSJQh/iH4OEiJlkJcJEiUIf4x+DhIiZZCXDRIlCH/Qfg4SImWQlxES
+JQh/1H4OEiJlkJcVEiUIf9h+DhIiZZCXGRIlCH/cfg4SImWQlx0SJQh/4H4OEiJlkJchEiUIf+x+
+DhIiZZCXJRIlCH8EfgwSImWQlykSJQh/BH4NEiJlkJctEiUIfwx+CRIiZZCXMRIlCH8EfggSImWQ
+lzUSJQh/jH4IEiJlkJfDEiUIkJfD4Pyj4P2j4P6j4P/tRMD97JCXwxIlCJCXw+D8o+D9o+D+o+D/
+kICWEiUIf4x+CBIrCJCAlhIlFAABAAB/RH4IEisIkICWEiUUANslpH9cfggSKwiQgJYSJRQg2yWk
+f2x+DhIrCJCAlhIlFCDbJaR/cH4OEisIkICWEiUUBBslpH90fg4SKwiQgJYSJRQEGyWkf3h+DhIr
+CJCAlhIlFAQbJaR/fH4OEisIkICWEiUUBBslpH+Afg4SKwiQgJYSJRRj2yWkf4R+DhIrCJCAlhIl
+FAQbJaR/iH4OEisIkICWEiUUINslpH+Mfg4SKwiQgJYSJRQg2yWkf9B+DhIrCJCAlhIlFCDbJaR/
+1H4OEisIkICWEiUUINslpH/Yfg4SKwiQgJYSJRQAGyWkf9x+DhIrCJCAlhIlFAAbJaR/4H4OEisI
+kICWEiUUJNslpH/sfg4SKwh/BH4MEiJlkJfDEiUIkJfD4Pyj4P2j4P7k/+yQl8MSJQiQl8Pg/KPg
+/aPg/qPgRBH/7JCXwxIlCJCXw+D8o+D9o+D+o+D/kICWEiUIfwR+DBIrCH8Efg0SImWQl8MSJQiQ
+l8Pg/KPg/aPg/qPgVPD/7JCXwxIlCJCXw+D8o+D9o+D+o+BEAf/skJfDEiUIkJfD4Pyj4P2j4P6j
+4P+QgJYSJQh/BH4NEisIfwx+CRIiZZCXwxIlCJCXw+D8o+D9o+D+5P/skJfDEiUIkJfD4Pyj4P2j
+4P6j4EQR/+yQl8MSJQiQl8Pg/KPg/aPg/qPg/5CAlhIlCH8MfgkSKwh/DH4JEiJlkJfDEiUIkJfD
+4Pyj4P2j4P6j4P/tVA/97FTw/JCXwxIlCJCXw+D8o+D9o+D+o+D/7UQQ/exEAfyQl8MSJQiQl8Pg
+/KPg/aPg/qPg/5CAlhIlCH8MfgkSKwh/BH4IEiJlkJfDEiUIkJfD4Pyj4P2j4P6j4FTw/+yQl8MS
+JQiQl8Pg/KPg/aPg/qPgRAH/7JCXwxIlCJCXw+D8o+D9o+D+o+D/kICWEiUIfwR+CBIrCOSQl03w
+Io8R7yXgJAT1guQ0lq+C9RKPE+URdfACpCSB+XSSNfB1FAH1FYkWdfAJ5RGkJGX1guXwNJOvgvUX
+jxjlEXXwCaQkY/l0kzXwdRkB9RqJG3TBJRH1guQ0kvWD4BJj2FWKAFWfAVW0AlXJA1XzBFYIBVYd
+BlZEDFZyDVafDlbMDwAAVwDlESXgJAT1guQ0lvWDdPDwo3QVgDzlESXgJAT1guQ0lvWDdPDwo3QQ
+gCflESXgJAT1guQ0lvWDdPDwo3QFgBLlESXgJAT1guQ0lvWDdPDwo+Tw5REl4CSB9YLkNJL1g3QP
+8KN0j/ACVwDlESXgJAT1guQ0lvWDdA/wo3T1gCflESXgJAT1guQ0lvWDdA/wo3TwgBLlESXgJAT1
+guQ0lvWD5PCjdA3w5REl4CSB9YLkNJL1g+Two/ACVwCQBEfgqxSqFakWEmKskARG4KsUqhWpFpAA
+ARJivpAEReCFE4KFEoPwkAREAlb3kARL4KsUqhWpFhJirJAESuCrFKoVqRaQAAESYr6QBEnghROC
+hRKD8JAESIBYkARP4KsUqhWpFhJirJAETuCrFKoVqRaQAAESYr6QBE3ghROChRKD8JAETIArkART
+4KsUqhWpFhJirJAEUuCrFKoVqRaQAAESYr6QBFHghROChRKD8JAEUOCFE4KFEoOj8KsUqhWpFsAD
+wALAARIkYv+rGaoaqRsSJGJf0AHQAtADEmKsqxTlFiQB+eQ1FfrAA8ACwAESJGL/qxmqGqkbkAAB
+EmJ/X9AB0ALQAxJirIUTgoUSg8CDwILg/4UYgoUXg+D+717QgtCD8IUTgoUSg6PAg8CC4P+FGIKF
+F4Oj4P7vXtCC0IPw5REl4CSB9YLkNJL1g+D+o+BOYEyQl3J0C/CQl3Lg/8OUAFADAlhGdAF+AKgH
+CIAFwzPOM87Y+f/lESXgJIH1guQ0kvWD4F7+o+BfTmAKkJdy4CQQo/CAaJCXcuAU8IC65REl4CQE
+9YLkNJb1g+D+o+BOYEeQl3J0D/CQl3Lg/8OUAEA8dAF+AKgHCIAFwzPOM87Y+f/lESXgJAT1guQ0
+lvWD4F7+o+BfTmAIkJdy4KPwgA2Ql3LgFPCAv+SQl3Pw5REl4CQE9YLkNJb1g+D+o+BOYEfkkJdy
+8JCXcuD/w5QQQAMCWQB0AX4AqAcIgAXDM84zztj5/+URJeAkBPWC5DSW9YPgXv6j4F9OYAaQl3Lg
+gGOQl3LgBPCAvuURJeAkgfWC5DSS9YPg/qPgTmBG5JCXcvCQl3Lg/8OUDFA8dAF+AKgHCIAFwzPO
+M87Y+f/lESXgJIH1guQ0kvWD4F7+o+BfTmAIkJdy4CQQgAmQl3LgBPCAv+SQl3TwkJdz4P918Anl
+EaQkZ/WC5fA0k/WD7/CQl3Tg/nXwCeURpCRo9YLl8DST9YPu8HSEJRH1guQ0BPWD4NOfQB+Ql3Pg
+/3SkJRH1guQ0lvWD7/B0hCUR9YLkNAT1g+/wkJdz4P/TlBNACJCTYnQD8IAh79OUC0AIkJNidALw
+gBPv05QDQAiQk2J0AfCABeSQk2LwkJNi4JAEsfAiwODA8MCDwILA0HXQAMAAwAHAAsADwATABcAG
+wAeQAcR0mfB0WaPwkAE34FUr9S+QATTgVSj1LJABNuBVKvUu5Swg4AMCW0uQATR0AfCF0U2F0k6F
+00+F1FCF1VGF1lKF11OF2VTlVFRAwxP/5VNUIG9wAwJa+OVUMOUDAlr45VJUH/UI5U1UP/UJ5VFU
+H//lCCXgJAP1guQ0lfWD5I/wEmLg5VNUH//lCCXgJMD1guQ0kfWD5I/wEmLg5QnTlARAA3UJBHXw
+CuUIpCQA9YLl8DSQ9YN18ALlCRJjzOD+o+D/5VNUHy//5D7+dfAK5QikJAD1guXwNJD1g3XwAuUJ
+EmPM7vCj7/DlVCDmJOVTVB//5Qgl4CSD9YLkNJT1g+SP8BJi4OVPMOc2rwgSddiAL+VTVB//5Qgl
+4CTD9YLkNJT1g+SP8BJi4OVPMOcS5U9Uf/3lU1Qf9Q2rCa8IEna65WZgT5CXreBgNZABW+TwkAE8
+dATwkAQb4FR/ZH9wNHVEFPVF+/1/WH4BEjBikAFbdAXwkAaSdAHwkJen8IAUkAQb4FR//79/CpCX
+q+D/fQESb0nlLDDhIZABNHQC8IXRVoXSV4XTWIXUWYXVWoXWW4XXXIXZXRJ82eUsMOMGkAE0dAjw
+5Sww5AmQATR0EPBDVRDlLDDlIZABz+Aw5RrgVN/wkAE0dCDwkAAD4FT78H8QfgASMhWA/uUsMOYG
+kAE0dEDw5S4w4QmQATZ0AvBDVUDlLjDgCZABNnQB8BJ1YuUuMOJjkAE2dATw5WVkAXBX5WZgU+Vm
+ZAJwJ5AGq+CQl5/wkAaq4JCXqvCQl5/gcAeQl6rg/4AFkJef4P+Ql5/v8JCXoeBgA+AU8JCXoOTw
+kAFX8JABPHQC8JCXr+BU/fDgVO/wEnZO5S4w4zGQATZ0CPDlZWQBcCXlZmAhkAFX5PCQATx0AvB1
+RAN1RQDk+/1/VH4BEjBikAFXdAXw5S4w5DqQATZ0EPDlZWQBcC7lZmAqkAFX5PCQATx0AvCQl67k
+8JCXr+BU/fDgVANwDpCXqfCQl6vg/30BEm9J5S4w5RKQATZ0IPDlZbQBB+VmYAMSffrlLjDmKpAB
+NnRA8OVlZAFwHuVmYBqQl6/gVP7w4FQDcA6Ql6nwkJer4P99ARJvSeUvMOEJkAE3dALwEnwodJkE
+kAHE8HRZo/DQB9AG0AXQBNAD0ALQAdAA0NDQgtCD0PDQ4DKQBER0EfCjdPDwo3QP8KPk8JCXWvCQ
+l1rg/8OUEFAUdKQv9YLkNAT1g+TwkJda4ATwgOLkkJda8JCXWuD7w5QgQAMCXzHg/3XwCqQkAPWC
+5fA0kPWD5PCj8HXwCu+kJAL1guXwNJD1g+Two/B18ArvpCQE9YLl8DSQ9YPk8KPwdfAK76QkBvWC
+5fA0kPWD5PCj8HXwCu+kJAj1guXwNJD1g+Two/B0pC/1guQ0lvWDdBPwdGQv9YLkNJX1g+Tw7yXg
+JMD1guQ0kfWD5PCj8O8l4CSD9YLkNJT1g+Two/DvJeAkA/WC5DSV9YPk8KPw7yXgJMP1guQ0lPWD
+5PCj8O8l4CSE9YLkNJX1g+Two/DvJeAkxPWC5DSV9YPk8KPwdGQv9YLkNJb1g+TwdEQv9YLkNJb1
+g+TwdIQv9YLkNJb1g+TwkEHEk/50AZP/kEGMdAGTL//kkz7DE/7vE//k/P3rJeAl4CTh9YLkNJL1
+gxIlCHXwCeukJGr1guXwNJP1g3QB8HXwCeukJGn1guXwNJP1g3QB8HTBK/WC5DSS9YN0DPB18Anr
+pCRl9YLl8DST9YN0//Cj8HXwCeukJGP1guXwNJP1g+Two3QP8HXwCeukJGf1guXwNJP1g3QT8HXw
+CeukJGj1guXwNJP1g+TwdIQr9YLkNAT1g3QT8JCXWuAE8AJdZiKpB3SEKfWC5DQE9YPgVH+Ql3Tw
+4FQf/5CXd/B18AnppCRo9YLl8DST9YPgkJd58HXwCemkJGf1guXwNJP1g+D+kJd68Okl4CQE9YLk
+NJb1g+D7o+CQl3vL8KPr8Okl4CSB9YLkNJL1g+D7o+CQl33L8KPr8O/TnkAMkJd64JCXd/CQl3Tw
+7XADAmCRkJd47fCQl3TgMOYOkJd34JCXdPCQl3jgFPCQl3jgcAMCYJGQl3fg/9OUAFADAmCR5JCX
+dvDvFJCXdfCQl3ng/ZCXdeD/051Ab++UEEAh7yTw/3QBfgCoBwiABcMzzjPO2Pn/kJd94F7+o+Bf
+TnAnkJd14P/DlBBQN3QBfgCoBwiABcMzzjPO2Pn/kJd74F7+o+BfTmAakJd14JCXdPCQl3bgBPCQ
+l3jg/5CXduBvYAiQl3XgFPCAg5CXeOD/kJd24MOfUA+Ql3XgtQUIkJd54JCXdPCQl3Tg/yXgJJ71
+guQ0QfWD5JP8dAGT/e8l4CRm9YLkNEH1g3QBky3/5JM8wxP+7xP/5Pz96SXgJeAk4fWC5DSS9YMS
+JQiQl3Tg/3SEKfWC5DQE9YPv8CKQAczgVA+Ql1rwkJda4P1wAwJifpCX0eD/dAF+AKgHCIAFwzPO
+M87Y+f/vXXADAmJfkJfR4HXwBKQk0PWC5fA0AfWD4JCXW/Cir+Qzo/DCr3VhAXVil3VjW3VkAXsB
+epd5XRJ4j5CXXOAk/5Kvo+D/xBMTE1QBkJfRMOBw4HXwAqQkiPWC5DXw9YPgkJde8JCX0eB18AKk
+JIn1guQ18PWD4JCXX/CQl9HgdfAEpCTR9YLl8DQB9YPgkJdg8JCX0eB18ASkJNL1guXwNAH1g+CQ
+l2HwkJfR4HXwBKQk0/WC5fA0AfWD4JCXYvCAQuB18ASkJNH1guXwNAH1g+CQl17wkJfR4HXwBKQk
+0vWC5fA0AfWD4JCXX/CQl9HgdfAEpCTT9YLl8DQB9YPgkJdg8O9Uf/97AXqXeV4SbbmQl1rg/5CX
+0eD+dAGoBgiAAsMz2Pz0X5CXWvCQl9Hg/3QBqAcIgALDM9j8kAHM8JCX0eAE8OBUA/ACYPLCr3To
+BJABxPB0YKPwkJda4JABxvCQl9HgkAHH8ID+IrsBDOWCKfWC5YM69YPgIlAG6SWC+OYiu/4G6SWC
++OIi5YIp9YLlgzr1g+STIrsBBomCioPwIlAC9yK7/gHzIvi7AQ3lgin1guWDOvWD6PAiUAbpJYLI
+9iK7/gXpJYLI8iLF8Pij4CjwxfD45YIVgnACFYPgOPAio/jgxfAl8PDlghWCcAIVg+DIOPDoIrsB
+ComCioPg9fCj4CJQBofwCecZIrv+B+P18AnjGSKJgoqD5JP18HQBkyK7ARDlgin1guWDOvWD4PXw
+o+AiUAnpJYL4hvAI5iK7/grpJYL44vXwCOIi5YMq9YPpk/Xwo+mTIrsBComCioPw5fCj8CJQBvcJ
+p/AZIrv+BvPl8AnzGSL4uwER5YIp9YLlgzr1g+jw5fCj8CJQCeklgsj2CKbwIrv+Ceklgsjy5fAI
+8iLrn/Xw6p5C8OmdQvDonEXwIqQlgvWC5fA1g/WDItCD0IL45JNwEnQBk3ANo6OT+HQBk/WCiIPk
+c3QCk2hg76Ojo4Df5JCXV/Cj8BJ5hZAAAuBU4JCXtmAFdAHwgAN0AvCQAPPgMOMIkJe3dAHwgAXk
+kJe38JCXt+C0AROQAPLgMOcMkJewdP3wo3Qz8IAKkJewdP3wo3Qv8OT1VRJdLhJ+jBJ5NhIuARJE
+/3UoM+T1KXUqAvUrkAEw5Sjwo+Up8KPlKvCj5SvwkADz4DDiDZAFQXQQ8JAFWvCj5PCQAWR0oPB1
+RP/k9UX7fQF/UH4BEjBidTAfdTEB5PUykAE45TDwo+Ux8KPlMvASeDiQl1nl2fCQATx0//Cj8KPw
+kAE08KPwo/Cj8MKvkACA4ERA8H8QfgASMhV16ANDqIXSr5ABwOTwo/Cj8KPwkAHG8KPwkJdX4GQB
+8CT+kAHE8HRjo/DlVTDmF8KvU1W/0q8SRQmQl43g/2ADtAEDEmkS5VUw5wfCr1NVf9Kv5VUw5ArC
+r1NV79KvEmDokJeN4HADEmwKEnyFgKqQAAISYn+Ql4vwkAABEmJ/JeAl4JCXivASJGIl4CXgkJeO
+8JCXi+CQBJjwkJeK4BMTVD+QBJnwkJeO4BMTVD+QBJrwkAVg4JCXmfCQBWHgkJea8JAFYuCQl5vw
+kAVj4JCXnPCir+QzkJdp8MKvkJeK4P8SeOSQl2ngJP+Sr5CXi+BwAwJmjJCXiuBwAwJmjJCXjuBw
+AwJmjKKv5DOQl2nwwq+Ql510AfCQl2ngJP+Sr5AAReBU/vCj4EQB8JCXg+BgHZCXj+D8o+D9o+D+
+o+D/kICWEiUIf4B+CBIrCIAGkAUidH/wkABF4FTv8JAFh+BkgPCQl5ngkAWE8JCXmuCQBYXwkJeb
+4JAFhvCQl5zgkAWH8KKv5DOQl2nwwq+QATzgRCDwfSDk/xIxt4ArkJeL4HAtkJed8JAAReBU/vCj
+4FT+8JAFIuTwoq8zkJdp8MKvfSDk/xIxSZCXaeAk/5KvIpCXZuvwo+rwo+nwkJdm4Puj4Pqj4PmQ
+AAQSYn//VB+Ql2nwkAADEmJ/VPDEVA+Ql2rw71QgxBNUB6PwkAAEEmJ/VEDEExNUA5CXbPCQl2ng
+/3XwCaQkZfWC5fA0k62CkJdt8KPt8O918AmkJGP5dJM18PqjdAHwo+rwo+nwkJdmo+D6o+D5kAAD
+EmJ/VA//kJdv4Puj4Pqj4PnvEmKskJdm4Puj4Pqj4PmQAAISYn//kJdv4Puj4Pqj4PmQAAHvEmK+
+kJdm4Puj4Pqj4PmQAAESYn//kJdt4Pyj4P31goyD7/ASJGKNgoyDo/CQl2rg/pCXaeD/JMH1guQ0
+kvWD7vCQl2vg/nXwCe+kJGn1guXwNJP1g+7wdfAJ76QkavWC5fA0k/WDdAHwkJds4P518AnvpCRr
+9YLl8DST9YPu8AJVCMDgwPDAg8CCwNB10ADAAMABwALAA8AEwAXABsAHkAHEdAHwdGij8FOR35AB
+POBVMPU0o+BVMfU1o+BVMvU25TQw4A+QATx0AfCQAVN0B/BDVYDlNDDhCZABPHQC8BJ50eU0MOI6
+kAE8dATwkAaS4DDgHnVEFHVFAOT7/X9YfgESMGKQAVt0BfCQBpJ0AfCAD5CXp+TwkJer4P99ARJv
+SeU0MOMGkAE8dAjw5TQw5AmQATx0EPASfgvlNDDlCZABPHQg8BJuheU1MOAVkAE9dAHwkACD4JCX
+q/Dg/30BEm9J5TYw4waQAT50CPB0AQSQAcTwdGij8NAH0AbQBdAE0APQAtAB0ADQ0NCC0IPQ8NDg
+MpCXhODDlBRQBuAE8AJpzJCXhOBkFGADAmnMkJeT4HAlkJeW4HAfkJeU4HAZkJeX4HATkJeV4HAN
+kJeY4HAHkAT94FT+8JCXk+CQBIjwkJeU4JAEifCQl5XgkASK8KPk8JCXluCQBIzwkJeX4JAEjfCQ
+l5jgkASO8KPk8JCXf+CQBJDwkJeA4JAEkfCQl4HgkASS8JCXguCQBJPw5JCXhPCQl38E8OSj8KPw
+o/CQl5Pwo/Cj8KPwo/Cj8JAFYOCQl1rwkAVh4JCXW/CQBWLgkJdc8JAFY+CQl13wkJec4P+Ql13g
+/tOfUAuQl5zgw57TlAFAEZCXiuC0AQKAA5CXjuD/EnjkIpCX0O3wkJfP7/DTlAdQbeD/dAGoBwiA
+AsMz2Pz0/5AAR+Bf8H8QfgASMhWQl8/g/3QBqAcIgALDM9j8/5AARuBP8H8QfgASMhWQl9DgYBaQ
+l8/g/3QBqAcIgALDM9j8/5AARYB4kJfP4P90AagHCIACwzPY/PT/kABFgH2Ql8/gJPjw4P90AagH
+CIACwzPY/MRU8PT/kABD4F/wfxB+ABIyFZCXz+D/dAGoBwiAAsMz2Pz/kABD4E/wfxB+ABIyFZCX
+0OBgG5CXz+D/dAGoBwiAAsMz2PzEVPD/kABC4E+AGpCXz+D/dAGoBwiAAsMz2PzEVPD0/5AAQuBf
+8H8QfgASMhUif3h+CBIiZZCXPRIlCH8EfgwSImWQl0ESJQh/AH4IEiJlkJdFEiUIkJe34JCXPbQB
+E+D8o+D9o+D+o+BUx//tVMf9gA3g/KPg/aPg/qPgVMf/7JCAlhIlCH94fggSKwiQl0Hg/KPg/aPg
+/qPgVA//7JCAlhIlCH8EfgwSKwiQl0Xg/KPg/aPg/qPgRAL/7JCAlhIlCH8AfggSKwh/cH4OEiJl
+kJdJEiUIkICWEiUUABsloH9wfg4SKwiQgGgSJRQAAAAA5P3/EjAskJe34LQBEZCAaBIlFAAAAADk
+/X8BEjAskAAR4FT28H8QfgACMhWQl53gZAFgCZCXi+BgAwJs4pCXf+DDlP9QBeAE8IA7kJeA4MOU
+/1AG4ATw5IAokJeB4MOU/1AK4ATw5JCXgPCAFZCXguDDlP9QEOAE8OSQl4HwkJeA8JCXf/CQAETg
+VAxgduAw4jKQl5Pgw5T/UAXgBPCAJJCXlODDlP9QBuAE8OSAEZCXleDDlP9QDOAE8OSQl5TwkJeT
+8JAAROAw4zKQl5bgw5T/UAXgBPCAJJCXl+DDlP9QBuAE8OSAEZCXmODDlP9QDOAE8OSQl5fwkJeW
+8JAE/eBEAfAiixGKEokTkAACEmJ/kJeM8OAw4FyQl4N0AfB/gH4IEiJlkJeFEiUIqxGqEqkTkAAB
+EmJ//+T8/f54GhIk9agEqQWqBqsHkJeF4Pyj4P2j4P6j4P/sVAP860//6k7+6U396Ez8kJePEiUI
+kAUi5PCANeSQl4Pwf4B+CBIiZexUA/zsRMD8kJeFEiUIkJeF4Pyj4P2j4P6j4P+QgJYSJQh/gH4I
+EisIkJeM4JAARzDhEXQM8KPgRAzwkABG4EQQ8IAQ4FTz8KPgVPPwkABG4FTv8OSQl4nwIpCXY+vw
+o+rwo+nw7xJj2G3qAW34Am4GA24UBW4iBm4wB24+CW5MDG5aDW5oDgAAbnaQl2Pg+6Pg+qPg+QJ8
+spCXY+D7o+D6o+D5An6jkJdj4Puj4Pqj4PkCfFeQl2Pg+6Pg+qPg+QJ63pCXY+D7o+D6o+D5AmbA
+kJdj4Puj4Pqj4PkCflSQl2Pg+6Pg+qPg+QJEaJCXY+D7o+D6o+D5AmVfkJdj4Puj4Pqj4PkCe4mQ
+l2Pg+6Pg+qPg+QJs48KvdLkEkAHE8HRto/CA/pCXi+BkAWADAm9IkABG4EQB8JCXneBwQJCXg+Bg
+HZCXj+D8o+D9o+D+o+D/kICWEiUIf4B+CBIrCIAGkAUidH/wkJeK4P8SeOSQl510AfCQAEXgVP7w
+gESQl53gZAFwPJCXjuD/Enjk5JCXnfCQAEXgRAHwkJeD4GAdkJeF4Pyj4P2j4P6j4P+QgJYSJQh/
+gH4IEisIgAWQBSLk8JAFh+BkgPCQl5ngkAWE8JCXmuCQBYXwkJeb4JAFhvCQl5zgkAWH8CKPJo0n
+5SZUD/+Ql6jgVA9vYHjlJjDiMJCXqOAg4gV/ARJ9PpCXqOAw4wrlJiDjBRJ9XYBWkJeo4CDjT+Um
+MONKrycSfR6AQ5CXqOBUD/+/DA7lJiDjCRJ8/e9gLhJ9XZCXqOBUD/+/BA7lJiDiCRJ7Gu9gFhJ7
+UpCXqOBUD/+/AgkSeqDvYAMSfXqQl6jgVA//kJer4FQPb3Aj4DDmH5CXqOBUD/+Ql57g/k+QAS/w
+7mSAkJee8JCXq+BUv/AikJdQ6/Cj6vCj6fCQl7bgZAJwAwJwvJABr+BgCZABx+AE8PCA8ZCX0+D/
+BPCQl1Dg+6Pg+qPg+ZAAAe8SYr6ir+QzkJdW8MKvkJdQ4Puj4Pqj4IthimL1Y3VkAnsBegF5oBJ4
+j5CXVuAk/5Kvoq/kM/DCr5CXU+D7o+D6o+CLYYpi9WOQl1Dg+6Pg+qPg+RIkYv/EVA/1ZHsBegF5
+ohJ4j5CXVuAk/5KvkAGvdP/wkAHL4GSA8CKQl77v8KPt8OSj8KPw5WZgBeT/En20kJe+4DDgCZCX
+wOTwo3SA8JAEHeBgHZAFIuCQl8Lw4P9UkGDskAHIdPzw71RvkAUi8IDdkJe+4P/DE5D9EPCQBCXv
+8JCXv+BgH6Oj4P8kD/WC5DT89YPgRIDwdBAv9YLkNPz1g+BEgPCQl8Cj4P/9JAj1guQ0/PWD5PB0
+CS31guQ0/PWD4FTw8HQhL/WC5DT89YPgVPfwkJfA4P6j4P8ikJfV7/DTlAdQSuD/dAGoBwiAAsMz
+2Pz0/5AARuBf8H8QfgASMhWQl9Xg/XQBfgCoBQiABcMzzjPO2Pn/kABE4Pvk/u9bqAUIgAbOoucT
+zhPY+P8ikJfV4CT48OD/dAGoBwiAAsMz2Pz0/5AAQ+Bf8H8QfgASMhWQl9Xg/XQBfgCoBQiABcMz
+zjPO2Pn/kABC4Pvk/u9bqAUIgAbOoucTzhPY+P8ikAAR4EQJ8H8QfgASMhWQlz3g/KPg/aPg/qPg
+/5CAlhIlCH94fggSKwiQl0Hg/KPg/aPg/qPg/5CAlhIlCH8EfgwSKwiQl0Xg/KPg/aPg/qPg/5CA
+lhIlCH8AfggSKwiQl0ng/KPg/aPg/qPg/5CAlhIlCH9wfg4SKwiQgGgSJRQAAy2V5P3/EjAskJe3
+4LQBEZCAaBIlFAADLZXk/X8BEjAsIsDgwPDAg8CCwNB10ADAAMABwALAA8AEwAXABsAHkAHEdLrw
+dHKj8FOR75AAUeD/kABV4F/1PeU9MOYYdEDwkJeM4FQD/78DC5CXieBgBX8BEnPY5T0w5xWQAFV0
+gPCQl4zgVAP/vwMFfwISc9iQAcR0uvB0cqPw0AfQBtAF0ATQA9AC0AHQANDQ0ILQg9Dw0OAy72A0
+fX1/AhIxLH0CfwMSMSyQAVfk8JABPHQC8H0BfwwSb0nk/xJ9tJAGBOBUf/CQBgrgVPjwIpABNnR9
+8KN0AvB9ff8SMZ19An8DEjGdkAYE4ESA8JAGCuBEB/CQl6Pgo+CQBVjw5WUw4BuQl6HgcBrgBPCQ
+l6jgVA/DlARQDH0BfwQCb0nkkJeh8CLvFGAgFGBLJAJweJCXiXQC8JAASOBEDPCQAEfgRAjwkABF
+gFvkkJeJ8JCXheD8o+D9o+D+o+D/kICWEiUIf4B+CBIrCJAAReBE7/DgVO/wo4AtkJeJdAHwkJeP
+4Pyj4P2j4P6j4P+QgJYSJQh/gH4IEisIkABF4EQg8OBEEPCj4EQQ8CICdJoCY/7kk6P45JOjQAP2
+gAHyCN/0gCnkk6P4VAckDMjDM8RUD0QgyINABPRWgAFG9t/kgAsBAgQIECBAgJB+OuR+AZNgvKP/
+VD8w5QlUH/7kk6NgAQ7PVMAl4GCoQLjkk6P65JOj+OSTo8jFgsjKxYPK8KPIxYLIysWDyt/p3ueA
+vpCXbO/w05QHUDPg/3QBqAcIgALDM9j89P+QAEfgX/B/EH4AEjIVkJds4P90AagHCIACwzPY/PT/
+kABGgDuQl2zgJPjw4P90AagHCIACwzPY/MRU8PT/kABD4F/wfxB+ABIyFZCXbOD/dAGoBwiAAsMz
+2Pz0/5AAQ+Bf8H8QfgASMhUi5JCXTvDlZmBs5WVkAXBm5WZkAmAG5WZkA3AdkJef4BTw4GAEo+Bg
+FpCXn+BwCpCXquCQl5/wgACQl050AfCQl07gYDGQl6/gRBDwkJel4PVE5PVF+/1/VH4BEjBikAFX
+dAXwkJeo4FQPw5QEUAd9AX8EEm9JIqsHdfAJ66QkZ/WC5fA0k/WD4P90xSv1guQ0lvWD4FQf+tOf
+QAKqB+ol4CSe9YLkNEH1g+ST/nQBk//qJeAkZvWC5DRB9YN0AZMv/+STPsMT/u8T/+T8/esl4CXg
+JOH1guQ0kvWDEiUIdIQr9YLkNAT1g+rw/yKQBqng9QpUwHAOkJep8JCXq+D/fQECb0nlCjDmEpCX
+qXQB8JCXr+BEAfASffqAB5CXr+BU/vDlCjDnKZCXqXQB8JCXr+BEAvB1RAPk9UX7/X9UfgESMGKQ
+AVd0BfCQl650AfAikJev4FT98CKNC+ULVB/1D3QBL/WC5DSS9YPg9Q6QBP3gtAEFdRADgAN1EAHr
+05UQQAMCddjlDiUN/uUPkEHWk/3u0510AUAYL/WC5DSS9YPk8HSEL/WC5DQE9YPlC/AiL/WC5DSS
+9YPu8CKQACvgRAHwf+h+AxIyFZAACOBEEPB/EH4AEjIVkAAJ4FT38H8QfgASMhWQACjgVP7wfxB+
+ABIyFZAAIOBU/vB/EH4AEjIVkAAl4ERA8H8QfgASMhWQAAngVO/wfxB+AAIyFYsRihKJExJ96KsR
+qhKpExIkYvVmFGAOFGAPFGAaJANwPH8BgDXk/4AxkJeqdAHwkJef8OT/gCOrEaoSqROQAAISYn//
+kJeqcAV0BfCAAu/wkJeq4JCXn/Dk/xJzTCKQACXgVL/wfxB+ABIyFZAAIOBEAfB/EH4AEjIVkAAo
+4EQB8H8QfgASMhWQAPDgMOH5kAAJ4EQI8H8QfgASMhWQAAjgVO/wfxB+ABIyFZAAK+BU/vB/6H4D
+AjIVkABF5PCQBP3wo/CQl43wkJeT8JCXlvCQl5TwkJeX8JCXlfCQl5jwkJd/BPDko/Cj8KPwkJeE
+8JCXifCQl4vwkJed8JCXjvCQl4rwkJeD8JAAUeBEwPAii16KX4lgkJe46/Cj6vCj6fCj5WHwo+Vi
+8KPlY/CvZBVk72AqkJe74Puj5HXwARJi9qnw+hIkYv+Ql7jg+6PkdfABEmL2qfD67xJirIDPq16q
+X6lgIpAFYOCQl5nwkAVh4JCXmvCQBWLgkJeb8JAFY+CQl5zww3T/n/6Ql5rg055AHuAv8KPgtP8P
+5PCj4LT/A+TwIpCXnIADkJeb4ATwIpCXmuAv8CLk9WWQl6/w9WaQl6t0DPCQl6jw5JCXrfCQl6fw
+kJem8JCXqgTwkJef8OSQl67wkJep8JCXofCQl6V0B/DkkJeg8JCXo/CjdALw5JCXrPAi5JCXtfCi
+rzOQl1vwkACA4CDhGhIyKxIyK5CXWuBkAfDgJIWQAcTwdHmj8IDfkAYwdAHwwq+QAIDgRIDwfxB+
+ABIyFZCXW+Ak/5KvIpCXruBgEuTwo+BU/fDgVANwM5CXqfCAI5CXoOAE8JCXr+BU7/CQl6Dg05QB
+QA3lZbQBEqPgcA7gBPAikJer4P99ARJvSSLkkJfN8KPwkAX44HAPo+BwC6PgcAej4HADfwEi05CX
+zuCU6JCXzeCUA0ADfwAifzJ+ABIyFZCXzuAE8HDKkJfN4ATwgMLkkJda8O+QADHw7lQD/6PgVPxP
+8KPgVH/wkAAw4CDnDpCXWuDDlGRQBeAE8IDrkJda4MOUZFAKkAAw4BJirH8BIn8AIuVVcDeQl6vg
+VA/TlAFQLJACh+BwJpCXtuC0AhCQl7Dg/qPg9YKOg+BgCIAPkAGv4HAJkJes4GADfwEifwAiEiRi
+/8OUIFAVkAACEmJ//nRDL/WC5DSV9YPu8IAO77QgCpAAAhJif5CTYfB0Qy/1guQ0lfWD4JAEsvAi
+kAQb4FR/ZH9wK5CXqeBkAWAjkJer4FQP05QCUBiQl6/gIOQRkJen4GQBYAmQl6HgcAN/ASJ/ACKQ
+ATd0AvCQBSJ0//ASehfvcAaQAch0/fB9An8DEjGd5WZgBX8BEn20EmsbkJeo4FTw8OBEAvAikAAC
+EmJ/kJeN8OCQBJvwkJeN4GAE4LT/HKKv5DP1EcKvkABH4FT78H1AfwESMWblEST/kq8ij2eQl7Tg
+/30BEnC95WdgEHQhL/WC5DT89YPgRBDwgA50IS/1guQ0/PWD4FTv8JAEH3QB8CKQl2ru8KPv8HUi
+AY4j9SR/CxJ03xJ9l+T/En5HkJdq4Pyj4P3s+41E5PVFfQF/YH4BAjBifQJ/AxIxLOVmYCOQl63g
+YAZ9AX8MgA+Ql6jgVA/DlARQB30BfwQSb0nk/xJ9tCKQAgng/RIkYv6vBe0ukJey8JAAARJif//t
+L5CXs/CQAAISYn//rgXtL5CXtPAikAY04GAmFHAbewF6Bnk1f/l+ARJ6XL8BCZAGNeBUD/CABYAA
+An4s5JAGNPAikAABEmJ/kJet8BIkYmVmYBWir+QzkJdm8MKvEnd/kJdm4CT/kq8ikJdO4FTwRAPw
+VA9EgPCQl1Pk8KN0APCjdFbwewF6l3lOAnAHkAQb4FR//79/FJCXp+BwDpCXq+BUD9OUBFADfwEi
+fwAikAYE4FS/8O9gCuVltAEF5P8Se7+Ql6jgVPDw4EQM8CKQl9Lv8BJyF5CX0uBgBZAFIuTwkJeo
+4FTw8OBEBPAikAYE4ERA8OVltAEFfwESe7+Ql6jgVPDw4EQE8CKQl6jgVPDw4EQB8BJ3HRJ33ZCX
+qOBU8PDgRALwIn8LEnFy72UlYBDlJbQBBeT1JYADdSUBfwEifwAi72ALkJe34LQBEOT/gAmQl7fg
+tAEFfwESTl0ikABJ4JCX1PDgVA/w4P9E8JAASfDvRLDwIuSQl67wkJeg8JCXqfCQl6/wIpCXs+D/
+5P0ScL2QBB90AfAi5SK0AQsSfZe/AQV/ARJ+RyKQCSjv8KPwo/Cj8KPwo/AikAY0dP/w5KPwo/Cj
+8CJBl9EAQZeegEGX0wAAkAHK5SXw72ADEn3PIpCXZuvwo+rwo+nwIpCXx+vwo+rwo+nwIpCXyuvw
+o+rwo+nwIo+CjoOjo6Pk8CLk9SJ/YH4BAn54kJe34JCXTfAijxyMHY0eIo8fjCCNISISJGL1ZSIi
+po4=
+====

Modified: head/sys/dev/usb/wlan/if_urtwn.c
==============================================================================
--- head/sys/dev/usb/wlan/if_urtwn.c	Wed Jul 10 07:40:30 2013	(r253138)
+++ head/sys/dev/usb/wlan/if_urtwn.c	Wed Jul 10 08:21:09 2013	(r253139)
@@ -3029,5 +3029,4 @@ DRIVER_MODULE(urtwn, uhub, urtwn_driver,
 MODULE_DEPEND(urtwn, usb, 1, 1, 1);
 MODULE_DEPEND(urtwn, wlan, 1, 1, 1);
 MODULE_DEPEND(urtwn, firmware, 1, 1, 1);
-MODULE_DEPEND(urtwn, urtwn_fw, 1, 1, 1);
 MODULE_VERSION(urtwn, 1);

Added: head/sys/modules/usb/urtwnfw/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/usb/urtwnfw/Makefile	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+SUBDIR=	urtwnrtl8192cT urtwnrtl8192cU
+
+.include 

Added: head/sys/modules/usb/urtwnfw/Makefile.inc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/usb/urtwnfw/Makefile.inc	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,15 @@
+# $FreeBSD$
+#
+# Common rules for building firmware.  Note this gets auto-included
+# by the subdir Makefile's as a consequence of included bsd.kmod.mk.
+
+_FIRM=	${IMG}.fw
+
+CLEANFILES+=	${_FIRM}
+
+FIRMWS=	${_FIRM}:${KMOD}:111
+
+FIRMWARE_LICENSE=	realtek
+
+${_FIRM}: ${.CURDIR}/../../../../contrib/dev/urtwn/${_FIRM}.uu
+	uudecode -p $? > ${.TARGET}

Added: head/sys/modules/usb/urtwnfw/urtwnrtl8192cT/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/usb/urtwnfw/urtwnrtl8192cT/Makefile	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+KMOD=	urtwn-rtl8192cfwT
+IMG=	urtwn-rtl8192cfwT
+
+.include 

Added: head/sys/modules/usb/urtwnfw/urtwnrtl8192cU/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/modules/usb/urtwnfw/urtwnrtl8192cU/Makefile	Wed Jul 10 08:21:09 2013	(r253139)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+KMOD=	urtwn-rtl8192cfwU
+IMG=	urtwn-rtl8192cfwU
+
+.include 

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 08:45:20 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id E60AD287;
 Wed, 10 Jul 2013 08:45:20 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au
 [211.29.132.249])
 by mx1.freebsd.org (Postfix) with ESMTP id 5576B1C7A;
 Wed, 10 Jul 2013 08:45:20 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 7D9051041279;
 Wed, 10 Jul 2013 18:45:17 +1000 (EST)
Date: Wed, 10 Jul 2013 18:45:17 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Aleksandr Rybalko 
Subject: Re: svn commit: r252425 - head/sys/arm/arm
In-Reply-To: <20130708132052.f9757df88ede1b087de9da8c@freebsd.org>
Message-ID: <20130710184356.R1991@besplex.bde.org>
References: <201306301952.r5UJqfwf010873@svn.freebsd.org>
 <20130701113808.F894@besplex.bde.org>
 <20130708132052.f9757df88ede1b087de9da8c@freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=eqSHVfVX c=1 sm=1 a=tB-szSHScXMA:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=E11o_6pwCccA:10
 a=i2sZn5OXAAAA:8 a=UzOYU2gb_QF09RkQxBUA:9 a=CjuIK1q_8ugA:10
 a=PObHtDWs1CoA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org, Bruce Evans 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 08:45:21 -0000

On Mon, 8 Jul 2013, Aleksandr Rybalko wrote:

> On Mon, 1 Jul 2013 11:56:25 +1000 (EST)
> Bruce Evans  wrote:
>
>> On Sun, 30 Jun 2013, Aleksandr Rybalko wrote:
>>
>>> Log:
>>>  Decrypt magic numbers - define names for fields of Generic Timer's CNTKCTL reg.
>>>
>>>  Submitted by:	Ruslan Bukin 
>>>
>>> Modified:
>>>  head/sys/arm/arm/generic_timer.c
>>>
>>> Modified: head/sys/arm/arm/generic_timer.c
>>> ==============================================================================
>>> --- head/sys/arm/arm/generic_timer.c	Sun Jun 30 19:36:17 2013	(r252424)
>>> +++ head/sys/arm/arm/generic_timer.c	Sun Jun 30 19:52:41 2013	(r252425)
>>> @@ -66,7 +66,22 @@ __FBSDID("$FreeBSD$");
>>> #define	GENERIC_TIMER_REG_CTRL		0
>>> #define	GENERIC_TIMER_REG_TVAL		1
>>>
>>> -#define	CNTPSIRQ	29
>>> +#define	GENERIC_TIMER_CNTKCTL_PL0PTEN	(1 << 9) /* Physical timer registers
>>> +						    access from PL0 */
>>> +#define	GENERIC_TIMER_CNTKCTL_PL0VTEN	(1 << 8) /* Virtual timer registers
>>
>> With names like these, the magic numbers are better.  The prefix name
>> GENERIC_TIMER is especially bad.  GT would be good.
>
> Changed in r252780.

Thanks.  It looks OK now.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 09:24:03 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id C7448C8A;
 Wed, 10 Jul 2013 09:24:03 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B9EA01E4F;
 Wed, 10 Jul 2013 09:24:03 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6A9O3IG070469;
 Wed, 10 Jul 2013 09:24:03 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6A9O3Br070468;
 Wed, 10 Jul 2013 09:24:03 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307100924.r6A9O3Br070468@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 10 Jul 2013 09:24:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253140 - head/sys/amd64/amd64
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 09:24:03 -0000

Author: kib
Date: Wed Jul 10 09:24:03 2013
New Revision: 253140
URL: http://svnweb.freebsd.org/changeset/base/253140

Log:
  Clear m->object for the page taken from the delayed free list for
  reuse as the pv chink page in reclaim_pv_chunk().  Having non-NULL
  m->object is wrong for page not owned by an object and confuses both
  vm_page_free_toq() and vm_page_remove() when the page is freed later.
  
  Reported and tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	3 days

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Wed Jul 10 08:21:09 2013	(r253139)
+++ head/sys/amd64/amd64/pmap.c	Wed Jul 10 09:24:03 2013	(r253140)
@@ -2234,6 +2234,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, str
 	if (m_pc == NULL && free != NULL) {
 		m_pc = free;
 		free = (void *)m_pc->object;
+		m_pc->object = NULL;
 		/* Recycle a freed page table page. */
 		m_pc->wire_count = 1;
 		atomic_add_int(&cnt.v_wire_count, 1);

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 10:11:44 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 249E7DF4;
 Wed, 10 Jul 2013 10:11:44 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 175DB1109;
 Wed, 10 Jul 2013 10:11:44 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AABhLD085438;
 Wed, 10 Jul 2013 10:11:43 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AABhY9085437;
 Wed, 10 Jul 2013 10:11:43 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307101011.r6AABhY9085437@svn.freebsd.org>
From: Konstantin Belousov 
Date: Wed, 10 Jul 2013 10:11:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253141 - head/sys/geom/journal
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 10:11:44 -0000

Author: kib
Date: Wed Jul 10 10:11:43 2013
New Revision: 253141
URL: http://svnweb.freebsd.org/changeset/base/253141

Log:
  When panicing due to the gjournal overflow, print the geom metadata
  journal id.
  
  Requested by:	Andreas Longwitz 
  MFC after:	1 week

Modified:
  head/sys/geom/journal/g_journal.c

Modified: head/sys/geom/journal/g_journal.c
==============================================================================
--- head/sys/geom/journal/g_journal.c	Wed Jul 10 09:24:03 2013	(r253140)
+++ head/sys/geom/journal/g_journal.c	Wed Jul 10 10:11:43 2013	(r253141)
@@ -341,7 +341,9 @@ g_journal_check_overflow(struct g_journa
 	    (sc->sc_active.jj_offset > sc->sc_inactive.jj_offset &&
 	     sc->sc_journal_offset >= sc->sc_inactive.jj_offset &&
 	     sc->sc_journal_offset < sc->sc_active.jj_offset)) {
-		panic("Journal overflow (joffset=%jd active=%jd inactive=%jd)",
+		panic("Journal overflow "
+		    "(id = %u joffset=%jd active=%jd inactive=%jd)",
+		    (unsigned)sc->sc_id,
 		    (intmax_t)sc->sc_journal_offset,
 		    (intmax_t)sc->sc_active.jj_offset,
 		    (intmax_t)sc->sc_inactive.jj_offset);

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 10:15:39 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 3F163FD0;
 Wed, 10 Jul 2013 10:15:39 +0000 (UTC) (envelope-from ray@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 30BD3112D;
 Wed, 10 Jul 2013 10:15:39 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AAFdgd086063;
 Wed, 10 Jul 2013 10:15:39 GMT (envelope-from ray@svn.freebsd.org)
Received: (from ray@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AAFdDK086062;
 Wed, 10 Jul 2013 10:15:39 GMT (envelope-from ray@svn.freebsd.org)
Message-Id: <201307101015.r6AAFdDK086062@svn.freebsd.org>
From: Aleksandr Rybalko 
Date: Wed, 10 Jul 2013 10:15:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253142 - head/sys/arm/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 10:15:39 -0000

Author: ray
Date: Wed Jul 10 10:15:38 2013
New Revision: 253142
URL: http://svnweb.freebsd.org/changeset/base/253142

Log:
  Remove trailing whitespaces.

Modified:
  head/sys/arm/arm/trap.c

Modified: head/sys/arm/arm/trap.c
==============================================================================
--- head/sys/arm/arm/trap.c	Wed Jul 10 10:11:43 2013	(r253141)
+++ head/sys/arm/arm/trap.c	Wed Jul 10 10:15:38 2013	(r253142)
@@ -238,7 +238,7 @@ data_abort_handler(trapframe_t *tf)
 	int error = 0;
 	struct ksig ksig;
 	struct proc *p;
-	
+
 
 	/* Grab FAR/FSR before enabling interrupts */
 	far = cpu_faultaddress();
@@ -262,10 +262,10 @@ data_abort_handler(trapframe_t *tf)
 
 	if (user) {
 		td->td_pticks = 0;
-		td->td_frame = tf;		
+		td->td_frame = tf;
 		if (td->td_ucred != td->td_proc->p_ucred)
 			cred_update_thread(td);
-		
+
 	}
 	/* Grab the current pcb */
 	pcb = td->td_pcb;
@@ -276,7 +276,7 @@ data_abort_handler(trapframe_t *tf)
 		if (__predict_true(tf->tf_spsr & F32_bit) == 0)
 			enable_interrupts(F32_bit);
 	}
-		
+
 
 	/* Invoke the appropriate handler, if necessary */
 	if (__predict_false(data_aborts[fsr & FAULT_TYPE_MASK].func != NULL)) {
@@ -720,7 +720,7 @@ prefetch_abort_handler(trapframe_t *tf)
 	printf("prefetch abort handler: %p %p\n", (void*)tf->tf_pc,
 	    (void*)tf->tf_usr_lr);
 #endif
-	
+
  	td = curthread;
 	p = td->td_proc;
 	PCPU_INC(cnt.v_trap);
@@ -937,7 +937,7 @@ swi_handler(trapframe_t *frame)
 	struct thread *td = curthread;
 
 	td->td_frame = frame;
-	
+
 	td->td_pticks = 0;
 	/*
       	 * Make sure the program counter is correctly aligned so we

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 10:40:52 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 9AC647EB;
 Wed, 10 Jul 2013 10:40:52 +0000 (UTC)
 (envelope-from netchild@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 739581258;
 Wed, 10 Jul 2013 10:40:52 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AAeqR0092476;
 Wed, 10 Jul 2013 10:40:52 GMT
 (envelope-from netchild@svn.freebsd.org)
Received: (from netchild@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AAeqbo092475;
 Wed, 10 Jul 2013 10:40:52 GMT
 (envelope-from netchild@svn.freebsd.org)
Message-Id: <201307101040.r6AAeqbo092475@svn.freebsd.org>
From: Alexander Leidinger 
Date: Wed, 10 Jul 2013 10:40:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253144 - head/sys/contrib/v4l
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 10:40:52 -0000

Author: netchild
Date: Wed Jul 10 10:40:52 2013
New Revision: 253144
URL: http://svnweb.freebsd.org/changeset/base/253144

Log:
  Fix build for gcc users by declaring variables for unions in structs which
  don't declare a variable. The size before/after this change of the structs
  doesn't change with gcc/clang.
  
  Noticed by:	several
  Suggested by:	Gary Jennejohn 

Modified:
  head/sys/contrib/v4l/videodev2.h

Modified: head/sys/contrib/v4l/videodev2.h
==============================================================================
--- head/sys/contrib/v4l/videodev2.h	Wed Jul 10 10:38:43 2013	(r253143)
+++ head/sys/contrib/v4l/videodev2.h	Wed Jul 10 10:40:52 2013	(r253144)
@@ -427,7 +427,7 @@ struct v4l2_frmsizeenum {
 	union {					/* Frame size */
 		struct v4l2_frmsize_discrete	discrete;
 		struct v4l2_frmsize_stepwise	stepwise;
-	};
+	} x;
 
 	__u32   reserved[2];			/* Reserved space for future use */
 };
@@ -457,7 +457,7 @@ struct v4l2_frmivalenum {
 	union {					/* Frame interval */
 		struct v4l2_fract		discrete;
 		struct v4l2_frmival_stepwise	stepwise;
-	};
+	} x;
 
 	__u32	reserved[2];			/* Reserved space for future use */
 };
@@ -834,7 +834,7 @@ struct v4l2_dv_timings {
 	union {
 		struct v4l2_bt_timings	bt;
 		__u32	reserved[32];
-	};
+	} x;
 } __attribute__ ((packed));
 
 /* Values for the type field */
@@ -927,7 +927,7 @@ struct v4l2_ext_control {
 		__s32 value;
 		__s64 value64;
 		char *string;
-	};
+	} x;
 } __attribute__ ((packed));
 
 struct v4l2_ext_controls {
@@ -1475,7 +1475,7 @@ struct v4l2_encoder_cmd {
 		struct {
 			__u32 data[8];
 		} raw;
-	};
+	} x;
 };
 
 #endif
@@ -1597,7 +1597,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv {
 	union {
 		struct v4l2_mpeg_vbi_itv0 itv0;
 		struct v4l2_mpeg_vbi_ITV0 ITV0;
-	};
+	} x;
 } __attribute__ ((packed));
 
 /*
@@ -1648,7 +1648,7 @@ struct v4l2_dbg_match {
 	union {     /* Match this chip, meaning determined by type */
 		__u32 addr;
 		char name[32];
-	};
+	} x;
 } __attribute__ ((packed));
 
 struct v4l2_dbg_register {

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 10:57:09 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id BD747593;
 Wed, 10 Jul 2013 10:57:09 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id AFFD7136B;
 Wed, 10 Jul 2013 10:57:09 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AAv970097967;
 Wed, 10 Jul 2013 10:57:09 GMT
 (envelope-from theraven@svn.freebsd.org)
Received: (from theraven@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AAv97Q097966;
 Wed, 10 Jul 2013 10:57:09 GMT
 (envelope-from theraven@svn.freebsd.org)
Message-Id: <201307101057.r6AAv97Q097966@svn.freebsd.org>
From: David Chisnall 
Date: Wed, 10 Jul 2013 10:57:09 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253149 - head/usr.bin/dtc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 10:57:09 -0000

Author: theraven
Date: Wed Jul 10 10:57:09 2013
New Revision: 253149
URL: http://svnweb.freebsd.org/changeset/base/253149

Log:
  Report error for out-of-range numerical inputs.  Requested by brooks.

Modified:
  head/usr.bin/dtc/fdt.cc

Modified: head/usr.bin/dtc/fdt.cc
==============================================================================
--- head/usr.bin/dtc/fdt.cc	Wed Jul 10 10:51:12 2013	(r253148)
+++ head/usr.bin/dtc/fdt.cc	Wed Jul 10 10:57:09 2013	(r253149)
@@ -30,6 +30,8 @@
  * $FreeBSD$
  */
 
+#define __STDC_LIMIT_MACROS 1
+
 #include "fdt.hh"
 
 #include 
@@ -281,6 +283,12 @@ property::parse_cells(input_buffer &inpu
 				valid = false;
 				return;
 			}
+			if ((val < 0) || (val > UINT32_MAX))
+			{
+				input.parse_error("Value out of range");
+				valid = false;
+				return;
+			}
 			push_big_endian(v.byte_data, (uint32_t)val);
 			input.next_token();
 		}

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 12:06:02 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 44D6BDF3;
 Wed, 10 Jul 2013 12:06:02 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 361A7195A;
 Wed, 10 Jul 2013 12:06:02 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AC62u3021177;
 Wed, 10 Jul 2013 12:06:02 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AC61qo021175;
 Wed, 10 Jul 2013 12:06:01 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307101206.r6AC61qo021175@svn.freebsd.org>
From: Andre Oppermann 
Date: Wed, 10 Jul 2013 12:06:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253150 - head/sys/netinet
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 12:06:02 -0000

Author: andre
Date: Wed Jul 10 12:06:01 2013
New Revision: 253150
URL: http://svnweb.freebsd.org/changeset/base/253150

Log:
  Extend debug logging of TCP timestamp related specification
  violations.
  
  Update related comments and style.

Modified:
  head/sys/netinet/tcp_input.c
  head/sys/netinet/tcp_syncache.c

Modified: head/sys/netinet/tcp_input.c
==============================================================================
--- head/sys/netinet/tcp_input.c	Wed Jul 10 10:57:09 2013	(r253149)
+++ head/sys/netinet/tcp_input.c	Wed Jul 10 12:06:01 2013	(r253150)
@@ -1446,6 +1446,8 @@ tcp_do_segment(struct mbuf *m, struct tc
 	int thflags, acked, ourfinisacked, needoutput = 0;
 	int rstreason, todrop, win;
 	u_long tiwin;
+	char *s;
+	struct in_conninfo *inc;
 	struct tcpopt to;
 
 #ifdef TCPDEBUG
@@ -1458,6 +1460,7 @@ tcp_do_segment(struct mbuf *m, struct tc
 	short ostate = 0;
 #endif
 	thflags = th->th_flags;
+	inc = &tp->t_inpcb->inp_inc;
 	tp->sackhint.last_sack_ack = 0;
 
 	/*
@@ -1546,6 +1549,24 @@ tcp_do_segment(struct mbuf *m, struct tc
 		if (TSTMP_GT(to.to_tsecr, tcp_ts_getticks()))
 			to.to_tsecr = 0;
 	}
+	/*
+	 * If timestamps were negotiated during SYN/ACK they should
+	 * appear on every segment during this session and vice versa.
+	 */
+	if ((tp->t_flags & TF_RCVD_TSTMP) && !(to.to_flags & TOF_TS)) {
+		if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+			log(LOG_DEBUG, "%s; %s: Timestamp missing, "
+			    "no action\n", s, __func__);
+			free(s, M_TCPLOG);
+		}
+	}
+	if (!(tp->t_flags & TF_RCVD_TSTMP) && (to.to_flags & TOF_TS)) {
+		if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+			log(LOG_DEBUG, "%s; %s: Timestamp not expected, "
+			    "no action\n", s, __func__);
+			free(s, M_TCPLOG);
+		}
+	}
 
 	/*
 	 * Process options only when we get SYN/ACK back. The SYN case
@@ -2213,15 +2234,14 @@ tcp_do_segment(struct mbuf *m, struct tc
 	 */
 	if ((so->so_state & SS_NOFDREF) &&
 	    tp->t_state > TCPS_CLOSE_WAIT && tlen) {
-		char *s;
-
 		KASSERT(ti_locked == TI_WLOCKED, ("%s: SS_NOFDEREF && "
 		    "CLOSE_WAIT && tlen ti_locked %d", __func__, ti_locked));
 		INP_INFO_WLOCK_ASSERT(&V_tcbinfo);
 
-		if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) {
-			log(LOG_DEBUG, "%s; %s: %s: Received %d bytes of data after socket "
-			    "was closed, sending RST and removing tcpcb\n",
+		if ((s = tcp_log_addrs(inc, th, NULL, NULL))) {
+			log(LOG_DEBUG, "%s; %s: %s: Received %d bytes of data "
+			    "after socket was closed, "
+			    "sending RST and removing tcpcb\n",
 			    s, __func__, tcpstates[tp->t_state], tlen);
 			free(s, M_TCPLOG);
 		}

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c	Wed Jul 10 10:57:09 2013	(r253149)
+++ head/sys/netinet/tcp_syncache.c	Wed Jul 10 12:06:01 2013	(r253150)
@@ -992,12 +992,29 @@ syncache_expand(struct in_conninfo *inc,
 		goto failed;
 	}
 
+	/*
+	 * If timestamps were not negotiated during SYN/ACK they
+	 * must not appear on any segment during this session.
+	 */
 	if (!(sc->sc_flags & SCF_TIMESTAMP) && (to->to_flags & TOF_TS)) {
 		if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
 			log(LOG_DEBUG, "%s; %s: Timestamp not expected, "
 			    "segment rejected\n", s, __func__);
 		goto failed;
 	}
+
+	/*
+	 * If timestamps were negotiated during SYN/ACK they should
+	 * appear on every segment during this session.
+	 * XXXAO: This is only informal as there have been unverified
+	 * reports of non-compliants stacks.
+	 */
+	if ((sc->sc_flags & SCF_TIMESTAMP) && !(to->to_flags & TOF_TS)) {
+		if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
+			log(LOG_DEBUG, "%s; %s: Timestamp missing, "
+			    "no action\n", s, __func__);
+	}
+
 	/*
 	 * If timestamps were negotiated the reflected timestamp
 	 * must be equal to what we actually sent in the SYN|ACK.

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 14:49:22 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id AC9B5DB;
 Wed, 10 Jul 2013 14:49:22 +0000 (UTC) (envelope-from alc@rice.edu)
Received: from pp1.rice.edu (proofpoint1.mail.rice.edu [128.42.201.100])
 by mx1.freebsd.org (Postfix) with ESMTP id 7E88012A3;
 Wed, 10 Jul 2013 14:49:21 +0000 (UTC)
Received: from pps.filterd (pp1.rice.edu [127.0.0.1])
 by pp1.rice.edu (8.14.5/8.14.5) with SMTP id r6A9xaeB028775;
 Wed, 10 Jul 2013 09:49:21 -0500
Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30])
 by pp1.rice.edu with ESMTP id 1ddpxdsyvw-1;
 Wed, 10 Jul 2013 09:49:20 -0500
X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel
Received: from [192.168.5.238] (unknown [12.107.116.132])
 (using TLSv1 with cipher RC4-MD5 (128/128 bits))
 (No client certificate requested) (Authenticated sender: alc)
 by mh11.mail.rice.edu (Postfix) with ESMTPSA id 162C04C0A0A;
 Wed, 10 Jul 2013 09:49:19 -0500 (CDT)
Subject: Re: svn commit: r253140 - head/sys/amd64/amd64
Mime-Version: 1.0 (Apple Message framework v1085)
Content-Type: text/plain; charset=us-ascii
From: Alan Cox 
In-Reply-To: <201307100924.r6A9O3Br070468@svn.freebsd.org>
Date: Wed, 10 Jul 2013 07:49:18 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201307100924.r6A9O3Br070468@svn.freebsd.org>
To: Konstantin Belousov 
X-Mailer: Apple Mail (2.1085)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 14:49:22 -0000

On Jul 10, 2013, at 2:24 AM, Konstantin Belousov wrote:

> Author: kib
> Date: Wed Jul 10 09:24:03 2013
> New Revision: 253140
> URL: http://svnweb.freebsd.org/changeset/base/253140
>=20
> Log:
>  Clear m->object for the page taken from the delayed free list for
>  reuse as the pv chink page in reclaim_pv_chunk().  Having non-NULL
>  m->object is wrong for page not owned by an object and confuses both
>  vm_page_free_toq() and vm_page_remove() when the page is freed later.
>=20
>  Reported and tested by:	pho
>  Sponsored by:	The FreeBSD Foundation
>  MFC after:	3 days
>=20


This problem only exists in HEAD.  Older branches don't abuse the object =
field for this purpose.  They use one of the splay tree pointers that =
were eliminated from HEAD with the introduction of the radix tree.  On =
the other hand, the same problem must exist in HEAD's i386 pmap.  As an =
aside, I think it's better to abuse the page's pageq field rather its =
object field.


> Modified:
>  head/sys/amd64/amd64/pmap.c
>=20
> Modified: head/sys/amd64/amd64/pmap.c
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/amd64/amd64/pmap.c	Wed Jul 10 08:21:09 2013	=
(r253139)
> +++ head/sys/amd64/amd64/pmap.c	Wed Jul 10 09:24:03 2013	=
(r253140)
> @@ -2234,6 +2234,7 @@ reclaim_pv_chunk(pmap_t locked_pmap, str
> 	if (m_pc =3D=3D NULL && free !=3D NULL) {
> 		m_pc =3D free;
> 		free =3D (void *)m_pc->object;
> +		m_pc->object =3D NULL;
> 		/* Recycle a freed page table page. */
> 		m_pc->wire_count =3D 1;
> 		atomic_add_int(&cnt.v_wire_count, 1);
>=20


From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 15:19:36 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D4613D51;
 Wed, 10 Jul 2013 15:19:36 +0000 (UTC)
 (envelope-from rpaulo@FreeBSD.org)
Received: from felyko.com (felyko.com [174.136.100.2])
 by mx1.freebsd.org (Postfix) with ESMTP id C17FB1685;
 Wed, 10 Jul 2013 15:19:36 +0000 (UTC)
Received: from [IPv6:2601:9:4d00:119:4d7e:a08:33f5:87dc] (unknown
 [IPv6:2601:9:4d00:119:4d7e:a08:33f5:87dc])
 (using TLSv1 with cipher AES128-SHA (128/128 bits))
 (No client certificate requested)
 by felyko.com (Postfix) with ESMTPSA id CAAC43982B;
 Wed, 10 Jul 2013 08:19:35 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Subject: Re: svn commit: r253139 - in head: share/doc/legal
 share/doc/legal/realtek sys/conf sys/contrib/dev/urtwn sys/dev/usb/wlan
 sys/modules/usb/urtwnfw sys/modules/usb/urtwnfw/urtwnrtl8192cT
 sys/modules/usb...
From: Rui Paulo 
In-Reply-To: <201307100821.r6A8LADo052432@svn.freebsd.org>
Date: Wed, 10 Jul 2013 08:19:35 -0700
Content-Transfer-Encoding: 7bit
Message-Id: 
References: <201307100821.r6A8LADo052432@svn.freebsd.org>
To: Hiren Panchasara 
X-Mailer: Apple Mail (2.1508)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 15:19:36 -0000

On 10 Jul 2013, at 01:21, Hiren Panchasara  wrote:

> Author: hiren
> Date: Wed Jul 10 08:21:09 2013
> New Revision: 253139
> URL: http://svnweb.freebsd.org/changeset/base/253139
> 
> Log:
>  Adding urtwn(4) firmware and related changes.
> 
>  Reviewed by:	rpaulo
>  Approved by:	sbruno (mentor)


Approved by: core

--
Rui Paulo


From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 15:35:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 0B2E0595;
 Wed, 10 Jul 2013 15:35:26 +0000 (UTC)
 (envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E217E17C6;
 Wed, 10 Jul 2013 15:35:25 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AFZPCM085209;
 Wed, 10 Jul 2013 15:35:25 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AFZPY2085207;
 Wed, 10 Jul 2013 15:35:25 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201307101535.r6AFZPY2085207@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Wed, 10 Jul 2013 15:35:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253158 - in head/sys: kern sys
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 15:35:26 -0000

Author: marcel
Date: Wed Jul 10 15:35:25 2013
New Revision: 253158
URL: http://svnweb.freebsd.org/changeset/base/253158

Log:
  Add vfs_mounted and vfs_unmounted events so that components can be informed
  about mount and unmount events. This is used by Juniper to implement a more
  optimal implementation of NetBSD's veriexec.
  
  This change differs from r253224 in the following way:
  o   The vfs_mounted handler is called before mountcheckdirs() and with
      newdp locked. vp is unlocked.
  o   The event handlers are declared in  and not in
      . The  header is used in user land code
      that pretends to be kernel code and as such creates a very convoluted
      environment. It's hard to untangle.
  
  Submitted by:	stevek@juniper.net
  Discussed with:	pjd@
  Obtained from:	Juniper Networks, Inc.

Modified:
  head/sys/kern/vfs_mount.c
  head/sys/sys/eventhandler.h

Modified: head/sys/kern/vfs_mount.c
==============================================================================
--- head/sys/kern/vfs_mount.c	Wed Jul 10 14:16:39 2013	(r253157)
+++ head/sys/kern/vfs_mount.c	Wed Jul 10 15:35:25 2013	(r253158)
@@ -861,8 +861,9 @@ vfs_domount_first(
 	vfs_event_signal(NULL, VQ_MOUNT, 0);
 	if (VFS_ROOT(mp, LK_EXCLUSIVE, &newdp))
 		panic("mount: lost mount");
-	VOP_UNLOCK(newdp, 0);
 	VOP_UNLOCK(vp, 0);
+	EVENTHANDLER_INVOKE(vfs_mounted, mp, newdp, td);
+	VOP_UNLOCK(newdp, 0);
 	mountcheckdirs(vp, newdp);
 	vrele(newdp);
 	if ((mp->mnt_flag & MNT_RDONLY) == 0)
@@ -1355,6 +1356,7 @@ dounmount(mp, flags, td)
 	mtx_lock(&mountlist_mtx);
 	TAILQ_REMOVE(&mountlist, mp, mnt_list);
 	mtx_unlock(&mountlist_mtx);
+	EVENTHANDLER_INVOKE(vfs_unmounted, mp, td);
 	if (coveredvp != NULL) {
 		coveredvp->v_mountedhere = NULL;
 		vput(coveredvp);

Modified: head/sys/sys/eventhandler.h
==============================================================================
--- head/sys/sys/eventhandler.h	Wed Jul 10 14:16:39 2013	(r253157)
+++ head/sys/sys/eventhandler.h	Wed Jul 10 15:35:25 2013	(r253158)
@@ -192,6 +192,17 @@ EVENTHANDLER_DECLARE(vm_lowmem, vm_lowme
 typedef void (*mountroot_handler_t)(void *);
 EVENTHANDLER_DECLARE(mountroot, mountroot_handler_t);
 
+/* File system mount events */
+struct mount;
+struct vnode;
+struct thread;
+typedef void (*vfs_mounted_notify_fn)(void *, struct mount *, struct vnode *,
+    struct thread *);
+typedef void (*vfs_unmounted_notify_fn)(void *, struct mount *,
+    struct thread *);
+EVENTHANDLER_DECLARE(vfs_mounted, vfs_mounted_notify_fn);
+EVENTHANDLER_DECLARE(vfs_unmounted, vfs_unmounted_notify_fn);
+
 /* VLAN state change events */
 struct ifnet;
 typedef void (*vlan_config_fn)(void *, struct ifnet *, uint16_t);
@@ -231,7 +242,6 @@ EVENTHANDLER_DECLARE(process_exec, execl
 /*
  * application dump event
  */
-struct thread;
 typedef void (*app_coredump_start_fn)(void *, struct thread *, char *name);
 typedef void (*app_coredump_progress_fn)(void *, struct thread *td, int byte_count);
 typedef void (*app_coredump_finish_fn)(void *, struct thread *td);

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 15:51:14 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 1F966D31;
 Wed, 10 Jul 2013 15:51:14 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id F09E3198C;
 Wed, 10 Jul 2013 15:51:13 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 722A8B988;
 Wed, 10 Jul 2013 11:51:12 -0400 (EDT)
From: John Baldwin 
To: David Chisnall 
Subject: Re: svn commit: r253149 - head/usr.bin/dtc
Date: Wed, 10 Jul 2013 11:40:12 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307101057.r6AAv97Q097966@svn.freebsd.org>
In-Reply-To: <201307101057.r6AAv97Q097966@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201307101140.12438.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Wed, 10 Jul 2013 11:51:12 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 15:51:14 -0000

On Wednesday, July 10, 2013 6:57:09 am David Chisnall wrote:
> Author: theraven
> Date: Wed Jul 10 10:57:09 2013
> New Revision: 253149
> URL: http://svnweb.freebsd.org/changeset/base/253149
> 
> Log:
>   Report error for out-of-range numerical inputs.  Requested by brooks.
> 
> Modified:
>   head/usr.bin/dtc/fdt.cc
> 
> Modified: head/usr.bin/dtc/fdt.cc
> 
==============================================================================
> --- head/usr.bin/dtc/fdt.cc	Wed Jul 10 10:51:12 2013	(r253148)
> +++ head/usr.bin/dtc/fdt.cc	Wed Jul 10 10:57:09 2013	(r253149)
> @@ -30,6 +30,8 @@
>   * $FreeBSD$
>   */
>  
> +#define __STDC_LIMIT_MACROS 1
> +

Hmm, would it be better to use a newer -std= instead?

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 16:28:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 3A86CC25;
 Wed, 10 Jul 2013 16:28:26 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 2C2EB1C0F;
 Wed, 10 Jul 2013 16:28:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AGSQw5000483;
 Wed, 10 Jul 2013 16:28:26 GMT
 (envelope-from theraven@svn.freebsd.org)
Received: (from theraven@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AGSO8r000471;
 Wed, 10 Jul 2013 16:28:24 GMT
 (envelope-from theraven@svn.freebsd.org)
Message-Id: <201307101628.r6AGSO8r000471@svn.freebsd.org>
From: David Chisnall 
Date: Wed, 10 Jul 2013 16:28:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253159 - in head/contrib: libc++/include libc++/src
 libcxxrt
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 16:28:26 -0000

Author: theraven
Date: Wed Jul 10 16:28:24 2013
New Revision: 253159
URL: http://svnweb.freebsd.org/changeset/base/253159

Log:
  Import new libcxxrt / libc++.  This brings some bug fixes, including a potential race condition for static initialisers.

Modified:
  head/contrib/libc++/include/__bit_reference
  head/contrib/libc++/include/__config
  head/contrib/libc++/include/__functional_base
  head/contrib/libc++/include/__hash_table
  head/contrib/libc++/include/__locale
  head/contrib/libc++/include/__split_buffer
  head/contrib/libc++/include/__std_stream
  head/contrib/libc++/include/__tree
  head/contrib/libc++/include/algorithm
  head/contrib/libc++/include/atomic
  head/contrib/libc++/include/deque
  head/contrib/libc++/include/forward_list
  head/contrib/libc++/include/functional
  head/contrib/libc++/include/future
  head/contrib/libc++/include/istream
  head/contrib/libc++/include/iterator
  head/contrib/libc++/include/list
  head/contrib/libc++/include/locale
  head/contrib/libc++/include/map
  head/contrib/libc++/include/memory
  head/contrib/libc++/include/random
  head/contrib/libc++/include/regex
  head/contrib/libc++/include/string
  head/contrib/libc++/include/type_traits
  head/contrib/libc++/include/unordered_map
  head/contrib/libc++/include/utility
  head/contrib/libc++/include/vector
  head/contrib/libc++/src/debug.cpp
  head/contrib/libc++/src/hash.cpp
  head/contrib/libc++/src/iostream.cpp
  head/contrib/libc++/src/locale.cpp
  head/contrib/libc++/src/stdexcept.cpp
  head/contrib/libc++/src/string.cpp
  head/contrib/libc++/src/thread.cpp
  head/contrib/libcxxrt/atomic.h
  head/contrib/libcxxrt/auxhelper.cc
  head/contrib/libcxxrt/cxxabi.h
  head/contrib/libcxxrt/dwarf_eh.h
  head/contrib/libcxxrt/exception.cc
  head/contrib/libcxxrt/guard.cc
  head/contrib/libcxxrt/memory.cc
Directory Properties:
  head/contrib/libc++/   (props changed)
  head/contrib/libcxxrt/   (props changed)

Modified: head/contrib/libc++/include/__bit_reference
==============================================================================
--- head/contrib/libc++/include/__bit_reference	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__bit_reference	Wed Jul 10 16:28:24 2013	(r253159)
@@ -333,7 +333,7 @@ __fill_n_false(__bit_iterator<_Cp, false
     }
     // do middle whole words
     __storage_type __nw = __n / __bits_per_word;
-    _VSTD::memset(__first.__seg_, 0, __nw * sizeof(__storage_type));
+    _VSTD::memset(_VSTD::__to_raw_pointer(__first.__seg_), 0, __nw * sizeof(__storage_type));
     __n -= __nw * __bits_per_word;
     // do last partial word
     if (__n > 0)
@@ -363,7 +363,7 @@ __fill_n_true(__bit_iterator<_Cp, false>
     }
     // do middle whole words
     __storage_type __nw = __n / __bits_per_word;
-    _VSTD::memset(__first.__seg_, -1, __nw * sizeof(__storage_type));
+    _VSTD::memset(_VSTD::__to_raw_pointer(__first.__seg_), -1, __nw * sizeof(__storage_type));
     __n -= __nw * __bits_per_word;
     // do last partial word
     if (__n > 0)
@@ -430,7 +430,9 @@ __copy_aligned(__bit_iterator<_Cp, _IsCo
         // __first.__ctz_ == 0;
         // do middle words
         __storage_type __nw = __n / __bits_per_word;
-        _VSTD::memmove(__result.__seg_, __first.__seg_, __nw * sizeof(__storage_type));
+        _VSTD::memmove(_VSTD::__to_raw_pointer(__result.__seg_),
+                       _VSTD::__to_raw_pointer(__first.__seg_),
+                       __nw * sizeof(__storage_type));
         __n -= __nw * __bits_per_word;
         __result.__seg_ += __nw;
         // do last word
@@ -569,7 +571,9 @@ __copy_backward_aligned(__bit_iterator<_
         __storage_type __nw = __n / __bits_per_word;
         __result.__seg_ -= __nw;
         __last.__seg_ -= __nw;
-        _VSTD::memmove(__result.__seg_, __last.__seg_, __nw * sizeof(__storage_type));
+        _VSTD::memmove(_VSTD::__to_raw_pointer(__result.__seg_),
+                       _VSTD::__to_raw_pointer(__last.__seg_),
+                       __nw * sizeof(__storage_type));
         __n -= __nw * __bits_per_word;
         // do last word
         if (__n > 0)
@@ -870,6 +874,7 @@ struct __bit_array
 {
     typedef typename _Cp::difference_type difference_type;
     typedef typename _Cp::__storage_type  __storage_type;
+    typedef typename _Cp::__storage_pointer __storage_pointer;
     typedef typename _Cp::iterator        iterator;
     static const unsigned __bits_per_word = _Cp::__bits_per_word;
     static const unsigned _Np = 4;
@@ -880,9 +885,15 @@ struct __bit_array
     _LIBCPP_INLINE_VISIBILITY static difference_type capacity()
         {return static_cast(_Np * __bits_per_word);}
     _LIBCPP_INLINE_VISIBILITY explicit __bit_array(difference_type __s) : __size_(__s) {}
-    _LIBCPP_INLINE_VISIBILITY iterator begin() {return iterator(__word_, 0);}
-    _LIBCPP_INLINE_VISIBILITY iterator end()   {return iterator(__word_ + __size_ / __bits_per_word,
-                                                  static_cast(__size_ % __bits_per_word));}
+    _LIBCPP_INLINE_VISIBILITY iterator begin()
+    {
+        return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]), 0);
+    }
+    _LIBCPP_INLINE_VISIBILITY iterator end()
+    {
+        return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]) + __size_ / __bits_per_word,
+                                                  static_cast(__size_ % __bits_per_word));
+    }
 };
 
 template 

Modified: head/contrib/libc++/include/__config
==============================================================================
--- head/contrib/libc++/include/__config	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__config	Wed Jul 10 16:28:24 2013	(r253159)
@@ -56,6 +56,18 @@
 # endif  // __LONG_LONG_SUPPORTED
 #endif  // __FreeBSD__
 
+#ifdef __NetBSD__
+# include 
+#  if _BYTE_ORDER == _LITTLE_ENDIAN
+#   define _LIBCPP_LITTLE_ENDIAN 1
+#   define _LIBCPP_BIG_ENDIAN    0
+# else  // _BYTE_ORDER == _LITTLE_ENDIAN
+#   define _LIBCPP_LITTLE_ENDIAN 0
+#   define _LIBCPP_BIG_ENDIAN    1
+# endif  // _BYTE_ORDER == _LITTLE_ENDIAN
+# define _LIBCPP_HAS_QUICK_EXIT
+#endif  // __NetBSD__
+
 #ifdef _WIN32
 #  define _LIBCPP_LITTLE_ENDIAN 1
 #  define _LIBCPP_BIG_ENDIAN    0
@@ -135,6 +147,10 @@
 
 #endif // _WIN32
 
+#ifndef __has_attribute
+#define __has_attribute(__x) 0
+#endif
+
 #ifndef _LIBCPP_HIDDEN
 #define _LIBCPP_HIDDEN __attribute__ ((__visibility__("hidden")))
 #endif
@@ -212,7 +228,9 @@ typedef __char32_t char32_t;
 #  define _LIBCPP_NORETURN __attribute__ ((noreturn))
 #endif
 
+#if !(__has_feature(cxx_defaulted_functions))
 #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#endif  // !(__has_feature(cxx_defaulted_functions))
 
 #if !(__has_feature(cxx_deleted_functions))
 #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
@@ -272,10 +290,20 @@ typedef __char32_t char32_t;
 #define _LIBCPP_HAS_NO_CONSTEXPR
 #endif
 
-#if defined(__FreeBSD__) && (__ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L)
+#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
+#if defined(__FreeBSD__)
+#define _LIBCPP_HAS_QUICK_EXIT
+#define _LIBCPP_HAS_C11_FEATURES
+#elif defined(__linux__)
+#include 
+#if __GLIBC_PREREQ(2, 15)
 #define _LIBCPP_HAS_QUICK_EXIT
+#endif
+#if __GLIBC_PREREQ(2, 17)
 #define _LIBCPP_HAS_C11_FEATURES
 #endif
+#endif
+#endif
 
 #if (__has_feature(cxx_noexcept))
 #  define _NOEXCEPT noexcept
@@ -418,8 +446,14 @@ template  struct __static_asse
 #define _LIBCPP_CONSTEXPR constexpr
 #endif
 
+#ifdef _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
+#define _LIBCPP_DEFAULT {}
+#else
+#define _LIBCPP_DEFAULT = default;
+#endif
+
 #ifdef __GNUC__
-#define _NOALIAS __attribute__((malloc))
+#define _NOALIAS __attribute__((__malloc__))
 #else
 #define _NOALIAS
 #endif
@@ -451,7 +485,7 @@ template  struct __static_asse
 #define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__;
 #endif
 
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__)
 #define _LIBCPP_LOCALE__L_EXTENSIONS 1
 #endif
 #ifdef __FreeBSD__
@@ -476,6 +510,14 @@ template  struct __static_asse
 #   endif
 #endif
 
+#ifndef _LIBCPP_STD_VER
+#  if  __cplusplus <= 201103L
+#    define _LIBCPP_STD_VER 11
+#  else
+#    define _LIBCPP_STD_VER 13  // current year, or date of c++14 ratification
+#  endif
+#endif  // _LIBCPP_STD_VER
+
 #ifdef _LIBCPP_DEBUG2
 #   include <__debug>
 #else

Modified: head/contrib/libc++/include/__functional_base
==============================================================================
--- head/contrib/libc++/include/__functional_base	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__functional_base	Wed Jul 10 16:28:24 2013	(r253159)
@@ -292,7 +292,8 @@ struct __weak_result_type<_Rp (_Cp::*)(_
 
 // bullets 1 and 2
 
-template 
+template 
 inline _LIBCPP_INLINE_VISIBILITY
 auto
 __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
@@ -301,7 +302,8 @@ __invoke(_Fp&& __f, _A0&& __a0, _Args&& 
     return (_VSTD::forward<_A0>(__a0).*__f)(_VSTD::forward<_Args>(__args)...);
 }
 
-template 
+template 
 inline _LIBCPP_INLINE_VISIBILITY
 auto
 __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
@@ -312,7 +314,8 @@ __invoke(_Fp&& __f, _A0&& __a0, _Args&& 
 
 // bullets 3 and 4
 
-template 
+template 
 inline _LIBCPP_INLINE_VISIBILITY
 auto
 __invoke(_Fp&& __f, _A0&& __a0)
@@ -321,7 +324,8 @@ __invoke(_Fp&& __f, _A0&& __a0)
     return _VSTD::forward<_A0>(__a0).*__f;
 }
 
-template 
+template 
 inline _LIBCPP_INLINE_VISIBILITY
 auto
 __invoke(_Fp&& __f, _A0&& __a0)

Modified: head/contrib/libc++/include/__hash_table
==============================================================================
--- head/contrib/libc++/include/__hash_table	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__hash_table	Wed Jul 10 16:28:24 2013	(r253159)
@@ -33,7 +33,6 @@ template 
 struct __hash_node_base
 {
     typedef __hash_node_base __first_node;
- //   typedef _NodePtr pointer;
 
     _NodePtr    __next_;
 
@@ -111,7 +110,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY
         reference operator*() const {return __node_->__value_;}
     _LIBCPP_INLINE_VISIBILITY
-        pointer operator->() const {return _VSTD::addressof(__node_->__value_);}
+        pointer operator->() const {return pointer_traits::pointer_to(__node_->__value_);}
 
     _LIBCPP_INLINE_VISIBILITY
     __hash_iterator& operator++()
@@ -189,7 +188,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY
         reference operator*() const {return __node_->__value_;}
     _LIBCPP_INLINE_VISIBILITY
-        pointer operator->() const {return _VSTD::addressof(__node_->__value_);}
+        pointer operator->() const {return pointer_traits::pointer_to(__node_->__value_);}
 
     _LIBCPP_INLINE_VISIBILITY
     __hash_const_iterator& operator++()
@@ -255,7 +254,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY
         reference operator*() const {return __node_->__value_;}
     _LIBCPP_INLINE_VISIBILITY
-        pointer operator->() const {return &__node_->__value_;}
+        pointer operator->() const {return pointer_traits::pointer_to(__node_->__value_);}
 
     _LIBCPP_INLINE_VISIBILITY
     __hash_local_iterator& operator++()
@@ -345,7 +344,7 @@ public:
     _LIBCPP_INLINE_VISIBILITY
         reference operator*() const {return __node_->__value_;}
     _LIBCPP_INLINE_VISIBILITY
-        pointer operator->() const {return &__node_->__value_;}
+        pointer operator->() const {return pointer_traits::pointer_to(__node_->__value_);}
 
     _LIBCPP_INLINE_VISIBILITY
     __hash_const_local_iterator& operator++()
@@ -505,8 +504,15 @@ public:
                                                      __node_allocator;
     typedef allocator_traits<__node_allocator>       __node_traits;
     typedef typename __node_traits::pointer          __node_pointer;
-    typedef typename __node_traits::const_pointer    __node_const_pointer;
+    typedef typename __node_traits::pointer          __node_const_pointer;
     typedef __hash_node_base<__node_pointer>         __first_node;
+    typedef typename pointer_traits<__node_pointer>::template
+#ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
+            rebind<__first_node>
+#else
+            rebind<__first_node>::other
+#endif
+                                                     __node_base_pointer;
 
 private:
 
@@ -558,9 +564,9 @@ public:
 
 public:
     typedef __hash_iterator<__node_pointer>                   iterator;
-    typedef __hash_const_iterator<__node_const_pointer>       const_iterator;
+    typedef __hash_const_iterator<__node_pointer>             const_iterator;
     typedef __hash_local_iterator<__node_pointer>             local_iterator;
-    typedef __hash_const_local_iterator<__node_const_pointer> const_local_iterator;
+    typedef __hash_const_local_iterator<__node_pointer>       const_local_iterator;
 
     __hash_table()
         _NOEXCEPT_(
@@ -706,7 +712,7 @@ public:
 
     _LIBCPP_INLINE_VISIBILITY
     size_type max_bucket_count() const _NOEXCEPT
-        {return __bucket_list_.get_deleter().__alloc().max_size();}
+        {return __pointer_alloc_traits::max_size(__bucket_list_.get_deleter().__alloc());}
     size_type bucket_size(size_type __n) const;
     _LIBCPP_INLINE_VISIBILITY float load_factor() const _NOEXCEPT
     {
@@ -807,6 +813,9 @@ private:
 
     void __deallocate(__node_pointer __np) _NOEXCEPT;
     __node_pointer __detach() _NOEXCEPT;
+
+    template  friend class _LIBCPP_TYPE_VIS unordered_map;
+    template  friend class _LIBCPP_TYPE_VIS unordered_multimap;
 };
 
 template 
@@ -893,7 +902,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     if (size() > 0)
     {
         __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
-            static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+            static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
         __u.__p1_.first().__next_ = nullptr;
         __u.size() = 0;
     }
@@ -917,7 +926,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
             __p1_.first().__next_ = __u.__p1_.first().__next_;
             __u.__p1_.first().__next_ = nullptr;
             __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
-                static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+                static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
             size() = __u.size();
             __u.size() = 0;
         }
@@ -1014,7 +1023,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     if (size() > 0)
     {
         __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
-            static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+            static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
         __u.__p1_.first().__next_ = nullptr;
         __u.size() = 0;
     }
@@ -1236,7 +1245,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
         __node_pointer __pn = __bucket_list_[__chash];
         if (__pn == nullptr)
         {
-            __pn = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+            __pn = static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
             __nd->__next_ = __pn->__next_;
             __pn->__next_ = __nd;
             // fix up __bucket_list_
@@ -1274,7 +1283,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     __node_pointer __pn = __bucket_list_[__chash];
     if (__pn == nullptr)
     {
-        __pn = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+        __pn = static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
         __cp->__next_ = __pn->__next_;
         __pn->__next_ = __cp;
         // fix up __bucket_list_
@@ -1322,7 +1331,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
 {
     if (__p != end() && key_eq()(*__p, __cp->__value_))
     {
-        __node_pointer __np = const_cast<__node_pointer>(__p.__node_);
+        __node_pointer __np = __p.__node_;
         __cp->__hash_ = __np->__hash_;
         size_type __bc = bucket_count();
         if (size()+1 > __bc * max_load_factor() || __bc == 0)
@@ -1380,7 +1389,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
         __node_pointer __pn = __bucket_list_[__chash];
         if (__pn == nullptr)
         {
-            __pn = static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+            __pn = static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
             __h->__next_ = __pn->__next_;
             __pn->__next_ = __h.get();
             // fix up __bucket_list_
@@ -1542,7 +1551,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     {
         for (size_type __i = 0; __i < __nbc; ++__i)
             __bucket_list_[__i] = nullptr;
-        __node_pointer __pp(static_cast<__node_pointer>(_VSTD::addressof(__p1_.first())));
+        __node_pointer __pp(static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first())));
         __node_pointer __cp = __pp->__next_;
         if (__cp != nullptr)
         {
@@ -1700,7 +1709,7 @@ template ::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p)
 {
-    __node_pointer __np = const_cast<__node_pointer>(__p.__node_);
+    __node_pointer __np = __p.__node_;
     iterator __r(__np);
     ++__r;
     remove(__p);
@@ -1717,7 +1726,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
         ++__first;
         erase(__p);
     }
-    __node_pointer __np = const_cast<__node_pointer>(__last.__node_);
+    __node_pointer __np = __last.__node_;
     return iterator (__np);
 }
 
@@ -1757,7 +1766,7 @@ typename __hash_table<_Tp, _Hash, _Equal
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
 {
     // current node
-    __node_pointer __cn = const_cast<__node_pointer>(__p.__node_);
+    __node_pointer __cn = __p.__node_;
     size_type __bc = bucket_count();
     size_t __chash = __constrain_hash(__cn->__hash_, __bc);
     // find previous node
@@ -1767,7 +1776,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     // Fix up __bucket_list_
         // if __pn is not in same bucket (before begin is not in same bucket) &&
         //    if __cn->__next_ is not in same bucket (nullptr is not in same bucket)
-    if (__pn == _VSTD::addressof(__p1_.first()) || __constrain_hash(__pn->__hash_, __bc) != __chash)
+    if (__pn == static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()))
+                            || __constrain_hash(__pn->__hash_, __bc) != __chash)
     {
         if (__cn->__next_ == nullptr || __constrain_hash(__cn->__next_->__hash_, __bc) != __chash)
             __bucket_list_[__chash] = nullptr;
@@ -1907,10 +1917,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>
     __p3_.swap(__u.__p3_);
     if (size() > 0)
         __bucket_list_[__constrain_hash(__p1_.first().__next_->__hash_, bucket_count())] =
-            static_cast<__node_pointer>(_VSTD::addressof(__p1_.first()));
+            static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__p1_.first()));
     if (__u.size() > 0)
         __u.__bucket_list_[__constrain_hash(__u.__p1_.first().__next_->__hash_, __u.bucket_count())] =
-            static_cast<__node_pointer>(_VSTD::addressof(__u.__p1_.first()));
+            static_cast<__node_pointer>(pointer_traits<__node_base_pointer>::pointer_to(__u.__p1_.first()));
 }
 
 template 

Modified: head/contrib/libc++/include/__locale
==============================================================================
--- head/contrib/libc++/include/__locale	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__locale	Wed Jul 10 16:28:24 2013	(r253159)
@@ -339,12 +339,12 @@ public:
     static const mask punct  = _PUNCT;
     static const mask xdigit = _HEX;
     static const mask blank  = _BLANK;
-#elif (defined(__APPLE__) || defined(__FreeBSD__)) || defined(EMSCRIPTEN)
+#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(EMSCRIPTEN) || defined(__NetBSD__)
 #ifdef __APPLE__
     typedef __uint32_t mask;
 #elif defined(__FreeBSD__)
     typedef unsigned long mask;
-#elif defined(EMSCRIPTEN)
+#elif defined(EMSCRIPTEN) ||  defined(__NetBSD__)
     typedef unsigned short mask;
 #endif
     static const mask space  = _CTYPE_S;
@@ -356,7 +356,11 @@ public:
     static const mask digit  = _CTYPE_D;
     static const mask punct  = _CTYPE_P;
     static const mask xdigit = _CTYPE_X;
+# if defined(__NetBSD__)
+    static const mask blank  = _CTYPE_BL;
+# else
     static const mask blank  = _CTYPE_B;
+# endif
 #elif defined(__sun__)
     typedef unsigned int mask;
     static const mask space  = _ISSPACE;
@@ -596,6 +600,10 @@ public:
     static const int* __classic_upper_table() _NOEXCEPT;
     static const int* __classic_lower_table() _NOEXCEPT;
 #endif
+#if defined(__NetBSD__)
+    static const short* __classic_upper_table() _NOEXCEPT;
+    static const short* __classic_lower_table() _NOEXCEPT;
+#endif
 
 protected:
     ~ctype();

Modified: head/contrib/libc++/include/__split_buffer
==============================================================================
--- head/contrib/libc++/include/__split_buffer	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__split_buffer	Wed Jul 10 16:28:24 2013	(r253159)
@@ -290,7 +290,7 @@ void
 __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
 {
     while (__begin_ != __new_begin)
-        __alloc_traits::destroy(__alloc(), __begin_++);
+        __alloc_traits::destroy(__alloc(), __to_raw_pointer(__begin_++));
 }
 
 template 
@@ -307,7 +307,7 @@ void
 __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
 {
     while (__new_last != __end_)
-        __alloc_traits::destroy(__alloc(), --__end_);
+        __alloc_traits::destroy(__alloc(), __to_raw_pointer(--__end_));
 }
 
 template 
@@ -320,7 +320,7 @@ __split_buffer<_Tp, _Allocator>::__destr
 
 template 
 __split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
-    : __end_cap_(0, __a)
+    : __end_cap_(nullptr, __a)
 {
     __first_ = __cap != 0 ? __alloc_traits::allocate(__alloc(), __cap) : nullptr;
     __begin_ = __end_ = __first_ + __start;
@@ -331,21 +331,21 @@ template 
 _LIBCPP_INLINE_VISIBILITY inline
 __split_buffer<_Tp, _Allocator>::__split_buffer()
     _NOEXCEPT_(is_nothrow_default_constructible::value)
-    : __first_(0), __begin_(0), __end_(0), __end_cap_(0)
+    : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr)
 {
 }
 
 template 
 _LIBCPP_INLINE_VISIBILITY inline
 __split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
-    : __first_(0), __begin_(0), __end_(0), __end_cap_(0, __a)
+    : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
 {
 }
 
 template 
 _LIBCPP_INLINE_VISIBILITY inline
 __split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
-    : __first_(0), __begin_(0), __end_(0), __end_cap_(0, __a)
+    : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
 {
 }
 

Modified: head/contrib/libc++/include/__std_stream
==============================================================================
--- head/contrib/libc++/include/__std_stream	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__std_stream	Wed Jul 10 16:28:24 2013	(r253159)
@@ -55,6 +55,8 @@ private:
     const codecvt* __cv_;
     state_type* __st_;
     int __encoding_;
+    int_type __last_consumed_;
+    bool __last_consumed_is_next_;
     bool __always_noconv_;
 
     __stdinbuf(const __stdinbuf&);
@@ -66,7 +68,9 @@ private:
 template 
 __stdinbuf<_CharT>::__stdinbuf(FILE* __fp, state_type* __st)
     : __file_(__fp),
-      __st_(__st)
+      __st_(__st),
+      __last_consumed_(traits_type::eof()),
+      __last_consumed_is_next_(false)
 {
     imbue(this->getloc());
 }
@@ -100,6 +104,16 @@ template 
 typename __stdinbuf<_CharT>::int_type
 __stdinbuf<_CharT>::__getchar(bool __consume)
 {
+    if (__last_consumed_is_next_)
+    {
+        int_type __result = __last_consumed_;
+        if (__consume)
+        {
+            __last_consumed_ = traits_type::eof();
+            __last_consumed_is_next_ = false;
+        }
+        return __result;
+    }
     char __extbuf[__limit];
     int __nread = _VSTD::max(1, __encoding_);
     for (int __i = 0; __i < __nread; ++__i)
@@ -154,6 +168,8 @@ __stdinbuf<_CharT>::__getchar(bool __con
                 return traits_type::eof();
         }
     }
+    else
+        __last_consumed_ = traits_type::to_int_type(__1buf);
     return traits_type::to_int_type(__1buf);
 }
 
@@ -162,28 +178,41 @@ typename __stdinbuf<_CharT>::int_type
 __stdinbuf<_CharT>::pbackfail(int_type __c)
 {
     if (traits_type::eq_int_type(__c, traits_type::eof()))
-        return __c;
-    char __extbuf[__limit];
-    char* __enxt;
-    const char_type __ci = traits_type::to_char_type(__c);
-    const char_type* __inxt;
-    switch (__cv_->out(*__st_, &__ci, &__ci + 1, __inxt,
-                              __extbuf, __extbuf + sizeof(__extbuf), __enxt))
     {
-    case _VSTD::codecvt_base::ok:
-        break;
-    case _VSTD::codecvt_base::noconv:
-        __extbuf[0] = static_cast(__c);
-        __enxt = __extbuf + 1;
-        break;
-    case codecvt_base::partial:
-    case codecvt_base::error:
-        return traits_type::eof();
+        if (!__last_consumed_is_next_)
+        {
+            __c = __last_consumed_;
+            __last_consumed_is_next_ = !traits_type::eq_int_type(__last_consumed_,
+                                                                 traits_type::eof());
+        }
+        return __c;
     }
-    while (__enxt > __extbuf)
-        if (ungetc(*--__enxt, __file_) == EOF)
+    if (__last_consumed_is_next_)
+    {
+        char __extbuf[__limit];
+        char* __enxt;
+        const char_type __ci = traits_type::to_char_type(__last_consumed_);
+        const char_type* __inxt;
+        switch (__cv_->out(*__st_, &__ci, &__ci + 1, __inxt,
+                                  __extbuf, __extbuf + sizeof(__extbuf), __enxt))
+        {
+        case _VSTD::codecvt_base::ok:
+            break;
+        case _VSTD::codecvt_base::noconv:
+            __extbuf[0] = static_cast(__last_consumed_);
+            __enxt = __extbuf + 1;
+            break;
+        case codecvt_base::partial:
+        case codecvt_base::error:
             return traits_type::eof();
- return traits_type::not_eof(__c);
+        }
+        while (__enxt > __extbuf)
+            if (ungetc(*--__enxt, __file_) == EOF)
+                return traits_type::eof();
+    }
+    __last_consumed_ = __c;
+    __last_consumed_is_next_ = true;
+    return __c;
 }
 
 // __stdoutbuf
@@ -234,30 +263,31 @@ __stdoutbuf<_CharT>::overflow(int_type _
     char_type __1buf;
     if (!traits_type::eq_int_type(__c, traits_type::eof()))
     {
-        this->setp(&__1buf, &__1buf+1);
-        *this->pptr() = traits_type::to_char_type(__c);
-        this->pbump(1);
+        __1buf = traits_type::to_char_type(__c);
         if (__always_noconv_)
         {
-            if (fwrite(this->pbase(), sizeof(char_type), 1, __file_) != 1)
+            if (fwrite(&__1buf, sizeof(char_type), 1, __file_) != 1)
                 return traits_type::eof();
         }
         else
         {
             char* __extbe = __extbuf;
             codecvt_base::result __r;
+            char_type* pbase = &__1buf;
+            char_type* pptr = pbase + 1;
+            char_type* epptr = pptr;
             do
             {
                 const char_type* __e;
-                __r = __cv_->out(*__st_, this->pbase(), this->pptr(), __e,
+                __r = __cv_->out(*__st_, pbase, pptr, __e,
                                         __extbuf,
                                         __extbuf + sizeof(__extbuf),
                                         __extbe);
-                if (__e == this->pbase())
+                if (__e == pbase)
                     return traits_type::eof();
                 if (__r == codecvt_base::noconv)
                 {
-                    if (fwrite(this->pbase(), 1, 1, __file_) != 1)
+                    if (fwrite(pbase, 1, 1, __file_) != 1)
                         return traits_type::eof();
                 }
                 else if (__r == codecvt_base::ok || __r == codecvt_base::partial)
@@ -267,15 +297,13 @@ __stdoutbuf<_CharT>::overflow(int_type _
                         return traits_type::eof();
                     if (__r == codecvt_base::partial)
                     {
-                        this->setp((char_type*)__e, this->pptr());
-                        this->pbump(static_cast(this->epptr() - this->pbase()));
+                        pbase = (char_type*)__e;
                     }
                 }
                 else
                     return traits_type::eof();
             } while (__r == codecvt_base::partial);
         }
-        this->setp(0, 0);
     }
     return traits_type::not_eof(__c);
 }

Modified: head/contrib/libc++/include/__tree
==============================================================================
--- head/contrib/libc++/include/__tree	Wed Jul 10 15:35:25 2013	(r253158)
+++ head/contrib/libc++/include/__tree	Wed Jul 10 16:28:24 2013	(r253159)
@@ -644,7 +644,8 @@ public:
     _LIBCPP_INLINE_VISIBILITY __tree_iterator() _NOEXCEPT {}
 
     _LIBCPP_INLINE_VISIBILITY reference operator*() const {return __ptr_->__value_;}
-    _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return &__ptr_->__value_;}
+    _LIBCPP_INLINE_VISIBILITY pointer operator->() const
+        {return pointer_traits::pointer_to(__ptr_->__value_);}
 
     _LIBCPP_INLINE_VISIBILITY
     __tree_iterator& operator++()
@@ -686,7 +687,7 @@ class _LIBCPP_TYPE_VIS __tree_const_iter
 {
     typedef _ConstNodePtr                                         __node_pointer;
     typedef typename pointer_traits<__node_pointer>::element_type __node;
-    typedef const typename __node::base                           __node_base;
+    typedef typename __node::base                                 __node_base;
     typedef typename pointer_traits<__node_pointer>::template
 #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
             rebind<__node_base>
@@ -729,7 +730,8 @@ public:
         : __ptr_(__p.__ptr_) {}
 
     _LIBCPP_INLINE_VISIBILITY reference operator*() const {return __ptr_->__value_;}
-    _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return &__ptr_->__value_;}
+    _LIBCPP_INLINE_VISIBILITY pointer operator->() const
+        {return pointer_traits::pointer_to(__ptr_->__value_);}
 
     _LIBCPP_INLINE_VISIBILITY
     __tree_const_iterator& operator++()
@@ -779,8 +781,10 @@ public:
     typedef typename __alloc_traits::size_type       size_type;
     typedef typename __alloc_traits::difference_type difference_type;
 
-    typedef __tree_node __node;
-    typedef __tree_node_base __node_base;
+    typedef typename __alloc_traits::void_pointer  __void_pointer;
+
+    typedef __tree_node __node;
+    typedef __tree_node_base<__void_pointer>        __node_base;
     typedef typename __alloc_traits::template
 #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
             rebind_alloc<__node>
@@ -790,9 +794,9 @@ public:
                                                      __node_allocator;
     typedef allocator_traits<__node_allocator>       __node_traits;
     typedef typename __node_traits::pointer          __node_pointer;
-    typedef typename __node_traits::const_pointer    __node_const_pointer;
+    typedef typename __node_traits::pointer          __node_const_pointer;
     typedef typename __node_base::pointer            __node_base_pointer;
-    typedef typename __node_base::const_pointer      __node_base_const_pointer;
+    typedef typename __node_base::pointer            __node_base_const_pointer;
 private:
     typedef typename __node_base::base __end_node_t;
     typedef typename pointer_traits<__node_pointer>::template
@@ -804,9 +808,9 @@ private:
                                                      __end_node_ptr;
     typedef typename pointer_traits<__node_pointer>::template
 #ifndef _LIBCPP_HAS_NO_TEMPLATE_ALIASES
-            rebind
+            rebind<__end_node_t>
 #else
-            rebind::other
+            rebind<__end_node_t>::other
 #endif
                                                      __end_node_const_ptr;
 
@@ -828,7 +832,7 @@ public:
     {
         return static_cast<__node_const_pointer>
                (
-                   pointer_traits<__end_node_const_ptr>::pointer_to(__pair1_.first())
+                   pointer_traits<__end_node_const_ptr>::pointer_to(const_cast<__end_node_t&>(__pair1_.first()))
                );
     }
     _LIBCPP_INLINE_VISIBILITY
@@ -865,7 +869,7 @@ public:
         {return static_cast<__node_const_pointer>(__end_node()->__left_);}
 
     typedef __tree_iterator             iterator;
-    typedef __tree_const_iterator const_iterator;
+    typedef __tree_const_iterator const_iterator;
 
     explicit __tree(const value_compare& __comp)
         _NOEXCEPT_(
@@ -1102,6 +1106,9 @@ private:
 
     __node_pointer __detach();
     static __node_pointer __detach(__node_pointer);
+
+    template  friend class _LIBCPP_TYPE_VIS map;
+    template  friend class _LIBCPP_TYPE_VIS multimap;
 };
 
 template 
@@ -1161,7 +1168,7 @@ __tree<_Tp, _Compare, _Allocator>::__det
 {
     if (__cache->__parent_ == nullptr)
         return nullptr;
-    if (__tree_is_left_child(__cache))
+    if (__tree_is_left_child(static_cast<__node_base_pointer>(__cache)))
     {
         __cache->__parent_->__left_ = nullptr;
         __cache = static_cast<__node_pointer>(__cache->__parent_);
@@ -1294,7 +1301,7 @@ __tree<_Tp, _Compare, _Allocator>::__tre
         __begin_node() = __end_node();
     else
     {
-        __end_node()->__left_->__parent_ = __end_node();
+        __end_node()->__left_->__parent_ = static_cast<__node_base_pointer>(__end_node());
         __t.__begin_node() = __t.__end_node();
         __t.__end_node()->__left_ = nullptr;
         __t.size() = 0;
@@ -1314,7 +1321,7 @@ __tree<_Tp, _Compare, _Allocator>::__tre
         {
             __begin_node() = __t.__begin_node();
             __end_node()->__left_ = __t.__end_node()->__left_;
-            __end_node()->__left_->__parent_ = __end_node();
+            __end_node()->__left_->__parent_ = static_cast<__node_base_pointer>(__end_node());
             size() = __t.size();
             __t.__begin_node() = __t.__end_node();
             __t.__end_node()->__left_ = nullptr;
@@ -1342,7 +1349,7 @@ __tree<_Tp, _Compare, _Allocator>::__mov
         __begin_node() = __end_node();
     else
     {
-        __end_node()->__left_->__parent_ = __end_node();
+        __end_node()->__left_->__parent_ = static_cast<__node_base_pointer>(__end_node());
         __t.__begin_node() = __t.__end_node();
         __t.__end_node()->__left_ = nullptr;
         __t.size() = 0;
@@ -1447,11 +1454,11 @@ __tree<_Tp, _Compare, _Allocator>::swap(
     if (size() == 0)
         __begin_node() = __end_node();
     else
-        __end_node()->__left_->__parent_ = __end_node();
+        __end_node()->__left_->__parent_ = static_cast<__node_base_pointer>(__end_node());
     if (__t.size() == 0)
         __t.__begin_node() = __t.__end_node();
     else
-        __t.__end_node()->__left_->__parent_ = __t.__end_node();
+        __t.__end_node()->__left_->__parent_ = static_cast<__node_base_pointer>(__t.__end_node());
 }
 
 template 
@@ -1483,7 +1490,7 @@ __tree<_Tp, _Compare, _Allocator>::__fin
                     __nd = static_cast<__node_pointer>(__nd->__right_);
                 else
                 {
-                    __parent = __nd;
+                    __parent = static_cast<__node_base_pointer>(__nd);
                     return __parent->__right_;
                 }
             }
@@ -1493,13 +1500,13 @@ __tree<_Tp, _Compare, _Allocator>::__fin
                     __nd = static_cast<__node_pointer>(__nd->__left_);
                 else
                 {
-                    __parent = __nd;
+                    __parent = static_cast<__node_base_pointer>(__nd);
                     return __parent->__left_;
                 }
             }
         }
     }
-    __parent = __end_node();
+    __parent = static_cast<__node_base_pointer>(__end_node());
     return __parent->__left_;
 }
 
@@ -1522,7 +1529,7 @@ __tree<_Tp, _Compare, _Allocator>::__fin
                     __nd = static_cast<__node_pointer>(__nd->__left_);
                 else
                 {
-                    __parent = __nd;
+                    __parent = static_cast<__node_base_pointer>(__nd);
                     return __parent->__left_;
                 }
             }
@@ -1532,13 +1539,13 @@ __tree<_Tp, _Compare, _Allocator>::__fin
                     __nd = static_cast<__node_pointer>(__nd->__right_);
                 else
                 {
-                    __parent = __nd;
+                    __parent = static_cast<__node_base_pointer>(__nd);
                     return __parent->__right_;
                 }
             }
         }
     }
-    __parent = __end_node();
+    __parent = static_cast<__node_base_pointer>(__end_node());
     return __parent->__left_;
 }
 
@@ -1563,12 +1570,12 @@ __tree<_Tp, _Compare, _Allocator>::__fin
             // *prev(__hint) <= __v <= *__hint
             if (__hint.__ptr_->__left_ == nullptr)
             {
-                __parent = const_cast<__node_pointer&>(__hint.__ptr_);
+                __parent = static_cast<__node_base_pointer>(__hint.__ptr_);
                 return __parent->__left_;
             }
             else
             {
-                __parent = const_cast<__node_pointer&>(__prior.__ptr_);
+                __parent = static_cast<__node_base_pointer>(__prior.__ptr_);
                 return __parent->__right_;
             }
         }
@@ -1600,7 +1607,7 @@ __tree<_Tp, _Compare, _Allocator>::__fin
                     __nd = static_cast<__node_pointer>(__nd->__left_);
                 else
                 {
-                    __parent = __nd;
+                    __parent = static_cast<__node_base_pointer>(__nd);
                     return __parent->__left_;
                 }
             }
@@ -1610,18 +1617,18 @@ __tree<_Tp, _Compare, _Allocator>::__fin
                     __nd = static_cast<__node_pointer>(__nd->__right_);
                 else
                 {
-                    __parent = __nd;
+                    __parent = static_cast<__node_base_pointer>(__nd);
                     return __parent->__right_;
                 }
             }
             else
             {
-                __parent = __nd;
+                __parent = static_cast<__node_base_pointer>(__nd);
                 return __parent;
             }
         }
     }
-    __parent = __end_node();
+    __parent = static_cast<__node_base_pointer>(__end_node());
     return __parent->__left_;
 }
 
@@ -1648,12 +1655,12 @@ __tree<_Tp, _Compare, _Allocator>::__fin
             // *prev(__hint) < __v < *__hint
             if (__hint.__ptr_->__left_ == nullptr)
             {
-                __parent = const_cast<__node_pointer&>(__hint.__ptr_);
+                __parent = static_cast<__node_base_pointer>(__hint.__ptr_);
                 return __parent->__left_;
             }
             else
             {
-                __parent = const_cast<__node_pointer&>(__prior.__ptr_);
+                __parent = static_cast<__node_base_pointer>(__prior.__ptr_);
                 return __parent->__right_;
             }
         }
@@ -1669,12 +1676,12 @@ __tree<_Tp, _Compare, _Allocator>::__fin
             // *__hint < __v < *_VSTD::next(__hint)
             if (__hint.__ptr_->__right_ == nullptr)
             {
-                __parent = const_cast<__node_pointer&>(__hint.__ptr_);
+                __parent = static_cast<__node_base_pointer>(__hint.__ptr_);
                 return __parent->__right_;
             }
             else
             {
-                __parent = const_cast<__node_pointer&>(__next.__ptr_);
+                __parent = static_cast<__node_base_pointer>(__next.__ptr_);
                 return __parent->__left_;
             }
         }
@@ -1682,7 +1689,7 @@ __tree<_Tp, _Compare, _Allocator>::__fin
         return __find_equal(__parent, __v);
     }
     // else __v == *__hint
-    __parent = const_cast<__node_pointer&>(__hint.__ptr_);
+    __parent = static_cast<__node_base_pointer>(__hint.__ptr_);
     return __parent;
 }
 
@@ -1729,7 +1736,7 @@ __tree<_Tp, _Compare, _Allocator>::__emp
     bool __inserted = false;
     if (__child == nullptr)
     {
-        __insert_node_at(__parent, __child, __h.get());
+        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
         __r = __h.release();
         __inserted = true;
     }
@@ -1747,7 +1754,7 @@ __tree<_Tp, _Compare, _Allocator>::__emp
     __node_pointer __r = static_cast<__node_pointer>(__child);
     if (__child == nullptr)
     {
-        __insert_node_at(__parent, __child, __h.get());
+        __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
         __r = __h.release();
     }
     return iterator(__r);
@@ -1761,7 +1768,7 @@ __tree<_Tp, _Compare, _Allocator>::__emp
     __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
     __node_base_pointer __parent;
     __node_base_pointer& __child = __find_leaf_high(__parent, __h->__value_);
-    __insert_node_at(__parent, __child, __h.get());
+    __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
     return iterator(static_cast<__node_pointer>(__h.release()));
 }
 
@@ -1774,7 +1781,7 @@ __tree<_Tp, _Compare, _Allocator>::__emp
     __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 17:42:21 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 0F9052B1;
 Wed, 10 Jul 2013 17:42:21 +0000 (UTC)
 (envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E59F91054;
 Wed, 10 Jul 2013 17:42:20 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AHgKmm024114;
 Wed, 10 Jul 2013 17:42:20 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AHgKOm024113;
 Wed, 10 Jul 2013 17:42:20 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201307101742.r6AHgKOm024113@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Wed, 10 Jul 2013 17:42:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253161 - head/sys/dev/uart
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 17:42:21 -0000

Author: marcel
Date: Wed Jul 10 17:42:20 2013
New Revision: 253161
URL: http://svnweb.freebsd.org/changeset/base/253161

Log:
  Protect against broken hardware. In this particular case, protect against
  H/W not de-asserting the interrupt at all. On x86, and because of the
  following conditions, this results in a hard hang with interrupts disabled:
  1.  The uart(4) driver uses a spin lock to protect against concurrent
      access to the H/W. Spin locks disable and restore interrupts.
  2.  Restoring the interrupt on x86 always writes the flags register. Even
      if we're restoring the interrupt from disabled to disabled.
  3.  The x86 CPU has a short window in which interrupts are enabled when the
      flags register is written.
  4.  The uart(4) driver registers a fast interrupt by default.
  
  To catch this case, we first try to clear any pending H/W interrupts and in
  particular, before setting up the interrupt. This makes sure the interrupt
  is masked on the PIC. The interrupt handler now has a limit set on the
  number of iterations it'll go through to clear interrupt conditions. If the
  limit is hit, the handler will return FILTER_SCHEDULE_THREAD. The attach
  function will check for this return code and avoid setting up the interrupt
  and foce polling in that case.
  
  Obtained from:	Juniper Networks, Inc.

Modified:
  head/sys/dev/uart/uart_core.c

Modified: head/sys/dev/uart/uart_core.c
==============================================================================
--- head/sys/dev/uart/uart_core.c	Wed Jul 10 17:16:10 2013	(r253160)
+++ head/sys/dev/uart/uart_core.c	Wed Jul 10 17:42:20 2013	(r253161)
@@ -248,10 +248,14 @@ static int
 uart_intr(void *arg)
 {
 	struct uart_softc *sc = arg;
-	int flag = 0, ipend;
+	int cnt, ipend;
 
-	while (!sc->sc_leaving && (ipend = UART_IPEND(sc)) != 0) {
-		flag = 1;
+	if (sc->sc_leaving)
+		return (FILTER_STRAY);
+
+	cnt = 0;
+	while (cnt < 20 && (ipend = UART_IPEND(sc)) != 0) {
+		cnt++;
 		if (ipend & SER_INT_OVERRUN)
 			uart_intr_overrun(sc);
 		if (ipend & SER_INT_BREAK)
@@ -269,7 +273,8 @@ uart_intr(void *arg)
 		    (timeout_t *)uart_intr, sc);
 	}
 
-	return((flag)?FILTER_HANDLED:FILTER_STRAY);
+	return ((cnt == 0) ? FILTER_STRAY :
+	    ((cnt == 20) ? FILTER_SCHEDULE_THREAD : FILTER_HANDLED));
 }
 
 serdev_intr_t *
@@ -390,7 +395,7 @@ uart_bus_attach(device_t dev)
 {
 	struct uart_softc *sc, *sc0;
 	const char *sep;
-	int error;
+	int error, filt;
 
 	/*
 	 * The sc_class field defines the type of UART we're going to work
@@ -430,33 +435,6 @@ uart_bus_attach(device_t dev)
 	sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres);
 	sc->sc_bas.bst = rman_get_bustag(sc->sc_rres);
 
-	sc->sc_irid = 0;
-	sc->sc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->sc_irid,
-	    RF_ACTIVE | RF_SHAREABLE);
-	if (sc->sc_ires != NULL) {
-		error = bus_setup_intr(dev,
-		    sc->sc_ires, INTR_TYPE_TTY, 
-		    uart_intr, NULL, sc, &sc->sc_icookie);		    
-		if (error)
-			error = bus_setup_intr(dev,
-			    sc->sc_ires, INTR_TYPE_TTY | INTR_MPSAFE,
-			    NULL, (driver_intr_t *)uart_intr, sc, &sc->sc_icookie);
-		else
-			sc->sc_fastintr = 1;
-
-		if (error) {
-			device_printf(dev, "could not activate interrupt\n");
-			bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irid,
-			    sc->sc_ires);
-			sc->sc_ires = NULL;
-		}
-	}
-	if (sc->sc_ires == NULL) {
-		/* No interrupt resource. Force polled mode. */
-		sc->sc_polled = 1;
-		callout_init(&sc->sc_timer, 1);
-	}
-
 	/*
 	 * Ensure there is room for at least three full FIFOs of data in the
 	 * receive buffer (handles the case of low-level drivers with huge
@@ -487,20 +465,6 @@ uart_bus_attach(device_t dev)
 		printf("\n");
 	}
 
-	if (bootverbose && (sc->sc_fastintr || sc->sc_polled)) {
-		sep = "";
-		device_print_prettyname(dev);
-		if (sc->sc_fastintr) {
-			printf("%sfast interrupt", sep);
-			sep = ", ";
-		}
-		if (sc->sc_polled) {
-			printf("%spolled mode", sep);
-			sep = ", ";
-		}
-		printf("\n");
-	}
-
 	if (sc->sc_sysdev != NULL) {
 		if (sc->sc_sysdev->baudrate == 0) {
 			if (UART_IOCTL(sc, UART_IOCTL_BAUD,
@@ -529,6 +493,56 @@ uart_bus_attach(device_t dev)
 	sc->sc_pps.ppscap = PPS_CAPTUREBOTH;
 	pps_init(&sc->sc_pps);
 
+	sc->sc_leaving = 0;
+	filt = uart_intr(sc);
+
+	/*
+	 * Don't use interrupts if we couldn't clear any pending interrupt
+	 * conditions. We may have broken H/W and polling is probably the
+	 * safest thing to do.
+	 */
+	if (filt != FILTER_SCHEDULE_THREAD) {
+		sc->sc_irid = 0;
+		sc->sc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ,
+		    &sc->sc_irid, RF_ACTIVE | RF_SHAREABLE);
+	}
+	if (sc->sc_ires != NULL) {
+		error = bus_setup_intr(dev, sc->sc_ires, INTR_TYPE_TTY,
+		    uart_intr, NULL, sc, &sc->sc_icookie);
+		sc->sc_fastintr = (error == 0) ? 1 : 0;
+
+		if (!sc->sc_fastintr)
+			error = bus_setup_intr(dev, sc->sc_ires,
+			    INTR_TYPE_TTY | INTR_MPSAFE, NULL,
+			    (driver_intr_t *)uart_intr, sc, &sc->sc_icookie);
+
+		if (error) {
+			device_printf(dev, "could not activate interrupt\n");
+			bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irid,
+			    sc->sc_ires);
+			sc->sc_ires = NULL;
+		}
+	}
+	if (sc->sc_ires == NULL) {
+		/* No interrupt resource. Force polled mode. */
+		sc->sc_polled = 1;
+		callout_init(&sc->sc_timer, 1);
+	}
+
+	if (bootverbose && (sc->sc_fastintr || sc->sc_polled)) {
+		sep = "";
+		device_print_prettyname(dev);
+		if (sc->sc_fastintr) {
+			printf("%sfast interrupt", sep);
+			sep = ", ";
+		}
+		if (sc->sc_polled) {
+			printf("%spolled mode", sep);
+			sep = ", ";
+		}
+		printf("\n");
+	}
+
 	error = (sc->sc_sysdev != NULL && sc->sc_sysdev->attach != NULL)
 	    ? (*sc->sc_sysdev->attach)(sc) : uart_tty_attach(sc);
 	if (error)
@@ -537,8 +551,6 @@ uart_bus_attach(device_t dev)
 	if (sc->sc_sysdev != NULL)
 		sc->sc_sysdev->hwmtx = sc->sc_hwmtx;
 
-	sc->sc_leaving = 0;
-	uart_intr(sc);
 	return (0);
 
  fail:

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 18:05:48 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 54A98C11;
 Wed, 10 Jul 2013 18:05:48 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id 2FFDC117A;
 Wed, 10 Jul 2013 18:05:48 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3288DB948;
 Wed, 10 Jul 2013 14:05:45 -0400 (EDT)
From: John Baldwin 
To: Marcel Moolenaar 
Subject: Re: svn commit: r253161 - head/sys/dev/uart
Date: Wed, 10 Jul 2013 14:05:43 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307101742.r6AHgKOm024113@svn.freebsd.org>
In-Reply-To: <201307101742.r6AHgKOm024113@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201307101405.44158.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Wed, 10 Jul 2013 14:05:45 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 18:05:48 -0000

On Wednesday, July 10, 2013 1:42:20 pm Marcel Moolenaar wrote:
> Author: marcel
> Date: Wed Jul 10 17:42:20 2013
> New Revision: 253161
> URL: http://svnweb.freebsd.org/changeset/base/253161
> 
> Log:
>   Protect against broken hardware. In this particular case, protect against
>   H/W not de-asserting the interrupt at all. On x86, and because of the
>   following conditions, this results in a hard hang with interrupts disabled:
>   1.  The uart(4) driver uses a spin lock to protect against concurrent
>       access to the H/W. Spin locks disable and restore interrupts.
>   2.  Restoring the interrupt on x86 always writes the flags register. Even
>       if we're restoring the interrupt from disabled to disabled.
>   3.  The x86 CPU has a short window in which interrupts are enabled when the
>       flags register is written.

Do you have proof of this?  I have never seen anything like this documented.
It would be fundamentally broken if true.  In fact, if anything the evidence
I have seen is the exact opposite: that Intel is very careful to prevent races
of this sort.  Specifically, Intel CPUs have long had a feature of disabling
interrupts for the instruction following POP SS to permit atomic loads of
SS:ESP (for code that doesn't use LSS).  I highly doubt your claim is true.

In fact, I think you might be confused by the VME bits (VIP and VIF). The
POPF instruction is documented to clear VIP and VIF, but those flags only
matter when operating in virtual 86 mode.  They are not relevant to our
kernel.  I think you need to find a real explanation for the hang you are
seeing.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 18:07:02 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 711ABEB2;
 Wed, 10 Jul 2013 18:07:02 +0000 (UTC)
 (envelope-from rdivacky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 62EF91199;
 Wed, 10 Jul 2013 18:07:02 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AI72Xb031230;
 Wed, 10 Jul 2013 18:07:02 GMT
 (envelope-from rdivacky@svn.freebsd.org)
Received: (from rdivacky@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AI72AF031229;
 Wed, 10 Jul 2013 18:07:02 GMT
 (envelope-from rdivacky@svn.freebsd.org)
Message-Id: <201307101807.r6AI72AF031229@svn.freebsd.org>
From: Roman Divacky 
Date: Wed, 10 Jul 2013 18:07:02 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253162 - head/usr.sbin/nvram
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 18:07:02 -0000

Author: rdivacky
Date: Wed Jul 10 18:07:01 2013
New Revision: 253162
URL: http://svnweb.freebsd.org/changeset/base/253162

Log:
  Fix -Wmissing-variable-declarations compiler warning.

Modified:
  head/usr.sbin/nvram/nvram.c

Modified: head/usr.sbin/nvram/nvram.c
==============================================================================
--- head/usr.sbin/nvram/nvram.c	Wed Jul 10 17:42:20 2013	(r253161)
+++ head/usr.sbin/nvram/nvram.c	Wed Jul 10 18:07:01 2013	(r253162)
@@ -51,7 +51,7 @@ struct deletelist {
 	struct deletelist *last;
 };
 
-union {
+static union {
 	uint8_t buf[sizeof(struct chrp_header)];
 	struct chrp_header header;
 } conv;

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 18:09:47 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 468E9145;
 Wed, 10 Jul 2013 18:09:47 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id 23FFE11C4;
 Wed, 10 Jul 2013 18:09:47 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8D89FB97F;
 Wed, 10 Jul 2013 14:09:46 -0400 (EDT)
From: John Baldwin 
To: Marcel Moolenaar 
Subject: Re: svn commit: r253161 - head/sys/dev/uart
Date: Wed, 10 Jul 2013 14:09:42 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307101742.r6AHgKOm024113@svn.freebsd.org>
 <201307101405.44158.jhb@freebsd.org>
In-Reply-To: <201307101405.44158.jhb@freebsd.org>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201307101409.42228.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Wed, 10 Jul 2013 14:09:46 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 18:09:47 -0000

On Wednesday, July 10, 2013 2:05:43 pm John Baldwin wrote:
> On Wednesday, July 10, 2013 1:42:20 pm Marcel Moolenaar wrote:
> > Author: marcel
> > Date: Wed Jul 10 17:42:20 2013
> > New Revision: 253161
> > URL: http://svnweb.freebsd.org/changeset/base/253161
> > 
> > Log:
> >   Protect against broken hardware. In this particular case, protect against
> >   H/W not de-asserting the interrupt at all. On x86, and because of the
> >   following conditions, this results in a hard hang with interrupts disabled:
> >   1.  The uart(4) driver uses a spin lock to protect against concurrent
> >       access to the H/W. Spin locks disable and restore interrupts.
> >   2.  Restoring the interrupt on x86 always writes the flags register. Even
> >       if we're restoring the interrupt from disabled to disabled.
> >   3.  The x86 CPU has a short window in which interrupts are enabled when the
> >       flags register is written.
> 
> Do you have proof of this?  I have never seen anything like this documented.
> It would be fundamentally broken if true.  In fact, if anything the evidence
> I have seen is the exact opposite: that Intel is very careful to prevent races
> of this sort.  Specifically, Intel CPUs have long had a feature of disabling
> interrupts for the instruction following POP SS to permit atomic loads of
> SS:ESP (for code that doesn't use LSS).  I highly doubt your claim is true.
> 
> In fact, I think you might be confused by the VME bits (VIP and VIF). The
> POPF instruction is documented to clear VIP and VIF, but those flags only
> matter when operating in virtual 86 mode.  They are not relevant to our
> kernel.  I think you need to find a real explanation for the hang you are
> seeing.

Also, to be clear, if CPUs behave the way you described, our x86 ports would
have been horribly unstable since at least 5.0.  We depend on nested unlocks
not transparently enabling interrupts to prevent nested interrupt frames
(which can quickly exhaust the kernel stack and lead to a double fault, back
when doing early ithread work these were not hard to provoke).

I have not see a single report of a double fault due to this type of
recursion since 5.0 was released 

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 18:19:48 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id D9B904EB;
 Wed, 10 Jul 2013 18:19:48 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id CBCE01253;
 Wed, 10 Jul 2013 18:19:48 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AIJmcu034695;
 Wed, 10 Jul 2013 18:19:48 GMT (envelope-from pfg@svn.freebsd.org)
Received: (from pfg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AIJmH8034694;
 Wed, 10 Jul 2013 18:19:48 GMT (envelope-from pfg@svn.freebsd.org)
Message-Id: <201307101819.r6AIJmH8034694@svn.freebsd.org>
From: "Pedro F. Giffuni" 
Date: Wed, 10 Jul 2013 18:19:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253163 - head/sys/ufs/ufs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 18:19:48 -0000

Author: pfg
Date: Wed Jul 10 18:19:48 2013
New Revision: 253163
URL: http://svnweb.freebsd.org/changeset/base/253163

Log:
  Change i_gen in UFS to an unsigned type.
  
  Missing type change from r252435.
  
  This fixes a "Stale NFS file handle" error.
  
  Reported by:	Claude Bisson
  Tested by:	Claude Bisson
  Pointed hat:	pfg

Modified:
  head/sys/ufs/ufs/inode.h

Modified: head/sys/ufs/ufs/inode.h
==============================================================================
--- head/sys/ufs/ufs/inode.h	Wed Jul 10 18:07:01 2013	(r253162)
+++ head/sys/ufs/ufs/inode.h	Wed Jul 10 18:19:48 2013	(r253163)
@@ -180,7 +180,7 @@ struct ufid {
 	u_int16_t ufid_len;	/* Length of structure. */
 	u_int16_t ufid_pad;	/* Force 32-bit alignment. */
 	uint32_t  ufid_ino;	/* File number (ino). */
-	int32_t	  ufid_gen;	/* Generation number. */
+	uint32_t  ufid_gen;	/* Generation number. */
 };
 #endif /* _KERNEL */
 

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 19:44:44 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 3A11917D;
 Wed, 10 Jul 2013 19:44:44 +0000 (UTC)
 (envelope-from trociny@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 1233017D6;
 Wed, 10 Jul 2013 19:44:44 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AJihdF060774;
 Wed, 10 Jul 2013 19:44:43 GMT (envelope-from trociny@svn.freebsd.org)
Received: (from trociny@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AJihNV060771;
 Wed, 10 Jul 2013 19:44:43 GMT (envelope-from trociny@svn.freebsd.org)
Message-Id: <201307101944.r6AJihNV060771@svn.freebsd.org>
From: Mikolaj Golub 
Date: Wed, 10 Jul 2013 19:44:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253167 - in head: . lib/libkvm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 19:44:44 -0000

Author: trociny
Date: Wed Jul 10 19:44:43 2013
New Revision: 253167
URL: http://svnweb.freebsd.org/changeset/base/253167

Log:
  In r227839, when removing libkvm dependency on procfs(5),
  kvm_uread() function, used for reading from /proc/pid/mem, was
  removed too. But the function declaration remained in kvm.h
  public header and the soname was not bumped.
  
  Remove kvm_uread() from kvm.h and bump the soname.
  
  Reported by:	rmh
  Discussed on:	arch

Modified:
  head/ObsoleteFiles.inc
  head/lib/libkvm/Makefile
  head/lib/libkvm/kvm.h

Modified: head/ObsoleteFiles.inc
==============================================================================
--- head/ObsoleteFiles.inc	Wed Jul 10 19:42:07 2013	(r253166)
+++ head/ObsoleteFiles.inc	Wed Jul 10 19:44:43 2013	(r253167)
@@ -38,6 +38,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20130710: libkvm version bump 
+OLD_LIBS+=lib/libkvm.so.5
+OLD_LIBS+=usr/lib32/libkvm.so.5
 # 20130623: dialog update from 1.1 to 1.2
 OLD_LIBS+=usr/lib/libdialog.so.7
 OLD_LIBS+=usr/lib32/libdialog.so.7

Modified: head/lib/libkvm/Makefile
==============================================================================
--- head/lib/libkvm/Makefile	Wed Jul 10 19:42:07 2013	(r253166)
+++ head/lib/libkvm/Makefile	Wed Jul 10 19:44:43 2013	(r253167)
@@ -3,6 +3,7 @@
 
 LIB=	kvm
 SHLIBDIR?= /lib
+SHLIB_MAJOR=	6
 CFLAGS+=-DLIBC_SCCS -I${.CURDIR}
 
 .if exists(${.CURDIR}/kvm_${MACHINE_ARCH}.c)

Modified: head/lib/libkvm/kvm.h
==============================================================================
--- head/lib/libkvm/kvm.h	Wed Jul 10 19:42:07 2013	(r253166)
+++ head/lib/libkvm/kvm.h	Wed Jul 10 19:44:43 2013	(r253167)
@@ -89,8 +89,6 @@ kvm_t	 *kvm_openfiles
 	    (const char *, const char *, const char *, int, char *);
 ssize_t	  kvm_read(kvm_t *, unsigned long, void *, size_t);
 ssize_t	  kvm_read_zpcpu(kvm_t *, void *, u_long, size_t, int);
-ssize_t	  kvm_uread
-	    (kvm_t *, const struct kinfo_proc *, unsigned long, char *, size_t);
 ssize_t	  kvm_write(kvm_t *, unsigned long, const void *, size_t);
 __END_DECLS
 

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 20:28:37 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 706F9354;
 Wed, 10 Jul 2013 20:28:37 +0000 (UTC)
 (envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214])
 by mx1.freebsd.org (Postfix) with ESMTP id 4F0821A29;
 Wed, 10 Jul 2013 20:28:36 +0000 (UTC)
Received: from amoroson-sslvpn-nc.jnpr.net (natint3.juniper.net
 [66.129.224.36]) (authenticated bits=0)
 by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id r6AJxk0W053747
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
 Wed, 10 Jul 2013 12:59:47 -0700 (PDT)
 (envelope-from marcel@xcllnt.net)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Subject: Re: svn commit: r253161 - head/sys/dev/uart
From: Marcel Moolenaar 
In-Reply-To: <201307101409.42228.jhb@freebsd.org>
Date: Wed, 10 Jul 2013 12:59:40 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: 
References: <201307101742.r6AHgKOm024113@svn.freebsd.org>
 <201307101405.44158.jhb@freebsd.org> <201307101409.42228.jhb@freebsd.org>
To: John Baldwin 
X-Mailer: Apple Mail (2.1508)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 Marcel Moolenaar , src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 20:28:37 -0000


On Jul 10, 2013, at 11:09 AM, John Baldwin  wrote:

> On Wednesday, July 10, 2013 2:05:43 pm John Baldwin wrote:
>> On Wednesday, July 10, 2013 1:42:20 pm Marcel Moolenaar wrote:
>>> Author: marcel
>>> Date: Wed Jul 10 17:42:20 2013
>>> New Revision: 253161
>>> URL: http://svnweb.freebsd.org/changeset/base/253161
>>>=20
>>> Log:
>>>  Protect against broken hardware. In this particular case, protect =
against
>>>  H/W not de-asserting the interrupt at all. On x86, and because of =
the
>>>  following conditions, this results in a hard hang with interrupts =
disabled:
>>>  1.  The uart(4) driver uses a spin lock to protect against =
concurrent
>>>      access to the H/W. Spin locks disable and restore interrupts.
>>>  2.  Restoring the interrupt on x86 always writes the flags =
register. Even
>>>      if we're restoring the interrupt from disabled to disabled.
>>>  3.  The x86 CPU has a short window in which interrupts are enabled =
when the
>>>      flags register is written.
>>=20
>> Do you have proof of this?

No. I only have proof of a hard hang during auto configuration that
cannot be fixed in any other way than not to setup the interrupt at
all.

--=20
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 21:37:51 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 6D88FB80;
 Wed, 10 Jul 2013 21:37:51 +0000 (UTC)
 (envelope-from marcel@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 408AF1D11;
 Wed, 10 Jul 2013 21:37:51 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6ALbpjk094268;
 Wed, 10 Jul 2013 21:37:51 GMT (envelope-from marcel@svn.freebsd.org)
Received: (from marcel@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6ALbpl7094267;
 Wed, 10 Jul 2013 21:37:51 GMT (envelope-from marcel@svn.freebsd.org)
Message-Id: <201307102137.r6ALbpl7094267@svn.freebsd.org>
From: Marcel Moolenaar 
Date: Wed, 10 Jul 2013 21:37:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253172 - head/sys/boot/ficl
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 21:37:51 -0000

Author: marcel
Date: Wed Jul 10 21:37:50 2013
New Revision: 253172
URL: http://svnweb.freebsd.org/changeset/base/253172

Log:
  Add 2 builtin words for working with directories:
  	isdir?		( fd -- bool )
  	freaddir	( fd -- ptr len TRUE | FALSE )
  
  The 'isdir?' word returns `true' if the file descriptor is for a
  directory and `false' otherwise.
  
  The 'freaddir' word reads the next directory entry and if successful,
  returns its name and 'true'. Otherwise 'false' is returned.
  
  These words give the loader the ability to scan directories and read
  files contained in them for 'rc.d'-like flexibility in handling which
  modules to load and/or which tunables to set.
  
  Obtained from:	Juniper Networks, Inc.

Modified:
  head/sys/boot/ficl/loader.c

Modified: head/sys/boot/ficl/loader.c
==============================================================================
--- head/sys/boot/ficl/loader.c	Wed Jul 10 21:05:03 2013	(r253171)
+++ head/sys/boot/ficl/loader.c	Wed Jul 10 21:37:50 2013	(r253172)
@@ -404,6 +404,34 @@ static void displayCellNoPad(FICL_VM *pV
     return;
 }
 
+/*      isdir? - Return whether an fd corresponds to a directory.
+ *
+ * isdir? ( fd -- bool )
+ */
+static void isdirQuestion(FICL_VM *pVM)
+{
+    struct stat sb;
+    FICL_INT flag;
+    int fd;
+
+#if FICL_ROBUST > 1
+    vmCheckStack(pVM, 1, 1);
+#endif
+
+    fd = stackPopINT(pVM->pStack);
+    flag = FICL_FALSE;
+    do {
+        if (fd < 0)
+            break;
+        if (fstat(fd, &sb) < 0)
+            break;
+        if (!S_ISDIR(sb.st_mode))
+            break;
+        flag = FICL_TRUE;
+    } while (0);
+    stackPushINT(pVM->pStack, flag);
+}
+
 /*          fopen - open a file and return new fd on stack.
  *
  * fopen ( ptr count mode -- fd )
@@ -477,6 +505,30 @@ static void pfread(FICL_VM *pVM)
     return;
 }
 
+/*      freaddir - read directory contents
+ *
+ * freaddir ( fd -- ptr len TRUE | FALSE )
+ */
+static void pfreaddir(FICL_VM *pVM)
+{
+    struct dirent *d;
+    int fd;
+
+#if FICL_ROBUST > 1
+    vmCheckStack(pVM, 1, 3);
+#endif
+
+    fd = stackPopINT(pVM->pStack);
+    d = readdirfd(fd);
+    if (d != NULL) {
+        stackPushPtr(pVM->pStack, d->d_name);
+        stackPushINT(pVM->pStack, strlen(d->d_name));
+        stackPushINT(pVM->pStack, FICL_TRUE);
+    } else {
+        stackPushINT(pVM->pStack, FICL_FALSE);
+    }
+}
+
 /*          fload - interpret file contents
  *
  * fload  ( fd -- )
@@ -653,9 +705,11 @@ void ficlCompilePlatform(FICL_SYSTEM *pS
     assert (dp);
 
     dictAppendWord(dp, ".#",        displayCellNoPad,    FW_DEFAULT);
+    dictAppendWord(dp, "isdir?",    isdirQuestion,  FW_DEFAULT);
     dictAppendWord(dp, "fopen",	    pfopen,	    FW_DEFAULT);
     dictAppendWord(dp, "fclose",    pfclose,	    FW_DEFAULT);
     dictAppendWord(dp, "fread",	    pfread,	    FW_DEFAULT);
+    dictAppendWord(dp, "freaddir",  pfreaddir,	    FW_DEFAULT);
     dictAppendWord(dp, "fload",	    pfload,	    FW_DEFAULT);
     dictAppendWord(dp, "fkey",	    fkey,	    FW_DEFAULT);
     dictAppendWord(dp, "fseek",     pfseek,	    FW_DEFAULT);

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 22:03:01 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D52B7365;
 Wed, 10 Jul 2013 22:03:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id ACE811E29;
 Wed, 10 Jul 2013 22:03:01 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AM31tK002531;
 Wed, 10 Jul 2013 22:03:01 GMT (envelope-from pfg@svn.freebsd.org)
Received: (from pfg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AM31GI002530;
 Wed, 10 Jul 2013 22:03:01 GMT (envelope-from pfg@svn.freebsd.org)
Message-Id: <201307102203.r6AM31GI002530@svn.freebsd.org>
From: "Pedro F. Giffuni" 
Date: Wed, 10 Jul 2013 22:03:01 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253173 - head/sys/fs/ext2fs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 22:03:01 -0000

Author: pfg
Date: Wed Jul 10 22:03:01 2013
New Revision: 253173
URL: http://svnweb.freebsd.org/changeset/base/253173

Log:
  Implement 1003.1-2001 pathconf() keys.
  
  This is based on r106058 in UFS.
  
  MFC after:	1 month

Modified:
  head/sys/fs/ext2fs/ext2_vnops.c

Modified: head/sys/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/fs/ext2fs/ext2_vnops.c	Wed Jul 10 21:37:50 2013	(r253172)
+++ head/sys/fs/ext2fs/ext2_vnops.c	Wed Jul 10 22:03:01 2013	(r253173)
@@ -1410,33 +1410,68 @@ ext2fifo_kqfilter(struct vop_kqfilter_ar
 static int
 ext2_pathconf(struct vop_pathconf_args *ap)
 {
+	int error = 0;
 
 	switch (ap->a_name) {
 	case _PC_LINK_MAX:
 		*ap->a_retval = EXT2_LINK_MAX;
-		return (0);
+		break;
 	case _PC_NAME_MAX:
 		*ap->a_retval = NAME_MAX;
-		return (0);
+		break;
 	case _PC_PATH_MAX:
 		*ap->a_retval = PATH_MAX;
-		return (0);
+		break;
 	case _PC_PIPE_BUF:
 		*ap->a_retval = PIPE_BUF;
-		return (0);
+		break;
 	case _PC_CHOWN_RESTRICTED:
 		*ap->a_retval = 1;
-		return (0);
+		break;
 	case _PC_NO_TRUNC:
 		*ap->a_retval = 1;
-		return (0);
+		break;
 	case _PC_MIN_HOLE_SIZE:
 		*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize;
-		return(0);
+		break;
+	case _PC_ASYNC_IO:
+		/* _PC_ASYNC_IO should have been handled by upper layers. */
+		KASSERT(0, ("_PC_ASYNC_IO should not get here"));
+		error = EINVAL;
+		break;
+	case _PC_PRIO_IO:
+		*ap->a_retval = 0;
+		break;
+	case _PC_SYNC_IO:
+		*ap->a_retval = 0;
+		break;
+	case _PC_ALLOC_SIZE_MIN:
+		*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_bsize;
+		break;
+	case _PC_FILESIZEBITS:
+		*ap->a_retval = 64;
+		break;
+	case _PC_REC_INCR_XFER_SIZE:
+		*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize;
+		break;
+	case _PC_REC_MAX_XFER_SIZE:
+		*ap->a_retval = -1; /* means ``unlimited'' */
+		break;
+	case _PC_REC_MIN_XFER_SIZE:
+		*ap->a_retval = ap->a_vp->v_mount->mnt_stat.f_iosize;
+		break;
+	case _PC_REC_XFER_ALIGN:
+		*ap->a_retval = PAGE_SIZE;
+		break;
+	case _PC_SYMLINK_MAX:
+		*ap->a_retval = MAXPATHLEN;
+		break;
+
 	default:
-		return (EINVAL);
+		error = EINVAL;
+		break;
 	}
-	/* NOTREACHED */
+	return (error);
 }
 
 /*

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 22:12:49 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 2C60674A;
 Wed, 10 Jul 2013 22:12:49 +0000 (UTC)
 (envelope-from marino@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 1E2C21E88;
 Wed, 10 Jul 2013 22:12:49 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AMCmrt005722;
 Wed, 10 Jul 2013 22:12:48 GMT (envelope-from marino@svn.freebsd.org)
Received: (from marino@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AMCm5c005721;
 Wed, 10 Jul 2013 22:12:48 GMT (envelope-from marino@svn.freebsd.org)
Message-Id: <201307102212.r6AMCm5c005721@svn.freebsd.org>
From: John Marino 
Date: Wed, 10 Jul 2013 22:12:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253174 - head/share/misc
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 22:12:49 -0000

Author: marino (ports committer)
Date: Wed Jul 10 22:12:48 2013
New Revision: 253174
URL: http://svnweb.freebsd.org/changeset/base/253174

Log:
  Add John Marino to committers-port.dot
  
  Approved by:	bapt (mentor)

Modified:
  head/share/misc/committers-ports.dot

Modified: head/share/misc/committers-ports.dot
==============================================================================
--- head/share/misc/committers-ports.dot	Wed Jul 10 22:03:01 2013	(r253173)
+++ head/share/misc/committers-ports.dot	Wed Jul 10 22:12:48 2013	(r253174)
@@ -143,6 +143,7 @@ maho [label="Maho Nakata\nmaho@FreeBSD.o
 makc [label="Max Brazhnikov\nmakc@FreeBSD.org\n2008/08/25"]
 mandree [label="Matthias Andree\nmandree@FreeBSD.org\n2009/11/18"]
 marcus [label="Joe Marcus Clarke\nmarcus@FreeBSD.org\n2002/04/05"]
+marino [label="John Marino\nmarino@FreeBSD.org\n2013/07/04"]
 marius [label="Marius Strobl\nmarius@FreeBSD.org\n2012/12/29"]
 markus [label="Markus Brueffer\nmarkus@FreeBSD.org\n2004/02/21"]
 martymac [label="Ganael Laplanche\nmartymac@FreeBSD.org\n2010/09/24"]
@@ -247,6 +248,7 @@ bapt -> bdrewery
 bapt -> eadler
 bapt -> jlaffaye
 bapt -> marius
+bapt -> marino
 
 beat -> decke
 beat -> marius
@@ -276,6 +278,7 @@ crees -> tijl
 
 culot -> jase
 culot -> wg
+culot -> marino
 
 db -> tj
 

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 22:45:08 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 3EE4E177;
 Wed, 10 Jul 2013 22:45:08 +0000 (UTC)
 (envelope-from dteske@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 307241FBE;
 Wed, 10 Jul 2013 22:45:08 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6AMj8xB014630;
 Wed, 10 Jul 2013 22:45:08 GMT (envelope-from dteske@svn.freebsd.org)
Received: (from dteske@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6AMj8dk014629;
 Wed, 10 Jul 2013 22:45:08 GMT (envelope-from dteske@svn.freebsd.org)
Message-Id: <201307102245.r6AMj8dk014629@svn.freebsd.org>
From: Devin Teske 
Date: Wed, 10 Jul 2013 22:45:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253175 - head/usr.sbin/bsdconfig/share
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 22:45:08 -0000

Author: dteske
Date: Wed Jul 10 22:45:07 2013
New Revision: 253175
URL: http://svnweb.freebsd.org/changeset/base/253175

Log:
  Introduce a new [yet unused] function for [efficiently] getting the path to
  an executable by-name without forking or using externals.
  
  In a performance benchmark of 10,000 runs on circa 2006 hardware, f_which
  out-performed `which' with an average completion time of ~2.5 seconds versus
  ~56 seconds.
  
  This should be handy for future use (not that I make it a habit to call
  `which' in a loop 10,000 times).

Modified:
  head/usr.sbin/bsdconfig/share/common.subr

Modified: head/usr.sbin/bsdconfig/share/common.subr
==============================================================================
--- head/usr.sbin/bsdconfig/share/common.subr	Wed Jul 10 22:12:48 2013	(r253174)
+++ head/usr.sbin/bsdconfig/share/common.subr	Wed Jul 10 22:45:07 2013	(r253175)
@@ -212,6 +212,35 @@ f_have()
 	f_quietly type "$@"
 }
 
+# f_which $anything [$var_to_set]
+#
+# A fast built-in replacement for syntaxes such as foo=$( which bar ). In a
+# comparison of 10,000 runs of this function versus which, this function
+# completed in under 3 seconds, while `which' took almost a full minute.
+#
+# If $var_to_set is missing or NULL, output is (like which) to standard out.
+# Returns success if a match was found, failure otherwise.
+#
+f_which()
+{
+	local __name="$1" __var_to_set="$2"
+	case "$__name" in */*|'') return $FAILURE; esac
+	local __p IFS=":" __found=
+	for __p in $PATH; do
+		local __exec="$__p/$__name"
+		[ -f "$__exec" -a -x "$__exec" ] && __found=1 && break
+	done
+	if [ "$__found" ]; then
+		if [ "$__var_to_set" ]; then
+			setvar "$__var_to_set" "$__exec"
+		else
+			echo "$__exec"
+		fi
+		return $SUCCESS
+	fi
+	return $FAILURE
+}
+
 # f_getvar $var_to_get [$var_to_set]
 #
 # Utility function designed to go along with the already-builtin setvar.

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 23:14:25 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 121AB7F5;
 Wed, 10 Jul 2013 23:14:25 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 03DD610D2;
 Wed, 10 Jul 2013 23:14:25 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6ANEOIC023517;
 Wed, 10 Jul 2013 23:14:24 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6ANEOUR023516;
 Wed, 10 Jul 2013 23:14:24 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201307102314.r6ANEOUR023516@svn.freebsd.org>
From: Jack F Vogel 
Date: Wed, 10 Jul 2013 23:14:24 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253176 - head/sys/dev/ixgbe
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 23:14:25 -0000

Author: jfv
Date: Wed Jul 10 23:14:24 2013
New Revision: 253176
URL: http://svnweb.freebsd.org/changeset/base/253176

Log:
  Fix to a panic found internally, bad pointer during rxeof
  processing. Thanks for John Baldwin for catching this. Not
  clearing the flag member of the rxbuf could result in a NULL
  mbuf pointer being used.
  
  MFC after:	2 days (this needs to get into 9.2!)

Modified:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Wed Jul 10 22:45:07 2013	(r253175)
+++ head/sys/dev/ixgbe/ixgbe.c	Wed Jul 10 23:14:24 2013	(r253176)
@@ -3943,6 +3943,7 @@ ixgbe_free_receive_ring(struct rx_ring *
 			rxbuf->buf->m_flags |= M_PKTHDR;
 			m_freem(rxbuf->buf);
 			rxbuf->buf = NULL;
+			rxbuf->flag = 0;
 		}
 	}
 }

From owner-svn-src-head@FreeBSD.ORG  Wed Jul 10 23:58:32 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 1CB40D26;
 Wed, 10 Jul 2013 23:58:32 +0000 (UTC)
 (envelope-from yaneurabeya@gmail.com)
Received: from mail-vc0-x22c.google.com (mail-vc0-x22c.google.com
 [IPv6:2607:f8b0:400c:c03::22c])
 by mx1.freebsd.org (Postfix) with ESMTP id 9C63F11EE;
 Wed, 10 Jul 2013 23:58:31 +0000 (UTC)
Received: by mail-vc0-f172.google.com with SMTP id ib11so6284442vcb.17
 for ; Wed, 10 Jul 2013 16:58:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:in-reply-to:references:date:message-id:subject:from:to
 :cc:content-type;
 bh=wI3mFey19Fy5XfGWqSow00VGAfxqzds6kz9qYHcbi8E=;
 b=LafCbKhAxuaZ1YitfPn0ZmszHeICGL4A6SupSEDR6MYLfT2v+RS2dnx8qQ9CqyeuKc
 qzTe03ISJgrDsPMXT1+zD9ZSJumJ9XD8Qobc/N9q0BIPpZ5wQJtzJp2Mo9yhZsDP5S6m
 Ful3AL0UtD4alSUX8qFjLC9bqzX4/MGGdoNUHJi/G51ETBCxnoZTjANF3T5b3HvelmlW
 UFmTkJqAq7clyxwricy7h2iKLNQAcPb/eQiLbE9AzkZLgnjEV0K0iUWFdRIYaEXuAJUv
 Kr6kWDjzvIy0ApMBycBwSROfsCYp/kIACqHV2rcOfsNvy121ZgDY1Sv1gPg5YNy4wFrk
 1ieA==
MIME-Version: 1.0
X-Received: by 10.52.16.77 with SMTP id e13mr17027131vdd.49.1373500710573;
 Wed, 10 Jul 2013 16:58:30 -0700 (PDT)
Received: by 10.220.146.145 with HTTP; Wed, 10 Jul 2013 16:58:30 -0700 (PDT)
In-Reply-To: <201307091120.22114.jhb@freebsd.org>
References: <201307082125.r68LPDlY023493@svn.freebsd.org>
 <3FF894D3-ACDF-4796-A682-F9F9DD8C943D@gmail.com>
 <201307091120.22114.jhb@freebsd.org>
Date: Wed, 10 Jul 2013 16:58:30 -0700
Message-ID: 
Subject: Re: svn commit: r253048 - in head/sys/ofed: drivers/net/mlx4
 include/linux
From: Garrett Cooper 
To: John Baldwin 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head ,
 svn-src-all ,
 src-committers , shahark@mellanox.com,
 acornehl@gmail.com
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Wed, 10 Jul 2013 23:58:32 -0000

On Tue, Jul 9, 2013 at 8:20 AM, John Baldwin  wrote:

...

> I hadn't seen it.  I had wondered if the '\n' issue was a generic sysfs thing.
> It sounds like it is and I'd be happy to revert the mlx4 change and alter the
> sysfs bits to manage the newline directly if that is more appropriate.

I'll doublecheck this, but basically I'm really adverse to diverging
from Linux in this area -- hence that's why I did what I did in the PR
I mentioned.

> I'd also like this to use sysctl_handle_string() if at all possible.  Are you in
> a position to test patches still?

Unfortunately I'm not right now :(. Anthony may or may not be able to
test this out (I used his machine when we were hacking around on IB
stuff).

> If so, maybe give this a whirl.  It's similar to yours except it uses
> sysctl_handle_string() and strlcat() rather than continuing to do things
> by hand.  It also outputs an empty string to userland if the attribute
> doesn't have a show method (your version would never pass out an old
> string in that case unlike the original code).

Can you please pass along a patch to Anthony and me so we can try and
apply it to test it out (Gmail's going to taint the inline patch, as
is the EMC Exchange server with the patch attachment)? If Anthony
still has the machine setup, then I'd be more than happy to test out
the patch :).

Thanks!

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 02:10:23 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D555B79B;
 Thu, 11 Jul 2013 02:10:23 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C80A419EA;
 Thu, 11 Jul 2013 02:10:23 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B2ANoI074290;
 Thu, 11 Jul 2013 02:10:23 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B2ANNj074288;
 Thu, 11 Jul 2013 02:10:23 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307110210.r6B2ANNj074288@svn.freebsd.org>
From: Jim Harris 
Date: Thu, 11 Jul 2013 02:10:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253178 - head/share/man/man4
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 02:10:23 -0000

Author: jimharris
Date: Thu Jul 11 02:10:23 2013
New Revision: 253178
URL: http://svnweb.freebsd.org/changeset/base/253178

Log:
  Bump date for nvme(4) and nvd(4).
  
  MFC after:	3 days

Modified:
  head/share/man/man4/nvd.4
  head/share/man/man4/nvme.4

Modified: head/share/man/man4/nvd.4
==============================================================================
--- head/share/man/man4/nvd.4	Thu Jul 11 01:30:24 2013	(r253177)
+++ head/share/man/man4/nvd.4	Thu Jul 11 02:10:23 2013	(r253178)
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 10, 2012
+.Dd July 9, 2013
 .Dt NVD 4
 .Os
 .Sh NAME

Modified: head/share/man/man4/nvme.4
==============================================================================
--- head/share/man/man4/nvme.4	Thu Jul 11 01:30:24 2013	(r253177)
+++ head/share/man/man4/nvme.4	Thu Jul 11 02:10:23 2013	(r253178)
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 10, 2012
+.Dd July 9, 2013
 .Dt NVME 4
 .Os
 .Sh NAME

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 03:44:07 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 632DF78D;
 Thu, 11 Jul 2013 03:44:07 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 562281E1A;
 Thu, 11 Jul 2013 03:44:07 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B3i7Ws006728;
 Thu, 11 Jul 2013 03:44:07 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B3i7dL006727;
 Thu, 11 Jul 2013 03:44:07 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201307110344.r6B3i7dL006727@svn.freebsd.org>
From: Jack F Vogel 
Date: Thu, 11 Jul 2013 03:44:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253179 - head/sys/dev/ixgbe
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 03:44:07 -0000

Author: jfv
Date: Thu Jul 11 03:44:06 2013
New Revision: 253179
URL: http://svnweb.freebsd.org/changeset/base/253179

Log:
  Fix my last commit, flags rather than flag... duh.
  
  MFC after: 2 days

Modified:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Thu Jul 11 02:10:23 2013	(r253178)
+++ head/sys/dev/ixgbe/ixgbe.c	Thu Jul 11 03:44:06 2013	(r253179)
@@ -3943,7 +3943,7 @@ ixgbe_free_receive_ring(struct rx_ring *
 			rxbuf->buf->m_flags |= M_PKTHDR;
 			m_freem(rxbuf->buf);
 			rxbuf->buf = NULL;
-			rxbuf->flag = 0;
+			rxbuf->flags = 0;
 		}
 	}
 }

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 03:54:36 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id AA50DAA0;
 Thu, 11 Jul 2013 03:54:36 +0000 (UTC)
 (envelope-from grehan@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 9CD161E6F;
 Thu, 11 Jul 2013 03:54:36 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B3sa2d009586;
 Thu, 11 Jul 2013 03:54:36 GMT (envelope-from grehan@svn.freebsd.org)
Received: (from grehan@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B3saLY009583;
 Thu, 11 Jul 2013 03:54:36 GMT (envelope-from grehan@svn.freebsd.org)
Message-Id: <201307110354.r6B3saLY009583@svn.freebsd.org>
From: Peter Grehan 
Date: Thu, 11 Jul 2013 03:54:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253181 - head/usr.sbin/bhyve
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 03:54:36 -0000

Author: grehan
Date: Thu Jul 11 03:54:35 2013
New Revision: 253181
URL: http://svnweb.freebsd.org/changeset/base/253181

Log:
  Implement RTC CMOS nvram. Init some fields that are used
  by FreeBSD and UEFI.
  Tested with nvram(4).
  
  Reviewed by:	neel

Added:
  head/usr.sbin/bhyve/rtc.h   (contents, props changed)
Modified:
  head/usr.sbin/bhyve/bhyverun.c
  head/usr.sbin/bhyve/rtc.c

Modified: head/usr.sbin/bhyve/bhyverun.c
==============================================================================
--- head/usr.sbin/bhyve/bhyverun.c	Thu Jul 11 03:49:14 2013	(r253180)
+++ head/usr.sbin/bhyve/bhyverun.c	Thu Jul 11 03:54:35 2013	(r253181)
@@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$");
 #include "xmsr.h"
 #include "ioapic.h"
 #include "spinup_ap.h"
+#include "rtc.h"
 
 #define	DEFAULT_GUEST_HZ	100
 #define	DEFAULT_GUEST_TSLICE	200
@@ -735,6 +736,8 @@ main(int argc, char *argv[])
 	init_mem();
 	init_inout();
 
+	rtc_init(ctx);
+
 	/*
 	 * Exit if a device emulation finds an error in it's initilization
 	 */

Modified: head/usr.sbin/bhyve/rtc.c
==============================================================================
--- head/usr.sbin/bhyve/rtc.c	Thu Jul 11 03:49:14 2013	(r253180)
+++ head/usr.sbin/bhyve/rtc.c	Thu Jul 11 03:54:35 2013	(r253181)
@@ -33,10 +33,15 @@ __FBSDID("$FreeBSD$");
 #include 
 
 #include 
+#include 
 #include 
 #include 
 
+#include 
+#include 
+
 #include "inout.h"
+#include "rtc.h"
 
 #define	IO_RTC	0x70
 
@@ -64,16 +69,30 @@ __FBSDID("$FreeBSD$");
 #define RTC_STATUSD	0x0d	/* status register D (R) Lost Power */
 #define  RTCSD_PWR	 0x80	/* clock power OK */
 
-#define	RTC_DIAG	0x0e
+#define	RTC_NVRAM_START	0x0e
+#define	RTC_NVRAM_END	0x7f
+#define RTC_NVRAM_SZ	(128 - RTC_NVRAM_START)
+#define	nvoff(x)	((x) - RTC_NVRAM_START)
 
+#define	RTC_DIAG	0x0e
 #define RTC_RSTCODE	0x0f
-
 #define	RTC_EQUIPMENT	0x14
+#define	RTC_LMEM_LSB	0x34
+#define	RTC_LMEM_MSB	0x35
+#define	RTC_HMEM_LSB	0x5b
+#define	RTC_HMEM_SB	0x5c
+#define	RTC_HMEM_MSB	0x5d
+
+#define m_64KB		(64*1024)
+#define	m_16MB		(16*1024*1024)
+#define	m_4GB		(4ULL*1024*1024*1024)
 
 static int addr;
 
+static uint8_t rtc_nvram[RTC_NVRAM_SZ];
+
 /* XXX initialize these to default values as they would be from BIOS */
-static uint8_t status_a, status_b, rstcode;
+static uint8_t status_a, status_b;
 
 static u_char const bin2bcd_data[] = {
 	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
@@ -135,14 +154,11 @@ rtc_addr_handler(struct vmctx *ctx, int 
 	case RTC_DAY:
 	case RTC_MONTH:
 	case RTC_YEAR:
-	case RTC_CENTURY:
 	case RTC_STATUSA:
 	case RTC_STATUSB:
 	case RTC_INTR:
 	case RTC_STATUSD:
-	case RTC_DIAG:
-	case RTC_RSTCODE:
-	case RTC_EQUIPMENT:
+	case RTC_NVRAM_START ... RTC_NVRAM_END:
 		break;
 	default:
 		return (-1);
@@ -217,9 +233,6 @@ rtc_data_handler(struct vmctx *ctx, int 
 		case RTC_YEAR:
 			*eax = rtcout(tm.tm_year % 100);
 			return (0);
-		case RTC_CENTURY:
-			*eax = rtcout(tm.tm_year / 100);
-			break;
 		case RTC_STATUSA:
 			*eax = status_a;
 			return (0);
@@ -232,14 +245,8 @@ rtc_data_handler(struct vmctx *ctx, int 
 		case RTC_STATUSD:
 			*eax = RTCSD_PWR;
 			return (0);
-		case RTC_DIAG:
-			*eax = 0;
-			return (0);
-		case RTC_RSTCODE:
-			*eax = rstcode;
-			return (0);
-		case RTC_EQUIPMENT:
-			*eax = 0;
+		case RTC_NVRAM_START ... RTC_NVRAM_END:
+			*eax = rtc_nvram[addr - RTC_NVRAM_START];
 			return (0);
 		default:
 			return (-1);
@@ -259,9 +266,6 @@ rtc_data_handler(struct vmctx *ctx, int 
 	case RTC_STATUSD:
 		/* ignore write */
 		break;
-	case RTC_RSTCODE:
-		rstcode = *eax;
-		break;
 	case RTC_SEC:
 	case RTC_MIN:
 	case RTC_HRS:
@@ -269,16 +273,58 @@ rtc_data_handler(struct vmctx *ctx, int 
 	case RTC_DAY:
 	case RTC_MONTH:
 	case RTC_YEAR:
-	case RTC_CENTURY:
 		/*
 		 * Ignore writes to the time of day registers
 		 */
 		break;
+	case RTC_NVRAM_START ... RTC_NVRAM_END:
+		rtc_nvram[addr - RTC_NVRAM_START] = *eax;
+		break;
 	default:
 		return (-1);
 	}
 	return (0);
 }
 
+void
+rtc_init(struct vmctx *ctx)
+{	
+	struct timeval cur;
+	struct tm tm;
+	size_t himem;
+	size_t lomem;
+	int err;
+
+	err = gettimeofday(&cur, NULL);
+	assert(err == 0);
+	(void) localtime_r(&cur.tv_sec, &tm);
+
+	memset(rtc_nvram, 0, sizeof(rtc_nvram));
+
+	rtc_nvram[nvoff(RTC_CENTURY)] = rtcout(tm.tm_year / 100);
+
+	/* XXX init diag/reset code/equipment/checksum ? */
+
+	/*
+	 * Report guest memory size in nvram cells as required by UEFI.
+	 * Little-endian encoding.
+	 * 0x34/0x35 - 64KB chunks above 16MB, below 4GB
+	 * 0x5b/0x5c/0x5d - 64KB chunks above 4GB
+	 */
+	err = vm_get_memory_seg(ctx, 0, &lomem);
+	assert(err == 0);
+
+	lomem = (lomem - m_16MB) / m_64KB;
+	rtc_nvram[nvoff(RTC_LMEM_LSB)] = lomem;
+	rtc_nvram[nvoff(RTC_LMEM_MSB)] = lomem >> 8;
+
+	if (vm_get_memory_seg(ctx, m_4GB, &himem) == 0) {	  
+		himem /= m_64KB;
+		rtc_nvram[nvoff(RTC_HMEM_LSB)] = himem;
+		rtc_nvram[nvoff(RTC_HMEM_SB)]  = himem >> 8;
+		rtc_nvram[nvoff(RTC_NVRAM_START)] = himem >> 16;
+	}
+}
+
 INOUT_PORT(rtc, IO_RTC, IOPORT_F_INOUT, rtc_addr_handler);
 INOUT_PORT(rtc, IO_RTC + 1, IOPORT_F_INOUT, rtc_data_handler);

Added: head/usr.sbin/bhyve/rtc.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/usr.sbin/bhyve/rtc.h	Thu Jul 11 03:54:35 2013	(r253181)
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2013  Peter Grehan 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _RTC_H_
+#define _RTC_H_
+
+void	rtc_init(struct vmctx *ctx);
+
+#endif /* _RTC_H_ */

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:10:36 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id CBC8AEC8;
 Thu, 11 Jul 2013 05:10:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BF4F9108C;
 Thu, 11 Jul 2013 05:10:36 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5AaOB033010;
 Thu, 11 Jul 2013 05:10:36 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5Aa1l033009;
 Thu, 11 Jul 2013 05:10:36 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110510.r6B5Aa1l033009@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:10:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253185 - head/sys/i386/i386
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:10:36 -0000

Author: kib
Date: Thu Jul 11 05:10:36 2013
New Revision: 253185
URL: http://svnweb.freebsd.org/changeset/base/253185

Log:
  MFamd64 r253140:
  Clear m->object for the page taken from the delayed free list in
  pmap_pv_reclaim().
  
  Noted by:	alc

Modified:
  head/sys/i386/i386/pmap.c

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Thu Jul 11 04:57:08 2013	(r253184)
+++ head/sys/i386/i386/pmap.c	Thu Jul 11 05:10:36 2013	(r253185)
@@ -2311,6 +2311,7 @@ out:
 	if (m_pc == NULL && pv_vafree != 0 && free != NULL) {
 		m_pc = free;
 		free = (void *)m_pc->object;
+		m_pc->object = NULL;
 		/* Recycle a freed page table page. */
 		m_pc->wire_count = 1;
 		atomic_add_int(&cnt.v_wire_count, 1);

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:15:31 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 590A1DA;
 Thu, 11 Jul 2013 05:15:31 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4CA3E10B0;
 Thu, 11 Jul 2013 05:15:31 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5FVG9033847;
 Thu, 11 Jul 2013 05:15:31 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5FVlX033846;
 Thu, 11 Jul 2013 05:15:31 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110515.r6B5FVlX033846@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:15:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253186 - head/sys/i386/i386
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:15:31 -0000

Author: kib
Date: Thu Jul 11 05:15:30 2013
New Revision: 253186
URL: http://svnweb.freebsd.org/changeset/base/253186

Log:
  Explicitely panic instead of possibly doing undefined things when
  ptelist KVA is exhausted.  Currently this cannot happen, the added
  panic serves as assert.
  
  Discussed with:	alc
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/i386/i386/pmap.c

Modified: head/sys/i386/i386/pmap.c
==============================================================================
--- head/sys/i386/i386/pmap.c	Thu Jul 11 05:10:36 2013	(r253185)
+++ head/sys/i386/i386/pmap.c	Thu Jul 11 05:15:30 2013	(r253186)
@@ -680,7 +680,7 @@ pmap_ptelist_alloc(vm_offset_t *head)
 
 	va = *head;
 	if (va == 0)
-		return (va);	/* Out of memory */
+		panic("pmap_ptelist_alloc: exhausted ptelist KVA");
 	pte = vtopte(va);
 	*head = *pte;
 	if (*head & PG_V)

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:36:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 9F59131B;
 Thu, 11 Jul 2013 05:36:26 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 938E21118;
 Thu, 11 Jul 2013 05:36:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5aQtP039542;
 Thu, 11 Jul 2013 05:36:26 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5aQeL039541;
 Thu, 11 Jul 2013 05:36:26 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110536.r6B5aQeL039541@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:36:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253187 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:36:26 -0000

Author: kib
Date: Thu Jul 11 05:36:26 2013
New Revision: 253187
URL: http://svnweb.freebsd.org/changeset/base/253187

Log:
  Do not invalidate page of the B_NOCACHE buffer or buffer after an I/O
  error if any user wired mappings exist.  Doing the invalidation
  destroys the user wiring.
  
  The change is the temporal measure to close the bug, the more proper
  fix is to delegate the invalidation of the page to upper layers
  always.
  
  Reported and tested by:	pho
  Reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/kern/vfs_bio.c

Modified: head/sys/kern/vfs_bio.c
==============================================================================
--- head/sys/kern/vfs_bio.c	Thu Jul 11 05:15:30 2013	(r253186)
+++ head/sys/kern/vfs_bio.c	Thu Jul 11 05:36:26 2013	(r253187)
@@ -1692,7 +1692,8 @@ brelse(struct buf *bp)
 
 				KASSERT(presid >= 0, ("brelse: extra page"));
 				VM_OBJECT_WLOCK(obj);
-				vm_page_set_invalid(m, poffset, presid);
+				if (pmap_page_wired_mappings(m) == 0)
+					vm_page_set_invalid(m, poffset, presid);
 				VM_OBJECT_WUNLOCK(obj);
 				if (had_bogus)
 					printf("avoided corruption bug in bogus_page/brelse code\n");

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:38:40 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 32B3B481;
 Thu, 11 Jul 2013 05:38:40 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 26230112F;
 Thu, 11 Jul 2013 05:38:40 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5ces9039826;
 Thu, 11 Jul 2013 05:38:40 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5cepS039825;
 Thu, 11 Jul 2013 05:38:40 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110538.r6B5cepS039825@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:38:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253188 - head/sys/vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:38:40 -0000

Author: kib
Date: Thu Jul 11 05:38:39 2013
New Revision: 253188
URL: http://svnweb.freebsd.org/changeset/base/253188

Log:
  In the vm_page_set_invalid() function, do not assert that the page is
  not busy, since its only caller brelse() can legitimately call it on
  busy page.  This happens for VOP_PUTPAGES() on filesystems that use
  buffers and which VOP_WRITE() method marked the buffer containing page
  as non-cacheable.
  
  Reported and tested by:	pho
  Reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/vm/vm_page.c

Modified: head/sys/vm/vm_page.c
==============================================================================
--- head/sys/vm/vm_page.c	Thu Jul 11 05:36:26 2013	(r253187)
+++ head/sys/vm/vm_page.c	Thu Jul 11 05:38:39 2013	(r253188)
@@ -2631,8 +2631,6 @@ vm_page_set_invalid(vm_page_t m, int bas
 	vm_page_bits_t bits;
 
 	VM_OBJECT_ASSERT_WLOCKED(m->object);
-	KASSERT((m->oflags & VPO_BUSY) == 0,
-	    ("vm_page_set_invalid: page %p is busy", m));
 	bits = vm_page_bits(base, size);
 	if (m->valid == VM_PAGE_BITS_ALL && bits != 0)
 		pmap_remove_all(m);

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:47:27 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 9A56F89D;
 Thu, 11 Jul 2013 05:47:27 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 746AB11A0;
 Thu, 11 Jul 2013 05:47:27 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5lRRL042536;
 Thu, 11 Jul 2013 05:47:27 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5lRda042534;
 Thu, 11 Jul 2013 05:47:27 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110547.r6B5lRda042534@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:47:27 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253189 - head/sys/vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:47:27 -0000

Author: kib
Date: Thu Jul 11 05:47:26 2013
New Revision: 253189
URL: http://svnweb.freebsd.org/changeset/base/253189

Log:
  Never remove user-wired pages from an object when doing
  msync(MS_INVALIDATE).  The vm_fault_copy_entry() requires that object
  range which corresponds to the user-wired vm_map_entry, is always
  fully populated.
  
  Add OBJPR_NOTWIRED flag for vm_object_page_remove() to request the
  preserving behaviour, use it when calling vm_object_page_remove() from
  vm_object_sync().
  
  Reported and tested by:	pho
  Reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/vm/vm_object.c
  head/sys/vm/vm_object.h

Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c	Thu Jul 11 05:38:39 2013	(r253188)
+++ head/sys/vm/vm_object.c	Thu Jul 11 05:47:26 2013	(r253189)
@@ -1054,9 +1054,9 @@ vm_object_sync(vm_object_t object, vm_oo
 			 */
 			flags = OBJPR_NOTMAPPED;
 		else if (old_msync)
-			flags = 0;
+			flags = OBJPR_NOTWIRED;
 		else
-			flags = OBJPR_CLEANONLY;
+			flags = OBJPR_CLEANONLY | OBJPR_NOTWIRED;
 		vm_object_page_remove(object, OFF_TO_IDX(offset),
 		    OFF_TO_IDX(offset + size + PAGE_MASK), flags);
 	}
@@ -1892,7 +1892,8 @@ again:
 		vm_page_lock(p);
 		if ((wirings = p->wire_count) != 0 &&
 		    (wirings = pmap_page_wired_mappings(p)) != p->wire_count) {
-			if ((options & OBJPR_NOTMAPPED) == 0) {
+			if ((options & (OBJPR_NOTWIRED | OBJPR_NOTMAPPED)) ==
+			    0) {
 				pmap_remove_all(p);
 				/* Account for removal of wired mappings. */
 				if (wirings != 0)
@@ -1902,8 +1903,7 @@ again:
 				p->valid = 0;
 				vm_page_undirty(p);
 			}
-			vm_page_unlock(p);
-			continue;
+			goto next;
 		}
 		if (vm_page_sleep_if_busy(p, TRUE, "vmopar"))
 			goto again;
@@ -1912,12 +1912,12 @@ again:
 		if ((options & OBJPR_CLEANONLY) != 0 && p->valid != 0) {
 			if ((options & OBJPR_NOTMAPPED) == 0)
 				pmap_remove_write(p);
-			if (p->dirty) {
-				vm_page_unlock(p);
-				continue;
-			}
+			if (p->dirty)
+				goto next;
 		}
 		if ((options & OBJPR_NOTMAPPED) == 0) {
+			if ((options & OBJPR_NOTWIRED) != 0 && wirings != 0)
+				goto next;
 			pmap_remove_all(p);
 			/* Account for removal of wired mappings. */
 			if (wirings != 0) {
@@ -1929,6 +1929,7 @@ again:
 			}
 		}
 		vm_page_free(p);
+next:
 		vm_page_unlock(p);
 	}
 	vm_object_pip_wakeup(object);

Modified: head/sys/vm/vm_object.h
==============================================================================
--- head/sys/vm/vm_object.h	Thu Jul 11 05:38:39 2013	(r253188)
+++ head/sys/vm/vm_object.h	Thu Jul 11 05:47:26 2013	(r253189)
@@ -205,6 +205,7 @@ struct vm_object {
  */
 #define	OBJPR_CLEANONLY	0x1		/* Don't remove dirty pages. */
 #define	OBJPR_NOTMAPPED	0x2		/* Don't unmap pages. */
+#define	OBJPR_NOTWIRED	0x4		/* Don't remove wired pages. */
 
 TAILQ_HEAD(object_q, vm_object);
 

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:55:08 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id DE789D30;
 Thu, 11 Jul 2013 05:55:08 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id D1F12123E;
 Thu, 11 Jul 2013 05:55:08 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5t878045371;
 Thu, 11 Jul 2013 05:55:08 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5t8xG045368;
 Thu, 11 Jul 2013 05:55:08 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110555.r6B5t8xG045368@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:55:08 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253190 - head/sys/vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:55:08 -0000

Author: kib
Date: Thu Jul 11 05:55:08 2013
New Revision: 253190
URL: http://svnweb.freebsd.org/changeset/base/253190

Log:
  The mlockall() or VM_MAP_WIRE_HOLESOK does not interact properly with
  parallel creation of the map entries, e.g. by mmap() or stack growing.
  It also breaks when other entry is wired in parallel.
  
  The vm_map_wire() iterates over the map entries in the region, and
  assumes that map entries it finds are marked as in transition before,
  also that any entry marked as in transition, are marked by the current
  invocation of vm_map_wire().  This is not true for new entries in the
  holes.
  
  Add the thread owner of the MAP_ENTRY_IN_TRANSITION flag to struct
  vm_map_entry.  In vm_map_wire() and vm_map_unwire(), only process the
  entries which transition owner is the current thread.
  
  Reported and tested by:	pho
  Reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/vm/vm_map.c
  head/sys/vm/vm_map.h

Modified: head/sys/vm/vm_map.c
==============================================================================
--- head/sys/vm/vm_map.c	Thu Jul 11 05:47:26 2013	(r253189)
+++ head/sys/vm/vm_map.c	Thu Jul 11 05:55:08 2013	(r253190)
@@ -2281,6 +2281,7 @@ vm_map_unwire(vm_map_t map, vm_offset_t 
 		 * above.)
 		 */
 		entry->eflags |= MAP_ENTRY_IN_TRANSITION;
+		entry->wiring_thread = curthread;
 		/*
 		 * Check the map for holes in the specified region.
 		 * If VM_MAP_WIRE_HOLESOK was specified, skip this check.
@@ -2313,8 +2314,24 @@ done:
 		else
 			KASSERT(result, ("vm_map_unwire: lookup failed"));
 	}
-	entry = first_entry;
-	while (entry != &map->header && entry->start < end) {
+	for (entry = first_entry; entry != &map->header && entry->start < end;
+	    entry = entry->next) {
+		/*
+		 * If VM_MAP_WIRE_HOLESOK was specified, an empty
+		 * space in the unwired region could have been mapped
+		 * while the map lock was dropped for draining
+		 * MAP_ENTRY_IN_TRANSITION.  Moreover, another thread
+		 * could be simultaneously wiring this new mapping
+		 * entry.  Detect these cases and skip any entries
+		 * marked as in transition by us.
+		 */
+		if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 ||
+		    entry->wiring_thread != curthread) {
+			KASSERT((flags & VM_MAP_WIRE_HOLESOK) != 0,
+			    ("vm_map_unwire: !HOLESOK and new/changed entry"));
+			continue;
+		}
+
 		if (rv == KERN_SUCCESS && (!user_unwire ||
 		    (entry->eflags & MAP_ENTRY_USER_WIRED))) {
 			if (user_unwire)
@@ -2330,15 +2347,15 @@ done:
 				    OBJ_FICTITIOUS) != 0);
 			}
 		}
-		KASSERT(entry->eflags & MAP_ENTRY_IN_TRANSITION,
-			("vm_map_unwire: in-transition flag missing"));
+		KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0,
+		    ("vm_map_unwire: in-transition flag missing"));
 		entry->eflags &= ~MAP_ENTRY_IN_TRANSITION;
+		entry->wiring_thread = NULL;
 		if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) {
 			entry->eflags &= ~MAP_ENTRY_NEEDS_WAKEUP;
 			need_wakeup = TRUE;
 		}
 		vm_map_simplify_entry(map, entry);
-		entry = entry->next;
 	}
 	vm_map_unlock(map);
 	if (need_wakeup)
@@ -2432,6 +2449,7 @@ vm_map_wire(vm_map_t map, vm_offset_t st
 		 * above.)
 		 */
 		entry->eflags |= MAP_ENTRY_IN_TRANSITION;
+		entry->wiring_thread = curthread;
 		if ((entry->protection & (VM_PROT_READ | VM_PROT_EXECUTE)) == 0
 		    || (entry->protection & prot) != prot) {
 			entry->eflags |= MAP_ENTRY_WIRE_SKIPPED;
@@ -2523,10 +2541,27 @@ done:
 		else
 			KASSERT(result, ("vm_map_wire: lookup failed"));
 	}
-	entry = first_entry;
-	while (entry != &map->header && entry->start < end) {
+	for (entry = first_entry; entry != &map->header && entry->start < end;
+	    entry = entry->next) {
 		if ((entry->eflags & MAP_ENTRY_WIRE_SKIPPED) != 0)
 			goto next_entry_done;
+
+		/*
+		 * If VM_MAP_WIRE_HOLESOK was specified, an empty
+		 * space in the unwired region could have been mapped
+		 * while the map lock was dropped for faulting in the
+		 * pages or draining MAP_ENTRY_IN_TRANSITION.
+		 * Moreover, another thread could be simultaneously
+		 * wiring this new mapping entry.  Detect these cases
+		 * and skip any entries marked as in transition by us.
+		 */
+		if ((entry->eflags & MAP_ENTRY_IN_TRANSITION) == 0 ||
+		    entry->wiring_thread != curthread) {
+			KASSERT((flags & VM_MAP_WIRE_HOLESOK) != 0,
+			    ("vm_map_wire: !HOLESOK and new/changed entry"));
+			continue;
+		}
+
 		if (rv == KERN_SUCCESS) {
 			if (user_wire)
 				entry->eflags |= MAP_ENTRY_USER_WIRED;
@@ -2551,15 +2586,18 @@ done:
 			}
 		}
 	next_entry_done:
-		KASSERT(entry->eflags & MAP_ENTRY_IN_TRANSITION,
-			("vm_map_wire: in-transition flag missing"));
-		entry->eflags &= ~(MAP_ENTRY_IN_TRANSITION|MAP_ENTRY_WIRE_SKIPPED);
+		KASSERT((entry->eflags & MAP_ENTRY_IN_TRANSITION) != 0,
+		    ("vm_map_wire: in-transition flag missing %p", entry));
+		KASSERT(entry->wiring_thread == curthread,
+		    ("vm_map_wire: alien wire %p", entry));
+		entry->eflags &= ~(MAP_ENTRY_IN_TRANSITION |
+		    MAP_ENTRY_WIRE_SKIPPED);
+		entry->wiring_thread = NULL;
 		if (entry->eflags & MAP_ENTRY_NEEDS_WAKEUP) {
 			entry->eflags &= ~MAP_ENTRY_NEEDS_WAKEUP;
 			need_wakeup = TRUE;
 		}
 		vm_map_simplify_entry(map, entry);
-		entry = entry->next;
 	}
 	vm_map_unlock(map);
 	if (need_wakeup)
@@ -3193,6 +3231,7 @@ vmspace_fork(struct vmspace *vm1, vm_oof
 			*new_entry = *old_entry;
 			new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED |
 			    MAP_ENTRY_IN_TRANSITION);
+			new_entry->wiring_thread = NULL;
 			new_entry->wired_count = 0;
 			if (new_entry->eflags & MAP_ENTRY_VN_WRITECNT) {
 				vnode_pager_update_writecount(object,
@@ -3227,6 +3266,7 @@ vmspace_fork(struct vmspace *vm1, vm_oof
 			 */
 			new_entry->eflags &= ~(MAP_ENTRY_USER_WIRED |
 			    MAP_ENTRY_IN_TRANSITION | MAP_ENTRY_VN_WRITECNT);
+			new_entry->wiring_thread = NULL;
 			new_entry->wired_count = 0;
 			new_entry->object.vm_object = NULL;
 			new_entry->cred = NULL;

Modified: head/sys/vm/vm_map.h
==============================================================================
--- head/sys/vm/vm_map.h	Thu Jul 11 05:47:26 2013	(r253189)
+++ head/sys/vm/vm_map.h	Thu Jul 11 05:55:08 2013	(r253190)
@@ -116,6 +116,7 @@ struct vm_map_entry {
 	int wired_count;		/* can be paged if = 0 */
 	vm_pindex_t next_read;		/* index of the next sequential read */
 	struct ucred *cred;		/* tmp storage for creator ref */
+	struct thread *wiring_thread;
 };
 
 #define MAP_ENTRY_NOSYNC		0x0001

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 05:58:29 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 82532E7E;
 Thu, 11 Jul 2013 05:58:29 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 7618C1250;
 Thu, 11 Jul 2013 05:58:29 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6B5wTuv045773;
 Thu, 11 Jul 2013 05:58:29 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6B5wT6x045772;
 Thu, 11 Jul 2013 05:58:29 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307110558.r6B5wT6x045772@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 05:58:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253191 - head/sys/vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 05:58:29 -0000

Author: kib
Date: Thu Jul 11 05:58:28 2013
New Revision: 253191
URL: http://svnweb.freebsd.org/changeset/base/253191

Log:
  The vm_fault() should not be allowed to proceed on the map entry which
  is being wired now.  The entry wired count is changed to non-zero in
  advance, before the map lock is dropped.  This makes the vm_fault() to
  perceive the entry as wired, and breaks the fragment which moves the
  wire count from the shadowed page, to the upper page, making the code
  unwiring non-wired page.
  
  On the other hand, the vm_fault() calls from vm_fault_wire() should be
  allowed to proceed, so only drain MAP_ENTRY_IN_TRANSITION from
  vm_fault() when wiring_thread is not current.
  
  Reported and tested by:	pho
  Reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation
  MFC after:	2 weeks

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Thu Jul 11 05:55:08 2013	(r253190)
+++ head/sys/vm/vm_fault.c	Thu Jul 11 05:58:28 2013	(r253191)
@@ -280,6 +280,19 @@ RetryFault:;
 		    (u_long)vaddr);
 	}
 
+	if (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION &&
+	    fs.entry->wiring_thread != curthread) {
+		vm_map_unlock_read(fs.map);
+		vm_map_lock(fs.map);
+		if (vm_map_lookup_entry(fs.map, vaddr, &fs.entry) &&
+		    (fs.entry->eflags & MAP_ENTRY_IN_TRANSITION)) {
+			fs.entry->eflags |= MAP_ENTRY_NEEDS_WAKEUP;
+			vm_map_unlock_and_wait(fs.map, 0);
+		} else
+			vm_map_unlock(fs.map);
+		goto RetryFault;
+	}
+
 	/*
 	 * Make a reference to this object to prevent its disposal while we
 	 * are messing with it.  Once we have the reference, the map is free

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 12:46:35 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id ECBA2E1A;
 Thu, 11 Jul 2013 12:46:35 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C4ADF1AAE;
 Thu, 11 Jul 2013 12:46:35 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BCkZpx067988;
 Thu, 11 Jul 2013 12:46:35 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BCkZ3V067987;
 Thu, 11 Jul 2013 12:46:35 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307111246.r6BCkZ3V067987@svn.freebsd.org>
From: Andre Oppermann 
Date: Thu, 11 Jul 2013 12:46:35 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253204 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 12:46:36 -0000

Author: andre
Date: Thu Jul 11 12:46:35 2013
New Revision: 253204
URL: http://svnweb.freebsd.org/changeset/base/253204

Log:
  Fix style issues, a typo in "kern.ipc.nmbufs" and correctly plave and
  expose the value of the tunable maxmbufmem as "kern.ipc.maxmbufmem"
  through sysctl.
  
  Reported by:	smh
  MFC after:	1 day

Modified:
  head/sys/kern/kern_mbuf.c

Modified: head/sys/kern/kern_mbuf.c
==============================================================================
--- head/sys/kern/kern_mbuf.c	Thu Jul 11 12:42:46 2013	(r253203)
+++ head/sys/kern/kern_mbuf.c	Thu Jul 11 12:46:35 2013	(r253204)
@@ -104,13 +104,18 @@ int nmbjumbo9;			/* limits number of 9k 
 int nmbjumbo16;			/* limits number of 16k jumbo clusters */
 struct mbstat mbstat;
 
+static quad_t maxmbufmem;	/* overall real memory limit for all mbufs */
+
+SYSCTL_QUAD(_kern_ipc, OID_AUTO, maxmbufmem, CTLFLAG_RDTUN, &maxmbufmem, 0,
+    "Maximum real memory allocateable to various mbuf types");
+
 /*
  * tunable_mbinit() has to be run before any mbuf allocations are done.
  */
 static void
 tunable_mbinit(void *dummy)
 {
-	quad_t realmem, maxmbufmem;
+	quad_t realmem;
 
 	/*
 	 * The default limit for all mbuf related memory is 1/2 of all
@@ -120,7 +125,7 @@ tunable_mbinit(void *dummy)
 	realmem = qmin((quad_t)physmem * PAGE_SIZE,
 	    vm_map_max(kmem_map) - vm_map_min(kmem_map));
 	maxmbufmem = realmem / 2;
-	TUNABLE_QUAD_FETCH("kern.maxmbufmem", &maxmbufmem);
+	TUNABLE_QUAD_FETCH("kern.ipc.maxmbufmem", &maxmbufmem);
 	if (maxmbufmem > realmem / 4 * 3)
 		maxmbufmem = realmem / 4 * 3;
 
@@ -204,7 +209,7 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS)
 	newnmbjumbo9 = nmbjumbo9;
 	error = sysctl_handle_int(oidp, &newnmbjumbo9, 0, req);
 	if (error == 0 && req->newptr) {
-		if (newnmbjumbo9 > nmbjumbo9&&
+		if (newnmbjumbo9 > nmbjumbo9 &&
 		    nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
 			nmbjumbo9 = newnmbjumbo9;
 			uma_zone_set_max(zone_jumbo9, nmbjumbo9);
@@ -258,7 +263,7 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS)
 	}
 	return (error);
 }
-SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbuf, CTLTYPE_INT|CTLFLAG_RW,
+SYSCTL_PROC(_kern_ipc, OID_AUTO, nmbufs, CTLTYPE_INT|CTLFLAG_RW,
 &nmbufs, 0, sysctl_nmbufs, "IU",
     "Maximum number of mbufs allowed");
 

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 12:53:14 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id F0AA9760;
 Thu, 11 Jul 2013 12:53:13 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id CB1A81B68;
 Thu, 11 Jul 2013 12:53:13 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BCrDcK070583;
 Thu, 11 Jul 2013 12:53:13 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BCrDnl070582;
 Thu, 11 Jul 2013 12:53:13 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307111253.r6BCrDnl070582@svn.freebsd.org>
From: Andre Oppermann 
Date: Thu, 11 Jul 2013 12:53:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253207 - head/sys/kern
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 12:53:14 -0000

Author: andre
Date: Thu Jul 11 12:53:13 2013
New Revision: 253207
URL: http://svnweb.freebsd.org/changeset/base/253207

Log:
  Make use of the fact that uma_zone_set_max(9) already returns the
  rounded limit making a call to uma_zone_get_max(9) unnecessary.
  
  MFC after:	1 day

Modified:
  head/sys/kern/kern_mbuf.c

Modified: head/sys/kern/kern_mbuf.c
==============================================================================
--- head/sys/kern/kern_mbuf.c	Thu Jul 11 12:49:12 2013	(r253206)
+++ head/sys/kern/kern_mbuf.c	Thu Jul 11 12:53:13 2013	(r253207)
@@ -167,8 +167,7 @@ sysctl_nmbclusters(SYSCTL_HANDLER_ARGS)
 		if (newnmbclusters > nmbclusters &&
 		    nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
 			nmbclusters = newnmbclusters;
-			uma_zone_set_max(zone_clust, nmbclusters);
-			nmbclusters = uma_zone_get_max(zone_clust);
+			nmbclusters = uma_zone_set_max(zone_clust, nmbclusters);
 			EVENTHANDLER_INVOKE(nmbclusters_change);
 		} else
 			error = EINVAL;
@@ -190,8 +189,7 @@ sysctl_nmbjumbop(SYSCTL_HANDLER_ARGS)
 		if (newnmbjumbop > nmbjumbop &&
 		    nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
 			nmbjumbop = newnmbjumbop;
-			uma_zone_set_max(zone_jumbop, nmbjumbop);
-			nmbjumbop = uma_zone_get_max(zone_jumbop);
+			nmbjumbop = uma_zone_set_max(zone_jumbop, nmbjumbop);
 		} else
 			error = EINVAL;
 	}
@@ -212,8 +210,7 @@ sysctl_nmbjumbo9(SYSCTL_HANDLER_ARGS)
 		if (newnmbjumbo9 > nmbjumbo9 &&
 		    nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
 			nmbjumbo9 = newnmbjumbo9;
-			uma_zone_set_max(zone_jumbo9, nmbjumbo9);
-			nmbjumbo9 = uma_zone_get_max(zone_jumbo9);
+			nmbjumbo9 = uma_zone_set_max(zone_jumbo9, nmbjumbo9);
 		} else
 			error = EINVAL;
 	}
@@ -234,8 +231,7 @@ sysctl_nmbjumbo16(SYSCTL_HANDLER_ARGS)
 		if (newnmbjumbo16 > nmbjumbo16 &&
 		    nmbufs >= nmbclusters + nmbjumbop + nmbjumbo9 + nmbjumbo16) {
 			nmbjumbo16 = newnmbjumbo16;
-			uma_zone_set_max(zone_jumbo16, nmbjumbo16);
-			nmbjumbo16 = uma_zone_get_max(zone_jumbo16);
+			nmbjumbo16 = uma_zone_set_max(zone_jumbo16, nmbjumbo16);
 		} else
 			error = EINVAL;
 	}
@@ -255,8 +251,7 @@ sysctl_nmbufs(SYSCTL_HANDLER_ARGS)
 	if (error == 0 && req->newptr) {
 		if (newnmbufs > nmbufs) {
 			nmbufs = newnmbufs;
-			uma_zone_set_max(zone_mbuf, nmbufs);
-			nmbufs = uma_zone_get_max(zone_mbuf);
+			nmbufs = uma_zone_set_max(zone_mbuf, nmbufs);
 			EVENTHANDLER_INVOKE(nmbufs_change);
 		} else
 			error = EINVAL;

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 13:23:17 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 250741F1;
 Thu, 11 Jul 2013 13:23:17 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id F3C221CC9;
 Thu, 11 Jul 2013 13:23:16 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4927CB982;
 Thu, 11 Jul 2013 09:23:16 -0400 (EDT)
From: John Baldwin 
To: Garrett Cooper 
Subject: Re: svn commit: r253048 - in head/sys/ofed: drivers/net/mlx4
 include/linux
Date: Thu, 11 Jul 2013 08:26:44 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307082125.r68LPDlY023493@svn.freebsd.org>
 <201307091120.22114.jhb@freebsd.org>
 
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201307110826.44287.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Thu, 11 Jul 2013 09:23:16 -0400 (EDT)
Cc: svn-src-head ,
 svn-src-all ,
 src-committers , shahark@mellanox.com,
 acornehl@gmail.com
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 13:23:17 -0000

On Wednesday, July 10, 2013 7:58:30 pm Garrett Cooper wrote:
> On Tue, Jul 9, 2013 at 8:20 AM, John Baldwin  wrote:
> 
> ...
> 
> > I hadn't seen it.  I had wondered if the '\n' issue was a generic sysfs thing.
> > It sounds like it is and I'd be happy to revert the mlx4 change and alter the
> > sysfs bits to manage the newline directly if that is more appropriate.
> 
> I'll doublecheck this, but basically I'm really adverse to diverging
> from Linux in this area -- hence that's why I did what I did in the PR
> I mentioned.

I checked the other sysfs attributes under sys/ofed and all the ones that deal
with strings expect the newline.  There might be some that are "blobs" that do
not expect newlines, but it wasn't clear.  I do agree that it would be best to
avoid diffs for this case if possible in all the sysfs handlers.

(It would be even nicer if ofed used a more abstract notion for device attributes
in its drivers that could map to sysctl on FreeBSD and sysfs device attributes on
Linux, but that's a much larger change, and one OFED would have to want to do.)

> > I'd also like this to use sysctl_handle_string() if at all possible.  Are you in
> > a position to test patches still?
> 
> Unfortunately I'm not right now :(. Anthony may or may not be able to
> test this out (I used his machine when we were hacking around on IB
> stuff).
> 
> > If so, maybe give this a whirl.  It's similar to yours except it uses
> > sysctl_handle_string() and strlcat() rather than continuing to do things
> > by hand.  It also outputs an empty string to userland if the attribute
> > doesn't have a show method (your version would never pass out an old
> > string in that case unlike the original code).
> 
> Can you please pass along a patch to Anthony and me so we can try and
> apply it to test it out (Gmail's going to taint the inline patch, as
> is the EMC Exchange server with the patch attachment)? If Anthony
> still has the machine setup, then I'd be more than happy to test out
> the patch :).

Ok, I've put the patch at a URL.  Note that it is relative to what was just
committed to HEAD, so to test on 9 you'd have to apply both patches.

http://www.freebsd.org/~jhb/patches/ofed_sysfs.patch

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 14:18:39 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 92693FC9;
 Thu, 11 Jul 2013 14:18:39 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 749D81FF0;
 Thu, 11 Jul 2013 14:18:39 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BEIdWC094920;
 Thu, 11 Jul 2013 14:18:39 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BEIdIo094917;
 Thu, 11 Jul 2013 14:18:39 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307111418.r6BEIdIo094917@svn.freebsd.org>
From: Andre Oppermann 
Date: Thu, 11 Jul 2013 14:18:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253208 - head/sys/crypto/siphash
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 14:18:39 -0000

Author: andre
Date: Thu Jul 11 14:18:38 2013
New Revision: 253208
URL: http://svnweb.freebsd.org/changeset/base/253208

Log:
  SipHash is a cryptographically strong pseudo-random function (a.k.a. keyed
  hash function) optimized for speed on short messages returning a 64bit hash/
  digest value.
  
  SipHash is simpler and much faster than other secure MACs and competitive
  in speed with popular non-cryptographic hash functions.  It uses a 128-bit
  key without the hidden cost of a key expansion step.  SipHash iterates a
  simple round function consisting of four additions, four xors, and six
  rotations, interleaved with xors of message blocks for a pre-defined number
  of compression and finalization rounds.  The absence of  secret load/store
  addresses or secret branch conditions avoid timing attacks.  No state is
  shared between messages.  Hashing is deterministic and doesn't use nonces.
  It is not susceptible to length extension attacks.
  
  Target applications include network traffic authentication, message
  authentication (MAC) and hash-tables protection against hash-flooding
  denial-of-service attacks.
  
  The number of update/finalization rounds is defined during initialization:
  
   SipHash24_Init() for the fast and reasonable strong version.
   SipHash48_Init() for the strong version (half as fast).
  
  SipHash usage is similar to other hash functions:
  
   struct SIPHASH_CTX ctx;
   char *k = "16bytes long key"
   char *s = "string";
   uint64_t h = 0;
   SipHash24_Init(&ctx);
   SipHash_SetKey(&ctx, k);
   SipHash_Update(&ctx, s, strlen(s));
   SipHash_Final(&h, &ctx);  /* or */
   h = SipHash_End(&ctx);    /* or */
   h = SipHash24(&ctx, k, s, strlen(s));
  
  It was designed by Jean-Philippe Aumasson and Daniel J. Bernstein and
  is described in the paper "SipHash: a fast short-input PRF", 2012.09.18:
   https://131002.net/siphash/siphash.pdf
   Permanent ID: b9a943a805fbfc6fde808af9fc0ecdfa
  
  Implemented by:	andre (based on the paper)
  Reviewed by:	cperciva

Added:
  head/sys/crypto/siphash/
  head/sys/crypto/siphash/siphash.c   (contents, props changed)
  head/sys/crypto/siphash/siphash.h   (contents, props changed)
  head/sys/crypto/siphash/siphash_test.c   (contents, props changed)

Added: head/sys/crypto/siphash/siphash.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/crypto/siphash/siphash.c	Thu Jul 11 14:18:38 2013	(r253208)
@@ -0,0 +1,241 @@
+/*-
+ * Copyright (c) 2013 Andre Oppermann 
+ * 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.
+ * 3. 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.
+ */
+
+/*
+ * SipHash is a family of PRFs SipHash-c-d where the integer parameters c and d
+ * are the number of compression rounds and the number of finalization rounds.
+ * A compression round is identical to a finalization round and this round
+ * function is called SipRound.  Given a 128-bit key k and a (possibly empty)
+ * byte string m, SipHash-c-d returns a 64-bit value SipHash-c-d(k; m).
+ *
+ * Implemented from the paper "SipHash: a fast short-input PRF", 2012.09.18,
+ * by Jean-Philippe Aumasson and Daniel J. Bernstein,
+ * Permanent Document ID b9a943a805fbfc6fde808af9fc0ecdfa
+ * https://131002.net/siphash/siphash.pdf
+ * https://131002.net/siphash/
+ */
+
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+static void	SipRounds(SIPHASH_CTX *ctx, int final);
+
+void
+SipHash_InitX(SIPHASH_CTX *ctx, int rc, int rf)
+{
+
+	ctx->v[0] = 0x736f6d6570736575ull;
+	ctx->v[1] = 0x646f72616e646f6dull;
+	ctx->v[2] = 0x6c7967656e657261ull;
+	ctx->v[3] = 0x7465646279746573ull;
+	ctx->buf.b64 = 0;
+	ctx->bytes = 0;
+	ctx->buflen = 0;
+	ctx->rounds_compr = rc;
+	ctx->rounds_final = rf;
+	ctx->initialized = 1;
+}
+
+void
+SipHash_SetKey(SIPHASH_CTX *ctx, const uint8_t key[16])
+{
+	uint64_t k[2];
+
+	KASSERT(ctx->v[0] == 0x736f6d6570736575ull &&
+	    ctx->initialized == 1,
+	    ("%s: context %p not properly initialized", __func__, ctx));
+
+	k[0] = le64dec(&key[0]);
+	k[1] = le64dec(&key[8]);
+
+	ctx->v[0] ^= k[0];
+	ctx->v[1] ^= k[1];
+	ctx->v[2] ^= k[0];
+	ctx->v[3] ^= k[1];
+
+	ctx->initialized = 2;
+}
+
+static size_t
+SipBuf(SIPHASH_CTX *ctx, const uint8_t **src, size_t len, int final)
+{
+	size_t x = 0;
+
+	KASSERT((!final && len > 0) || (final && len == 0),
+	    ("%s: invalid parameters", __func__));
+
+	if (!final) {
+		x = MIN(len, sizeof(ctx->buf.b64) - ctx->buflen);
+		bcopy(*src, &ctx->buf.b8[ctx->buflen], x);
+		ctx->buflen += x;
+		*src += x;
+	} else
+		ctx->buf.b8[7] = (uint8_t)ctx->bytes;
+
+	if (ctx->buflen == 8 || final) {
+		ctx->v[3] ^= le64toh(ctx->buf.b64);
+		SipRounds(ctx, 0);
+		ctx->v[0] ^= le64toh(ctx->buf.b64);
+		ctx->buf.b64 = 0;
+		ctx->buflen = 0;
+	}
+	return (x);
+}
+
+void
+SipHash_Update(SIPHASH_CTX *ctx, const void *src, size_t len)
+{
+	uint64_t m, *p;
+	const uint8_t *s;
+	size_t rem;
+
+	KASSERT(ctx->initialized == 2,
+	    ("%s: context %p not properly initialized", __func__, ctx));
+
+	s = src;
+	ctx->bytes += len;
+
+	/*
+	 * Push length smaller than block size into buffer or
+	 * fill up the buffer if there is already something
+	 * in it.
+	 */
+	if (ctx->buflen > 0 || len < 8)
+		len -= SipBuf(ctx, &s, len, 0);
+	if (len == 0)
+		return;
+
+	rem = len & 0x7;
+	len >>= 3;
+
+	/* Optimze for 64bit aligned/unaligned access. */
+	if (((uintptr_t)s & 0x7) == 0) {
+		for (p = (uint64_t *)s; len > 0; len--, p++) {
+			m = le64toh(*p);
+			ctx->v[3] ^= m;
+			SipRounds(ctx, 0);
+			ctx->v[0] ^= m;
+		}
+		s = (uint8_t *)p;
+	} else {
+		for (; len > 0; len--, s += 8) {
+			m = le64dec(s);
+			ctx->v[3] ^= m;
+			SipRounds(ctx, 0);
+			ctx->v[0] ^= m;
+		}
+	}
+
+	/* Push remainder into buffer. */
+	if (rem > 0)
+		(void)SipBuf(ctx, &s, rem, 0);
+}
+
+void
+SipHash_Final(void *dst, SIPHASH_CTX *ctx)
+{
+	uint64_t r;
+
+	KASSERT(ctx->initialized == 2,
+	    ("%s: context %p not properly initialized", __func__, ctx));
+
+	r = SipHash_End(ctx);
+	le64enc(dst, r);
+}
+
+uint64_t
+SipHash_End(SIPHASH_CTX *ctx)
+{
+	uint64_t r;
+
+	KASSERT(ctx->initialized == 2,
+	    ("%s: context %p not properly initialized", __func__, ctx));
+
+	SipBuf(ctx, NULL, 0, 1);
+	ctx->v[2] ^= 0xff;
+	SipRounds(ctx, 1);
+	r = (ctx->v[0] ^ ctx->v[1]) ^ (ctx->v[2] ^ ctx->v[3]);
+
+	bzero(ctx, sizeof(*ctx));
+	return (r);
+}
+
+uint64_t
+SipHashX(SIPHASH_CTX *ctx, int rc, int rf, const uint8_t key[16],
+    const void *src, size_t len)
+{
+
+	SipHash_InitX(ctx, rc, rf);
+	SipHash_SetKey(ctx, key);
+	SipHash_Update(ctx, src, len);
+
+	return (SipHash_End(ctx));
+}
+
+#define SIP_ROTL(x, b)	(uint64_t)(((x) << (b)) | ( (x) >> (64 - (b))))
+
+static void
+SipRounds(SIPHASH_CTX *ctx, int final)
+{
+	int rounds;
+
+	if (!final)
+		rounds = ctx->rounds_compr;
+	else
+		rounds = ctx->rounds_final;
+
+	while (rounds--) {
+		ctx->v[0] += ctx->v[1];
+		ctx->v[2] += ctx->v[3];
+		ctx->v[1] = SIP_ROTL(ctx->v[1], 13);
+		ctx->v[3] = SIP_ROTL(ctx->v[3], 16);
+
+		ctx->v[1] ^= ctx->v[0];
+		ctx->v[3] ^= ctx->v[2];
+		ctx->v[0] = SIP_ROTL(ctx->v[0], 32);
+
+		ctx->v[2] += ctx->v[1];
+		ctx->v[0] += ctx->v[3];
+		ctx->v[1] = SIP_ROTL(ctx->v[1], 17);
+		ctx->v[3] = SIP_ROTL(ctx->v[3], 21);
+
+		ctx->v[1] ^= ctx->v[2];
+		ctx->v[3] ^= ctx->v[0];
+		ctx->v[2] = SIP_ROTL(ctx->v[2], 32);
+	}
+}
+

Added: head/sys/crypto/siphash/siphash.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/crypto/siphash/siphash.h	Thu Jul 11 14:18:38 2013	(r253208)
@@ -0,0 +1,83 @@
+/*-
+ * Copyright (c) 2013 Andre Oppermann 
+ * 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.
+ * 3. 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$
+ */
+
+/*
+ * SipHash is a family of pseudorandom functions (a.k.a. keyed hash functions)
+ * optimized for speed on short messages returning a 64bit hash/digest value.
+ *
+ * The number of rounds is defined during the initialization:
+ *  SipHash24_Init() for the fast and resonable strong version
+ *  SipHash48_Init() for the strong version (half as fast)
+ *
+ * struct SIPHASH_CTX ctx;
+ * SipHash24_Init(&ctx);
+ * SipHash_SetKey(&ctx, "16bytes long key");
+ * SipHash_Update(&ctx, pointer_to_string, length_of_string);
+ * SipHash_Final(output, &ctx);
+ */
+
+#ifndef _SIPHASH_H_
+#define _SIPHASH_H_
+
+#define SIPHASH_BLOCK_LENGTH	 8
+#define SIPHASH_KEY_LENGTH	16
+#define SIPHASH_DIGEST_LENGTH	 8
+
+typedef struct _SIPHASH_CTX {
+	uint64_t	v[4];
+	union {
+		uint64_t	b64;
+		uint8_t		b8[8];
+	} buf;
+	uint64_t	bytes;
+	uint8_t		buflen;
+	uint8_t		rounds_compr;
+	uint8_t		rounds_final;
+	uint8_t		initialized;
+} SIPHASH_CTX;
+
+
+#define SipHash24_Init(x)	SipHash_InitX((x), 2, 4)
+#define SipHash48_Init(x)	SipHash_InitX((x), 4, 8)
+void SipHash_InitX(SIPHASH_CTX *, int, int);
+void SipHash_SetKey(SIPHASH_CTX *, const uint8_t [16]);
+void SipHash_Update(SIPHASH_CTX *, const void *, size_t);
+void SipHash_Final(void *, SIPHASH_CTX *);
+uint64_t SipHash_End(SIPHASH_CTX *);
+
+#define SipHash24(x, y, z, i)	SipHashX((x), 2, 4, (y), (z), (i));
+#define SipHash48(x, y, z, i)	SipHashX((x), 4, 8, (y), (z), (i));
+uint64_t SipHashX(SIPHASH_CTX *, int, int, const uint8_t [16], const void *,
+    size_t);
+
+int SipHash24_TestVectors(void);
+
+#endif /* _SIPHASH_H_ */

Added: head/sys/crypto/siphash/siphash_test.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/crypto/siphash/siphash_test.c	Thu Jul 11 14:18:38 2013	(r253208)
@@ -0,0 +1,140 @@
+/*-
+ * Test Vectors from the SipHash reference C implementation:
+ *
+ * Written in 2012 by 
+ * Jean-Philippe Aumasson 
+ * Daniel J. Bernstein 
+ *
+ * Adjusted by Andre Oppermann  to use function calls in
+ * line with other hash implementations.
+ *
+ * To the extent possible under law, the author(s) have dedicated all copyright
+ * and related and neighboring rights to this software to the public domain
+ * worldwide. This software is distributed without any warranty.
+ *
+ * You should have received a copy of the CC0 Public Domain Dedication along with
+ * this software. If not, see .
+ *
+ * SipHash-2-4 output with
+ * k = 00 01 02 ...
+ * and
+ * in = (empty string)
+ * in = 00 (1 byte)
+ * in = 00 01 (2 bytes)
+ * in = 00 01 02 (3 bytes)
+ * ...
+ * in = 00 01 02 ... 3e (63 bytes)
+ */
+#include 
+__FBSDID("$FreeBSD$");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+uint8_t vectors[64][8] =
+{
+  { 0x31, 0x0e, 0x0e, 0xdd, 0x47, 0xdb, 0x6f, 0x72, },
+  { 0xfd, 0x67, 0xdc, 0x93, 0xc5, 0x39, 0xf8, 0x74, },
+  { 0x5a, 0x4f, 0xa9, 0xd9, 0x09, 0x80, 0x6c, 0x0d, },
+  { 0x2d, 0x7e, 0xfb, 0xd7, 0x96, 0x66, 0x67, 0x85, },
+  { 0xb7, 0x87, 0x71, 0x27, 0xe0, 0x94, 0x27, 0xcf, },
+  { 0x8d, 0xa6, 0x99, 0xcd, 0x64, 0x55, 0x76, 0x18, },
+  { 0xce, 0xe3, 0xfe, 0x58, 0x6e, 0x46, 0xc9, 0xcb, },
+  { 0x37, 0xd1, 0x01, 0x8b, 0xf5, 0x00, 0x02, 0xab, },
+  { 0x62, 0x24, 0x93, 0x9a, 0x79, 0xf5, 0xf5, 0x93, },
+  { 0xb0, 0xe4, 0xa9, 0x0b, 0xdf, 0x82, 0x00, 0x9e, },
+  { 0xf3, 0xb9, 0xdd, 0x94, 0xc5, 0xbb, 0x5d, 0x7a, },
+  { 0xa7, 0xad, 0x6b, 0x22, 0x46, 0x2f, 0xb3, 0xf4, },
+  { 0xfb, 0xe5, 0x0e, 0x86, 0xbc, 0x8f, 0x1e, 0x75, },
+  { 0x90, 0x3d, 0x84, 0xc0, 0x27, 0x56, 0xea, 0x14, },
+  { 0xee, 0xf2, 0x7a, 0x8e, 0x90, 0xca, 0x23, 0xf7, },
+  { 0xe5, 0x45, 0xbe, 0x49, 0x61, 0xca, 0x29, 0xa1, },
+  { 0xdb, 0x9b, 0xc2, 0x57, 0x7f, 0xcc, 0x2a, 0x3f, },
+  { 0x94, 0x47, 0xbe, 0x2c, 0xf5, 0xe9, 0x9a, 0x69, },
+  { 0x9c, 0xd3, 0x8d, 0x96, 0xf0, 0xb3, 0xc1, 0x4b, },
+  { 0xbd, 0x61, 0x79, 0xa7, 0x1d, 0xc9, 0x6d, 0xbb, },
+  { 0x98, 0xee, 0xa2, 0x1a, 0xf2, 0x5c, 0xd6, 0xbe, },
+  { 0xc7, 0x67, 0x3b, 0x2e, 0xb0, 0xcb, 0xf2, 0xd0, },
+  { 0x88, 0x3e, 0xa3, 0xe3, 0x95, 0x67, 0x53, 0x93, },
+  { 0xc8, 0xce, 0x5c, 0xcd, 0x8c, 0x03, 0x0c, 0xa8, },
+  { 0x94, 0xaf, 0x49, 0xf6, 0xc6, 0x50, 0xad, 0xb8, },
+  { 0xea, 0xb8, 0x85, 0x8a, 0xde, 0x92, 0xe1, 0xbc, },
+  { 0xf3, 0x15, 0xbb, 0x5b, 0xb8, 0x35, 0xd8, 0x17, },
+  { 0xad, 0xcf, 0x6b, 0x07, 0x63, 0x61, 0x2e, 0x2f, },
+  { 0xa5, 0xc9, 0x1d, 0xa7, 0xac, 0xaa, 0x4d, 0xde, },
+  { 0x71, 0x65, 0x95, 0x87, 0x66, 0x50, 0xa2, 0xa6, },
+  { 0x28, 0xef, 0x49, 0x5c, 0x53, 0xa3, 0x87, 0xad, },
+  { 0x42, 0xc3, 0x41, 0xd8, 0xfa, 0x92, 0xd8, 0x32, },
+  { 0xce, 0x7c, 0xf2, 0x72, 0x2f, 0x51, 0x27, 0x71, },
+  { 0xe3, 0x78, 0x59, 0xf9, 0x46, 0x23, 0xf3, 0xa7, },
+  { 0x38, 0x12, 0x05, 0xbb, 0x1a, 0xb0, 0xe0, 0x12, },
+  { 0xae, 0x97, 0xa1, 0x0f, 0xd4, 0x34, 0xe0, 0x15, },
+  { 0xb4, 0xa3, 0x15, 0x08, 0xbe, 0xff, 0x4d, 0x31, },
+  { 0x81, 0x39, 0x62, 0x29, 0xf0, 0x90, 0x79, 0x02, },
+  { 0x4d, 0x0c, 0xf4, 0x9e, 0xe5, 0xd4, 0xdc, 0xca, },
+  { 0x5c, 0x73, 0x33, 0x6a, 0x76, 0xd8, 0xbf, 0x9a, },
+  { 0xd0, 0xa7, 0x04, 0x53, 0x6b, 0xa9, 0x3e, 0x0e, },
+  { 0x92, 0x59, 0x58, 0xfc, 0xd6, 0x42, 0x0c, 0xad, },
+  { 0xa9, 0x15, 0xc2, 0x9b, 0xc8, 0x06, 0x73, 0x18, },
+  { 0x95, 0x2b, 0x79, 0xf3, 0xbc, 0x0a, 0xa6, 0xd4, },
+  { 0xf2, 0x1d, 0xf2, 0xe4, 0x1d, 0x45, 0x35, 0xf9, },
+  { 0x87, 0x57, 0x75, 0x19, 0x04, 0x8f, 0x53, 0xa9, },
+  { 0x10, 0xa5, 0x6c, 0xf5, 0xdf, 0xcd, 0x9a, 0xdb, },
+  { 0xeb, 0x75, 0x09, 0x5c, 0xcd, 0x98, 0x6c, 0xd0, },
+  { 0x51, 0xa9, 0xcb, 0x9e, 0xcb, 0xa3, 0x12, 0xe6, },
+  { 0x96, 0xaf, 0xad, 0xfc, 0x2c, 0xe6, 0x66, 0xc7, },
+  { 0x72, 0xfe, 0x52, 0x97, 0x5a, 0x43, 0x64, 0xee, },
+  { 0x5a, 0x16, 0x45, 0xb2, 0x76, 0xd5, 0x92, 0xa1, },
+  { 0xb2, 0x74, 0xcb, 0x8e, 0xbf, 0x87, 0x87, 0x0a, },
+  { 0x6f, 0x9b, 0xb4, 0x20, 0x3d, 0xe7, 0xb3, 0x81, },
+  { 0xea, 0xec, 0xb2, 0xa3, 0x0b, 0x22, 0xa8, 0x7f, },
+  { 0x99, 0x24, 0xa4, 0x3c, 0xc1, 0x31, 0x57, 0x24, },
+  { 0xbd, 0x83, 0x8d, 0x3a, 0xaf, 0xbf, 0x8d, 0xb7, },
+  { 0x0b, 0x1a, 0x2a, 0x32, 0x65, 0xd5, 0x1a, 0xea, },
+  { 0x13, 0x50, 0x79, 0xa3, 0x23, 0x1c, 0xe6, 0x60, },
+  { 0x93, 0x2b, 0x28, 0x46, 0xe4, 0xd7, 0x06, 0x66, },
+  { 0xe1, 0x91, 0x5f, 0x5c, 0xb1, 0xec, 0xa4, 0x6c, },
+  { 0xf3, 0x25, 0x96, 0x5c, 0xa1, 0x6d, 0x62, 0x9f, },
+  { 0x57, 0x5f, 0xf2, 0x8e, 0x60, 0x38, 0x1b, 0xe5, },
+  { 0x72, 0x45, 0x06, 0xeb, 0x4c, 0x32, 0x8a, 0x95, }
+};
+
+#define MAXLEN 64
+
+int
+SipHash24_TestVectors(void)
+{
+	int i, fail = 0;
+	uint8_t in[MAXLEN], out[8], k[16];
+	SIPHASH_CTX ctx;
+
+	/* Initialize key. */
+	for (i = 0; i < 16; ++i)
+		k[i] = i;
+
+	/* Step through differnet length. */
+	for (i = 0; i < MAXLEN; ++i) {
+		in[i] = i;
+
+		SipHash24_Init(&ctx);
+		SipHash_SetKey(&ctx, k);
+		SipHash_Update(&ctx, in, i);
+		SipHash_Final(out, &ctx);
+
+		if (memcmp(out, vectors[i], 8))
+#if 0
+			printf("%i: test vector failed\n", i);
+		else
+			printf("%i: test vector correct\n", i);
+#else
+			fail++;
+#endif
+	}
+
+	return ((fail == 0));
+}

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 15:02:39 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 6F5ABE41;
 Thu, 11 Jul 2013 15:02:39 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 614F3128F;
 Thu, 11 Jul 2013 15:02:39 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BF2dMf008620;
 Thu, 11 Jul 2013 15:02:39 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BF2dJa008619;
 Thu, 11 Jul 2013 15:02:39 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307111502.r6BF2dJa008619@svn.freebsd.org>
From: Jim Harris 
Date: Thu, 11 Jul 2013 15:02:39 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253209 - head/sys/dev/nvme
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 15:02:39 -0000

Author: jimharris
Date: Thu Jul 11 15:02:38 2013
New Revision: 253209
URL: http://svnweb.freebsd.org/changeset/base/253209

Log:
  Fix a poorly worded comment in nvme(4).
  
  MFC after:	3 days

Modified:
  head/sys/dev/nvme/nvme.h

Modified: head/sys/dev/nvme/nvme.h
==============================================================================
--- head/sys/dev/nvme/nvme.h	Thu Jul 11 14:18:38 2013	(r253208)
+++ head/sys/dev/nvme/nvme.h	Thu Jul 11 15:02:38 2013	(r253209)
@@ -765,10 +765,10 @@ struct nvme_pt_command {
 
 	/*
 	 * is_read = 1 if the passthrough command will read data into the
-	 *  supplied buffer.
+	 *  supplied buffer from the controller.
 	 *
-	 * is_read = 0 if the passthrough command will write data into the
-	 *  supplied buffer.
+	 * is_read = 0 if the passthrough command will write data from the
+	 *  supplied buffer to the controller.
 	 */
 	uint32_t		is_read;
 

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 15:29:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 1C2EC128;
 Thu, 11 Jul 2013 15:29:26 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 0DBC61475;
 Thu, 11 Jul 2013 15:29:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BFTQo0016812;
 Thu, 11 Jul 2013 15:29:26 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BFTPSf016809;
 Thu, 11 Jul 2013 15:29:25 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307111529.r6BFTPSf016809@svn.freebsd.org>
From: Andre Oppermann 
Date: Thu, 11 Jul 2013 15:29:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253210 - in head/sys: conf netinet
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 15:29:26 -0000

Author: andre
Date: Thu Jul 11 15:29:25 2013
New Revision: 253210
URL: http://svnweb.freebsd.org/changeset/base/253210

Log:
  Improve SYN cookies by encoding the MSS, WSCALE (window scaling) and SACK
  information into the ISN (initial sequence number) without the additional
  use of timestamp bits and switching to the very fast and cryptographically
  strong SipHash-2-4 MAC hash algorithm to protect the SYN cookie against
  forgeries.
  
  The purpose of SYN cookies is to encode all necessary session state in
  the 32 bits of our initial sequence number to avoid storing any information
  locally in memory.  This is especially important when under heavy spoofed
  SYN attacks where we would either run out of memory or the syncache would
  fill with bogus connection attempts swamping out legitimate connections.
  
  The original SYN cookies method only stored an indexed MSS values in the
  cookie.  This isn't sufficient anymore and breaks down in the presence of
  WSCALE information which is only exchanged during SYN and SYN-ACK.  If we
  can't keep track of it then we may severely underestimate the available
  send or receive window. This is compounded with large windows whose size
  information on the TCP segment header is even lower numerically.  A number
  of years back SYN cookies were extended to store the additional state in
  the TCP timestamp fields, if available on a connection.  While timestamps
  are common among the BSD, Linux and other *nix systems Windows never enabled
  them by default and thus are not present for the vast majority of clients
  seen on the Internet.
  
  The common parameters used on TCP sessions have changed quite a bit since
  SYN cookies very invented some 17 years ago.  Today we have a lot more
  bandwidth available making the use window scaling almost mandatory.  Also
  SACK has become standard making recovering from packet loss much more
  efficient.
  
  This change moves all necessary information into the ISS removing the need
  for timestamps.  Both the MSS (16 bits) and send WSCALE (4 bits) are stored
  in 3 bit indexed form together with a single bit for SACK.  While this is
  significantly less than the original range, it is sufficient to encode all
  common values with minimal rounding.
  
  The MSS depends on the MTU of the path and with the dominance of ethernet
  the main value seen is around 1460 bytes.  Encapsulations for DSL lines
  and some other overheads reduce it by a few more bytes for many connections
  seen.  Rounding down to the next lower value in some cases isn't a problem
  as we send only slightly more packets for the same amount of data.
  
  The send WSCALE index is bit more tricky as rounding down under-estimates
  the available send space available towards the remote host, however a small
  number values dominate and are carefully selected again.
  
  The receive WSCALE isn't encoded at all but recalculated based on the local
  receive socket buffer size when a valid SYN cookie returns.  A listen socket
  buffer size is unlikely to change while active.
  
  The index values for MSS and WSCALE are selected for minimal rounding errors
  based on large traffic surveys.  These values have to be periodically
  validated against newer traffic surveys adjusting the arrays tcp_sc_msstab[]
  and tcp_sc_wstab[] if necessary.
  
  In addition the hash MAC to protect the SYN cookies is changed from MD5
  to SipHash-2-4, a much faster and cryptographically secure algorithm.
  
  Reviewed by:	dwmalone
  Tested by:	Fabian Keil 

Modified:
  head/sys/conf/files
  head/sys/netinet/tcp_syncache.c
  head/sys/netinet/tcp_syncache.h

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Thu Jul 11 15:02:38 2013	(r253209)
+++ head/sys/conf/files	Thu Jul 11 15:29:25 2013	(r253210)
@@ -547,6 +547,8 @@ crypto/sha1.c			optional carp | crypto |
 					 netgraph_mppc_encryption | sctp
 crypto/sha2/sha2.c		optional crypto | geom_bde | ipsec | random | \
 					 sctp | zfs
+crypto/siphash/siphash.c	optional inet | inet6
+crypto/siphash/siphash_test.c	optional inet | inet6
 ddb/db_access.c			optional ddb
 ddb/db_break.c			optional ddb
 ddb/db_capture.c		optional ddb

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c	Thu Jul 11 15:02:38 2013	(r253209)
+++ head/sys/netinet/tcp_syncache.c	Thu Jul 11 15:29:25 2013	(r253210)
@@ -1,12 +1,12 @@
 /*-
  * Copyright (c) 2001 McAfee, Inc.
- * Copyright (c) 2006 Andre Oppermann, Internet Business Solutions AG
+ * Copyright (c) 2006,2013 Andre Oppermann, Internet Business Solutions AG
  * All rights reserved.
  *
  * This software was developed for the FreeBSD Project by Jonathan Lemon
  * and McAfee Research, the Security Research Division of McAfee, Inc. under
  * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
- * DARPA CHATS research program.
+ * DARPA CHATS research program. [2001 McAfee, Inc.]
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 #include 		/* for proc0 declaration */
 #include 
 #include 
@@ -55,6 +54,9 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 
 #include 
@@ -127,12 +129,20 @@ static int	 syncache_sysctl_count(SYSCTL
 static void	 syncache_timeout(struct syncache *sc, struct syncache_head *sch,
 		    int docallout);
 static void	 syncache_timer(void *);
-static void	 syncookie_generate(struct syncache_head *, struct syncache *,
-		    u_int32_t *);
+
+static uint32_t	 syncookie_mac(struct in_conninfo *, tcp_seq, uint8_t,
+		    uint8_t *, uintptr_t);
+static tcp_seq	 syncookie_generate(struct syncache_head *, struct syncache *);
 static struct syncache
 		*syncookie_lookup(struct in_conninfo *, struct syncache_head *,
-		    struct syncache *, struct tcpopt *, struct tcphdr *,
+		    struct syncache *, struct tcphdr *, struct tcpopt *,
 		    struct socket *);
+static void	 syncookie_reseed(void *);
+#ifdef INVARIANTS
+static int	 syncookie_cmp(struct in_conninfo *inc, struct syncache_head *sch,
+		    struct syncache *sc, struct tcphdr *th, struct tcpopt *to,
+		    struct socket *lso);
+#endif
 
 /*
  * Transmit the SYN,ACK fewer times than TCP_MAXRXTSHIFT specifies.
@@ -252,17 +262,19 @@ syncache_init(void)
 	V_tcp_syncache.hashbase = malloc(V_tcp_syncache.hashsize *
 	    sizeof(struct syncache_head), M_SYNCACHE, M_WAITOK | M_ZERO);
 
-	/* Initialize the hash buckets. */
-	for (i = 0; i < V_tcp_syncache.hashsize; i++) {
 #ifdef VIMAGE
-		V_tcp_syncache.hashbase[i].sch_vnet = curvnet;
+	V_tcp_syncache.vnet = curvnet;
 #endif
+
+	/* Initialize the hash buckets. */
+	for (i = 0; i < V_tcp_syncache.hashsize; i++) {
 		TAILQ_INIT(&V_tcp_syncache.hashbase[i].sch_bucket);
 		mtx_init(&V_tcp_syncache.hashbase[i].sch_mtx, "tcp_sc_head",
 			 NULL, MTX_DEF);
 		callout_init_mtx(&V_tcp_syncache.hashbase[i].sch_timer,
 			 &V_tcp_syncache.hashbase[i].sch_mtx, 0);
 		V_tcp_syncache.hashbase[i].sch_length = 0;
+		V_tcp_syncache.hashbase[i].sch_sc = &V_tcp_syncache;
 	}
 
 	/* Create the syncache entry zone. */
@@ -270,6 +282,13 @@ syncache_init(void)
 	    NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
 	V_tcp_syncache.cache_limit = uma_zone_set_max(V_tcp_syncache.zone,
 	    V_tcp_syncache.cache_limit);
+
+	/* Start the SYN cookie reseeder callout. */
+	callout_init(&V_tcp_syncache.secret.reseed, 1);
+	arc4rand(V_tcp_syncache.secret.key[0], SYNCOOKIE_SECRET_SIZE, 0);
+	arc4rand(V_tcp_syncache.secret.key[1], SYNCOOKIE_SECRET_SIZE, 0);
+	callout_reset(&V_tcp_syncache.secret.reseed, SYNCOOKIE_LIFETIME * hz,
+	    syncookie_reseed, &V_tcp_syncache);
 }
 
 #ifdef VIMAGE
@@ -303,6 +322,8 @@ syncache_destroy(void)
 	/* Free the allocated global resources. */
 	uma_zdestroy(V_tcp_syncache.zone);
 	free(V_tcp_syncache.hashbase, M_SYNCACHE);
+
+	callout_drain(&V_tcp_syncache.secret.reseed);
 }
 #endif
 
@@ -414,7 +435,7 @@ syncache_timer(void *xsch)
 	int tick = ticks;
 	char *s;
 
-	CURVNET_SET(sch->sch_vnet);
+	CURVNET_SET(sch->sch_sc->vnet);
 
 	/* NB: syncache_head has already been locked by the callout. */
 	SCH_LOCK_ASSERT(sch);
@@ -927,6 +948,16 @@ syncache_expand(struct in_conninfo *inc,
 
 	sc = syncache_lookup(inc, &sch);	/* returns locked sch */
 	SCH_LOCK_ASSERT(sch);
+
+#ifdef INVARIANTS
+	/*
+	 * Test code for syncookies comparing the syncache stored
+	 * values with the reconstructed values from the cookie.
+	 */
+	if (sc != NULL)
+		syncookie_cmp(inc, sch, sc, th, to, *lsop);
+#endif
+
 	if (sc == NULL) {
 		/*
 		 * There is no syncache entry, so see if this ACK is
@@ -946,7 +977,7 @@ syncache_expand(struct in_conninfo *inc,
 			goto failed;
 		}
 		bzero(&scs, sizeof(scs));
-		sc = syncookie_lookup(inc, sch, &scs, to, th, *lsop);
+		sc = syncookie_lookup(inc, sch, &scs, th, to, *lsop);
 		SCH_UNLOCK(sch);
 		if (sc == NULL) {
 			if ((s = tcp_log_addrs(inc, th, NULL, NULL)))
@@ -1070,7 +1101,6 @@ syncache_add(struct in_conninfo *inc, st
 	struct syncache *sc = NULL;
 	struct syncache_head *sch;
 	struct mbuf *ipopts = NULL;
-	u_int32_t flowtmp;
 	u_int ltflags;
 	int win, sb_hiwat, ip_ttl, ip_tos;
 	char *s;
@@ -1311,19 +1341,17 @@ syncache_add(struct in_conninfo *inc, st
 	if ((th->th_flags & (TH_ECE|TH_CWR)) && V_tcp_do_ecn)
 		sc->sc_flags |= SCF_ECN;
 
-	if (V_tcp_syncookies) {
-		syncookie_generate(sch, sc, &flowtmp);
+	if (V_tcp_syncookies)
+		sc->sc_iss = syncookie_generate(sch, sc);
 #ifdef INET6
-		if (autoflowlabel)
-			sc->sc_flowlabel = flowtmp;
-#endif
-	} else {
-#ifdef INET6
-		if (autoflowlabel)
-			sc->sc_flowlabel =
-			    (htonl(ip6_randomflowlabel()) & IPV6_FLOWLABEL_MASK);
-#endif
+	if (autoflowlabel) {
+		if (V_tcp_syncookies)
+			sc->sc_flowlabel = sc->sc_iss;
+		else
+			sc->sc_flowlabel = ip6_randomflowlabel();
+		sc->sc_flowlabel = htonl(sc->sc_flowlabel) & IPV6_FLOWLABEL_MASK;
 	}
+#endif
 	SCH_UNLOCK(sch);
 
 	/*
@@ -1546,265 +1574,385 @@ syncache_respond(struct syncache *sc)
 }
 
 /*
- * The purpose of SYN cookies is to avoid keeping track of all SYN's we
- * receive and to be able to handle SYN floods from bogus source addresses
- * (where we will never receive any reply).  SYN floods try to exhaust all
- * our memory and available slots in the SYN cache table to cause a denial
- * of service to legitimate users of the local host.
+ * The purpose of syncookies is to handle spoofed SYN flooding DoS attacks
+ * that exceed the capacity of the syncache by avoiding the storage of any
+ * of the SYNs we receive.  Syncookies defend against blind SYN flooding
+ * attacks where the attacker does not have access to our responses.
+ *
+ * Syncookies encode and include all necessary information about the
+ * connection setup within the SYN|ACK that we send back.  That way we
+ * can avoid keeping any local state until the ACK to our SYN|ACK returns
+ * (if ever).  Normally the syncache and syncookies are running in parallel
+ * with the latter taking over when the former is exhausted.  When matching
+ * syncache entry is found the syncookie is ignored.
+ *
+ * The only reliable information persisting the 3WHS is our inital sequence
+ * number ISS of 32 bits.  Syncookies embed a cryptographically sufficient
+ * strong hash (MAC) value and a few bits of TCP SYN options in the ISS
+ * of our SYN|ACK.  The MAC can be recomputed when the ACK to our SYN|ACK
+ * returns and signifies a legitimate connection if it matches the ACK.
+ *
+ * The available space of 32 bits to store the hash and to encode the SYN
+ * option information is very tight and we should have at least 24 bits for
+ * the MAC to keep the number of guesses by blind spoofing reasonably high.
+ *
+ * SYN option information we have to encode to fully restore a connection:
+ * MSS: is imporant to chose an optimal segment size to avoid IP level
+ *   fragmentation along the path.  The common MSS values can be encoded
+ *   in a 3-bit table.  Uncommon values are captured by the next lower value
+ *   in the table leading to a slight increase in packetization overhead.
+ * WSCALE: is necessary to allow large windows to be used for high delay-
+ *   bandwidth product links.  Not scaling the window when it was initially
+ *   negotiated is bad for performance as lack of scaling further decreases
+ *   the apparent available send window.  We only need to encode the WSCALE
+ *   we received from the remote end.  Our end can be recalculated at any
+ *   time.  The common WSCALE values can be encoded in a 3-bit table.
+ *   Uncommon values are captured by the next lower value in the table
+ *   making us under-estimate the available window size halving our
+ *   theoretically possible maximum throughput for that connection.
+ * SACK: Greatly assists in packet loss recovery and requires 1 bit.
+ * TIMESTAMP and SIGNATURE is not encoded because they are permanent options
+ *   that are included in all segments on a connection.  We enable them when
+ *   the ACK has them.
  *
- * The idea of SYN cookies is to encode and include all necessary information
- * about the connection setup state within the SYN-ACK we send back and thus
- * to get along without keeping any local state until the ACK to the SYN-ACK
- * arrives (if ever).  Everything we need to know should be available from
- * the information we encoded in the SYN-ACK.
+ * Security of syncookies and attack vectors:
  *
- * More information about the theory behind SYN cookies and its first
- * discussion and specification can be found at:
- *  http://cr.yp.to/syncookies.html    (overview)
- *  http://cr.yp.to/syncookies/archive (gory details)
+ * The MAC is computed over (faddr||laddr||fport||lport||irs||flags||secmod)
+ * together with the gloabl secret to make it unique per connection attempt.
+ * Thus any change of any of those parameters results in a different MAC output
+ * in an unpredictable way unless a collision is encountered.  24 bits of the
+ * MAC are embedded into the ISS.
  *
- * This implementation extends the orginal idea and first implementation
- * of FreeBSD by using not only the initial sequence number field to store
- * information but also the timestamp field if present.  This way we can
- * keep track of the entire state we need to know to recreate the session in
- * its original form.  Almost all TCP speakers implement RFC1323 timestamps
- * these days.  For those that do not we still have to live with the known
- * shortcomings of the ISN only SYN cookies.
+ * To prevent replay attacks two rotating global secrets are updated with a
+ * new random value every 15 seconds.  The life-time of a syncookie is thus
+ * 15-30 seconds.
  *
- * Cookie layers:
+ * Vector 1: Attacking the secret.  This requires finding a weakness in the
+ * MAC itself or the way it is used here.  The attacker can do a chosen plain
+ * text attack by varying and testing the all parameters under his control.
+ * The strength depends on the size and randomness of the secret, and the
+ * cryptographic security of the MAC function.  Due to the constant updating
+ * of the secret the attacker has at most 29.999 seconds to find the secret
+ * and launch spoofed connections.  After that he has to start all over again.
  *
- * Initial sequence number we send:
- * 31|................................|0
- *    DDDDDDDDDDDDDDDDDDDDDDDDDMMMRRRP
- *    D = MD5 Digest (first dword)
- *    M = MSS index
- *    R = Rotation of secret
- *    P = Odd or Even secret
+ * Vector 2: Collision attack on the MAC of a single ACK.  With a 24 bit MAC
+ * size an average of 4,823 attempts are required for a 50% chance of success
+ * to spoof a single syncookie (birthday collision paradox).  However the
+ * attacker is blind and doesn't know if one of his attempts succeeded unless
+ * he has a side channel to interfere success from.  A single connection setup
+ * success average of 90% requires 8,790 packets, 99.99% requires 17,578 packets.
+ * This many attempts are required for each one blind spoofed connection.  For
+ * every additional spoofed connection he has to launch another N attempts.
+ * Thus for a sustained rate 100 spoofed connections per second approximately
+ * 1,800,000 packets per second would have to be sent.
  *
- * The MD5 Digest is computed with over following parameters:
- *  a) randomly rotated secret
- *  b) struct in_conninfo containing the remote/local ip/port (IPv4&IPv6)
- *  c) the received initial sequence number from remote host
- *  d) the rotation offset and odd/even bit
+ * NB: The MAC function should be fast so that it doesn't become a CPU
+ * exhaustion attack vector itself.
  *
- * Timestamp we send:
- * 31|................................|0
- *    DDDDDDDDDDDDDDDDDDDDDDSSSSRRRRA5
- *    D = MD5 Digest (third dword) (only as filler)
- *    S = Requested send window scale
- *    R = Requested receive window scale
- *    A = SACK allowed
- *    5 = TCP-MD5 enabled (not implemented yet)
- *    XORed with MD5 Digest (forth dword)
+ * References:
+ *  RFC4987 TCP SYN Flooding Attacks and Common Mitigations
+ *  SYN cookies were first proposed by cryptographer Dan J. Bernstein in 1996
+ *   http://cr.yp.to/syncookies.html    (overview)
+ *   http://cr.yp.to/syncookies/archive (details)
  *
- * The timestamp isn't cryptographically secure and doesn't need to be.
- * The double use of the MD5 digest dwords ties it to a specific remote/
- * local host/port, remote initial sequence number and our local time
- * limited secret.  A received timestamp is reverted (XORed) and then
- * the contained MD5 dword is compared to the computed one to ensure the
- * timestamp belongs to the SYN-ACK we sent.  The other parameters may
- * have been tampered with but this isn't different from supplying bogus
- * values in the SYN in the first place.
  *
- * Some problems with SYN cookies remain however:
- * Consider the problem of a recreated (and retransmitted) cookie.  If the
- * original SYN was accepted, the connection is established.  The second
- * SYN is inflight, and if it arrives with an ISN that falls within the
- * receive window, the connection is killed.
+ * Schematic construction of a syncookie enabled Initial Sequence Number:
+ *  0        1         2         3
+ *  12345678901234567890123456789012
+ * |xxxxxxxxxxxxxxxxxxxxxxxxWWWMMMSP|
  *
- * Notes:
- * A heuristic to determine when to accept syn cookies is not necessary.
- * An ACK flood would cause the syncookie verification to be attempted,
- * but a SYN flood causes syncookies to be generated.  Both are of equal
- * cost, so there's no point in trying to optimize the ACK flood case.
- * Also, if you don't process certain ACKs for some reason, then all someone
- * would have to do is launch a SYN and ACK flood at the same time, which
- * would stop cookie verification and defeat the entire purpose of syncookies.
+ *  x 24 MAC (truncated)
+ *  W  3 Send Window Scale index
+ *  M  3 MSS index
+ *  S  1 SACK permitted
+ *  P  1 Odd/even secret
  */
-static int tcp_sc_msstab[] = { 0, 256, 468, 536, 996, 1452, 1460, 8960 };
 
-static void
-syncookie_generate(struct syncache_head *sch, struct syncache *sc,
-    u_int32_t *flowlabel)
+/*
+ * Distribution and probability of certain MSS values.  Those in between are
+ * rounded down to the next lower one.
+ * [An Analysis of TCP Maximum Segment Sizes, S. Alcock and R. Nelson, 2011]
+ *                            .2%  .3%   5%    7%    7%    20%   15%   45%
+ */
+static int tcp_sc_msstab[] = { 216, 536, 1200, 1360, 1400, 1440, 1452, 1460 };
+
+/*
+ * Distribution and probability of certain WSCALE values.  We have to map the
+ * (send) window scale (shift) option with a range of 0-14 from 4 bits into 3
+ * bits based on prevalence of certain values.  Where we don't have an exact
+ * match for are rounded down to the next lower one letting us under-estimate
+ * the true available window.  At the moment this would happen only for the
+ * very uncommon values 3, 5 and those above 8 (more than 16MB socket buffer
+ * and window size).  The absence of the WSCALE option (no scaling in either
+ * direction) is encoded with index zero.
+ * [WSCALE values histograms, Allman, 2012]
+ *                            X 10 10 35  5  6 14 10%   by host
+ *                            X 11  4  5  5 18 49  3%   by connections
+ */
+static int tcp_sc_wstab[] = { 0, 0, 1, 2, 4, 6, 7, 8 };
+
+/*
+ * Compute the MAC for the SYN cookie.  SIPHASH-2-4 is chosen for its speed
+ * and good cryptographic properties.
+ */
+static uint32_t
+syncookie_mac(struct in_conninfo *inc, tcp_seq irs, uint8_t flags,
+    uint8_t *secbits, uintptr_t secmod)
 {
-	MD5_CTX ctx;
-	u_int32_t md5_buffer[MD5_DIGEST_LENGTH / sizeof(u_int32_t)];
-	u_int32_t data;
-	u_int32_t *secbits;
-	u_int off, pmss, mss;
-	int i;
+	SIPHASH_CTX ctx;
+	uint32_t siphash[2];
+
+	SipHash24_Init(&ctx);
+	SipHash_SetKey(&ctx, secbits);
+	switch (inc->inc_flags & INC_ISIPV6) {
+#ifdef INET
+	case 0:
+		SipHash_Update(&ctx, &inc->inc_faddr, sizeof(inc->inc_faddr));
+		SipHash_Update(&ctx, &inc->inc_laddr, sizeof(inc->inc_laddr));
+		break;
+#endif
+#ifdef INET6
+	case INC_ISIPV6:
+		SipHash_Update(&ctx, &inc->inc6_faddr, sizeof(inc->inc6_faddr));
+		SipHash_Update(&ctx, &inc->inc6_laddr, sizeof(inc->inc6_laddr));
+		break;
+#endif
+	}
+	SipHash_Update(&ctx, &inc->inc_fport, sizeof(inc->inc_fport));
+	SipHash_Update(&ctx, &inc->inc_lport, sizeof(inc->inc_lport));
+	SipHash_Update(&ctx, &flags, sizeof(flags));
+	SipHash_Update(&ctx, &secmod, sizeof(secmod));
+	SipHash_Final((u_int8_t *)&siphash, &ctx);
+
+	return (siphash[0] ^ siphash[1]);
+}
+
+static tcp_seq
+syncookie_generate(struct syncache_head *sch, struct syncache *sc)
+{
+	u_int i, mss, secbit, wscale;
+	uint32_t iss, hash;
+	uint8_t *secbits;
+	union syncookie cookie;
 
 	SCH_LOCK_ASSERT(sch);
 
-	/* Which of the two secrets to use. */
-	secbits = sch->sch_oddeven ?
-			sch->sch_secbits_odd : sch->sch_secbits_even;
+	cookie.cookie = 0;
 
-	/* Reseed secret if too old. */
-	if (sch->sch_reseed < time_uptime) {
-		sch->sch_oddeven = sch->sch_oddeven ? 0 : 1;	/* toggle */
-		secbits = sch->sch_oddeven ?
-				sch->sch_secbits_odd : sch->sch_secbits_even;
-		for (i = 0; i < SYNCOOKIE_SECRET_SIZE; i++)
-			secbits[i] = arc4random();
-		sch->sch_reseed = time_uptime + SYNCOOKIE_LIFETIME;
-	}
-
-	/* Secret rotation offset. */
-	off = sc->sc_iss & 0x7;			/* iss was randomized before */
-
-	/* Maximum segment size calculation. */
-	pmss =
-	    max( min(sc->sc_peer_mss, tcp_mssopt(&sc->sc_inc)),	V_tcp_minmss);
-	for (mss = sizeof(tcp_sc_msstab) / sizeof(int) - 1; mss > 0; mss--)
-		if (tcp_sc_msstab[mss] <= pmss)
-			break;
-
-	/* Fold parameters and MD5 digest into the ISN we will send. */
-	data = sch->sch_oddeven;/* odd or even secret, 1 bit */
-	data |= off << 1;	/* secret offset, derived from iss, 3 bits */
-	data |= mss << 4;	/* mss, 3 bits */
-
-	MD5Init(&ctx);
-	MD5Update(&ctx, ((u_int8_t *)secbits) + off,
-	    SYNCOOKIE_SECRET_SIZE * sizeof(*secbits) - off);
-	MD5Update(&ctx, secbits, off);
-	MD5Update(&ctx, &sc->sc_inc, sizeof(sc->sc_inc));
-	MD5Update(&ctx, &sc->sc_irs, sizeof(sc->sc_irs));
-	MD5Update(&ctx, &data, sizeof(data));
-	MD5Final((u_int8_t *)&md5_buffer, &ctx);
+	/* Map our computed MSS into the 3-bit index. */
+	mss = min(tcp_mssopt(&sc->sc_inc), max(sc->sc_peer_mss, V_tcp_minmss));
+	for (i = sizeof(tcp_sc_msstab) / sizeof(*tcp_sc_msstab) - 1;
+	     tcp_sc_msstab[i] > mss && i > 0;
+	     i--)
+		;
+	cookie.flags.mss_idx = i;
+
+	/*
+	 * Map the send window scale into the 3-bit index but only if
+	 * the wscale option was received.
+	 */
+	if (sc->sc_flags & SCF_WINSCALE) {
+		wscale = sc->sc_requested_s_scale;
+		for (i = sizeof(tcp_sc_wstab) / sizeof(*tcp_sc_wstab) - 1;
+		     tcp_sc_wstab[i] > wscale && i > 0;
+		     i--)
+			;
+		cookie.flags.wscale_idx = i;
+	}
+
+	/* Can we do SACK? */
+	if (sc->sc_flags & SCF_SACK)
+		cookie.flags.sack_ok = 1;
 
-	data |= (md5_buffer[0] << 7);
-	sc->sc_iss = data;
+	/* Which of the two secrets to use. */
+	secbit = sch->sch_sc->secret.oddeven & 0x1;
+	cookie.flags.odd_even = secbit;
 
-#ifdef INET6
-	*flowlabel = md5_buffer[1] & IPV6_FLOWLABEL_MASK;
-#endif
+	secbits = sch->sch_sc->secret.key[secbit];
+	hash = syncookie_mac(&sc->sc_inc, sc->sc_irs, cookie.cookie, secbits,
+	    (uintptr_t)sch);
+
+	/*
+	 * Put the flags into the hash and XOR them to get better ISS number
+	 * variance.  This doesn't enhance the cryptographic strength and is
+	 * done to prevent the 8 cookie bits from showing up directly on the
+	 * wire.
+	 */
+	iss = hash & ~0xff;
+	iss |= cookie.cookie ^ (hash >> 24);
 
-	/* Additional parameters are stored in the timestamp if present. */
+	/* Randomize the timestamp. */
 	if (sc->sc_flags & SCF_TIMESTAMP) {
-		data =  ((sc->sc_flags & SCF_SIGNATURE) ? 1 : 0); /* TCP-MD5, 1 bit */
-		data |= ((sc->sc_flags & SCF_SACK) ? 1 : 0) << 1; /* SACK, 1 bit */
-		data |= sc->sc_requested_s_scale << 2;  /* SWIN scale, 4 bits */
-		data |= sc->sc_requested_r_scale << 6;  /* RWIN scale, 4 bits */
-		data |= md5_buffer[2] << 10;		/* more digest bits */
-		data ^= md5_buffer[3];
-		sc->sc_ts = data;
-		sc->sc_tsoff = data - tcp_ts_getticks();	/* after XOR */
+		sc->sc_ts = arc4random();
+		sc->sc_tsoff = sc->sc_ts - tcp_ts_getticks();
 	}
 
 	TCPSTAT_INC(tcps_sc_sendcookie);
+	return (iss);
 }
 
 static struct syncache *
 syncookie_lookup(struct in_conninfo *inc, struct syncache_head *sch, 
-    struct syncache *sc, struct tcpopt *to, struct tcphdr *th,
-    struct socket *so)
+    struct syncache *sc, struct tcphdr *th, struct tcpopt *to,
+    struct socket *lso)
 {
-	MD5_CTX ctx;
-	u_int32_t md5_buffer[MD5_DIGEST_LENGTH / sizeof(u_int32_t)];
-	u_int32_t data = 0;
-	u_int32_t *secbits;
+	uint32_t hash;
+	uint8_t *secbits;
 	tcp_seq ack, seq;
-	int off, mss, wnd, flags;
+	int wnd, wscale = 0;
+	union syncookie cookie;
 
 	SCH_LOCK_ASSERT(sch);
 
 	/*
-	 * Pull information out of SYN-ACK/ACK and
-	 * revert sequence number advances.
+	 * Pull information out of SYN-ACK/ACK and revert sequence number
+	 * advances.
 	 */
 	ack = th->th_ack - 1;
 	seq = th->th_seq - 1;
-	off = (ack >> 1) & 0x7;
-	mss = (ack >> 4) & 0x7;
-	flags = ack & 0x7f;
-
-	/* Which of the two secrets to use. */
-	secbits = (flags & 0x1) ? sch->sch_secbits_odd : sch->sch_secbits_even;
 
 	/*
-	 * The secret wasn't updated for the lifetime of a syncookie,
-	 * so this SYN-ACK/ACK is either too old (replay) or totally bogus.
+	 * Unpack the flags containing enough information to restore the
+	 * connection.
 	 */
-	if (sch->sch_reseed + SYNCOOKIE_LIFETIME < time_uptime) {
-		return (NULL);
-	}
+	cookie.cookie = (ack & 0xff) ^ (ack >> 24);
 
-	/* Recompute the digest so we can compare it. */
-	MD5Init(&ctx);
-	MD5Update(&ctx, ((u_int8_t *)secbits) + off,
-	    SYNCOOKIE_SECRET_SIZE * sizeof(*secbits) - off);
-	MD5Update(&ctx, secbits, off);
-	MD5Update(&ctx, inc, sizeof(*inc));
-	MD5Update(&ctx, &seq, sizeof(seq));
-	MD5Update(&ctx, &flags, sizeof(flags));
-	MD5Final((u_int8_t *)&md5_buffer, &ctx);
+	/* Which of the two secrets to use. */
+	secbits = sch->sch_sc->secret.key[cookie.flags.odd_even];
 
-	/* Does the digest part of or ACK'ed ISS match? */
-	if ((ack & (~0x7f)) != (md5_buffer[0] << 7))
-		return (NULL);
+	hash = syncookie_mac(inc, seq, cookie.cookie, secbits, (uintptr_t)sch);
 
-	/* Does the digest part of our reflected timestamp match? */
-	if (to->to_flags & TOF_TS) {
-		data = md5_buffer[3] ^ to->to_tsecr;
-		if ((data & (~0x3ff)) != (md5_buffer[2] << 10))
-			return (NULL);
-	}
+	/* The recomputed hash matches the ACK if this was a genuine cookie. */
+	if ((ack & ~0xff) != (hash & ~0xff))
+		return (NULL);
 
 	/* Fill in the syncache values. */
+	sc->sc_flags = 0;
 	bcopy(inc, &sc->sc_inc, sizeof(struct in_conninfo));
 	sc->sc_ipopts = NULL;
 	
 	sc->sc_irs = seq;
 	sc->sc_iss = ack;
 
+	switch (inc->inc_flags & INC_ISIPV6) {
+#ifdef INET
+	case 0:
+		sc->sc_ip_ttl = sotoinpcb(lso)->inp_ip_ttl;
+		sc->sc_ip_tos = sotoinpcb(lso)->inp_ip_tos;
+		break;
+#endif
 #ifdef INET6
-	if (inc->inc_flags & INC_ISIPV6) {
-		if (sotoinpcb(so)->inp_flags & IN6P_AUTOFLOWLABEL)
-			sc->sc_flowlabel = md5_buffer[1] & IPV6_FLOWLABEL_MASK;
-	} else
+	case INC_ISIPV6:
+		if (sotoinpcb(lso)->inp_flags & IN6P_AUTOFLOWLABEL)
+			sc->sc_flowlabel = sc->sc_iss & IPV6_FLOWLABEL_MASK;
+		break;
 #endif
-	{
-		sc->sc_ip_ttl = sotoinpcb(so)->inp_ip_ttl;
-		sc->sc_ip_tos = sotoinpcb(so)->inp_ip_tos;
 	}
 
-	/* Additional parameters that were encoded in the timestamp. */
-	if (data) {
+	sc->sc_peer_mss = tcp_sc_msstab[cookie.flags.mss_idx];
+
+	/* We can simply recompute receive window scale we sent earlier. */
+	while (wscale < TCP_MAX_WINSHIFT && (TCP_MAXWIN << wscale) < sb_max)
+		wscale++;
+
+	/* Only use wscale if it was enabled in the orignal SYN. */
+	if (cookie.flags.wscale_idx > 0) {
+		sc->sc_requested_r_scale = wscale;
+		sc->sc_requested_s_scale = tcp_sc_wstab[cookie.flags.wscale_idx];
+		sc->sc_flags |= SCF_WINSCALE;
+	}
+
+	wnd = sbspace(&lso->so_rcv);
+	wnd = imax(wnd, 0);
+	wnd = imin(wnd, TCP_MAXWIN);
+	sc->sc_wnd = wnd;
+
+	if (cookie.flags.sack_ok)
+		sc->sc_flags |= SCF_SACK;
+
+	if (to->to_flags & TOF_TS) {
 		sc->sc_flags |= SCF_TIMESTAMP;
 		sc->sc_tsreflect = to->to_tsval;
 		sc->sc_ts = to->to_tsecr;
 		sc->sc_tsoff = to->to_tsecr - tcp_ts_getticks();
-		sc->sc_flags |= (data & 0x1) ? SCF_SIGNATURE : 0;
-		sc->sc_flags |= ((data >> 1) & 0x1) ? SCF_SACK : 0;
-		sc->sc_requested_s_scale = min((data >> 2) & 0xf,
-		    TCP_MAX_WINSHIFT);
-		sc->sc_requested_r_scale = min((data >> 6) & 0xf,
-		    TCP_MAX_WINSHIFT);
-		if (sc->sc_requested_s_scale || sc->sc_requested_r_scale)
-			sc->sc_flags |= SCF_WINSCALE;
-	} else
-		sc->sc_flags |= SCF_NOOPT;
+	}
 
-	wnd = sbspace(&so->so_rcv);
-	wnd = imax(wnd, 0);
-	wnd = imin(wnd, TCP_MAXWIN);
-	sc->sc_wnd = wnd;
+	if (to->to_flags & TOF_SIGNATURE)
+		sc->sc_flags |= SCF_SIGNATURE;
 
 	sc->sc_rxmits = 0;
-	sc->sc_peer_mss = tcp_sc_msstab[mss];
 
 	TCPSTAT_INC(tcps_sc_recvcookie);
 	return (sc);
 }
 
+#ifdef INVARIANTS
+static int
+syncookie_cmp(struct in_conninfo *inc, struct syncache_head *sch,
+    struct syncache *sc, struct tcphdr *th, struct tcpopt *to,
+    struct socket *lso)
+{
+	struct syncache scs, *scx;
+	char *s;
+
+	bzero(&scs, sizeof(scs));
+	scx = syncookie_lookup(inc, sch, &scs, th, to, lso);
+
+	if ((s = tcp_log_addrs(inc, th, NULL, NULL)) == NULL)
+		return (0);
+
+	if (scx != NULL) {
+		if (sc->sc_peer_mss != scx->sc_peer_mss)
+			log(LOG_DEBUG, "%s; %s: mss different %i vs %i\n",
+			    s, __func__, sc->sc_peer_mss, scx->sc_peer_mss);
+
+		if (sc->sc_requested_r_scale != scx->sc_requested_r_scale)
+			log(LOG_DEBUG, "%s; %s: rwscale different %i vs %i\n",
+			    s, __func__, sc->sc_requested_r_scale,
+			    scx->sc_requested_r_scale);
+
+		if (sc->sc_requested_s_scale != scx->sc_requested_s_scale)
+			log(LOG_DEBUG, "%s; %s: swscale different %i vs %i\n",
+			    s, __func__, sc->sc_requested_s_scale,
+			    scx->sc_requested_s_scale);
+
+		if ((sc->sc_flags & SCF_SACK) != (scx->sc_flags & SCF_SACK))
+			log(LOG_DEBUG, "%s; %s: SACK different\n", s, __func__);
+	}
+
+	if (s != NULL)
+		free(s, M_TCPLOG);
+	return (0);
+}
+#endif /* INVARIANTS */
+
+static void
+syncookie_reseed(void *arg)
+{
+	struct tcp_syncache *sc = arg;
+	uint8_t *secbits;
+	int secbit;
+
+	/*
+	 * Reseeding the secret doesn't have to be protected by a lock.
+	 * It only must be ensured that the new random values are visible
+	 * to all CPUs in a SMP environment.  The atomic with release
+	 * semantics ensures that.
+	 */
+	secbit = (sc->secret.oddeven & 0x1) ? 0 : 1;
+	secbits = sc->secret.key[secbit];
+	arc4rand(secbits, SYNCOOKIE_SECRET_SIZE, 0);
+	atomic_add_rel_int(&sc->secret.oddeven, 1);
+
+	/* Reschedule ourself. */
+	callout_schedule(&sc->secret.reseed, SYNCOOKIE_LIFETIME * hz);
+}
+
 /*
  * Returns the current number of syncache entries.  This number
  * will probably change before you get around to calling 
  * syncache_pcblist.
  */
-
 int
 syncache_pcbcount(void)
 {

Modified: head/sys/netinet/tcp_syncache.h
==============================================================================
--- head/sys/netinet/tcp_syncache.h	Thu Jul 11 15:02:38 2013	(r253209)
+++ head/sys/netinet/tcp_syncache.h	Thu Jul 11 15:29:25 2013	(r253210)
@@ -90,20 +90,23 @@ struct syncache {
 #define SCF_SACK	0x80			/* send SACK option */
 #define SCF_ECN		0x100			/* send ECN setup packet */
 
-#define	SYNCOOKIE_SECRET_SIZE	8	/* dwords */
-#define	SYNCOOKIE_LIFETIME	16	/* seconds */
-
 struct syncache_head {
-	struct vnet	*sch_vnet;
 	struct mtx	sch_mtx;
 	TAILQ_HEAD(sch_head, syncache)	sch_bucket;
 	struct callout	sch_timer;
 	int		sch_nextc;
 	u_int		sch_length;
-	u_int		sch_oddeven;
-	u_int32_t	sch_secbits_odd[SYNCOOKIE_SECRET_SIZE];
-	u_int32_t	sch_secbits_even[SYNCOOKIE_SECRET_SIZE];
-	u_int		sch_reseed;		/* time_uptime, seconds */
+	struct tcp_syncache *sch_sc;
+};
+
+#define	SYNCOOKIE_SECRET_SIZE	16
+#define	SYNCOOKIE_LIFETIME	15		/* seconds */
+
+struct syncookie_secret {
+	volatile u_int oddeven;
+	uint8_t key[2][SYNCOOKIE_SECRET_SIZE];
+	struct callout reseed;
+	u_int lifetime;
 };
 
 struct tcp_syncache {
@@ -115,6 +118,19 @@ struct tcp_syncache {
 	u_int	cache_limit;
 	u_int	rexmt_limit;
 	u_int	hash_secret;
+	struct vnet *sch_vnet;
+	struct syncookie_secret secret;
+};
+
+/* Internal use for the syncookie functions. */
+union syncookie {
+	uint8_t cookie;
+	struct {
+		uint8_t odd_even:1,
+			sack_ok:1,
+			wscale_idx:3,
+			mss_idx:3;
+	} flags;
 };
 
 #endif /* _KERNEL */

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 16:11:20 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 297C1A06
 for ; Thu, 11 Jul 2013 16:11:20 +0000 (UTC)
 (envelope-from andre@freebsd.org)
Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2])
 by mx1.freebsd.org (Postfix) with ESMTP id 8E96017D8
 for ; Thu, 11 Jul 2013 16:11:19 +0000 (UTC)
Received: (qmail 89975 invoked from network); 11 Jul 2013 17:01:52 -0000
Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2])
 (envelope-sender )
 by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP
 for ; 11 Jul 2013 17:01:52 -0000
Message-ID: <51DED921.9030505@freebsd.org>
Date: Thu, 11 Jul 2013 18:11:13 +0200
From: Andre Oppermann 
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
 rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Andre Oppermann 
Subject: Re: svn commit: r253208 - head/sys/crypto/siphash
References: <201307111418.r6BEIdIo094917@svn.freebsd.org>
In-Reply-To: <201307111418.r6BEIdIo094917@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
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 16:11:20 -0000

On 11.07.2013 16:18, Andre Oppermann wrote:
> Author: andre
> Date: Thu Jul 11 14:18:38 2013
> New Revision: 253208
> URL: http://svnweb.freebsd.org/changeset/base/253208
>
> Log:
>    SipHash is a cryptographically strong pseudo-random function (a.k.a. keyed
>    hash function) optimized for speed on short messages returning a 64bit hash/
>    digest value.
...
>    The number of update/finalization rounds is defined during initialization:
>
>     SipHash24_Init() for the fast and reasonable strong version.
>     SipHash48_Init() for the strong version (half as fast).
>
>    SipHash usage is similar to other hash functions:
>
>     struct SIPHASH_CTX ctx;
>     char *k = "16bytes long key"
>     char *s = "string";
>     uint64_t h = 0;
>     SipHash24_Init(&ctx);
>     SipHash_SetKey(&ctx, k);
>     SipHash_Update(&ctx, s, strlen(s));
>     SipHash_Final(&h, &ctx);  /* or */
>     h = SipHash_End(&ctx);    /* or */
>     h = SipHash24(&ctx, k, s, strlen(s));

Looking for a man page whiz to hack one up. :)

-- 
Andre


From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 16:27:11 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id DD71DF50;
 Thu, 11 Jul 2013 16:27:11 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id D0069188C;
 Thu, 11 Jul 2013 16:27:11 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BGRB8t037943;
 Thu, 11 Jul 2013 16:27:11 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BGRBUa037942;
 Thu, 11 Jul 2013 16:27:11 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307111627.r6BGRBUa037942@svn.freebsd.org>
From: Andre Oppermann 
Date: Thu, 11 Jul 2013 16:27:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253214 - head/sys/crypto/siphash
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 16:27:11 -0000

Author: andre
Date: Thu Jul 11 16:27:11 2013
New Revision: 253214
URL: http://svnweb.freebsd.org/changeset/base/253214

Log:
  Fix const propagation issues to make GCC happy.
  
  Submitted by:	Michael Butler 

Modified:
  head/sys/crypto/siphash/siphash.c

Modified: head/sys/crypto/siphash/siphash.c
==============================================================================
--- head/sys/crypto/siphash/siphash.c	Thu Jul 11 15:55:57 2013	(r253213)
+++ head/sys/crypto/siphash/siphash.c	Thu Jul 11 16:27:11 2013	(r253214)
@@ -119,7 +119,8 @@ SipBuf(SIPHASH_CTX *ctx, const uint8_t *
 void
 SipHash_Update(SIPHASH_CTX *ctx, const void *src, size_t len)
 {
-	uint64_t m, *p;
+	uint64_t m;
+	const uint64_t *p;
 	const uint8_t *s;
 	size_t rem;
 
@@ -144,13 +145,13 @@ SipHash_Update(SIPHASH_CTX *ctx, const v
 
 	/* Optimze for 64bit aligned/unaligned access. */
 	if (((uintptr_t)s & 0x7) == 0) {
-		for (p = (uint64_t *)s; len > 0; len--, p++) {
+		for (p = (const uint64_t *)s; len > 0; len--, p++) {
 			m = le64toh(*p);
 			ctx->v[3] ^= m;
 			SipRounds(ctx, 0);
 			ctx->v[0] ^= m;
 		}
-		s = (uint8_t *)p;
+		s = (const uint8_t *)p;
 	} else {
 		for (; len > 0; len--, s += 8) {
 			m = le64dec(s);

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 17:41:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 4233B656;
 Thu, 11 Jul 2013 17:41:05 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 33A821C26;
 Thu, 11 Jul 2013 17:41:05 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BHf5Lo060845;
 Thu, 11 Jul 2013 17:41:05 GMT
 (envelope-from theraven@svn.freebsd.org)
Received: (from theraven@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BHf5gQ060844;
 Thu, 11 Jul 2013 17:41:05 GMT
 (envelope-from theraven@svn.freebsd.org)
Message-Id: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
From: David Chisnall 
Date: Thu, 11 Jul 2013 17:41:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253215 - head/lib/msun/src
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 17:41:05 -0000

Author: theraven
Date: Thu Jul 11 17:41:04 2013
New Revision: 253215
URL: http://svnweb.freebsd.org/changeset/base/253215

Log:
  Cleanups to math.h that prevent namespace conflicts with C++.
  
  Reviewed by:	bde
  MFC after:	3 days

Modified:
  head/lib/msun/src/math.h

Modified: head/lib/msun/src/math.h
==============================================================================
--- head/lib/msun/src/math.h	Thu Jul 11 16:27:11 2013	(r253214)
+++ head/lib/msun/src/math.h	Thu Jul 11 17:41:04 2013	(r253215)
@@ -80,27 +80,33 @@ extern const union __nan_un {
 #define	FP_NORMAL	0x04
 #define	FP_SUBNORMAL	0x08
 #define	FP_ZERO		0x10
+
+#if __STDC_VERSION__ >= 201112L
+#define	__fp_type_select(x, f, d, ld) _Generic((x),     \
+	float: f(x),                                    \
+	double: d(x),                                   \
+	long double: ld(x))
+#elif __GNUC_PREREQ__(5, 1)
+#define	__fp_type_select(x, f, d, ld) __builtin_choose_expr(              \
+	__builtin_types_compatible_p(__typeof(x), long double), ld(x),    \
+	__builtin_choose_expr(                                            \
+	__builtin_types_compatible_p(__typeof(x), double), d(x),          \
+	__builtin_choose_expr(                                            \
+	__builtin_types_compatible_p(__typeof(x), float), f(x), (void)0)))
+#else
+#define	 __fp_type_select(x, f, d, ld)                         \
+	((sizeof(x) == sizeof(float)) ? f(x)                   \
+	: (sizeof(x) == sizeof(double)) ? d(x)                 \
+	: ld(x))
+#endif
+
 #define	fpclassify(x) \
-    ((sizeof (x) == sizeof (float)) ? __fpclassifyf(x) \
-    : (sizeof (x) == sizeof (double)) ? __fpclassifyd(x) \
-    : __fpclassifyl(x))
-
-#define	isfinite(x)					\
-    ((sizeof (x) == sizeof (float)) ? __isfinitef(x)	\
-    : (sizeof (x) == sizeof (double)) ? __isfinite(x)	\
-    : __isfinitel(x))
-#define	isinf(x)					\
-    ((sizeof (x) == sizeof (float)) ? __isinff(x)	\
-    : (sizeof (x) == sizeof (double)) ? isinf(x)	\
-    : __isinfl(x))
-#define	isnan(x)					\
-    ((sizeof (x) == sizeof (float)) ? __isnanf(x)	\
-    : (sizeof (x) == sizeof (double)) ? isnan(x)	\
-    : __isnanl(x))
-#define	isnormal(x)					\
-    ((sizeof (x) == sizeof (float)) ? __isnormalf(x)	\
-    : (sizeof (x) == sizeof (double)) ? __isnormal(x)	\
-    : __isnormall(x))
+	__fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyd)
+#define	isfinite(x) __fp_type_select(x, __isfinitef, __isfinite, __isfinitel)
+#define	isinf(x) __fp_type_select(x, __isinff, __isinf, __isinfl)
+#define	isnan(x) \
+	__fp_type_select(x, __inline_isnanf, __inline_isnan, __inline_isnanl)
+#define	isnormal(x) __fp_type_select(x, __isnormalf, __isnormal, __isnormall)
 
 #ifdef __MATH_BUILTIN_RELOPS
 #define	isgreater(x, y)		__builtin_isgreater((x), (y))
@@ -119,10 +125,7 @@ extern const union __nan_un {
 #define	isunordered(x, y)	(isnan(x) || isnan(y))
 #endif /* __MATH_BUILTIN_RELOPS */
 
-#define	signbit(x)					\
-    ((sizeof (x) == sizeof (float)) ? __signbitf(x)	\
-    : (sizeof (x) == sizeof (double)) ? __signbit(x)	\
-    : __signbitl(x))
+#define	signbit(x) __fp_type_select(x, __signbitf, __signbit, __signbitl)
 
 typedef	__double_t	double_t;
 typedef	__float_t	float_t;
@@ -175,9 +178,8 @@ int	__isfinitef(float) __pure2;
 int	__isfinite(double) __pure2;
 int	__isfinitel(long double) __pure2;
 int	__isinff(float) __pure2;
+int	__isinf(double) __pure2;
 int	__isinfl(long double) __pure2;
-int	__isnanf(float) __pure2;
-int	__isnanl(long double) __pure2;
 int	__isnormalf(float) __pure2;
 int	__isnormal(double) __pure2;
 int	__isnormall(long double) __pure2;
@@ -185,6 +187,27 @@ int	__signbit(double) __pure2;
 int	__signbitf(float) __pure2;
 int	__signbitl(long double) __pure2;
 
+static __inline int
+__inline_isnan(double __x)
+{
+
+	return (__x != __x);
+}
+
+static __inline int
+__inline_isnanf(float __x)
+{
+
+	return (__x != __x);
+}
+
+static __inline int
+__inline_isnanl(long double __x)
+{
+
+	return (__x != __x);
+}
+
 double	acos(double);
 double	asin(double);
 double	atan(double);
@@ -227,8 +250,6 @@ double	expm1(double);
 double	fma(double, double, double);
 double	hypot(double, double);
 int	ilogb(double) __pure2;
-int	(isinf)(double) __pure2;
-int	(isnan)(double) __pure2;
 double	lgamma(double);
 long long llrint(double);
 long long llround(double);

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 17:41:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 711F4786;
 Thu, 11 Jul 2013 17:41:18 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1])
 by mx1.freebsd.org (Postfix) with ESMTP id 4D4A81C28;
 Thu, 11 Jul 2013 17:41:18 +0000 (UTC)
Received: from jhbbsd.localnet (unknown [209.249.190.124])
 by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6268BB953;
 Thu, 11 Jul 2013 13:41:17 -0400 (EDT)
From: John Baldwin 
To: Marcel Moolenaar 
Subject: Re: svn commit: r253161 - head/sys/dev/uart
Date: Thu, 11 Jul 2013 09:41:34 -0400
User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; )
References: <201307101742.r6AHgKOm024113@svn.freebsd.org>
 <201307101409.42228.jhb@freebsd.org>
 
In-Reply-To: 
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <201307110941.34400.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7
 (bigwig.baldwin.cx); Thu, 11 Jul 2013 13:41:17 -0400 (EDT)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 Marcel Moolenaar , src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 17:41:18 -0000

On Wednesday, July 10, 2013 3:59:40 pm Marcel Moolenaar wrote:
> 
> On Jul 10, 2013, at 11:09 AM, John Baldwin  wrote:
> 
> > On Wednesday, July 10, 2013 2:05:43 pm John Baldwin wrote:
> >> On Wednesday, July 10, 2013 1:42:20 pm Marcel Moolenaar wrote:
> >>> Author: marcel
> >>> Date: Wed Jul 10 17:42:20 2013
> >>> New Revision: 253161
> >>> URL: http://svnweb.freebsd.org/changeset/base/253161
> >>> 
> >>> Log:
> >>>  Protect against broken hardware. In this particular case, protect against
> >>>  H/W not de-asserting the interrupt at all. On x86, and because of the
> >>>  following conditions, this results in a hard hang with interrupts disabled:
> >>>  1.  The uart(4) driver uses a spin lock to protect against concurrent
> >>>      access to the H/W. Spin locks disable and restore interrupts.
> >>>  2.  Restoring the interrupt on x86 always writes the flags register. Even
> >>>      if we're restoring the interrupt from disabled to disabled.
> >>>  3.  The x86 CPU has a short window in which interrupts are enabled when the
> >>>      flags register is written.
> >> 
> >> Do you have proof of this?
> 
> No. I only have proof of a hard hang during auto configuration that
> cannot be fixed in any other way than not to setup the interrupt at
> all.

Ok.  I think what is happening is that you are just spinning in the interrupt
handler forever due to the hardware being stuck in that case in the old code.
I assume you tried just using the count first but it still hung?  (Perhaps the
interrupt was for a PCI device and level-triggered and so it kept reasserting
anyway?)

I think your change is correct for a uart that is stuck in this way regardless,
I just think the hang isn't related to weirdness with x86 temporarily
re-enabling interrupts.

-- 
John Baldwin

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 18:52:54 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 40148C02;
 Thu, 11 Jul 2013 18:52:54 +0000 (UTC)
 (envelope-from tijl@coosemans.org)
Received: from mailrelay010.isp.belgacom.be (mailrelay010.isp.belgacom.be
 [195.238.6.177])
 by mx1.freebsd.org (Postfix) with ESMTP id 59A3B1F5E;
 Thu, 11 Jul 2013 18:52:53 +0000 (UTC)
X-Belgacom-Dynamic: yes
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AmIGAJid3lFR8aPm/2dsb2JhbABagwkyg1O+SoEFF3SCIwEBBSMzIgEQCw4GBAkWCwICCQMCAQIBJx4GDQEHAQGIDwildpE+j1ARB4JWgR8DkA6BLYdIkCGDEzo
Received: from 230.163-241-81.adsl-dyn.isp.belgacom.be (HELO
 kalimero.tijl.coosemans.org) ([81.241.163.230])
 by relay.skynet.be with ESMTP; 11 Jul 2013 20:52:45 +0200
Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org
 [127.0.0.1])
 by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r6BIqiom029168;
 Thu, 11 Jul 2013 20:52:45 +0200 (CEST)
 (envelope-from tijl@coosemans.org)
Message-ID: <51DEFEF7.4080709@coosemans.org>
Date: Thu, 11 Jul 2013 20:52:39 +0200
From: Tijl Coosemans 
User-Agent: Mozilla/5.0 (X11; FreeBSD i386;
 rv:17.0) Gecko/20130701 Thunderbird/17.0.7
MIME-Version: 1.0
To: David Chisnall 
Subject: Re: svn commit: r253215 - head/lib/msun/src
References: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
In-Reply-To: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
X-Enigmail-Version: 1.5.1
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="----enig2ARPGUAAVSEBRLNCGTWEH"
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 18:52:54 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2ARPGUAAVSEBRLNCGTWEH
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 2013-07-11 19:41, David Chisnall wrote:
> Author: theraven
> Date: Thu Jul 11 17:41:04 2013
> New Revision: 253215
> URL: http://svnweb.freebsd.org/changeset/base/253215
>=20
> Log:
>   Cleanups to math.h that prevent namespace conflicts with C++.
>  =20
>   Reviewed by:	bde
>   MFC after:	3 days
>=20
> Modified:
>   head/lib/msun/src/math.h
>=20
> Modified: head/lib/msun/src/math.h
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=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/lib/msun/src/math.h	Thu Jul 11 16:27:11 2013	(r253214)
> +++ head/lib/msun/src/math.h	Thu Jul 11 17:41:04 2013	(r253215)
> @@ -80,27 +80,33 @@ extern const union __nan_un {
>  #define	FP_NORMAL	0x04
>  #define	FP_SUBNORMAL	0x08
>  #define	FP_ZERO		0x10
> +
> +#if __STDC_VERSION__ >=3D 201112L
> +#define	__fp_type_select(x, f, d, ld) _Generic((x),     \
> +	float: f(x),                                    \
> +	double: d(x),                                   \
> +	long double: ld(x))

GCC doesn't support _Generic yet for -std=3Dc11.

> +#elif __GNUC_PREREQ__(5, 1)

GCC 3.1?

> +#define	__fp_type_select(x, f, d, ld) __builtin_choose_expr(          =
    \
> +	__builtin_types_compatible_p(__typeof(x), long double), ld(x),    \
> +	__builtin_choose_expr(                                            \
> +	__builtin_types_compatible_p(__typeof(x), double), d(x),          \
> +	__builtin_choose_expr(                                            \
> +	__builtin_types_compatible_p(__typeof(x), float), f(x), (void)0)))
> +#else
> +#define	 __fp_type_select(x, f, d, ld)                         \
> +	((sizeof(x) =3D=3D sizeof(float)) ? f(x)                   \
> +	: (sizeof(x) =3D=3D sizeof(double)) ? d(x)                 \
> +	: ld(x))
> +#endif
> +
>  #define	fpclassify(x) \
> -    ((sizeof (x) =3D=3D sizeof (float)) ? __fpclassifyf(x) \
> -    : (sizeof (x) =3D=3D sizeof (double)) ? __fpclassifyd(x) \
> -    : __fpclassifyl(x))
> -
> -#define	isfinite(x)					\
> -    ((sizeof (x) =3D=3D sizeof (float)) ? __isfinitef(x)	\
> -    : (sizeof (x) =3D=3D sizeof (double)) ? __isfinite(x)	\
> -    : __isfinitel(x))
> -#define	isinf(x)					\
> -    ((sizeof (x) =3D=3D sizeof (float)) ? __isinff(x)	\
> -    : (sizeof (x) =3D=3D sizeof (double)) ? isinf(x)	\
> -    : __isinfl(x))
> -#define	isnan(x)					\
> -    ((sizeof (x) =3D=3D sizeof (float)) ? __isnanf(x)	\
> -    : (sizeof (x) =3D=3D sizeof (double)) ? isnan(x)	\
> -    : __isnanl(x))
> -#define	isnormal(x)					\
> -    ((sizeof (x) =3D=3D sizeof (float)) ? __isnormalf(x)	\
> -    : (sizeof (x) =3D=3D sizeof (double)) ? __isnormal(x)	\
> -    : __isnormall(x))
> +	__fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyd)

Last __fpclassifyd should be __fpclassifyl.

> @@ -227,8 +250,6 @@ double	expm1(double);
>  double	fma(double, double, double);
>  double	hypot(double, double);
>  int	ilogb(double) __pure2;
> -int	(isinf)(double) __pure2;
> -int	(isnan)(double) __pure2;

I think they should stay for the C90 case.


------enig2ARPGUAAVSEBRLNCGTWEH
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iF4EAREIAAYFAlHe/vwACgkQfoCS2CCgtiv3QwD/USQ3ZRmBJDOZVM/rLceqnkT3
RdTlc2V1NOw0jIiQuQgA/1fZCdFTdAlEmewAxjjPNQDf2iKMBS1Hyu69iBPBszPG
=NRg+
-----END PGP SIGNATURE-----

------enig2ARPGUAAVSEBRLNCGTWEH--

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 19:09:31 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id EA3442F1;
 Thu, 11 Jul 2013 19:09:31 +0000 (UTC) (envelope-from np@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id DCE381FF8;
 Thu, 11 Jul 2013 19:09:31 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BJ9VJj085492;
 Thu, 11 Jul 2013 19:09:31 GMT (envelope-from np@svn.freebsd.org)
Received: (from np@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BJ9VXa085490;
 Thu, 11 Jul 2013 19:09:31 GMT (envelope-from np@svn.freebsd.org)
Message-Id: <201307111909.r6BJ9VXa085490@svn.freebsd.org>
From: Navdeep Parhar 
Date: Thu, 11 Jul 2013 19:09:31 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253217 - head/sys/dev/cxgbe
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 19:09:32 -0000

Author: np
Date: Thu Jul 11 19:09:31 2013
New Revision: 253217
URL: http://svnweb.freebsd.org/changeset/base/253217

Log:
  Attach to the 4x10G T540-CR card.

Modified:
  head/sys/dev/cxgbe/t4_main.c

Modified: head/sys/dev/cxgbe/t4_main.c
==============================================================================
--- head/sys/dev/cxgbe/t4_main.c	Thu Jul 11 19:04:19 2013	(r253216)
+++ head/sys/dev/cxgbe/t4_main.c	Thu Jul 11 19:09:31 2013	(r253217)
@@ -448,13 +448,13 @@ struct {
 	{0xb000, "Chelsio Terminator 5 FPGA"},
 	{0x5400, "Chelsio T580-dbg"},
 	{0x5401,  "Chelsio T520-CR"},
+	{0x5403,  "Chelsio T540-CR"},		/* 4 x 10G */
 	{0x5407,  "Chelsio T520-SO"},
 	{0x5408,  "Chelsio T520-CX"},
 	{0x5410,  "Chelsio T580-LP-CR"},	/* 2 x 40G */
 	{0x5411,  "Chelsio T520-LL-CR"},
 #ifdef notyet
 	{0x5402,  "Chelsio T522-CR"},
-	{0x5403,  "Chelsio T540-CR"},
 	{0x5404,  "Chelsio T520-BCH"},
 	{0x5405,  "Chelsio T540-BCH"},
 	{0x5406,  "Chelsio T540-CH"},

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 19:34:16 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id CE4658E1;
 Thu, 11 Jul 2013 19:34:16 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BFBAB10B7;
 Thu, 11 Jul 2013 19:34:16 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BJYG4S093698;
 Thu, 11 Jul 2013 19:34:16 GMT
 (envelope-from theraven@svn.freebsd.org)
Received: (from theraven@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BJYGNv093697;
 Thu, 11 Jul 2013 19:34:16 GMT
 (envelope-from theraven@svn.freebsd.org)
Message-Id: <201307111934.r6BJYGNv093697@svn.freebsd.org>
From: David Chisnall 
Date: Thu, 11 Jul 2013 19:34:16 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253219 - head/lib/msun/src
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 19:34:16 -0000

Author: theraven
Date: Thu Jul 11 19:34:16 2013
New Revision: 253219
URL: http://svnweb.freebsd.org/changeset/base/253219

Log:
  Fix some typoes in math.h cleanup.

Modified:
  head/lib/msun/src/math.h

Modified: head/lib/msun/src/math.h
==============================================================================
--- head/lib/msun/src/math.h	Thu Jul 11 19:18:13 2013	(r253218)
+++ head/lib/msun/src/math.h	Thu Jul 11 19:34:16 2013	(r253219)
@@ -81,12 +81,12 @@ extern const union __nan_un {
 #define	FP_SUBNORMAL	0x08
 #define	FP_ZERO		0x10
 
-#if __STDC_VERSION__ >= 201112L
+#if __STDC_VERSION__ >= 201112L && defined(__clang__)
 #define	__fp_type_select(x, f, d, ld) _Generic((x),     \
 	float: f(x),                                    \
 	double: d(x),                                   \
 	long double: ld(x))
-#elif __GNUC_PREREQ__(5, 1)
+#elif __GNUC_PREREQ__(3, 1)
 #define	__fp_type_select(x, f, d, ld) __builtin_choose_expr(              \
 	__builtin_types_compatible_p(__typeof(x), long double), ld(x),    \
 	__builtin_choose_expr(                                            \
@@ -101,7 +101,7 @@ extern const union __nan_un {
 #endif
 
 #define	fpclassify(x) \
-	__fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyd)
+	__fp_type_select(x, __fpclassifyf, __fpclassifyd, __fpclassifyl)
 #define	isfinite(x) __fp_type_select(x, __isfinitef, __isfinite, __isfinitel)
 #define	isinf(x) __fp_type_select(x, __isinff, __isinf, __isinfl)
 #define	isnan(x) \

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 19:37:10 2013
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 0D490A41;
 Thu, 11 Jul 2013 19:37:10 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27])
 by mx1.freebsd.org (Postfix) with ESMTP id B787710CF;
 Thu, 11 Jul 2013 19:37:08 +0000 (UTC)
Received: from [192.168.0.2]
 (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236])
 (authenticated bits=0)
 by theravensnest.org (8.14.5/8.14.5) with ESMTP id r6BJb4Cs058535
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
 Thu, 11 Jul 2013 19:37:05 GMT (envelope-from theraven@FreeBSD.org)
Content-Type: multipart/signed;
 boundary="Apple-Mail=_32F89FA4-D090-45FF-AA2C-83F200615C97";
 protocol="application/pgp-signature"; micalg=pgp-sha1
Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\))
Subject: Re: svn commit: r253215 - head/lib/msun/src
From: David Chisnall 
In-Reply-To: <51DEFEF7.4080709@coosemans.org>
Date: Thu, 11 Jul 2013 20:36:58 +0100
Message-Id: <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
References: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
 <51DEFEF7.4080709@coosemans.org>
To: Tijl Coosemans 
X-Mailer: Apple Mail (2.1503)
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
 src-committers@FreeBSD.org, David Chisnall 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 19:37:10 -0000


--Apple-Mail=_32F89FA4-D090-45FF-AA2C-83F200615C97
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 11 Jul 2013, at 19:52, Tijl Coosemans  wrote:

> GCC doesn't support _Generic yet for -std=3Dc11.

Ugh.  Given that they also lack a fine-grained feature check mechanism, =
they really should not advertise support for a language dialect if they =
don't support it.

>=20
>> +#elif __GNUC_PREREQ__(5, 1)
>=20
> GCC 3.1?

Ooops, I changed this to 5.1 to test the other code path and forgot to =
revert it.

> Last __fpclassifyd should be __fpclassifyl.

Fixed.

>> @@ -227,8 +250,6 @@ double	expm1(double);
>> double	fma(double, double, double);
>> double	hypot(double, double);
>> int	ilogb(double) __pure2;
>> -int	(isinf)(double) __pure2;
>> -int	(isnan)(double) __pure2;
>=20
> I think they should stay for the C90 case.

That would completely defeat the point of this entire exercise and be =
redundant unless we aim to support a compiler that only supports C90 and =
no GNU extensions, in which case you'll hit errors in cdefs.h, long =
before you get to this point in an include. =20

David



--Apple-Mail=_32F89FA4-D090-45FF-AA2C-83F200615C97
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJR3wlaAAoJEKx65DEEsqIdV+gP/jHKkH9K6qTYWJyVj4qLTWE0
1IecE8rEF+mgo53VKFtzcZyO6IAHAvfPkQDk57FjWMmykzkL1hQGFc0w8ncdbiUG
1ETknOrzNO4H4biCZQN/9nvL6UGQB2RAPgJ1eBTypMaes2uIIEx1iy1tl1OyEfRd
ohSltgdafnaAnCkM6MSEX3N77Zj5vT7SkzYb3BePkl+fPy/cb1Rdy94w2wUqXWo6
VSDqN0VP0ecWqinNJw58uEV5NAcnN1f1kDxDWCAEBfFWbTOf8V+4r+BO8jQlZG7u
Yv52V4pSY592HIJPjlmGIQ+wvzEbuf6jRnjVdZdqGqjziz9gIpUNHRn92p4il7vc
bfdljT5nY19RyEzes+7ZIeQlfzzy1GSWcgdnzAyNbpgoGBszMN+ZbsWXQxWShCcN
xM7HerErkWcj4E2P4iz5SsNY6Uz9JOhNPtfVu9Zvb359VV3VfDYLf/6MVejTMRGb
WaO9O2jPe1RQ9tOH7k7/P6O9u5/sGczK2j3l/Z+UmC8GsoEI9kjTYLOQAKoDTdAx
mO6tfc2FEFCVvOZ+WdjWI+7cF0Y3aABAaNKIA47WUP9JBfqCJjPna/82dWknU3iK
bvhj3h8puoF2FBoD8/g0K6/3OM+m8W+6veNTwklnV7COvPDMlGCRMCc9GCwLJkzy
l5RLiXUcpQcD/qk6mB1D
=NvnX
-----END PGP SIGNATURE-----

--Apple-Mail=_32F89FA4-D090-45FF-AA2C-83F200615C97--

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 20:05:07 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 96D94328;
 Thu, 11 Jul 2013 20:05:07 +0000 (UTC)
 (envelope-from tijl@coosemans.org)
Received: from mailrelay005.isp.belgacom.be (mailrelay005.isp.belgacom.be
 [195.238.6.171])
 by mx1.freebsd.org (Postfix) with ESMTP id AF29A11DA;
 Thu, 11 Jul 2013 20:05:06 +0000 (UTC)
X-Belgacom-Dynamic: yes
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AuwGAEAP31FR8aPm/2dsb2JhbABagwmDPr8VgQYXdIIjAQEFViIBEAsOCgkWDwkDAgECASceBgEMAQUCAQGID7dbj2EHg3UDkA6BLZdpgxM6
Received: from 230.163-241-81.adsl-dyn.isp.belgacom.be (HELO
 kalimero.tijl.coosemans.org) ([81.241.163.230])
 by relay.skynet.be with ESMTP; 11 Jul 2013 22:03:56 +0200
Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org
 [127.0.0.1])
 by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r6BK3sr0029504;
 Thu, 11 Jul 2013 22:03:54 +0200 (CEST)
 (envelope-from tijl@coosemans.org)
Message-ID: <51DF0FA5.4050106@coosemans.org>
Date: Thu, 11 Jul 2013 22:03:49 +0200
From: Tijl Coosemans 
User-Agent: Mozilla/5.0 (X11; FreeBSD i386;
 rv:17.0) Gecko/20130701 Thunderbird/17.0.7
MIME-Version: 1.0
To: David Chisnall , Bruce Evans 
Subject: Re: svn commit: r253215 - head/lib/msun/src
References: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
 <51DEFEF7.4080709@coosemans.org>
 <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
In-Reply-To: <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
X-Enigmail-Version: 1.5.1
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="----enig2JFRNAHPSRCEWMEIXBBSG"
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
 src-committers@FreeBSD.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 20:05:07 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2JFRNAHPSRCEWMEIXBBSG
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 2013-07-11 21:36, David Chisnall wrote:
> On 11 Jul 2013, at 19:52, Tijl Coosemans  wrote:
>>> @@ -227,8 +250,6 @@ double	expm1(double);
>>> double	fma(double, double, double);
>>> double	hypot(double, double);
>>> int	ilogb(double) __pure2;
>>> -int	(isinf)(double) __pure2;
>>> -int	(isnan)(double) __pure2;
>>
>> I think they should stay for the C90 case.
>=20
> That would completely defeat the point of this entire exercise and be
> redundant unless we aim to support a compiler that only supports C90
> and no GNU extensions, in which case you'll hit errors in cdefs.h,
> long before you get to this point in an include.

isnan(double) is part of SUSv2. It should be visible when compiling with
-D_XOPEN_SOURCE=3D500. I think you need something like this:

#if (__BSD_VISIBLE || __XSI_VISIBLE <=3D 500) && __ISO_C_VISIBLE < 1999
int	isinf(double) __pure2;
int	isnan(double) __pure2;
#endif


------enig2JFRNAHPSRCEWMEIXBBSG
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iF4EAREIAAYFAlHfD6oACgkQfoCS2CCgtitHbAD9FmMy9FG+6k9abgI2j5xP9LOD
wYatLfRjnD/UGDjnPT0A/ihVf5GqJXKFCHvH2R163dYmnny3q0qlzQfk/B3wJKU/
=N4xj
-----END PGP SIGNATURE-----

------enig2JFRNAHPSRCEWMEIXBBSG--

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 20:27:50 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 92D0ACAF;
 Thu, 11 Jul 2013 20:27:50 +0000 (UTC)
 (envelope-from tijl@coosemans.org)
Received: from mailrelay009.isp.belgacom.be (mailrelay009.isp.belgacom.be
 [195.238.6.176])
 by mx1.freebsd.org (Postfix) with ESMTP id A479D1344;
 Thu, 11 Jul 2013 20:27:49 +0000 (UTC)
X-Belgacom-Dynamic: yes
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Al4GADsU31FR8aPm/2dsb2JhbABagwnCVIEGF3SCIwEBBVYjEAsOCgklDwIoHgYBDAEFAgEBiA+3ZY9hB4N1A5AOgS2XaYMTOg
Received: from 230.163-241-81.adsl-dyn.isp.belgacom.be (HELO
 kalimero.tijl.coosemans.org) ([81.241.163.230])
 by relay.skynet.be with ESMTP; 11 Jul 2013 22:26:39 +0200
Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org
 [127.0.0.1])
 by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r6BKQcQU029608;
 Thu, 11 Jul 2013 22:26:38 +0200 (CEST)
 (envelope-from tijl@coosemans.org)
Message-ID: <51DF14F9.50001@coosemans.org>
Date: Thu, 11 Jul 2013 22:26:33 +0200
From: Tijl Coosemans 
User-Agent: Mozilla/5.0 (X11; FreeBSD i386;
 rv:17.0) Gecko/20130701 Thunderbird/17.0.7
MIME-Version: 1.0
To: David Chisnall , Bruce Evans 
Subject: Re: svn commit: r253215 - head/lib/msun/src
References: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
 <51DEFEF7.4080709@coosemans.org>
 <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
 <51DF0FA5.4050106@coosemans.org>
In-Reply-To: <51DF0FA5.4050106@coosemans.org>
X-Enigmail-Version: 1.5.1
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="----enig2PCBEHFJOSCTIFNHTVUBT"
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
 src-committers@FreeBSD.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 20:27:50 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
------enig2PCBEHFJOSCTIFNHTVUBT
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 2013-07-11 22:03, Tijl Coosemans wrote:
> On 2013-07-11 21:36, David Chisnall wrote:
>> On 11 Jul 2013, at 19:52, Tijl Coosemans  wrote:
>>>> @@ -227,8 +250,6 @@ double	expm1(double);
>>>> double	fma(double, double, double);
>>>> double	hypot(double, double);
>>>> int	ilogb(double) __pure2;
>>>> -int	(isinf)(double) __pure2;
>>>> -int	(isnan)(double) __pure2;
>>>
>>> I think they should stay for the C90 case.
>>
>> That would completely defeat the point of this entire exercise and be
>> redundant unless we aim to support a compiler that only supports C90
>> and no GNU extensions, in which case you'll hit errors in cdefs.h,
>> long before you get to this point in an include.
>=20
> isnan(double) is part of SUSv2. It should be visible when compiling wit=
h
> -D_XOPEN_SOURCE=3D500. I think you need something like this:
>=20
> #if (__BSD_VISIBLE || __XSI_VISIBLE <=3D 500) && __ISO_C_VISIBLE < 1999=

> int	isinf(double) __pure2;
> int	isnan(double) __pure2;
> #endif

Actually this:

#if (__BSD_VISIBLE || (defined(__XSI_VISIBLE) && __XSI_VISIBLE <=3D 500))=
 && __ISO_C_VISIBLE < 1999




------enig2PCBEHFJOSCTIFNHTVUBT
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iF4EAREIAAYFAlHfFP4ACgkQfoCS2CCgtitdoAD+OXfe70zo9LnLZ7pWOL3fWj2h
e4JB/MtzTPBIAjgV6uIA/ilsgIqqgBMo3Ml/9qXL02hXpFFNXG477yXNlNJr3RGW
=xmqp
-----END PGP SIGNATURE-----

------enig2PCBEHFJOSCTIFNHTVUBT--

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 20:33:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 1BC0FE62;
 Thu, 11 Jul 2013 20:33:58 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 0E091136C;
 Thu, 11 Jul 2013 20:33:58 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BKXvsM012005;
 Thu, 11 Jul 2013 20:33:57 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BKXvFf012004;
 Thu, 11 Jul 2013 20:33:57 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307112033.r6BKXvFf012004@svn.freebsd.org>
From: Konstantin Belousov 
Date: Thu, 11 Jul 2013 20:33:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253221 - head/sys/vm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 20:33:58 -0000

Author: kib
Date: Thu Jul 11 20:33:57 2013
New Revision: 253221
URL: http://svnweb.freebsd.org/changeset/base/253221

Log:
  When swap pager allocates metadata in the pagedaemon context, allow it
  to drain the reserve.  This was broken in r243040, causing deadlock.
  Note that VM_WAIT call in case of uma_zalloc() failure from pagedaemon
  would only wait for the v_pageout_free_min anyway.
  
  Reported and tested by:	pho
  Reviewed by:	alc
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/vm/swap_pager.c

Modified: head/sys/vm/swap_pager.c
==============================================================================
--- head/sys/vm/swap_pager.c	Thu Jul 11 20:09:46 2013	(r253220)
+++ head/sys/vm/swap_pager.c	Thu Jul 11 20:33:57 2013	(r253221)
@@ -1855,7 +1855,8 @@ retry:
 		if (swapblk == SWAPBLK_NONE)
 			goto done;
 
-		swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT);
+		swap = *pswap = uma_zalloc(swap_zone, M_NOWAIT |
+		    (curproc == pageproc ? M_USE_RESERVE : 0));
 		if (swap == NULL) {
 			mtx_unlock(&swhash_mtx);
 			VM_OBJECT_WUNLOCK(object);

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 20:36:25 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 976671A5;
 Thu, 11 Jul 2013 20:36:25 +0000 (UTC)
 (envelope-from to.my.trociny@gmail.com)
Received: from mail-ee0-x232.google.com (mail-ee0-x232.google.com
 [IPv6:2a00:1450:4013:c00::232])
 by mx1.freebsd.org (Postfix) with ESMTP id AB0571380;
 Thu, 11 Jul 2013 20:36:24 +0000 (UTC)
Received: by mail-ee0-f50.google.com with SMTP id d49so5699719eek.23
 for ; Thu, 11 Jul 2013 13:36:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=vXdiPiBRWFzcmTCNPjXfW5uWpmjN5WukkXxzWOvCFrY=;
 b=kQIlHdt0zIbY1/TinQDMFkCGLHx79JE5mbgSSW56dnDMn1CfgbmErLV7lmXz8H4Bio
 LXkhKnCaazvVRer6hnDggwgLXPoUQ4OK1wtNXOgsuILybby08u2/Sj6ThLh0PoXNrflr
 +HvRyDF8EPUndhConEnlADLq3oLuTQP1mONsjv1TGCWS9OyB6HoB3jH8dG4wW2E0w9OH
 T06LZWlyB/Rk0VgSG7c/YWAx7kFTzx7XBTDK6RAr9wtecE5gGpyDpfFgdVOh6Z4JJdIg
 uMjK+CYMWNnW9tE4Bxd1DjLy1a4D3IDIgDVr777a7mBhMnyQujcWbCDR5nRymYUxfi/P
 gpMQ==
X-Received: by 10.15.42.72 with SMTP id t48mr43466247eev.105.1373574983257;
 Thu, 11 Jul 2013 13:36:23 -0700 (PDT)
Received: from localhost ([178.150.115.244])
 by mx.google.com with ESMTPSA id n45sm72155822eew.1.2013.07.11.13.36.21
 for 
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Thu, 11 Jul 2013 13:36:22 -0700 (PDT)
Sender: Mikolaj Golub 
Date: Thu, 11 Jul 2013 23:36:19 +0300
From: Mikolaj Golub 
To: Andre Oppermann 
Subject: Re: svn commit: r253210 - in head/sys: conf netinet
Message-ID: <20130711203617.GA7506@gmail.com>
References: <201307111529.r6BFTPSf016809@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201307111529.r6BFTPSf016809@svn.freebsd.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 20:36:25 -0000

Hi, Andre

On Thu, Jul 11, 2013 at 03:29:25PM +0000, Andre Oppermann wrote:
> Author: andre
> Date: Thu Jul 11 15:29:25 2013
> New Revision: 253210
> URL: http://svnweb.freebsd.org/changeset/base/253210
> 
> Log:
>   Improve SYN cookies by encoding the MSS, WSCALE (window scaling) and SACK
>   information into the ISN (initial sequence number) without the additional
>   use of timestamp bits and switching to the very fast and cryptographically
>   strong SipHash-2-4 MAC hash algorithm to protect the SYN cookie against
>   forgeries.

It fails to build with VIMAGE:

cc  -c -O2 -pipe -fno-strict-aliasing  -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality  -nostdinc  -I. -I/home/golub/freebsd/base/head/sys -I/home/golub/freebsd/base/head/sys/contrib/altq -I/home/golub/freebsd/base/head/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror  /home/golub/freebsd/base/head/sys/netinet/tcp_syncache.c
/home/golub/freebsd/base/head/sys/netinet/tcp_syncache.c:266:17: error: no member named 'vnet' in
      'struct tcp_syncache'
        V_tcp_syncache.vnet = curvnet;
        ~~~~~~~~~~~~~~ ^
/home/golub/freebsd/base/head/sys/netinet/tcp_syncache.c:438:27: error: no member named 'vnet' in
      'struct tcp_syncache'
        CURVNET_SET(sch->sch_sc->vnet);
                    ~~~~~~~~~~~  ^

> Modified: head/sys/netinet/tcp_syncache.h
> ==============================================================================
...
>  struct tcp_syncache {
> @@ -115,6 +118,19 @@ struct tcp_syncache {
>  	u_int	cache_limit;
>  	u_int	rexmt_limit;
>  	u_int	hash_secret;
> +	struct vnet *sch_vnet;

I think you meant here:

+	struct vnet *vnet;

-- 
Mikolaj Golub

From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 21:42:03 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E953AFE9;
 Thu, 11 Jul 2013 21:42:03 +0000 (UTC)
 (envelope-from marcel@xcllnt.net)
Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214])
 by mx1.freebsd.org (Postfix) with ESMTP id AA4AD176F;
 Thu, 11 Jul 2013 21:42:03 +0000 (UTC)
Received: from amoroson-sslvpn-nc.jnpr.net (natint3.juniper.net
 [66.129.224.36]) (authenticated bits=0)
 by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id r6BLft2B066233
 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO);
 Thu, 11 Jul 2013 14:41:57 -0700 (PDT)
 (envelope-from marcel@xcllnt.net)
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\))
Subject: Re: svn commit: r253161 - head/sys/dev/uart
From: Marcel Moolenaar 
In-Reply-To: <201307110941.34400.jhb@freebsd.org>
Date: Thu, 11 Jul 2013 14:41:50 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <84AC1620-BD44-4A55-B580-02F3D50C546B@xcllnt.net>
References: <201307101742.r6AHgKOm024113@svn.freebsd.org>
 <201307101409.42228.jhb@freebsd.org>
 
 <201307110941.34400.jhb@freebsd.org>
To: John Baldwin 
X-Mailer: Apple Mail (2.1508)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 Marcel Moolenaar , src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 21:42:04 -0000


On Jul 11, 2013, at 6:41 AM, John Baldwin  wrote:

> On Wednesday, July 10, 2013 3:59:40 pm Marcel Moolenaar wrote:
>>=20
>> On Jul 10, 2013, at 11:09 AM, John Baldwin  wrote:
>>=20
>>> On Wednesday, July 10, 2013 2:05:43 pm John Baldwin wrote:
>>>> On Wednesday, July 10, 2013 1:42:20 pm Marcel Moolenaar wrote:
>>>>> Author: marcel
>>>>> Date: Wed Jul 10 17:42:20 2013
>>>>> New Revision: 253161
>>>>> URL: http://svnweb.freebsd.org/changeset/base/253161
>>>>>=20
>>>>> Log:
>>>>> Protect against broken hardware. In this particular case, protect =
against
>>>>> H/W not de-asserting the interrupt at all. On x86, and because of =
the
>>>>> following conditions, this results in a hard hang with interrupts =
disabled:
>>>>> 1.  The uart(4) driver uses a spin lock to protect against =
concurrent
>>>>>     access to the H/W. Spin locks disable and restore interrupts.
>>>>> 2.  Restoring the interrupt on x86 always writes the flags =
register. Even
>>>>>     if we're restoring the interrupt from disabled to disabled.
>>>>> 3.  The x86 CPU has a short window in which interrupts are enabled =
when the
>>>>>     flags register is written.
>>>>=20
>>>> Do you have proof of this?
>>=20
>> No. I only have proof of a hard hang during auto configuration that
>> cannot be fixed in any other way than not to setup the interrupt at
>> all.
>=20
> Ok.  I think what is happening is that you are just spinning in the =
interrupt
> handler forever due to the hardware being stuck in that case in the =
old code.
> I assume you tried just using the count first but it still hung?  =
(Perhaps the
> interrupt was for a PCI device and level-triggered and so it kept =
reasserting
> anyway?)

Yes, the count alone didn't do the trick. It's really a H/W
problem. I suspect a floating line to an FPGA. The condition
is cleared by means that go beyond FreeBSD, let me put it
that way :-)

> I think your change is correct for a uart that is stuck in this way =
regardless,
> I just think the hang isn't related to weirdness with x86 temporarily
> re-enabling interrupts.

You're right. I looked at configure() this time and it
starts with enable_intr(). For some reason I had it in
my head that we auto-configure with interrupts disabled.
We do on most platforms, just not on x86...

--=20
Marcel Moolenaar
marcel@xcllnt.net



From owner-svn-src-head@FreeBSD.ORG  Thu Jul 11 22:19:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id CA1D3CA9;
 Thu, 11 Jul 2013 22:19:18 +0000 (UTC)
 (envelope-from cperciva@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BAE5D1955;
 Thu, 11 Jul 2013 22:19:18 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BMJIGY042097;
 Thu, 11 Jul 2013 22:19:18 GMT
 (envelope-from cperciva@svn.freebsd.org)
Received: (from cperciva@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BMJIi8042095;
 Thu, 11 Jul 2013 22:19:18 GMT
 (envelope-from cperciva@svn.freebsd.org)
Message-Id: <201307112219.r6BMJIi8042095@svn.freebsd.org>
From: Colin Percival 
Date: Thu, 11 Jul 2013 22:19:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253224 - head/usr.sbin/portsnap/portsnap
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Thu, 11 Jul 2013 22:19:18 -0000

Author: cperciva
Date: Thu Jul 11 22:19:18 2013
New Revision: 253224
URL: http://svnweb.freebsd.org/changeset/base/253224

Log:
  Fix bug in deleting files: If two ports had the same tarball and one of
  them changed (or was removed from the tree) then portsnap would delete
  that file.  This happened earlier today when one of two empty port
  directories was removed.  Uniquifying the lists of needed files fixes
  this.
  
  9.2-RELEASE candidate.
  
  MFC after:	3 days

Modified:
  head/usr.sbin/portsnap/portsnap/portsnap.sh

Modified: head/usr.sbin/portsnap/portsnap/portsnap.sh
==============================================================================
--- head/usr.sbin/portsnap/portsnap/portsnap.sh	Thu Jul 11 22:15:14 2013	(r253223)
+++ head/usr.sbin/portsnap/portsnap/portsnap.sh	Thu Jul 11 22:19:18 2013	(r253224)
@@ -864,8 +864,8 @@ fetch_update() {
 	echo "done."
 
 # Remove files which are no longer needed
-	cut -f 2 -d '|' tINDEX INDEX | sort > oldfiles
-	cut -f 2 -d '|' tINDEX.new INDEX.new | sort | comm -13 - oldfiles |
+	cut -f 2 -d '|' tINDEX INDEX | sort -u > oldfiles
+	cut -f 2 -d '|' tINDEX.new INDEX.new | sort -u | comm -13 - oldfiles |
 	    lam -s "files/" - -s ".gz" | xargs rm -f
 	rm patchlist filelist oldfiles
 

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 00:50:25 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id EEB3D575;
 Fri, 12 Jul 2013 00:50:25 +0000 (UTC)
 (envelope-from scottl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E14CA1FC5;
 Fri, 12 Jul 2013 00:50:25 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C0oPkb085880;
 Fri, 12 Jul 2013 00:50:25 GMT (envelope-from scottl@svn.freebsd.org)
Received: (from scottl@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C0oPpU085879;
 Fri, 12 Jul 2013 00:50:25 GMT (envelope-from scottl@svn.freebsd.org)
Message-Id: <201307120050.r6C0oPpU085879@svn.freebsd.org>
From: Scott Long 
Date: Fri, 12 Jul 2013 00:50:25 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253228 - head/sys/cam/scsi
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 00:50:26 -0000

Author: scottl
Date: Fri Jul 12 00:50:25 2013
New Revision: 253228
URL: http://svnweb.freebsd.org/changeset/base/253228

Log:
  Refactor the various delete methods out of dastart().  Cleans up a bunch
  of style and adds more modularity and clarity.
  
  Obtained from:	Netflix
  MFC after:	3 days

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Fri Jul 12 00:40:49 2013	(r253227)
+++ head/sys/cam/scsi/scsi_da.c	Fri Jul 12 00:50:25 2013	(r253228)
@@ -144,6 +144,22 @@ typedef enum {
 	DA_DELETE_MAX = DA_DELETE_ZERO
 } da_delete_methods;
 
+typedef void da_delete_func_t (struct cam_periph *periph, union ccb *ccb,
+			      struct bio *bp);
+static da_delete_func_t da_delete_trim;
+static da_delete_func_t da_delete_unmap;
+static da_delete_func_t da_delete_ws;
+
+static void * da_delete_functions[] = {
+	NULL,
+	NULL,
+	da_delete_trim,
+	da_delete_unmap,
+	da_delete_ws,
+	da_delete_ws,
+	da_delete_ws
+};
+
 static const char *da_delete_method_names[] =
     { "NONE", "DISABLE", "ATA_TRIM", "UNMAP", "WS16", "WS10", "ZERO" };
 static const char *da_delete_method_desc[] =
@@ -198,6 +214,7 @@ struct da_softc {
 	uint32_t		unmap_max_lba;
 	uint64_t		ws_max_blks;
 	da_delete_methods	delete_method;
+	da_delete_func_t	*delete_func;
 	struct	 disk_params params;
 	struct	 disk *disk;
 	union	 ccb saved_ccb;
@@ -1801,6 +1818,10 @@ dadeletemethodset(struct da_softc *softc
 
 	softc->delete_method = delete_method;
 	softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method);
+	if (delete_method <= DA_DELETE_MAX)
+		softc->delete_func = da_delete_functions[delete_method];
+	else
+		softc->delete_func = NULL;
 
 	if (softc->delete_method > DA_DELETE_DISABLE)
 		softc->disk->d_flags |= DISKFLAG_CANDELETE;
@@ -2160,7 +2181,7 @@ skipstate:
 	switch (softc->state) {
 	case DA_STATE_NORMAL:
 	{
-		struct bio *bp, *bp1;
+		struct bio *bp;
 		uint8_t tag_code;
 
 		/* Execute immediate CCB if waiting. */
@@ -2180,237 +2201,13 @@ skipstate:
 		/* Run BIO_DELETE if not running yet. */
 		if (!softc->delete_running &&
 		    (bp = bioq_first(&softc->delete_queue)) != NULL) {
-		    uint64_t lba;
-		    uint64_t count; /* forward compat with WS32 */
-
-		    /*
-		     * In each of the methods below, while its the caller's
-		     * responsibility to ensure the request will fit into a
-		     * single device request, we might have changed the delete
-		     * method due to the device incorrectly advertising either
-		     * its supported methods or limits.
-		     * 
-		     * To prevent this causing further issues we validate the
-		     * against the methods limits, and warn which would
-		     * otherwise be unnecessary.
-		     */
-
-		    if (softc->delete_method == DA_DELETE_UNMAP) {
-			uint8_t *buf = softc->unmap_buf;
-			uint64_t lastlba = (uint64_t)-1;
-			uint32_t lastcount = 0, c;
-			uint64_t totalcount = 0;
-			uint32_t off, ranges = 0;
-
-			/*
-			 * Currently this doesn't take the UNMAP
-			 * Granularity and Granularity Alignment
-			 * fields into account.
-			 *
-			 * This could result in both unoptimal unmap
-			 * requests as as well as UNMAP calls unmapping
-			 * fewer LBA's than requested.
-			 */
-
-			softc->delete_running = 1;
-			bzero(softc->unmap_buf, sizeof(softc->unmap_buf));
-			bp1 = bp;
-			do {
-				bioq_remove(&softc->delete_queue, bp1);
-				if (bp1 != bp)
-					bioq_insert_tail(&softc->delete_run_queue, bp1);
-				lba = bp1->bio_pblkno;
-				count = bp1->bio_bcount / softc->params.secsize;
-
-				/* Try to extend the previous range. */
-				if (lba == lastlba) {
-					c = min(count, softc->unmap_max_lba -
-						lastcount);
-					lastcount += c;
-					off = ((ranges - 1) * UNMAP_RANGE_SIZE) +
-					      UNMAP_HEAD_SIZE;
-					scsi_ulto4b(lastcount, &buf[off + 8]);
-					count -= c;
-					lba +=c;
-					totalcount += c;
-				}
-
-				while (count > 0) {
-					c = min(count, softc->unmap_max_lba);
-					if (totalcount + c > softc->unmap_max_lba ||
-					    ranges >= softc->unmap_max_ranges) {
-						xpt_print(periph->path,
-						  "%s issuing short delete %ld > %ld"
-						  "|| %d >= %d",
-						  da_delete_method_desc[softc->delete_method],
-						  totalcount + c, softc->unmap_max_lba,
-						  ranges, softc->unmap_max_ranges);
-						break;
-					}
-					off = (ranges * UNMAP_RANGE_SIZE) +
-					      UNMAP_HEAD_SIZE;
-					scsi_u64to8b(lba, &buf[off + 0]);
-					scsi_ulto4b(c, &buf[off + 8]);
-					lba += c;
-					totalcount += c;
-					ranges++;
-					count -= c;
-					lastcount = c;
-				}
-				lastlba = lba;
-				bp1 = bioq_first(&softc->delete_queue);
-				if (bp1 == NULL ||
-				    ranges >= softc->unmap_max_ranges ||
-				    totalcount + bp1->bio_bcount /
-				     softc->params.secsize > softc->unmap_max_lba)
-					break;
-			} while (1);
-			scsi_ulto2b(ranges * 16 + 6, &buf[0]);
-			scsi_ulto2b(ranges * 16, &buf[2]);
-
-			scsi_unmap(&start_ccb->csio,
-					/*retries*/da_retry_count,
-					/*cbfcnp*/dadone,
-					/*tag_action*/MSG_SIMPLE_Q_TAG,
-					/*byte2*/0,
-					/*data_ptr*/ buf,
-					/*dxfer_len*/ ranges * 16 + 8,
-					/*sense_len*/SSD_FULL_SIZE,
-					da_default_timeout * 1000);
-			start_ccb->ccb_h.ccb_state = DA_CCB_DELETE;
-			goto out;
-		    } else if (softc->delete_method == DA_DELETE_ATA_TRIM) {
-				uint8_t *buf = softc->unmap_buf;
-				uint64_t lastlba = (uint64_t)-1;
-				uint32_t lastcount = 0, c, requestcount;
-				int ranges = 0, off, block_count;
-
-				softc->delete_running = 1;
-				bzero(softc->unmap_buf, sizeof(softc->unmap_buf));
-				bp1 = bp;
-				do {
-					bioq_remove(&softc->delete_queue, bp1);
-					if (bp1 != bp)
-						bioq_insert_tail(&softc->delete_run_queue, bp1);
-					lba = bp1->bio_pblkno;
-					count = bp1->bio_bcount / softc->params.secsize;
-					requestcount = count;
-
-					/* Try to extend the previous range. */
-					if (lba == lastlba) {
-						c = min(count, ATA_DSM_RANGE_MAX - lastcount);
-						lastcount += c;
-						off = (ranges - 1) * 8;
-						buf[off + 6] = lastcount & 0xff;
-						buf[off + 7] = (lastcount >> 8) & 0xff;
-						count -= c;
-						lba += c;
-					}
-
-					while (count > 0) {
-						c = min(count, ATA_DSM_RANGE_MAX);
-						off = ranges * 8;
-
-						buf[off + 0] = lba & 0xff;
-						buf[off + 1] = (lba >> 8) & 0xff;
-						buf[off + 2] = (lba >> 16) & 0xff;
-						buf[off + 3] = (lba >> 24) & 0xff;
-						buf[off + 4] = (lba >> 32) & 0xff;
-						buf[off + 5] = (lba >> 40) & 0xff;
-						buf[off + 6] = c & 0xff;
-						buf[off + 7] = (c >> 8) & 0xff;
-						lba += c;
-						ranges++;
-						count -= c;
-						lastcount = c;
-						if (count != 0 && ranges == softc->trim_max_ranges) {
-							xpt_print(periph->path,
-							  "%s issuing short delete %ld > %ld",
-							  da_delete_method_desc[softc->delete_method],
-							  requestcount,
-							  (softc->trim_max_ranges - ranges) *
-							  ATA_DSM_RANGE_MAX);
-							break;
-						}
-					}
-					lastlba = lba;
-					bp1 = bioq_first(&softc->delete_queue);
-					if (bp1 == NULL ||
-					    bp1->bio_bcount / softc->params.secsize >
-					    (softc->trim_max_ranges - ranges) *
-						    ATA_DSM_RANGE_MAX)
-						break;
-				} while (1);
-
-				block_count = (ranges + ATA_DSM_BLK_RANGES - 1) /
-					      ATA_DSM_BLK_RANGES;
-				scsi_ata_trim(&start_ccb->csio,
-						/*retries*/da_retry_count,
-						/*cbfcnp*/dadone,
-						/*tag_action*/MSG_SIMPLE_Q_TAG,
-						block_count,
-						/*data_ptr*/buf,
-						/*dxfer_len*/block_count * ATA_DSM_BLK_SIZE,
-						/*sense_len*/SSD_FULL_SIZE,
-						da_default_timeout * 1000);
-				start_ccb->ccb_h.ccb_state = DA_CCB_DELETE;
+			if (softc->delete_func != NULL) {
+				softc->delete_func(periph, start_ccb, bp);
 				goto out;
-		    } else if (softc->delete_method == DA_DELETE_ZERO ||
-			       softc->delete_method == DA_DELETE_WS10 ||
-			       softc->delete_method == DA_DELETE_WS16) {
-			/*
-			 * We calculate ws_max_blks here based off d_delmaxsize instead
-			 * of using softc->ws_max_blks as it is absolute max for the
-			 * device not the protocol max which may well be lower
-			 */
-			uint64_t ws_max_blks;
-			ws_max_blks = softc->disk->d_delmaxsize / softc->params.secsize;
-			softc->delete_running = 1;
-			lba = bp->bio_pblkno;
-			count = 0;
-			bp1 = bp;
-			do {
-				bioq_remove(&softc->delete_queue, bp1);
-				if (bp1 != bp)
-					bioq_insert_tail(&softc->delete_run_queue, bp1);
-				count += bp1->bio_bcount / softc->params.secsize;
-				if (count > ws_max_blks) {
-					count = min(count, ws_max_blks);
-					xpt_print(periph->path,
-					  "%s issuing short delete %ld > %ld",
-					  da_delete_method_desc[softc->delete_method],
-					  count, ws_max_blks);
-					break;
-				}
-				bp1 = bioq_first(&softc->delete_queue);
-				if (bp1 == NULL ||
-				    lba + count != bp1->bio_pblkno ||
-				    count + bp1->bio_bcount /
-				     softc->params.secsize > ws_max_blks)
-					break;
-			} while (1);
-
-			scsi_write_same(&start_ccb->csio,
-					/*retries*/da_retry_count,
-					/*cbfcnp*/dadone,
-					/*tag_action*/MSG_SIMPLE_Q_TAG,
-					/*byte2*/softc->delete_method ==
-					    DA_DELETE_ZERO ? 0 : SWS_UNMAP,
-					softc->delete_method ==
-					    DA_DELETE_WS16 ? 16 : 10,
-					/*lba*/lba,
-					/*block_count*/count,
-					/*data_ptr*/ __DECONST(void *,
-					    zero_region),
-					/*dxfer_len*/ softc->params.secsize,
-					/*sense_len*/SSD_FULL_SIZE,
-					da_default_timeout * 1000);
-			start_ccb->ccb_h.ccb_state = DA_CCB_DELETE;
-			goto out;
-		    } else {
-			bioq_flush(&softc->delete_queue, NULL, 0);
-			/* FALLTHROUGH */
-		    }
+			} else {
+				bioq_flush(&softc->delete_queue, NULL, 0);
+				/* FALLTHROUGH */
+			}
 		}
 
 		/* Run regular command. */
@@ -2703,6 +2500,240 @@ out:
 	}
 }
 
+/*
+ * In each of the methods below, while its the caller's
+ * responsibility to ensure the request will fit into a
+ * single device request, we might have changed the delete
+ * method due to the device incorrectly advertising either
+ * its supported methods or limits.
+ * 
+ * To prevent this causing further issues we validate the
+ * against the methods limits, and warn which would
+ * otherwise be unnecessary.
+ */
+static void
+da_delete_unmap(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
+{
+	struct da_softc *softc = (struct da_softc *)periph->softc;;
+	struct bio *bp1;
+	uint8_t *buf = softc->unmap_buf;
+	uint64_t lba, lastlba = (uint64_t)-1;
+	uint64_t totalcount = 0;
+	uint64_t count;
+	uint32_t lastcount = 0, c;
+	uint32_t off, ranges = 0;
+
+	/*
+	 * Currently this doesn't take the UNMAP
+	 * Granularity and Granularity Alignment
+	 * fields into account.
+	 *
+	 * This could result in both unoptimal unmap
+	 * requests as as well as UNMAP calls unmapping
+	 * fewer LBA's than requested.
+	 */
+
+	softc->delete_running = 1;
+	bzero(softc->unmap_buf, sizeof(softc->unmap_buf));
+	bp1 = bp;
+	do {
+		bioq_remove(&softc->delete_queue, bp1);
+		if (bp1 != bp)
+			bioq_insert_tail(&softc->delete_run_queue, bp1);
+		lba = bp1->bio_pblkno;
+		count = bp1->bio_bcount / softc->params.secsize;
+
+		/* Try to extend the previous range. */
+		if (lba == lastlba) {
+			c = min(count, softc->unmap_max_lba - lastcount);
+			lastcount += c;
+			off = ((ranges - 1) * UNMAP_RANGE_SIZE) +
+			      UNMAP_HEAD_SIZE;
+			scsi_ulto4b(lastcount, &buf[off + 8]);
+			count -= c;
+			lba +=c;
+			totalcount += c;
+		}
+
+		while (count > 0) {
+			c = min(count, softc->unmap_max_lba);
+			if (totalcount + c > softc->unmap_max_lba ||
+			    ranges >= softc->unmap_max_ranges) {
+				xpt_print(periph->path,
+				    "%s issuing short delete %ld > %ld"
+				    "|| %d >= %d",
+				    da_delete_method_desc[softc->delete_method],
+				    totalcount + c, softc->unmap_max_lba,
+				    ranges, softc->unmap_max_ranges);
+				break;
+			}
+			off = (ranges * UNMAP_RANGE_SIZE) + UNMAP_HEAD_SIZE;
+			scsi_u64to8b(lba, &buf[off + 0]);
+			scsi_ulto4b(c, &buf[off + 8]);
+			lba += c;
+			totalcount += c;
+			ranges++;
+			count -= c;
+			lastcount = c;
+		}
+		lastlba = lba;
+		bp1 = bioq_first(&softc->delete_queue);
+		if (bp1 == NULL || ranges >= softc->unmap_max_ranges ||
+		    totalcount + bp1->bio_bcount /
+		    softc->params.secsize > softc->unmap_max_lba)
+			break;
+	} while (1);
+	scsi_ulto2b(ranges * 16 + 6, &buf[0]);
+	scsi_ulto2b(ranges * 16, &buf[2]);
+
+	scsi_unmap(&ccb->csio,
+		   /*retries*/da_retry_count,
+		   /*cbfcnp*/dadone,
+		   /*tag_action*/MSG_SIMPLE_Q_TAG,
+		   /*byte2*/0,
+		   /*data_ptr*/ buf,
+		   /*dxfer_len*/ ranges * 16 + 8,
+		   /*sense_len*/SSD_FULL_SIZE,
+		   da_default_timeout * 1000);
+	ccb->ccb_h.ccb_state = DA_CCB_DELETE;
+}
+
+static void
+da_delete_trim(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
+{
+	struct da_softc *softc = (struct da_softc *)periph->softc;
+	struct bio *bp1;
+	uint8_t *buf = softc->unmap_buf;
+	uint64_t lastlba = (uint64_t)-1;
+	uint64_t count;
+	uint64_t lba;
+	uint32_t lastcount = 0, c, requestcount;
+	int ranges = 0, off, block_count;
+
+	softc->delete_running = 1;
+	bzero(softc->unmap_buf, sizeof(softc->unmap_buf));
+	bp1 = bp;
+	do {
+		bioq_remove(&softc->delete_queue, bp1);
+		if (bp1 != bp)
+			bioq_insert_tail(&softc->delete_run_queue, bp1);
+		lba = bp1->bio_pblkno;
+		count = bp1->bio_bcount / softc->params.secsize;
+		requestcount = count;
+
+		/* Try to extend the previous range. */
+		if (lba == lastlba) {
+			c = min(count, ATA_DSM_RANGE_MAX - lastcount);
+			lastcount += c;
+			off = (ranges - 1) * 8;
+			buf[off + 6] = lastcount & 0xff;
+			buf[off + 7] = (lastcount >> 8) & 0xff;
+			count -= c;
+			lba += c;
+		}
+
+		while (count > 0) {
+			c = min(count, ATA_DSM_RANGE_MAX);
+			off = ranges * 8;
+
+			buf[off + 0] = lba & 0xff;
+			buf[off + 1] = (lba >> 8) & 0xff;
+			buf[off + 2] = (lba >> 16) & 0xff;
+			buf[off + 3] = (lba >> 24) & 0xff;
+			buf[off + 4] = (lba >> 32) & 0xff;
+			buf[off + 5] = (lba >> 40) & 0xff;
+			buf[off + 6] = c & 0xff;
+			buf[off + 7] = (c >> 8) & 0xff;
+			lba += c;
+			ranges++;
+			count -= c;
+			lastcount = c;
+			if (count != 0 && ranges == softc->trim_max_ranges) {
+				xpt_print(periph->path,
+				    "%s issuing short delete %ld > %ld",
+				    da_delete_method_desc[softc->delete_method],
+				    requestcount,
+				    (softc->trim_max_ranges - ranges) *
+				    ATA_DSM_RANGE_MAX);
+				break;
+			}
+		}
+		lastlba = lba;
+		bp1 = bioq_first(&softc->delete_queue);
+		if (bp1 == NULL || bp1->bio_bcount / softc->params.secsize >
+		    (softc->trim_max_ranges - ranges) * ATA_DSM_RANGE_MAX)
+			break;
+	} while (1);
+
+	block_count = (ranges + ATA_DSM_BLK_RANGES - 1) / ATA_DSM_BLK_RANGES;
+	scsi_ata_trim(&ccb->csio,
+		      /*retries*/da_retry_count,
+		      /*cbfcnp*/dadone,
+		      /*tag_action*/MSG_SIMPLE_Q_TAG,
+		      block_count,
+		      /*data_ptr*/buf,
+		      /*dxfer_len*/block_count * ATA_DSM_BLK_SIZE,
+		      /*sense_len*/SSD_FULL_SIZE,
+		      da_default_timeout * 1000);
+	ccb->ccb_h.ccb_state = DA_CCB_DELETE;
+}
+
+/*
+ * We calculate ws_max_blks here based off d_delmaxsize instead
+ * of using softc->ws_max_blks as it is absolute max for the
+ * device not the protocol max which may well be lower
+ */
+static void
+da_delete_ws(struct cam_periph *periph, union ccb *ccb, struct bio *bp)
+{
+	struct da_softc *softc;
+	struct bio *bp1;
+	uint64_t ws_max_blks;
+	uint64_t lba;
+	uint64_t count; /* forward compat with WS32 */
+
+	softc = (struct da_softc *)periph->softc;
+	ws_max_blks = softc->disk->d_delmaxsize / softc->params.secsize;
+	softc->delete_running = 1;
+	lba = bp->bio_pblkno;
+	count = 0;
+	bp1 = bp;
+	do {
+		bioq_remove(&softc->delete_queue, bp1);
+		if (bp1 != bp)
+			bioq_insert_tail(&softc->delete_run_queue, bp1);
+		count += bp1->bio_bcount / softc->params.secsize;
+		if (count > ws_max_blks) {
+			count = min(count, ws_max_blks);
+			xpt_print(periph->path,
+			    "%s issuing short delete %ld > %ld",
+			    da_delete_method_desc[softc->delete_method],
+			    count, ws_max_blks);
+			break;
+		}
+		bp1 = bioq_first(&softc->delete_queue);
+		if (bp1 == NULL || lba + count != bp1->bio_pblkno ||
+		    count + bp1->bio_bcount /
+		    softc->params.secsize > ws_max_blks)
+			break;
+	} while (1);
+
+	scsi_write_same(&ccb->csio,
+			/*retries*/da_retry_count,
+			/*cbfcnp*/dadone,
+			/*tag_action*/MSG_SIMPLE_Q_TAG,
+			/*byte2*/softc->delete_method ==
+			    DA_DELETE_ZERO ? 0 : SWS_UNMAP,
+			softc->delete_method == DA_DELETE_WS16 ? 16 : 10,
+			/*lba*/lba,
+			/*block_count*/count,
+			/*data_ptr*/ __DECONST(void *, zero_region),
+			/*dxfer_len*/ softc->params.secsize,
+			/*sense_len*/SSD_FULL_SIZE,
+			da_default_timeout * 1000);
+	ccb->ccb_h.ccb_state = DA_CCB_DELETE;
+}
+
 static int
 cmd6workaround(union ccb *ccb)
 {

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 02:36:01 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 152AB61D;
 Fri, 12 Jul 2013 02:36:01 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 06DEA12C0;
 Fri, 12 Jul 2013 02:36:01 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C2a0BI018968;
 Fri, 12 Jul 2013 02:36:00 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C2a0nQ018966;
 Fri, 12 Jul 2013 02:36:00 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307120236.r6C2a0nQ018966@svn.freebsd.org>
From: Hiroki Sato 
Date: Fri, 12 Jul 2013 02:36:00 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253247 - head/lib/libgeom
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 02:36:01 -0000

Author: hrs
Date: Fri Jul 12 02:36:00 2013
New Revision: 253247
URL: http://svnweb.freebsd.org/changeset/base/253247

Log:
  Use strtoumax() instead of strtoul() for id/ref attr in XML elements.
  This improves compatibility when running an ILP32 binary on LP64 kernel.
  
  Spotted by:	gjb

Modified:
  head/lib/libgeom/geom_xml2tree.c

Modified: head/lib/libgeom/geom_xml2tree.c
==============================================================================
--- head/lib/libgeom/geom_xml2tree.c	Fri Jul 12 02:28:35 2013	(r253246)
+++ head/lib/libgeom/geom_xml2tree.c	Fri Jul 12 02:36:00 2013	(r253247)
@@ -75,10 +75,10 @@ StartElement(void *userData, const char 
 	ref = NULL;
 	for (i = 0; attr[i] != NULL; i += 2) {
 		if (!strcmp(attr[i], "id")) {
-			id = (void *)strtoul(attr[i + 1], NULL, 0);
+			id = (void *)strtoumax(attr[i + 1], NULL, 0);
 			mt->nident++;
 		} else if (!strcmp(attr[i], "ref")) {
-			ref = (void *)strtoul(attr[i + 1], NULL, 0);
+			ref = (void *)strtoumax(attr[i + 1], NULL, 0);
 		} else
 			printf("%*.*s[%s = %s]\n",
 			    mt->level + 1, mt->level + 1, "",

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 04:22:47 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 7A0D7215;
 Fri, 12 Jul 2013 04:22:47 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 6CB1518B1;
 Fri, 12 Jul 2013 04:22:47 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C4MlwF052718;
 Fri, 12 Jul 2013 04:22:47 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C4Mlq0052717;
 Fri, 12 Jul 2013 04:22:47 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307120422.r6C4Mlq0052717@svn.freebsd.org>
From: Hiroki Sato 
Date: Fri, 12 Jul 2013 04:22:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253249 - head/lib/libgeom
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 04:22:47 -0000

Author: hrs
Date: Fri Jul 12 04:22:46 2013
New Revision: 253249
URL: http://svnweb.freebsd.org/changeset/base/253249

Log:
  Revert r253247.  This change should be improved based on a lesson learnt
  from r233646 first.
  
  Pointed out by:	jmallett

Modified:
  head/lib/libgeom/geom_xml2tree.c

Modified: head/lib/libgeom/geom_xml2tree.c
==============================================================================
--- head/lib/libgeom/geom_xml2tree.c	Fri Jul 12 02:42:37 2013	(r253248)
+++ head/lib/libgeom/geom_xml2tree.c	Fri Jul 12 04:22:46 2013	(r253249)
@@ -75,10 +75,10 @@ StartElement(void *userData, const char 
 	ref = NULL;
 	for (i = 0; attr[i] != NULL; i += 2) {
 		if (!strcmp(attr[i], "id")) {
-			id = (void *)strtoumax(attr[i + 1], NULL, 0);
+			id = (void *)strtoul(attr[i + 1], NULL, 0);
 			mt->nident++;
 		} else if (!strcmp(attr[i], "ref")) {
-			ref = (void *)strtoumax(attr[i + 1], NULL, 0);
+			ref = (void *)strtoul(attr[i + 1], NULL, 0);
 		} else
 			printf("%*.*s[%s = %s]\n",
 			    mt->level + 1, mt->level + 1, "",

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 06:03:26 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 37149C1D;
 Fri, 12 Jul 2013 06:03:26 +0000 (UTC) (envelope-from jh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 29D051BD3;
 Fri, 12 Jul 2013 06:03:26 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C63Qem081505;
 Fri, 12 Jul 2013 06:03:26 GMT (envelope-from jh@svn.freebsd.org)
Received: (from jh@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C63QKd081504;
 Fri, 12 Jul 2013 06:03:26 GMT (envelope-from jh@svn.freebsd.org)
Message-Id: <201307120603.r6C63QKd081504@svn.freebsd.org>
From: Jaakko Heinonen 
Date: Fri, 12 Jul 2013 06:03:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253252 - head/sbin/devfs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 06:03:26 -0000

Author: jh
Date: Fri Jul 12 06:03:25 2013
New Revision: 253252
URL: http://svnweb.freebsd.org/changeset/base/253252

Log:
  Clarify how "hide" and "unhide" commands work on directories.

Modified:
  head/sbin/devfs/devfs.8

Modified: head/sbin/devfs/devfs.8
==============================================================================
--- head/sbin/devfs/devfs.8	Fri Jul 12 05:58:54 2013	(r253251)
+++ head/sbin/devfs/devfs.8	Fri Jul 12 06:03:25 2013	(r253252)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd April 21, 2013
+.Dd July 12, 2013
 .Dt DEVFS 8
 .Os
 .Sh NAME
@@ -190,6 +190,7 @@ Nodes may later be revived manually with
 or with the
 .Cm unhide
 action.
+Hiding a directory node effectively hides all of its child nodes.
 .It Cm include Ar ruleset
 Apply all the rules in ruleset number
 .Ar ruleset
@@ -213,6 +214,8 @@ which may be a user name
 or number.
 .It Cm unhide
 Unhide the node.
+If the node resides in a subdirectory,
+all parent directory nodes must be visible to be able to access the node.
 .El
 .Sh IMPLEMENTATION NOTES
 Rulesets are created by the kernel at the first reference

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 06:54:29 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D9B51169;
 Fri, 12 Jul 2013 06:54:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id CC3401E89;
 Fri, 12 Jul 2013 06:54:29 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C6sTuP096025;
 Fri, 12 Jul 2013 06:54:29 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C6sTm3096024;
 Fri, 12 Jul 2013 06:54:29 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307120654.r6C6sTm3096024@svn.freebsd.org>
From: Hiroki Sato 
Date: Fri, 12 Jul 2013 06:54:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253253 - head/usr.sbin/ypserv
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 06:54:29 -0000

Author: hrs
Date: Fri Jul 12 06:54:29 2013
New Revision: 253253
URL: http://svnweb.freebsd.org/changeset/base/253253

Log:
  Fix a wrong memcpy of struct sockaddr.
  
  Spotted by:	dt71@gmx.com

Modified:
  head/usr.sbin/ypserv/yp_main.c

Modified: head/usr.sbin/ypserv/yp_main.c
==============================================================================
--- head/usr.sbin/ypserv/yp_main.c	Fri Jul 12 06:03:25 2013	(r253252)
+++ head/usr.sbin/ypserv/yp_main.c	Fri Jul 12 06:54:29 2013	(r253253)
@@ -329,9 +329,8 @@ create_service(const int sock, const str
 					return -1;
 				}
 				memset(slep, 0, sizeof(*slep));
-				memcpy(&slep->sle_ss,
-				    (struct sockaddr *)(res->ai_addr),
-				    sizeof(res->ai_addr));
+				memcpy(&slep->sle_ss, res->ai_addr,
+				    res->ai_addrlen);
 				slep->sle_sock = s;
 				SLIST_INSERT_HEAD(&sle_head, slep, sle_next);
 

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 07:43:56 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id B9596FF1;
 Fri, 12 Jul 2013 07:43:56 +0000 (UTC)
 (envelope-from andre@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id AC26011EB;
 Fri, 12 Jul 2013 07:43:56 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C7huDB010775;
 Fri, 12 Jul 2013 07:43:56 GMT (envelope-from andre@svn.freebsd.org)
Received: (from andre@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C7hu2w010773;
 Fri, 12 Jul 2013 07:43:56 GMT (envelope-from andre@svn.freebsd.org)
Message-Id: <201307120743.r6C7hu2w010773@svn.freebsd.org>
From: Andre Oppermann 
Date: Fri, 12 Jul 2013 07:43:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253254 - head/sys/netinet
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 07:43:56 -0000

Author: andre
Date: Fri Jul 12 07:43:56 2013
New Revision: 253254
URL: http://svnweb.freebsd.org/changeset/base/253254

Log:
  Unbreak VIMAGE by correctly naming the vnet pointer in struct tcp_syncache.
  
  Reported by:	trociny, rodrigc

Modified:
  head/sys/netinet/tcp_syncache.h

Modified: head/sys/netinet/tcp_syncache.h
==============================================================================
--- head/sys/netinet/tcp_syncache.h	Fri Jul 12 06:54:29 2013	(r253253)
+++ head/sys/netinet/tcp_syncache.h	Fri Jul 12 07:43:56 2013	(r253254)
@@ -118,7 +118,7 @@ struct tcp_syncache {
 	u_int	cache_limit;
 	u_int	rexmt_limit;
 	u_int	hash_secret;
-	struct vnet *sch_vnet;
+	struct vnet *vnet;
 	struct syncookie_secret secret;
 };
 

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 07:47:23 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id F11D4404
 for ; Fri, 12 Jul 2013 07:47:23 +0000 (UTC)
 (envelope-from andre@freebsd.org)
Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2])
 by mx1.freebsd.org (Postfix) with ESMTP id 919671259
 for ; Fri, 12 Jul 2013 07:47:23 +0000 (UTC)
Received: (qmail 95450 invoked from network); 12 Jul 2013 08:37:49 -0000
Received: from c00l3r.networx.ch (HELO [127.0.0.1]) ([62.48.2.2])
 (envelope-sender )
 by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP
 for ; 12 Jul 2013 08:37:49 -0000
Message-ID: <51DFB484.1000703@freebsd.org>
Date: Fri, 12 Jul 2013 09:47:16 +0200
From: Andre Oppermann 
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
 rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Andre Oppermann 
Subject: Re: svn commit: r253254 - head/sys/netinet
References: <201307120743.r6C7hu2w010773@svn.freebsd.org>
In-Reply-To: <201307120743.r6C7hu2w010773@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
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 07:47:24 -0000

On 12.07.2013 09:43, Andre Oppermann wrote:
> Author: andre
> Date: Fri Jul 12 07:43:56 2013
> New Revision: 253254
> URL: http://svnweb.freebsd.org/changeset/base/253254
>
> Log:
>    Unbreak VIMAGE by correctly naming the vnet pointer in struct tcp_syncache.
>
>    Reported by:	trociny, rodrigc

Sorry for the breakage.  I'm extending my test protocol to include VIMAGE,
INET-only and INET6-only builds.

-- 
Andre


From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 08:03:10 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id C33BC845;
 Fri, 12 Jul 2013 08:03:10 +0000 (UTC)
 (envelope-from rodrigc@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 9B7DF130D;
 Fri, 12 Jul 2013 08:03:10 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C83A9B016524;
 Fri, 12 Jul 2013 08:03:10 GMT (envelope-from rodrigc@svn.freebsd.org)
Received: (from rodrigc@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C83ACp016523;
 Fri, 12 Jul 2013 08:03:10 GMT (envelope-from rodrigc@svn.freebsd.org)
Message-Id: <201307120803.r6C83ACp016523@svn.freebsd.org>
From: Craig Rodrigues 
Date: Fri, 12 Jul 2013 08:03:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 08:03:10 -0000

Author: rodrigc
Date: Fri Jul 12 08:03:10 2013
New Revision: 253255
URL: http://svnweb.freebsd.org/changeset/base/253255

Log:
  PR: kern/168520
  Submitted by: "YAMAMOTO, Shigeru" 
  Reviewed by: adrian
  
  In PC-BSD 9.1, VIMAGE is enabled in the kernel config.
  For laptops with Bluetooth capability, such as the HP Elitebook 8460p,
  the kernel will panic upon bootup, because curthread->td_vnet
  is not initialized.
  
  Properly initialize curthread->td_vnet when initializing the Bluetooth stack.
  
  This allows laptops such as the HP Elitebook 8460p laptop
  to properly boot with VIMAGE kernels.

Modified:
  head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c

Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
==============================================================================
--- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c	Fri Jul 12 07:43:56 2013	(r253254)
+++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c	Fri Jul 12 08:03:10 2013	(r253255)
@@ -109,7 +109,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 #include "usbdevs.h"
 #include 
@@ -123,6 +125,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -487,13 +490,14 @@ ubt_attach(device_t dev)
 
 	sc->sc_dev = dev;
 	sc->sc_debug = NG_UBT_WARN_LEVEL;
-
+	CURVNET_SET(TD_TO_VNET(curthread));
 	/* 
 	 * Create Netgraph node
 	 */
 
 	if (ng_make_node_common(&typestruct, &sc->sc_node) != 0) {
 		UBT_ALERT(sc, "could not create Netgraph node\n");
+		CURVNET_RESTORE();
 		return (ENXIO);
 	}
 
@@ -501,10 +505,12 @@ ubt_attach(device_t dev)
 	if (ng_name_node(sc->sc_node, device_get_nameunit(dev)) != 0) {
 		UBT_ALERT(sc, "could not name Netgraph node\n");
 		NG_NODE_UNREF(sc->sc_node);
+		CURVNET_RESTORE();
 		return (ENXIO);
 	}
 	NG_NODE_SET_PRIVATE(sc->sc_node, sc);
 	NG_NODE_FORCE_WRITER(sc->sc_node);
+	CURVNET_RESTORE();
 
 	/*
 	 * Initialize device softc structure
@@ -631,8 +637,10 @@ ubt_detach(device_t dev)
 	/* Destroy Netgraph node */
 	if (node != NULL) {
 		sc->sc_node = NULL;
+		CURVNET_SET(node->nd_vnet);
 		NG_NODE_REALLY_DIE(node);
 		ng_rmnode_self(node);
+		CURVNET_RESTORE();
 	}
 
 	/* Make sure ubt_task in gone */

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 08:07:01 2013
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 09EB09E3;
 Fri, 12 Jul 2013 08:07:01 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au
 [211.29.132.246])
 by mx1.freebsd.org (Postfix) with ESMTP id 548921331;
 Fri, 12 Jul 2013 08:07:00 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id C32B64224C6;
 Fri, 12 Jul 2013 18:06:48 +1000 (EST)
Date: Fri, 12 Jul 2013 18:06:47 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: David Chisnall 
Subject: Re: svn commit: r253215 - head/lib/msun/src
In-Reply-To: <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
Message-ID: <20130712173951.R5131@besplex.bde.org>
References: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
 <51DEFEF7.4080709@coosemans.org>
 <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=K8x6hFqI c=1 sm=1 a=hIML2bcmzLYA:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10
 a=YqRfAJJkAAAA:8 a=dE5sqkZ3J7ntajQaAuMA:9 a=CjuIK1q_8ugA:10
 a=UIDpq6-GphUA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
 Tijl Coosemans , src-committers@FreeBSD.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 08:07:01 -0000

On Thu, 11 Jul 2013, David Chisnall wrote:

> On 11 Jul 2013, at 19:52, Tijl Coosemans  wrote:
>
>> GCC doesn't support _Generic yet for -std=c11.
>
> Ugh.  Given that they also lack a fine-grained feature check mechanism, they really should not advertise support for a language dialect if they don't support it.
>>
>>> +#elif __GNUC_PREREQ__(5, 1)
>>
>> GCC 3.1?
>
> Ooops, I changed this to 5.1 to test the other code path and forgot to revert it.
>
>> Last __fpclassifyd should be __fpclassifyl.
>
> Fixed.

There are still many style bugs to fix:
- indentation of continuation lines.  It was changed from the normal 4
   spaces to 1 tab in macro definitions.  The style rule for continuation
   lines for #define's is not as clear as for statements, but math.h used
   to use 4 spaces consistently.
- whitespace before backslashes.  It is neither minimal, maximal, lines
   up the backslashes to tab boundaries, lines up the backslashes across
   macros, nor uses tabs.  It repaces formatting that uses tabs to line
   up all backslashes to the 7th tab stop.
- whitespace before macro bodies.  It was changed from the normal 1 tab
   to 1 space.  The next block of macros (for __MATH_BUILTIN_RELOPS)
   provides examples of normal formatting, and the block beginning with
   isfinite() looks really ugly in comparison.
- verbose names, and resulting ugly formatting to avoid long lines
- the x parameter is missing parentheses in the main macros starting at
   fpclassify().  __fp_type_select() supplies the necessary parentheses,
   but this is fragile.

BTW, is it really permitted for the comparison macros to evaluate their
args more than once?  This is done for the !__MATH_BUILTIN_RELOPS case.
I hoped that you replace all the inlines for isnan() by macros, but
now I can't see how to do this without using either multiple evaluation
of the arg or an unportable statement-expression.  However, the relops
already use macros that are sloppy about multiple evaluation in the
!_MATH_BUILTIN_RELOPS case, so math.h would be no more broken if it did
the same for isnan().  isnan() is just a special relop that is even
simpler than the others, but its implementation is more complicated and
10-20 times larger in math.h alone (100 times larger counting all the
compatibility cruft for it in other files).

>>> @@ -227,8 +250,6 @@ double	expm1(double);
>>> double	fma(double, double, double);
>>> double	hypot(double, double);
>>> int	ilogb(double) __pure2;
>>> -int	(isinf)(double) __pure2;
>>> -int	(isnan)(double) __pure2;
>>
>> I think they should stay for the C90 case.
>
> That would completely defeat the point of this entire exercise and be redundant unless we aim to support a compiler that only supports C90 and no GNU extensions, in which case you'll hit errors in cdefs.h, long before you get to this point in an include.

They aren't in C90.  More in another reply.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 09:14:52 2013
Return-Path: 
Delivered-To: svn-src-head@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id CEC4F675;
 Fri, 12 Jul 2013 09:14:52 +0000 (UTC)
 (envelope-from brde@optusnet.com.au)
Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au
 [211.29.132.53])
 by mx1.freebsd.org (Postfix) with ESMTP id 844711884;
 Fri, 12 Jul 2013 09:14:51 +0000 (UTC)
Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au
 (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23])
 by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id BE5E6D40A7B;
 Fri, 12 Jul 2013 19:14:39 +1000 (EST)
Date: Fri, 12 Jul 2013 19:14:39 +1000 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Tijl Coosemans 
Subject: Re: svn commit: r253215 - head/lib/msun/src
In-Reply-To: <51DF14F9.50001@coosemans.org>
Message-ID: <20130712180753.E5131@besplex.bde.org>
References: <201307111741.r6BHf5gQ060844@svn.freebsd.org>
 <51DEFEF7.4080709@coosemans.org>
 <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org>
 <51DF0FA5.4050106@coosemans.org> <51DF14F9.50001@coosemans.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Optus-CM-Score: 0
X-Optus-CM-Analysis: v=2.0 cv=Q6eKePKa c=1 sm=1 a=hIML2bcmzLYA:10
 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10
 a=YqRfAJJkAAAA:8 a=XDH_4B7L22ftifMYl1UA:9 a=CjuIK1q_8ugA:10
 a=UIDpq6-GphUA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
 src-committers@FreeBSD.org, David Chisnall ,
 Bruce Evans 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 09:14:52 -0000

On Thu, 11 Jul 2013, Tijl Coosemans wrote:

> On 2013-07-11 22:03, Tijl Coosemans wrote:
>> On 2013-07-11 21:36, David Chisnall wrote:
>>> On 11 Jul 2013, at 19:52, Tijl Coosemans  wrote:
>>>>> @@ -227,8 +250,6 @@ double	expm1(double);
>>>>> double	fma(double, double, double);
>>>>> double	hypot(double, double);
>>>>> int	ilogb(double) __pure2;
>>>>> -int	(isinf)(double) __pure2;
>>>>> -int	(isnan)(double) __pure2;
>>>>
>>>> I think they should stay for the C90 case.
>>>
>>> That would completely defeat the point of this entire exercise and be
>>> redundant unless we aim to support a compiler that only supports C90
>>> and no GNU extensions, in which case you'll hit errors in cdefs.h,
>>> long before you get to this point in an include.
>>
>> isnan(double) is part of SUSv2. It should be visible when compiling with
>> -D_XOPEN_SOURCE=500. I think you need something like this:

>> #if (__BSD_VISIBLE || __XSI_VISIBLE <= 500) && __ISO_C_VISIBLE < 1999
>> int	isinf(double) __pure2;
>> int	isnan(double) __pure2;
>> #endif
>
> Actually this:
>
> #if (__BSD_VISIBLE || (defined(__XSI_VISIBLE) && __XSI_VISIBLE <= 500)) && __ISO_C_VISIBLE < 1999

Remove the __ISO_C_VISIBLE part, since this is not in C90.  This also fixes
a style bug (long line).

How can that work?  Even you forgot to restore the parentheses around
the functions, so the above has syntax errors.  Applications would
have to use parentheses to get the functions (or not include ,
but then it doesn't matther if it doesn't declare the functions).
Applications that forget to do this will get the macros instead of the
functions.  If the arg type is double, then the macro will work the
same as the functions.  Otherwise, it has different semantics, but
usually the same result except for signaling NaNs.  But does old XSI
really specify that parentheses must be used to get isnan() (or can
be used to get an isnan() function that is specified to exist)?  Old
BSD has almost no specification for isnan(), and there probably isn't
much old BSD code that carefully prevents use of the macro using
parentheses.  isnan()'s man page actually says that 3BSD introduced
isinf() and isnan() functions, but these have been superseded by the
macros.

I noticed some more problems in the implementation of these macros
and others:
- many or all of the __pure2's in the prototypes are wrong, since even
   the classification functions can have side effects for signaling
   NaNs.  It is impossible to avoid these side effects for extern
   functions in some cases, since the ABI gives them.  I think static
   inline functions must have the same results as extern functions,
   so compilers should pessimize inline functions as necessary to
   get the same bad results, but compilers don't do that.
- classification functions are specified to convert to the semantic
   type (remove any extra precision or exponent range) before classifying.

   For example, if x is a double slightly larger than sqrt(DBL_MAX), and
   if double expressions are evaluated in extra exponent range, then x*x
   is finite with the extra range but infinite in the semantic type.  So
   isinf(x*x) is true, and the implementation
   #define isinf(x) (fabs(x) == INFINITY) is invalid.  clang on x86 gets
   __builtin_isinf(x*x) this right as a side effect of its pessimization
   of fabs() to non-inline -- parameter passing to the extern fabs()
   converts to the semantic type.  Sometimes the arg is known not to have
   extra range, so no conversion is needed.

   isnan(x) can safely skip the conversion, at least on x86, since conversion
   doesn't change the classification of NaNs.  __builtin_isnan(x*x) for
   clang on x86 skips the conversion.

   __builtin_isinfinite(x*x) for clang on x86 is a combination of the above --
   isnan() with no conversion and !isinf() with pessimal conversion via
   non-inline fabs().

I couldn't find any case where a necessary conversion is not done.  Our
implementation using functions gives the necessary conversions including
ones that are broken for signaling NaNs.  But there is no problem for
with signaling NaNs for expressions like x*x, since the result of an
expression with almost any operator in it can't be a signaling NaN.

I think C11 has new mistakes for extra precision.  It specifies that
return reduces to the semantic type, like the classification macros
are required to do for their arg.  clang -std=c11 doesn't implement
this bug for at least:

 	#include 
 	double sq(double x) { return (x*x); }
 	double sq2(double x) { return (fabs(x*x); }

On i386 without SSE2 (so extra precision), this generates the same code
as with -std=c99.  Squaring x gives extra precision and exponent range.
This is not destroyed on return, so extra precision is not defeated by
writing the squaring operation as a function.  fabs() is inlined in both
cases, so it has little effect here (no effect unless x is NaN), but I
think even C99 doesn't permit this.  If fabs() were not inline, then
the ABI would force destruction of the extra precision and range when
it is called, and I think C99 requires conversion to the semantic type
for calls.

Bruce

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 09:20:55 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id C2D9D879;
 Fri, 12 Jul 2013 09:20:55 +0000 (UTC)
 (envelope-from oleg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B4A8018BB;
 Fri, 12 Jul 2013 09:20:55 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6C9KtPX039917;
 Fri, 12 Jul 2013 09:20:55 GMT (envelope-from oleg@svn.freebsd.org)
Received: (from oleg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6C9KtET039916;
 Fri, 12 Jul 2013 09:20:55 GMT (envelope-from oleg@svn.freebsd.org)
Message-Id: <201307120920.r6C9KtET039916@svn.freebsd.org>
From: Oleg Bulyzhin 
Date: Fri, 12 Jul 2013 09:20:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253256 - head/sbin/recoverdisk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 09:20:55 -0000

Author: oleg
Date: Fri Jul 12 09:20:55 2013
New Revision: 253256
URL: http://svnweb.freebsd.org/changeset/base/253256

Log:
  Fix 'SEE ALSO' list.

Modified:
  head/sbin/recoverdisk/recoverdisk.1

Modified: head/sbin/recoverdisk/recoverdisk.1
==============================================================================
--- head/sbin/recoverdisk/recoverdisk.1	Fri Jul 12 08:03:10 2013	(r253255)
+++ head/sbin/recoverdisk/recoverdisk.1	Fri Jul 12 09:20:55 2013	(r253256)
@@ -125,9 +125,9 @@ recoverdisk -b 0 /dev/ad3 /somewhere
 .Ed
 .Sh SEE ALSO
 .Xr dd 1 ,
-.Xr ada 4,
-.Xr cam 4,
-.Xr cd 4,
+.Xr ada 4 ,
+.Xr cam 4 ,
+.Xr cd 4 ,
 .Xr da 4
 .Sh HISTORY
 The

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 10:07:21 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D3AD879A;
 Fri, 12 Jul 2013 10:07:21 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C63C11B1B;
 Fri, 12 Jul 2013 10:07:21 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CA7L26052093;
 Fri, 12 Jul 2013 10:07:21 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CA7L7F052092;
 Fri, 12 Jul 2013 10:07:21 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <201307121007.r6CA7L7F052092@svn.freebsd.org>
From: Dag-Erling Smørgrav 
Date: Fri, 12 Jul 2013 10:07:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253258 - head/tools/build/mk
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 10:07:21 -0000

Author: des
Date: Fri Jul 12 10:07:21 2013
New Revision: 253258
URL: http://svnweb.freebsd.org/changeset/base/253258

Log:
  Remove authpf-noip along with authpf.
  
  Reminded by:	delphij@

Modified:
  head/tools/build/mk/OptionalObsoleteFiles.inc

Modified: head/tools/build/mk/OptionalObsoleteFiles.inc
==============================================================================
--- head/tools/build/mk/OptionalObsoleteFiles.inc	Fri Jul 12 10:02:47 2013	(r253257)
+++ head/tools/build/mk/OptionalObsoleteFiles.inc	Fri Jul 12 10:07:21 2013	(r253258)
@@ -206,7 +206,9 @@ OLD_FILES+=usr/share/man/man8/auditd.8.g
 
 .if ${MK_AUTHPF} == no
 OLD_FILES+=usr/sbin/authpf
+OLD_FILES+=usr/sbin/authpf-noip
 OLD_FILES+=usr/share/man/man8/authpf.8.gz
+OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz
 .endif
 
 .if ${MK_BIND} == no

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 11:03:52 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 7A8B929D;
 Fri, 12 Jul 2013 11:03:52 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 6CE701D59;
 Fri, 12 Jul 2013 11:03:52 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CB3qLq068784;
 Fri, 12 Jul 2013 11:03:52 GMT
 (envelope-from theraven@svn.freebsd.org)
Received: (from theraven@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CB3qrh068782;
 Fri, 12 Jul 2013 11:03:52 GMT
 (envelope-from theraven@svn.freebsd.org)
Message-Id: <201307121103.r6CB3qrh068782@svn.freebsd.org>
From: David Chisnall 
Date: Fri, 12 Jul 2013 11:03:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253260 - head/lib/msun/src
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 11:03:52 -0000

Author: theraven
Date: Fri Jul 12 11:03:51 2013
New Revision: 253260
URL: http://svnweb.freebsd.org/changeset/base/253260

Log:
  Fix the build with C++ where __builtin_types_compatible_p is not allowed.

Modified:
  head/lib/msun/src/math.h

Modified: head/lib/msun/src/math.h
==============================================================================
--- head/lib/msun/src/math.h	Fri Jul 12 10:07:48 2013	(r253259)
+++ head/lib/msun/src/math.h	Fri Jul 12 11:03:51 2013	(r253260)
@@ -81,12 +81,13 @@ extern const union __nan_un {
 #define	FP_SUBNORMAL	0x08
 #define	FP_ZERO		0x10
 
-#if __STDC_VERSION__ >= 201112L && defined(__clang__)
+#if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \
+    __has_extension(c_generic_selections)
 #define	__fp_type_select(x, f, d, ld) _Generic((x),     \
 	float: f(x),                                    \
 	double: d(x),                                   \
 	long double: ld(x))
-#elif __GNUC_PREREQ__(3, 1)
+#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
 #define	__fp_type_select(x, f, d, ld) __builtin_choose_expr(              \
 	__builtin_types_compatible_p(__typeof(x), long double), ld(x),    \
 	__builtin_choose_expr(                                            \

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 12:18:07 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 8CC35ADD;
 Fri, 12 Jul 2013 12:18:07 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 7F83310DF;
 Fri, 12 Jul 2013 12:18:07 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CCI7sv089673;
 Fri, 12 Jul 2013 12:18:07 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CCI7tH089672;
 Fri, 12 Jul 2013 12:18:07 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307121218.r6CCI7tH089672@svn.freebsd.org>
From: Hiroki Sato 
Date: Fri, 12 Jul 2013 12:18:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253261 - head/sys/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 12:18:07 -0000

Author: hrs
Date: Fri Jul 12 12:18:07 2013
New Revision: 253261
URL: http://svnweb.freebsd.org/changeset/base/253261

Log:
  - Drop GIF_ACCEPT_REVETHIP flag by default.
  - Add IFF_MONITOR support.

Modified:
  head/sys/net/if_gif.c

Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c	Fri Jul 12 11:03:51 2013	(r253260)
+++ head/sys/net/if_gif.c	Fri Jul 12 12:18:07 2013	(r253261)
@@ -173,7 +173,7 @@ gif_clone_create(ifc, unit, params)
 	if_initname(GIF2IFP(sc), gifname, unit);
 
 	sc->encap_cookie4 = sc->encap_cookie6 = NULL;
-	sc->gif_options = GIF_ACCEPT_REVETHIP;
+	sc->gif_options = 0;
 
 	GIF2IFP(sc)->if_addrlen = 0;
 	GIF2IFP(sc)->if_mtu    = GIF_MTU;
@@ -437,6 +437,11 @@ gif_output(struct ifnet *ifp, struct mbu
 		goto end;
 	}
 #endif
+	if ((ifp->if_flags & IFF_MONITOR) != 0) {
+		error = ENETDOWN;
+		m_freem(m);
+		goto end;
+	}
 
 	/*
 	 * gif may cause infinite recursion calls when misconfigured.
@@ -551,6 +556,13 @@ gif_input(m, af, ifp)
 		bpf_mtap2(ifp->if_bpf, &af1, sizeof(af1), m);
 	}
 
+	if ((ifp->if_flags & IFF_MONITOR) != 0) {
+		ifp->if_ipackets++;
+		ifp->if_ibytes += m->m_pkthdr.len;
+		m_freem(m);
+		return;
+	}
+
 	if (ng_gif_input_p != NULL) {
 		(*ng_gif_input_p)(ifp, &m, af);
 		if (m == NULL)

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 12:36:13 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id AB184446;
 Fri, 12 Jul 2013 12:36:13 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 83638122B;
 Fri, 12 Jul 2013 12:36:13 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CCaDC4095417;
 Fri, 12 Jul 2013 12:36:13 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CCaDCW095414;
 Fri, 12 Jul 2013 12:36:13 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307121236.r6CCaDCW095414@svn.freebsd.org>
From: Hiroki Sato 
Date: Fri, 12 Jul 2013 12:36:13 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253262 - in head: lib/libc/gen sys/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 12:36:13 -0000

Author: hrs
Date: Fri Jul 12 12:36:12 2013
New Revision: 253262
URL: http://svnweb.freebsd.org/changeset/base/253262

Log:
  Add a leaf node CTL_NET.PF_ROUTE.0.AF.NET_RT_DUMP.0.FIB.  This returns
  routing table with the specified FIB number, not td->td_proc->p_fibnum.

Modified:
  head/lib/libc/gen/sysctl.3
  head/sys/net/rtsock.c

Modified: head/lib/libc/gen/sysctl.3
==============================================================================
--- head/lib/libc/gen/sysctl.3	Fri Jul 12 12:18:07 2013	(r253261)
+++ head/lib/libc/gen/sysctl.3	Fri Jul 12 12:36:12 2013	(r253262)
@@ -28,7 +28,7 @@
 .\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
 .\" $FreeBSD$
 .\"
-.Dd February 11, 2012
+.Dd May 17, 2013
 .Dt SYSCTL 3
 .Os
 .Sh NAME
@@ -547,14 +547,14 @@ The length of each message is contained 
 The third level name is a protocol number, which is currently always 0.
 The fourth level name is an address family, which may be set to 0 to
 select all address families.
-The fifth and sixth level names are as follows:
-.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent
-.It Sy "Fifth level name	Sixth level is:"
-.It "NET_RT_FLAGS	rtflags"
-.It "NET_RT_DUMP	None"
-.It "NET_RT_IFLIST	0 or if_index"
-.It "NET_RT_IFMALIST	0 or if_index"
-.It "NET_RT_IFLISTL	0 or if_index"
+The fifth, sixth, and seventh level names are as follows:
+.Bl -column "Fifth level	" "Sixth level	" -offset indent
+.It Sy "Fifth level	Sixth level	Seventh level"
+.It "NET_RT_FLAGS	rtflags			None"
+.It "NET_RT_DUMP	None			None or fib number"
+.It "NET_RT_IFLIST	0 or if_index		None"
+.It "NET_RT_IFMALIST	0 or if_index		None"
+.It "NET_RT_IFLISTL	0 or if_index		None"
 .El
 .Pp
 The

Modified: head/sys/net/rtsock.c
==============================================================================
--- head/sys/net/rtsock.c	Fri Jul 12 12:18:07 2013	(r253261)
+++ head/sys/net/rtsock.c	Fri Jul 12 12:36:12 2013	(r253262)
@@ -1905,6 +1905,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
 	u_int	namelen = arg2;
 	struct radix_node_head *rnh = NULL; /* silence compiler. */
 	int	i, lim, error = EINVAL;
+	int	fib = 0;
 	u_char	af;
 	struct	walkarg w;
 
@@ -1912,7 +1913,17 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
 	namelen--;
 	if (req->newptr)
 		return (EPERM);
-	if (namelen != 3)
+	if (name[1] == NET_RT_DUMP) {
+		if (namelen == 3)
+			fib = req->td->td_proc->p_fibnum;
+		else if (namelen == 4)
+			fib = (name[3] == -1) ?
+			    req->td->td_proc->p_fibnum : name[3];
+		else
+			return ((namelen < 3) ? EISDIR : ENOTDIR);
+		if (fib < 0 || fib >= rt_numfibs)
+			return (EINVAL);
+	} else if (namelen != 3)
 		return ((namelen < 3) ? EISDIR : ENOTDIR);
 	af = name[0];
 	if (af > AF_MAX)
@@ -1951,7 +1962,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
 		 * take care of routing entries
 		 */
 		for (error = 0; error == 0 && i <= lim; i++) {
-			rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i);
+			rnh = rt_tables_get_rnh(fib, i);
 			if (rnh != NULL) {
 				RADIX_NODE_HEAD_RLOCK(rnh); 
 			    	error = rnh->rnh_walktree(rnh,

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 14:24:54 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 02D0BB93;
 Fri, 12 Jul 2013 14:24:54 +0000 (UTC)
 (envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id D8BEF195E;
 Fri, 12 Jul 2013 14:24:53 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CEOrnE028219;
 Fri, 12 Jul 2013 14:24:53 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CEOqZL028212;
 Fri, 12 Jul 2013 14:24:52 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <201307121424.r6CEOqZL028212@svn.freebsd.org>
From: Marius Strobl 
Date: Fri, 12 Jul 2013 14:24:52 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253266 - in head: lib/libc/sparc64/gen
 lib/libthread_db/arch/sparc64 sys/sparc64/include sys/sparc64/sparc64
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 14:24:54 -0000

Author: marius
Date: Fri Jul 12 14:24:52 2013
New Revision: 253266
URL: http://svnweb.freebsd.org/changeset/base/253266

Log:
  Prefix the alias macros for members of struct __mcontext with an underscore
  in order to avoid a clash in the net80211 code.

Modified:
  head/lib/libc/sparc64/gen/makecontext.c
  head/lib/libc/sparc64/gen/signalcontext.c
  head/lib/libthread_db/arch/sparc64/libpthread_md.c
  head/sys/sparc64/include/ucontext.h
  head/sys/sparc64/sparc64/machdep.c

Modified: head/lib/libc/sparc64/gen/makecontext.c
==============================================================================
--- head/lib/libc/sparc64/gen/makecontext.c	Fri Jul 12 13:52:27 2013	(r253265)
+++ head/lib/libc/sparc64/gen/makecontext.c	Fri Jul 12 14:24:52 2013	(r253266)
@@ -54,12 +54,12 @@ __makecontext(ucontext_t *ucp, void (*st
 
 	mc = &ucp->uc_mcontext;
 	if (ucp == NULL ||
-	    (mc->mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION)
+	    (mc->_mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION)
 		return;
 	if ((argc < 0) || (argc > 6) ||
 	    (ucp->uc_stack.ss_sp == NULL) ||
 	    (ucp->uc_stack.ss_size < MINSIGSTKSZ)) {
-		mc->mc_flags = 0;
+		mc->_mc_flags = 0;
 		return;
 	}
 	mc = &ucp->uc_mcontext;
@@ -71,8 +71,8 @@ __makecontext(ucontext_t *ucp, void (*st
 	mc->mc_global[1] = (uint64_t)start;
 	mc->mc_global[2] = (uint64_t)ucp;
 	mc->mc_out[6] = sp - SPOFF - sizeof(struct frame);
-	mc->mc_tnpc = (uint64_t)_ctx_start + 4;
-	mc->mc_tpc = (uint64_t)_ctx_start;
+	mc->_mc_tnpc = (uint64_t)_ctx_start + 4;
+	mc->_mc_tpc = (uint64_t)_ctx_start;
 }
 
 void
@@ -82,7 +82,7 @@ _ctx_done(ucontext_t *ucp)
 	if (ucp->uc_link == NULL)
 		exit(0);
 	else {
-		ucp->uc_mcontext.mc_flags = 0;
+		ucp->uc_mcontext._mc_flags = 0;
 		setcontext((const ucontext_t *)ucp->uc_link);
 		abort();
 	}

Modified: head/lib/libc/sparc64/gen/signalcontext.c
==============================================================================
--- head/lib/libc/sparc64/gen/signalcontext.c	Fri Jul 12 13:52:27 2013	(r253265)
+++ head/lib/libc/sparc64/gen/signalcontext.c	Fri Jul 12 14:24:52 2013	(r253266)
@@ -52,7 +52,7 @@ __signalcontext(ucontext_t *ucp, int sig
 	mcontext_t *mc;
 
 	mc = &ucp->uc_mcontext;
-	sfp = (struct sigframe *)(mc->mc_sp + SPOFF) - 1;
+	sfp = (struct sigframe *)(mc->_mc_sp + SPOFF) - 1;
 	fp = (struct frame *)sfp - 1;
 
 	bzero(fp, sizeof(*fp));
@@ -67,8 +67,8 @@ __signalcontext(ucontext_t *ucp, int sig
 	mc->mc_out[1] = (uint64_t)&sfp->sf_si;
 	mc->mc_out[2] = (uint64_t)&sfp->sf_uc;
 	mc->mc_out[6] = (uint64_t)fp - SPOFF;
-	mc->mc_tnpc = (uint64_t)_ctx_start + 4;
-	mc->mc_tpc = (uint64_t)_ctx_start;
+	mc->_mc_tnpc = (uint64_t)_ctx_start + 4;
+	mc->_mc_tpc = (uint64_t)_ctx_start;
 
 	ucp->uc_link = &sfp->sf_uc;
 	sigdelset(&ucp->uc_sigmask, sig);

Modified: head/lib/libthread_db/arch/sparc64/libpthread_md.c
==============================================================================
--- head/lib/libthread_db/arch/sparc64/libpthread_md.c	Fri Jul 12 13:52:27 2013	(r253265)
+++ head/lib/libthread_db/arch/sparc64/libpthread_md.c	Fri Jul 12 14:24:52 2013	(r253266)
@@ -57,9 +57,9 @@ pt_fpreg_to_ucontext(const struct fpreg*
 
 	memcpy(mc->mc_fp, r->fr_regs, MIN(sizeof(mc->mc_fp),
 	    sizeof(r->fr_regs)));
-	mc->mc_fsr = r->fr_fsr;
-	mc->mc_gsr = r->fr_gsr;
-	mc->mc_fprs |= FPRS_FEF;
+	mc->_mc_fsr = r->fr_fsr;
+	mc->_mc_gsr = r->fr_gsr;
+	mc->_mc_fprs |= FPRS_FEF;
 }
 
 void
@@ -67,11 +67,11 @@ pt_ucontext_to_fpreg(const ucontext_t *u
 {
 	const mcontext_t *mc = &uc->uc_mcontext;
 
-	if ((mc->mc_fprs & FPRS_FEF) != 0) {
+	if ((mc->_mc_fprs & FPRS_FEF) != 0) {
 		memcpy(r->fr_regs, mc->mc_fp, MIN(sizeof(mc->mc_fp),
 		    sizeof(r->fr_regs)));
-		r->fr_fsr = mc->mc_fsr;
-		r->fr_gsr = mc->mc_gsr;
+		r->fr_fsr = mc->_mc_fsr;
+		r->fr_gsr = mc->_mc_gsr;
 	} else
 		memset(r, 0, sizeof(*r));
 }

Modified: head/sys/sparc64/include/ucontext.h
==============================================================================
--- head/sys/sparc64/include/ucontext.h	Fri Jul 12 13:52:27 2013	(r253265)
+++ head/sys/sparc64/include/ucontext.h	Fri Jul 12 14:24:52 2013	(r253266)
@@ -6,7 +6,7 @@
  * 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 
+ *    notice, this list of conditions and the following disclaimer
  *    in this position and unchanged.
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
@@ -42,16 +42,16 @@ struct __mcontext {
 
 typedef struct __mcontext mcontext_t;
 
-#define	mc_flags	mc_global[0]
-#define	mc_sp           mc_out[6]
-#define	mc_fprs         mc_local[0]
-#define	mc_fsr		mc_local[1]
-#define	mc_gsr		mc_local[2]
-#define	mc_tnpc         mc_in[0]
-#define	mc_tpc          mc_in[1]
-#define	mc_tstate       mc_in[2]
-#define	mc_y            mc_in[4]
-#define	mc_wstate	mc_in[5]
+#define	_mc_flags	mc_global[0]
+#define	_mc_sp		mc_out[6]
+#define	_mc_fprs	mc_local[0]
+#define	_mc_fsr		mc_local[1]
+#define	_mc_gsr		mc_local[2]
+#define	_mc_tnpc	mc_in[0]
+#define	_mc_tpc		mc_in[1]
+#define	_mc_tstate	mc_in[2]
+#define	_mc_y		mc_in[4]
+#define	_mc_wstate	mc_in[5]
 
 #define	_MC_VERSION_SHIFT	0
 #define	_MC_VERSION_BITS	32

Modified: head/sys/sparc64/sparc64/machdep.c
==============================================================================
--- head/sys/sparc64/sparc64/machdep.c	Fri Jul 12 13:52:27 2013	(r253265)
+++ head/sys/sparc64/sparc64/machdep.c	Fri Jul 12 14:24:52 2013	(r253266)
@@ -736,7 +736,7 @@ sys_sigreturn(struct thread *td, struct 
 	kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0);
 
 	CTR4(KTR_SIG, "sigreturn: return td=%p pc=%#lx sp=%#lx tstate=%#lx",
-	    td, mc->mc_tpc, mc->mc_sp, mc->mc_tstate);
+	    td, mc->_mc_tpc, mc->_mc_sp, mc->_mc_tstate);
 	return (EJUSTRETURN);
 }
 
@@ -769,7 +769,7 @@ get_mcontext(struct thread *td, mcontext
 	 * Note that we skip %g7 which is used as the userland TLS register
 	 * and %wstate.
 	 */
-	mc->mc_flags = _MC_VERSION;
+	mc->_mc_flags = _MC_VERSION;
 	mc->mc_global[1] = tf->tf_global[1];
 	mc->mc_global[2] = tf->tf_global[2];
 	mc->mc_global[3] = tf->tf_global[3];
@@ -789,13 +789,13 @@ get_mcontext(struct thread *td, mcontext
 	mc->mc_out[5] = tf->tf_out[5];
 	mc->mc_out[6] = tf->tf_out[6];
 	mc->mc_out[7] = tf->tf_out[7];
-	mc->mc_fprs = tf->tf_fprs;
-	mc->mc_fsr = tf->tf_fsr;
-	mc->mc_gsr = tf->tf_gsr;
-	mc->mc_tnpc = tf->tf_tnpc;
-	mc->mc_tpc = tf->tf_tpc;
-	mc->mc_tstate = tf->tf_tstate;
-	mc->mc_y = tf->tf_y;
+	mc->_mc_fprs = tf->tf_fprs;
+	mc->_mc_fsr = tf->tf_fsr;
+	mc->_mc_gsr = tf->tf_gsr;
+	mc->_mc_tnpc = tf->tf_tnpc;
+	mc->_mc_tpc = tf->tf_tpc;
+	mc->_mc_tstate = tf->tf_tstate;
+	mc->_mc_y = tf->tf_y;
 	critical_enter();
 	if ((tf->tf_fprs & FPRS_FEF) != 0) {
 		savefpctx(pcb->pcb_ufp);
@@ -804,7 +804,7 @@ get_mcontext(struct thread *td, mcontext
 	}
 	if ((pcb->pcb_flags & PCB_FEF) != 0) {
 		bcopy(pcb->pcb_ufp, mc->mc_fp, sizeof(mc->mc_fp));
-		mc->mc_fprs |= FPRS_FEF;
+		mc->_mc_fprs |= FPRS_FEF;
 	}
 	critical_exit();
 	return (0);
@@ -816,8 +816,8 @@ set_mcontext(struct thread *td, const mc
 	struct trapframe *tf;
 	struct pcb *pcb;
 
-	if (!TSTATE_SECURE(mc->mc_tstate) ||
-	    (mc->mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION)
+	if (!TSTATE_SECURE(mc->_mc_tstate) ||
+	    (mc->_mc_flags & ((1L << _MC_VERSION_BITS) - 1)) != _MC_VERSION)
 		return (EINVAL);
 	tf = td->td_frame;
 	pcb = td->td_pcb;
@@ -843,14 +843,14 @@ set_mcontext(struct thread *td, const mc
 	tf->tf_out[5] = mc->mc_out[5];
 	tf->tf_out[6] = mc->mc_out[6];
 	tf->tf_out[7] = mc->mc_out[7];
-	tf->tf_fprs = mc->mc_fprs;
-	tf->tf_fsr = mc->mc_fsr;
-	tf->tf_gsr = mc->mc_gsr;
-	tf->tf_tnpc = mc->mc_tnpc;
-	tf->tf_tpc = mc->mc_tpc;
-	tf->tf_tstate = mc->mc_tstate;
-	tf->tf_y = mc->mc_y;
-	if ((mc->mc_fprs & FPRS_FEF) != 0) {
+	tf->tf_fprs = mc->_mc_fprs;
+	tf->tf_fsr = mc->_mc_fsr;
+	tf->tf_gsr = mc->_mc_gsr;
+	tf->tf_tnpc = mc->_mc_tnpc;
+	tf->tf_tpc = mc->_mc_tpc;
+	tf->tf_tstate = mc->_mc_tstate;
+	tf->tf_y = mc->_mc_y;
+	if ((mc->_mc_fprs & FPRS_FEF) != 0) {
 		tf->tf_fprs = 0;
 		bcopy(mc->mc_fp, pcb->pcb_ufp, sizeof(pcb->pcb_ufp));
 		pcb->pcb_flags |= PCB_FEF;

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 14:25:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id CD5B3CD4;
 Fri, 12 Jul 2013 14:25:58 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BE0BB1969;
 Fri, 12 Jul 2013 14:25:58 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CEPwmq028396;
 Fri, 12 Jul 2013 14:25:58 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CEPwjV028394;
 Fri, 12 Jul 2013 14:25:58 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201307121425.r6CEPwjV028394@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Fri, 12 Jul 2013 14:25:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253267 - head/share/man/man9
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 14:25:58 -0000

Author: glebius
Date: Fri Jul 12 14:25:58 2013
New Revision: 253267
URL: http://svnweb.freebsd.org/changeset/base/253267

Log:
  Add manual page for vmem(9). Obtained from NetBSD, modified to match
  our implementation.
  
  Obtained from:	NetBSD

Added:
  head/share/man/man9/vmem.9   (contents, props changed)
Modified:
  head/share/man/man9/Makefile

Modified: head/share/man/man9/Makefile
==============================================================================
--- head/share/man/man9/Makefile	Fri Jul 12 14:24:52 2013	(r253266)
+++ head/share/man/man9/Makefile	Fri Jul 12 14:25:58 2013	(r253267)
@@ -339,6 +339,7 @@ MAN=	accept_filter.9 \
 	vm_page_wakeup.9 \
 	vm_page_wire.9 \
 	vm_set_page_size.9 \
+	vmem.9 \
 	vn_fullpath.9 \
 	vn_isdisk.9 \
 	vnode.9 \

Added: head/share/man/man9/vmem.9
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/share/man/man9/vmem.9	Fri Jul 12 14:25:58 2013	(r253267)
@@ -0,0 +1,323 @@
+.\"	$NetBSD: vmem.9,v 1.15 2013/01/29 22:02:17 wiz Exp $
+.\"
+.\" Copyright (c)2006 YAMAMOTO Takashi,
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" SUCH DAMAGE.
+.\"
+.\" $FreeBSD$
+.\"
+.\" ------------------------------------------------------------
+.Dd July 12, 2013
+.Dt VMEM 9
+.Os
+.\" ------------------------------------------------------------
+.Sh NAME
+.Nm vmem
+.Nd general purpose resource allocator
+.\" ------------------------------------------------------------
+.Sh SYNOPSIS
+.In sys/vmem.h
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft vmem_t *
+.Fn vmem_create \
+"const char *name" "vmem_addr_t base" "vmem_size_t size" "vmem_size_t quantum" \
+"vmem_size_t qcache_max" "int flags"
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft int
+.Fn vmem_add \
+"vmem_t *vm" "vmem_addr_t addr" "vmem_size_t size" "int flags"
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft int
+.Fn vmem_xalloc \
+"vmem_t *vm" "const vmem_size_t size" "vmem_size_t align" \
+"const vmem_size_t phase" "const vmem_size_t nocross" \
+"const vmem_addr_t minaddr" "const vmem_addr_t maxaddr" "int flags" \
+"vmem_addr_t *addrp"
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft void
+.Fn vmem_xfree "vmem_t *vm" "vmem_addr_t addr" "vmem_size_t size"
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft int
+.Fn vmem_alloc "vmem_t *vm" "vmem_size_t size" "int flags" "vmem_addr_t *addrp"
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft void
+.Fn vmem_free "vmem_t *vm" "vmem_addr_t addr" "vmem_size_t size"
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Ft void
+.Fn vmem_destroy "vmem_t *vm"
+.\" ------------------------------------------------------------
+.Sh DESCRIPTION
+The
+.Nm
+is a general purpose resource allocator.
+Despite its name, it can be used for arbitrary resources
+other than virtual memory.
+.Pp
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Fn vmem_create
+creates a new vmem arena.
+.Pp
+.Bl -tag -width qcache_max
+.It Fa name
+The string to describe the vmem.
+.It Fa base
+The start address of the initial span.
+Pass
+.Dv 0
+if no initial span is required.
+.It Fa size
+The size of the initial span.
+Pass
+.Dv 0
+if no initial span is required.
+.It Fa quantum
+The smallest unit of allocation.
+.It Fa qcache_max
+The largest size of allocations which can be served by quantum cache.
+It is merely a hint and can be ignored.
+.It Fa flags
+Combination of
+.Xr malloc 9
+wait flag and
+.Nm
+allocation strategy flag:
+.Bl -tag -width M_FIRSTFIT
+.It Dv M_FIRSTFIT
+Prefer allocation performance.
+.It Dv M_BESTFIT
+Prefer space efficiency.
+.El
+.El
+.Pp
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Fn vmem_add
+adds a span of size
+.Fa size
+starting at
+.Fa addr
+to the arena.
+Returns
+0
+on success,
+.Dv ENOMEM
+on failure.
+.Fa flags
+is
+.Xr malloc 9
+wait flag.
+.Pp
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Fn vmem_xalloc
+allocates a resource from the arena.
+.Pp
+.Bl -tag -width nocross
+.It Fa vm
+The arena which we allocate from.
+.It Fa size
+Specify the size of the allocation.
+.It Fa align
+If zero, don't care about the alignment of the allocation.
+Otherwise, request a resource segment starting at
+offset
+.Fa phase
+from an
+.Fa align
+aligned boundary.
+.It Fa phase
+See the above description of
+.Fa align .
+If
+.Fa align
+is zero,
+.Fa phase
+should be zero.
+Otherwise,
+.Fa phase
+should be smaller than
+.Fa align .
+.It Fa nocross
+Request a resource which doesn't cross
+.Fa nocross
+aligned boundary.
+.It Fa minaddr
+Specify the minimum address which can be allocated, or
+.Dv VMEM_ADDR_MIN
+if the caller does not care.
+.It Fa maxaddr
+Specify the maximum address which can be allocated, or
+.Dv VMEM_ADDR_MAX
+if the caller does not care.
+.It Fa flags
+A bitwise OR of an allocation strategy and a
+.Xr malloc 8
+wait flag.
+The allocation strategy is one of
+.Dv M_FIRSTFIT
+and
+.Dv M_BESTFIT .
+.It Fa addrp
+On success, if
+.Fa addrp
+is not
+.Dv NULL ,
+.Fn vmem_xalloc
+overwrites it with the start address of the allocated span.
+.El
+.Pp
+.\" ------------------------------------------------------------
+.Fn vmem_xfree
+frees resource allocated by
+.Fn vmem_xalloc
+to the arena.
+.Pp
+.Bl -tag -width addr
+.It Fa vm
+The arena which we free to.
+.It Fa addr
+The resource being freed.
+It must be the one returned by
+.Fn vmem_xalloc .
+Notably, it must not be the one from
+.Fn vmem_alloc .
+Otherwise, the behaviour is undefined.
+.It Fa size
+The size of the resource being freed.
+It must be the same as the
+.Fa size
+argument used for
+.Fn vmem_xalloc .
+.El
+.Pp
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Fn vmem_alloc
+allocates a resource from the arena.
+.Pp
+.Bl -tag -width flags
+.It Fa vm
+The arena which we allocate from.
+.It Fa size
+Specify the size of the allocation.
+.It Fa flags
+A bitwise OR of an
+.Nm
+allocation strategy flag (see above) and a
+.Xr malloc 9
+sleep flag.
+.It Fa addrp
+On success, if
+.Fa addrp
+is not
+.Dv NULL ,
+.Fn vmem_alloc
+overwrites it with the start address of the allocated span.
+.El
+.Pp
+.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+.Fn vmem_free
+frees resource allocated by
+.Fn vmem_alloc
+to the arena.
+.Pp
+.Bl -tag -width addr
+.It Fa vm
+The arena which we free to.
+.It Fa addr
+The resource being freed.
+It must be the one returned by
+.Fn vmem_alloc .
+Notably, it must not be the one from
+.Fn vmem_xalloc .
+Otherwise, the behaviour is undefined.
+.It Fa size
+The size of the resource being freed.
+It must be the same as the
+.Fa size
+argument used for
+.Fn vmem_alloc .
+.El
+.Pp
+.\" ------------------------------------------------------------
+.Fn vmem_destroy
+destroys a vmem arena.
+.Pp
+.Bl -tag -width vm
+.It Fa vm
+The vmem arena being destroyed.
+The caller should ensure that no one will use it anymore.
+.El
+.\" ------------------------------------------------------------
+.Sh RETURN VALUES
+.Fn vmem_create
+returns a pointer to the newly allocated vmem_t.
+Otherwise, it returns
+.Dv NULL .
+.Pp
+On success,
+.Fn vmem_xalloc
+and
+.Fn vmem_alloc
+return 0.
+Otherwise,
+.Dv ENOMEM
+is returned.
+.\" ------------------------------------------------------------
+.Sh CODE REFERENCES
+The
+.Nm
+subsystem is implemented within the file
+.Pa sys/kern/subr_vmem.c .
+.\" ------------------------------------------------------------
+.Sh SEE ALSO
+.Xr malloc 9
+.Rs
+.%A Jeff Bonwick
+.%A Jonathan Adams
+.%T "Magazines and Vmem: Extending the Slab Allocator to Many CPUs and Arbitrary Resources"
+.%J "2001 USENIX Annual Technical Conference"
+.%D 2001
+.Re
+.\" ------------------------------------------------------------
+.Sh HISTORY
+The
+.Nm
+allocator was originally implemented in
+.Nx .
+It was introduced in
+.Fx 10.0 .
+.Sh AUTHORS
+.An -nosplit
+Original implementation of
+.Nm
+was written by
+.An "YAMAMOTO Takashi" .
+The
+.Fx
+port was made by
+.An "Jeff Roberson" .
+.Sh BUGS
+.Pp
+.Nm
+relies on
+.Xr malloc 9 ,
+so it cannot be used as early during system bootstrap as
+.Xr extent 9 .

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 14:46:41 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 08A762A9;
 Fri, 12 Jul 2013 14:46:41 +0000 (UTC)
 (envelope-from glebius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id ED9921A53;
 Fri, 12 Jul 2013 14:46:40 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CEkeMY034068;
 Fri, 12 Jul 2013 14:46:40 GMT (envelope-from glebius@svn.freebsd.org)
Received: (from glebius@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CEkeBX034067;
 Fri, 12 Jul 2013 14:46:40 GMT (envelope-from glebius@svn.freebsd.org)
Message-Id: <201307121446.r6CEkeBX034067@svn.freebsd.org>
From: Gleb Smirnoff 
Date: Fri, 12 Jul 2013 14:46:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253268 - head/share/man/man9
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 14:46:41 -0000

Author: glebius
Date: Fri Jul 12 14:46:40 2013
New Revision: 253268
URL: http://svnweb.freebsd.org/changeset/base/253268

Log:
  Remove non existent in FreeBSD reference.

Modified:
  head/share/man/man9/vmem.9

Modified: head/share/man/man9/vmem.9
==============================================================================
--- head/share/man/man9/vmem.9	Fri Jul 12 14:25:58 2013	(r253267)
+++ head/share/man/man9/vmem.9	Fri Jul 12 14:46:40 2013	(r253268)
@@ -319,5 +319,4 @@ port was made by
 .Nm
 relies on
 .Xr malloc 9 ,
-so it cannot be used as early during system bootstrap as
-.Xr extent 9 .
+so it cannot be used as early during system bootstrap.

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 15:08:38 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 374B594D;
 Fri, 12 Jul 2013 15:08:38 +0000 (UTC)
 (envelope-from pluknet@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 0FA4B1B4B;
 Fri, 12 Jul 2013 15:08:38 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CF8bb4042951;
 Fri, 12 Jul 2013 15:08:37 GMT (envelope-from pluknet@svn.freebsd.org)
Received: (from pluknet@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CF8bbd042950;
 Fri, 12 Jul 2013 15:08:37 GMT (envelope-from pluknet@svn.freebsd.org)
Message-Id: <201307121508.r6CF8bbd042950@svn.freebsd.org>
From: Sergey Kandaurov 
Date: Fri, 12 Jul 2013 15:08:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253270 - head/share/man/man9
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 15:08:38 -0000

Author: pluknet
Date: Fri Jul 12 15:08:37 2013
New Revision: 253270
URL: http://svnweb.freebsd.org/changeset/base/253270

Log:
  - mdoc: remove superfluous paragraph macros.
  - fix typo in xref manual section number.

Modified:
  head/share/man/man9/vmem.9

Modified: head/share/man/man9/vmem.9
==============================================================================
--- head/share/man/man9/vmem.9	Fri Jul 12 14:58:09 2013	(r253269)
+++ head/share/man/man9/vmem.9	Fri Jul 12 15:08:37 2013	(r253270)
@@ -76,7 +76,6 @@ other than virtual memory.
 .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .Fn vmem_create
 creates a new vmem arena.
-.Pp
 .Bl -tag -width qcache_max
 .It Fa name
 The string to describe the vmem.
@@ -129,7 +128,6 @@ wait flag.
 .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .Fn vmem_xalloc
 allocates a resource from the arena.
-.Pp
 .Bl -tag -width nocross
 .It Fa vm
 The arena which we allocate from.
@@ -169,7 +167,7 @@ Specify the maximum address which can be
 if the caller does not care.
 .It Fa flags
 A bitwise OR of an allocation strategy and a
-.Xr malloc 8
+.Xr malloc 9
 wait flag.
 The allocation strategy is one of
 .Dv M_FIRSTFIT
@@ -189,7 +187,6 @@ overwrites it with the start address of 
 frees resource allocated by
 .Fn vmem_xalloc
 to the arena.
-.Pp
 .Bl -tag -width addr
 .It Fa vm
 The arena which we free to.
@@ -211,7 +208,6 @@ argument used for
 .\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 .Fn vmem_alloc
 allocates a resource from the arena.
-.Pp
 .Bl -tag -width flags
 .It Fa vm
 The arena which we allocate from.
@@ -237,7 +233,6 @@ overwrites it with the start address of 
 frees resource allocated by
 .Fn vmem_alloc
 to the arena.
-.Pp
 .Bl -tag -width addr
 .It Fa vm
 The arena which we free to.
@@ -259,7 +254,6 @@ argument used for
 .\" ------------------------------------------------------------
 .Fn vmem_destroy
 destroys a vmem arena.
-.Pp
 .Bl -tag -width vm
 .It Fa vm
 The vmem arena being destroyed.
@@ -315,7 +309,6 @@ The
 port was made by
 .An "Jeff Roberson" .
 .Sh BUGS
-.Pp
 .Nm
 relies on
 .Xr malloc 9 ,

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 15:29:42 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 2CDAFD9A;
 Fri, 12 Jul 2013 15:29:42 +0000 (UTC)
 (envelope-from jilles@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 1DB441C15;
 Fri, 12 Jul 2013 15:29:42 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CFTfJN048985;
 Fri, 12 Jul 2013 15:29:41 GMT (envelope-from jilles@svn.freebsd.org)
Received: (from jilles@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CFTftp048983;
 Fri, 12 Jul 2013 15:29:41 GMT (envelope-from jilles@svn.freebsd.org)
Message-Id: <201307121529.r6CFTftp048983@svn.freebsd.org>
From: Jilles Tjoelker 
Date: Fri, 12 Jul 2013 15:29:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253271 - in head: bin/sh
 tools/regression/bin/sh/execution
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 15:29:42 -0000

Author: jilles
Date: Fri Jul 12 15:29:41 2013
New Revision: 253271
URL: http://svnweb.freebsd.org/changeset/base/253271

Log:
  sh: Do not read from stdin if an error occurs during -i -c cmd.
  
  Although using -i with -c does not seem very useful, it seems inappropriate
  to read commands from the terminal in this case.
  
  Side effect: if the -s -c extension is used and the -s option is turned off
  using 'set +s' during the interactive part, the shell now exits after an
  error or interrupt. Note that POSIX only specifies -s as option to sh, not
  to set.
  
  See also Austin Group issue #718.

Added:
  head/tools/regression/bin/sh/execution/int-cmd1.0   (contents, props changed)
Modified:
  head/bin/sh/main.c

Modified: head/bin/sh/main.c
==============================================================================
--- head/bin/sh/main.c	Fri Jul 12 15:08:37 2013	(r253270)
+++ head/bin/sh/main.c	Fri Jul 12 15:29:41 2013	(r253271)
@@ -170,8 +170,8 @@ state3:
 	if (minusc) {
 		evalstring(minusc, sflag ? 0 : EV_EXIT);
 	}
+state4:
 	if (sflag || minusc == NULL) {
-state4:	/* XXX ??? - why isn't this before the "if" statement */
 		cmdloop(1);
 	}
 	exitshell(exitstatus);

Added: head/tools/regression/bin/sh/execution/int-cmd1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/int-cmd1.0	Fri Jul 12 15:29:41 2013	(r253271)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+! echo echo bad | $SH -ic 'fi' 2>/dev/null

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 15:56:30 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id B36E68F7;
 Fri, 12 Jul 2013 15:56:30 +0000 (UTC)
 (envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id A5CEE1D77;
 Fri, 12 Jul 2013 15:56:30 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CFuUfC057123;
 Fri, 12 Jul 2013 15:56:30 GMT
 (envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CFuU6i057122;
 Fri, 12 Jul 2013 15:56:30 GMT
 (envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <201307121556.r6CFuU6i057122@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Fri, 12 Jul 2013 15:56:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253272 - head/sys/powerpc/aim
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 15:56:30 -0000

Author: nwhitehorn
Date: Fri Jul 12 15:56:30 2013
New Revision: 253272
URL: http://svnweb.freebsd.org/changeset/base/253272

Log:
  Fix check: bitwise and has only one &.
  
  MFC after:	1 week

Modified:
  head/sys/powerpc/aim/mmu_oea64.c

Modified: head/sys/powerpc/aim/mmu_oea64.c
==============================================================================
--- head/sys/powerpc/aim/mmu_oea64.c	Fri Jul 12 15:29:41 2013	(r253271)
+++ head/sys/powerpc/aim/mmu_oea64.c	Fri Jul 12 15:56:30 2013	(r253272)
@@ -1978,7 +1978,7 @@ moea64_pvo_protect(mmu_t mmu,  pmap_t pm
 	 * removed write access.
 	 */
 	if ((pvo->pvo_vaddr & PVO_MANAGED) == PVO_MANAGED && 
-	    (oldlo & LPTE_PP) != LPTE_BR && !(prot && VM_PROT_WRITE)) {
+	    (oldlo & LPTE_PP) != LPTE_BR && !(prot & VM_PROT_WRITE)) {
 		if (pg != NULL) {
 			if (pvo->pvo_pte.lpte.pte_lo & LPTE_CHG)
 				vm_page_dirty(pg);

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 15:57:32 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 4142FAC0;
 Fri, 12 Jul 2013 15:57:32 +0000 (UTC)
 (envelope-from nwhitehorn@freebsd.org)
Received: from mail.icecube.wisc.edu (trout.icecube.wisc.edu [128.104.255.119])
 by mx1.freebsd.org (Postfix) with ESMTP id 1C6511D8A;
 Fri, 12 Jul 2013 15:57:31 +0000 (UTC)
Received: from localhost (localhost.localdomain [127.0.0.1])
 by mail.icecube.wisc.edu (Postfix) with ESMTP id BEEB858380;
 Fri, 12 Jul 2013 10:57:25 -0500 (CDT)
X-Virus-Scanned: amavisd-new at icecube.wisc.edu
Received: from mail.icecube.wisc.edu ([127.0.0.1])
 by localhost (trout.icecube.wisc.edu [127.0.0.1]) (amavisd-new, port 10030)
 with ESMTP id qQpR7FqM86Pl; Fri, 12 Jul 2013 10:57:25 -0500 (CDT)
Received: from terminus.icecube.wisc.edu (terminus.icecube.wisc.edu
 [172.16.223.97])
 by mail.icecube.wisc.edu (Postfix) with ESMTP id 8638E5837F;
 Fri, 12 Jul 2013 10:57:25 -0500 (CDT)
Message-ID: <51E02765.7010306@freebsd.org>
Date: Fri, 12 Jul 2013 10:57:25 -0500
From: Nathan Whitehorn 
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:17.0) Gecko/20130627 Thunderbird/17.0.7
MIME-Version: 1.0
To: Nathan Whitehorn 
Subject: Re: svn commit: r253272 - head/sys/powerpc/aim
References: <201307121556.r6CFuU6i057122@svn.freebsd.org>
In-Reply-To: <201307121556.r6CFuU6i057122@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
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 15:57:32 -0000

On 07/12/13 10:56, Nathan Whitehorn wrote:
> Author: nwhitehorn
> Date: Fri Jul 12 15:56:30 2013
> New Revision: 253272
> URL: http://svnweb.freebsd.org/changeset/base/253272
>
> Log:
>    Fix check: bitwise and has only one &.
>    
>    MFC after:	1 week
>

Thanks to rdivacky for finding this!
-Nathan

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 17:09:50 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id DE82E68A;
 Fri, 12 Jul 2013 17:09:50 +0000 (UTC) (envelope-from ken@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id D08CF10D2;
 Fri, 12 Jul 2013 17:09:50 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CH9osA078054;
 Fri, 12 Jul 2013 17:09:50 GMT (envelope-from ken@svn.freebsd.org)
Received: (from ken@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CH9oZr078053;
 Fri, 12 Jul 2013 17:09:50 GMT (envelope-from ken@svn.freebsd.org)
Message-Id: <201307121709.r6CH9oZr078053@svn.freebsd.org>
From: "Kenneth D. Merry" 
Date: Fri, 12 Jul 2013 17:09:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253274 - head/sys/cam/scsi
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 17:09:51 -0000

Author: ken
Date: Fri Jul 12 17:09:50 2013
New Revision: 253274
URL: http://svnweb.freebsd.org/changeset/base/253274

Log:
  Fix a problem with READ ELEMENT STATUS that occurs on some
  changers that don't support the DVCID and CURDATA bits that were
  introduced in the SMC spec.
  
  These changers will return an Illegal Request type error if the
  bits are set.  This causes "chio status" to fail.
  
  The fix is two-fold.  First, for changers that claim to be SCSI-2
  or older, don't set the DVCID and CURDATA bits for READ ELEMENT
  STATUS.  For newer changers (SCSI-3 and newer), we default to
  setting the new bits, but back off and try the READ ELEMENT STATUS
  without the bits if we get an Illegal Request type error.
  
  This has been tested on a Qualstar TLS-8211, which is a SCSI-2
  changer that does not support the new bits, and a Spectra T-380,
  which is a SCSI-3 changer that does support the new bits.  In the
  absence of a SCSI-3 changer that does not support the bits, I
  tested that with some error injection code.  (The SMC spec says
  that support for CURDATA is mandatory, and DVCID is optional.)
  
  scsi_ch.c:	Add a new quirk, CH_Q_NO_DVCID that gets set for
  		SCSI-2 and older libraries, or newer libraries that
  		report errors when the DVCID/CURDATA bits are set.
  
  		In chgetelemstatus(), use the new quirk to
  		determine whether or not to set DVCID and CURDATA.
  		If we get an error with the bits set, back off and
  		try without the bits.  Set the quirk flag if the
  		read element status succeeds without the bits set.
  
  		Increase the READ ELEMENT STATUS timeout to 60
  		seconds after testing with a Spectra T-380.  The
  		previous value was 10 seconds, and too short for
  		the T-380.  This may be decreased later after
  		some additional testing and investigation.
  
  Tested by:	Andre Albsmeier 
  Sponsored by:	Spectra Logic
  MFC after:	3 days

Modified:
  head/sys/cam/scsi/scsi_ch.c

Modified: head/sys/cam/scsi/scsi_ch.c
==============================================================================
--- head/sys/cam/scsi/scsi_ch.c	Fri Jul 12 16:41:58 2013	(r253273)
+++ head/sys/cam/scsi/scsi_ch.c	Fri Jul 12 17:09:50 2013	(r253274)
@@ -102,7 +102,7 @@ static const u_int32_t	CH_TIMEOUT_MODE_S
 static const u_int32_t	CH_TIMEOUT_MOVE_MEDIUM               = 100000;
 static const u_int32_t	CH_TIMEOUT_EXCHANGE_MEDIUM           = 100000;
 static const u_int32_t	CH_TIMEOUT_POSITION_TO_ELEMENT       = 100000;
-static const u_int32_t	CH_TIMEOUT_READ_ELEMENT_STATUS       = 10000;
+static const u_int32_t	CH_TIMEOUT_READ_ELEMENT_STATUS       = 60000;
 static const u_int32_t	CH_TIMEOUT_SEND_VOLTAG		     = 10000;
 static const u_int32_t	CH_TIMEOUT_INITIALIZE_ELEMENT_STATUS = 500000;
 
@@ -122,12 +122,14 @@ typedef enum {
 
 typedef enum {
 	CH_Q_NONE	= 0x00,
-	CH_Q_NO_DBD	= 0x01
+	CH_Q_NO_DBD	= 0x01,
+	CH_Q_NO_DVCID	= 0x02
 } ch_quirks;
 
 #define CH_Q_BIT_STRING	\
 	"\020"		\
-	"\001NO_DBD"
+	"\001NO_DBD"	\
+	"\002NO_DVCID"
 
 #define ccb_state	ppriv_field0
 #define ccb_bp		ppriv_ptr1
@@ -396,6 +398,14 @@ chregister(struct cam_periph *periph, vo
 	periph->softc = softc;
 	softc->quirks = CH_Q_NONE;
 
+	/*
+	 * The DVCID and CURDATA bits were not introduced until the SMC
+	 * spec.  If this device claims SCSI-2 or earlier support, then it
+	 * very likely does not support these bits.
+	 */
+	if (cgd->inq_data.version <= SCSI_REV_2)
+		softc->quirks |= CH_Q_NO_DVCID;
+
 	bzero(&cpi, sizeof(cpi));
 	xpt_setup_ccb(&cpi.ccb_h, periph->path, CAM_PRIORITY_NORMAL);
 	cpi.ccb_h.func_code = XPT_PATH_INQ;
@@ -1208,6 +1218,8 @@ chgetelemstatus(struct cam_periph *perip
 	caddr_t data = NULL;
 	size_t size, desclen;
 	int avail, i, error = 0;
+	int curdata, dvcid, sense_flags;
+	int try_no_dvcid = 0;
 	struct changer_element_status *user_data = NULL;
 	struct ch_softc *softc;
 	union ccb *ccb;
@@ -1239,14 +1251,31 @@ chgetelemstatus(struct cam_periph *perip
 	cam_periph_lock(periph);
 	ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL);
 
+	sense_flags = SF_RETRY_UA;
+	if (softc->quirks & CH_Q_NO_DVCID) {
+		dvcid = 0;
+		curdata = 0;
+	} else {
+		dvcid = 1;
+		curdata = 1;
+		/*
+		 * Don't print anything for an Illegal Request, because
+		 * these flags can cause some changers to complain.  We'll
+		 * retry without them if we get an error.
+		 */
+		sense_flags |= SF_QUIET_IR;
+	}
+
+retry_einval:
+
 	scsi_read_element_status(&ccb->csio,
 				 /* retries */ 1,
 				 /* cbfcnp */ chdone,
 				 /* tag_action */ MSG_SIMPLE_Q_TAG,
 				 /* voltag */ want_voltags,
 				 /* sea */ softc->sc_firsts[chet],
-				 /* dvcid */ 1,
-				 /* curdata */ 1,
+				 /* dvcid */ dvcid,
+				 /* curdata */ curdata,
 				 /* count */ 1,
 				 /* data_ptr */ data,
 				 /* dxfer_len */ 1024,
@@ -1254,9 +1283,38 @@ chgetelemstatus(struct cam_periph *perip
 				 /* timeout */ CH_TIMEOUT_READ_ELEMENT_STATUS);
 
 	error = cam_periph_runccb(ccb, cherror, /*cam_flags*/ CAM_RETRY_SELTO,
-				  /*sense_flags*/ SF_RETRY_UA,
+				  /*sense_flags*/ sense_flags,
 				  softc->device_stats);
 
+	/*
+	 * An Illegal Request sense key (only used if there is no asc/ascq)
+	 * or 0x24,0x00 for an ASC/ASCQ both map to EINVAL.  If dvcid or
+	 * curdata are set (we set both or neither), try turning them off
+	 * and see if the command is successful.
+	 */
+	if ((error == EINVAL)
+	 && (dvcid || curdata))  {
+		dvcid = 0;
+		curdata = 0;
+		error = 0;
+		/* At this point we want to report any Illegal Request */
+		sense_flags &= ~SF_QUIET_IR;
+		try_no_dvcid = 1;
+		goto retry_einval;
+	}
+
+	/*
+	 * In this case, we tried a read element status with dvcid and
+	 * curdata set, and it failed.  We retried without those bits, and
+	 * it succeeded.  Suggest to the user that he set a quirk, so we
+	 * don't go through the retry process the first time in the future.
+	 * This should only happen on changers that claim SCSI-3 or higher,
+	 * but don't support these bits.
+	 */
+	if ((try_no_dvcid != 0)
+	 && (error == 0))
+		softc->quirks |= CH_Q_NO_DVCID;
+
 	if (error)
 		goto done;
 	cam_periph_unlock(periph);
@@ -1284,8 +1342,8 @@ chgetelemstatus(struct cam_periph *perip
 				 /* voltag */ want_voltags,
 				 /* sea */ softc->sc_firsts[chet]
 				 + cesr->cesr_element_base,
-				 /* dvcid */ 1,
-				 /* curdata */ 1,
+				 /* dvcid */ dvcid,
+				 /* curdata */ curdata,
 				 /* count */ cesr->cesr_element_count,
 				 /* data_ptr */ data,
 				 /* dxfer_len */ size,

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 17:11:31 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 45E89981;
 Fri, 12 Jul 2013 17:11:31 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 3796210FE;
 Fri, 12 Jul 2013 17:11:31 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CHBVuf080142;
 Fri, 12 Jul 2013 17:11:31 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CHBUfX080136;
 Fri, 12 Jul 2013 17:11:30 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307121711.r6CHBUfX080136@svn.freebsd.org>
From: Hiroki Sato 
Date: Fri, 12 Jul 2013 17:11:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253275 - head/usr.bin/netstat
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 17:11:31 -0000

Author: hrs
Date: Fri Jul 12 17:11:30 2013
New Revision: 253275
URL: http://svnweb.freebsd.org/changeset/base/253275

Log:
  Add -F fibnum option to specify an FIB number for -r flag.

Modified:
  head/usr.bin/netstat/main.c
  head/usr.bin/netstat/netstat.1
  head/usr.bin/netstat/netstat.h
  head/usr.bin/netstat/route.c

Modified: head/usr.bin/netstat/main.c
==============================================================================
--- head/usr.bin/netstat/main.c	Fri Jul 12 17:09:50 2013	(r253274)
+++ head/usr.bin/netstat/main.c	Fri Jul 12 17:11:30 2013	(r253275)
@@ -363,10 +363,12 @@ main(int argc, char *argv[])
 {
 	struct protox *tp = NULL;  /* for printing cblocks & stats */
 	int ch;
+	int fib = -1;
+	char *endptr;
 
 	af = AF_UNSPEC;
 
-	while ((ch = getopt(argc, argv, "AaBbdf:ghI:iLlM:mN:np:Qq:rSTsuWw:xz"))
+	while ((ch = getopt(argc, argv, "AaBbdF:f:ghI:iLlM:mN:np:Qq:rSTsuWw:xz"))
 	    != -1)
 		switch(ch) {
 		case 'A':
@@ -384,6 +386,12 @@ main(int argc, char *argv[])
 		case 'd':
 			dflag = 1;
 			break;
+		case 'F':
+			fib = strtol(optarg, &endptr, 0);
+			if (*endptr != '\0' ||
+			    (fib == 0 && (errno == EINVAL || errno == ERANGE)))
+				errx(1, "%s: invalid fib", optarg);
+			break;
 		case 'f':
 			if (strcmp(optarg, "ipx") == 0)
 				af = AF_IPX;
@@ -571,7 +579,7 @@ main(int argc, char *argv[])
 		if (sflag)
 			rt_stats(nl[N_RTSTAT].n_value, nl[N_RTTRASH].n_value);
 		else
-			routepr(nl[N_RTREE].n_value);
+			routepr(nl[N_RTREE].n_value, fib);
 		exit(0);
 	}
 	if (gflag) {

Modified: head/usr.bin/netstat/netstat.1
==============================================================================
--- head/usr.bin/netstat/netstat.1	Fri Jul 12 17:09:50 2013	(r253274)
+++ head/usr.bin/netstat/netstat.1	Fri Jul 12 17:11:30 2013	(r253275)
@@ -28,7 +28,7 @@
 .\"	@(#)netstat.1	8.8 (Berkeley) 4/18/94
 .\" $FreeBSD$
 .\"
-.Dd March 10, 2013
+.Dd May 17, 2013
 .Dt NETSTAT 1
 .Os
 .Sh NAME
@@ -217,14 +217,29 @@ states.
 .Nm
 .Fl r
 .Op Fl AanW
+.Op Fl F Ar fibnum
 .Op Fl f Ar address_family
 .Op Fl M Ar core
 .Op Fl N Ar system
 .Ek
 .Xc
-Display the contents of all routing tables,
-or a routing table for a particular
-.Ar address_family .
+Display the contents of routing tables.
+When
+.Fl f
+is specified, a routing table for a particular
+.Ar address_family
+is displayed.
+When
+.Fl F
+is specified, a routing table with the number
+.Ar fibnum
+is displayed.
+If the specified
+.Ar fibnum
+is -1 or
+.Fl F
+is not specified,
+the default routing table is displayed.
 If
 .Fl A
 is also present,

Modified: head/usr.bin/netstat/netstat.h
==============================================================================
--- head/usr.bin/netstat/netstat.h	Fri Jul 12 17:09:50 2013	(r253274)
+++ head/usr.bin/netstat/netstat.h	Fri Jul 12 17:11:30 2013	(r253275)
@@ -135,7 +135,7 @@ char	*atalk_print(struct sockaddr *, int
 char	*atalk_print2(struct sockaddr *, struct sockaddr *, int);
 char	*ipx_print(struct sockaddr *);
 char	*ns_print(struct sockaddr *);
-void	routepr(u_long);
+void	routepr(u_long, int);
 
 void	ipxprotopr(u_long, const char *, int, int);
 void	spx_stats(u_long, const char *, int, int);

Modified: head/usr.bin/netstat/route.c
==============================================================================
--- head/usr.bin/netstat/route.c	Fri Jul 12 17:09:50 2013	(r253274)
+++ head/usr.bin/netstat/route.c	Fri Jul 12 17:11:30 2013	(r253275)
@@ -143,17 +143,20 @@ static void domask(char *, in_addr_t, u_
  * Print routing tables.
  */
 void
-routepr(u_long rtree)
+routepr(u_long rtree, int fibnum)
 {
 	struct radix_node_head **rnhp, *rnh, head;
 	size_t intsize;
-	int fam, fibnum, numfibs;
+	int fam, numfibs;
 
 	intsize = sizeof(int);
-	if (sysctlbyname("net.my_fibnum", &fibnum, &intsize, NULL, 0) == -1)
+	if (fibnum == -1 &&
+	    sysctlbyname("net.my_fibnum", &fibnum, &intsize, NULL, 0) == -1)
 		fibnum = 0;
 	if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1)
 		numfibs = 1;
+	if (fibnum < 0 || fibnum > numfibs - 1)
+		errx(EX_USAGE, "%d: invalid fib", fibnum);
 	rt_tables = calloc(numfibs * (AF_MAX+1),
 	    sizeof(struct radix_node_head *));
 	if (rt_tables == NULL)
@@ -166,7 +169,10 @@ routepr(u_long rtree)
 	if (clock_gettime(CLOCK_UPTIME, &uptime) < 0)
 		err(EX_OSERR, "clock_gettime() failed");
 
-	printf("Routing tables\n");
+	printf("Routing tables");
+	if (fibnum)
+		printf(" (fib: %d)", fibnum);
+	printf("\n");
 
 	if (Aflag == 0 && NewTree)
 		ntreestuff();

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 17:23:00 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 5B9AFE4D;
 Fri, 12 Jul 2013 17:23:00 +0000 (UTC) (envelope-from pfg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4D6CF119D;
 Fri, 12 Jul 2013 17:23:00 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CHN0V8083295;
 Fri, 12 Jul 2013 17:23:00 GMT (envelope-from pfg@svn.freebsd.org)
Received: (from pfg@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CHMxAs083287;
 Fri, 12 Jul 2013 17:22:59 GMT (envelope-from pfg@svn.freebsd.org)
Message-Id: <201307121722.r6CHMxAs083287@svn.freebsd.org>
From: "Pedro F. Giffuni" 
Date: Fri, 12 Jul 2013 17:22:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253276 - head/sys/fs/fuse
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 17:23:00 -0000

Author: pfg
Date: Fri Jul 12 17:22:59 2013
New Revision: 253276
URL: http://svnweb.freebsd.org/changeset/base/253276

Log:
  Add creation timestamp (birthtime) support for fuse.
  
  This is based on similar support in MacFUSE.

Modified:
  head/sys/fs/fuse/fuse_internal.h
  head/sys/fs/fuse/fuse_kernel.h

Modified: head/sys/fs/fuse/fuse_internal.h
==============================================================================
--- head/sys/fs/fuse/fuse_internal.h	Fri Jul 12 17:11:30 2013	(r253275)
+++ head/sys/fs/fuse/fuse_internal.h	Fri Jul 12 17:22:59 2013	(r253276)
@@ -223,6 +223,8 @@ fuse_internal_attr_fat2vat(struct mount 
     vap->va_mtime.tv_nsec = fat->mtimensec;
     vap->va_ctime.tv_sec  = fat->ctime;
     vap->va_ctime.tv_nsec = fat->ctimensec;
+    vap->va_birthtime.tv_sec  = fat->crtime;
+    vap->va_birthtime.tv_nsec = fat->crtimensec;
     vap->va_blocksize = PAGE_SIZE;
     vap->va_type = IFTOVT(fat->mode);
 

Modified: head/sys/fs/fuse/fuse_kernel.h
==============================================================================
--- head/sys/fs/fuse/fuse_kernel.h	Fri Jul 12 17:11:30 2013	(r253275)
+++ head/sys/fs/fuse/fuse_kernel.h	Fri Jul 12 17:22:59 2013	(r253276)
@@ -69,9 +69,15 @@ struct fuse_attr {
 	__u64	atime;
 	__u64	mtime;
 	__u64	ctime;
+#ifdef __FreeBSD__
+	__u64	crtime;
+#endif
 	__u32	atimensec;
 	__u32	mtimensec;
 	__u32	ctimensec;
+#ifdef __FreeBSD__
+	__u32	crtimensec;
+#endif
 	__u32	mode;
 	__u32	nlink;
 	__u32	uid;

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 17:37:06 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 5A3E43EE;
 Fri, 12 Jul 2013 17:37:06 +0000 (UTC)
 (envelope-from schweikh@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4C823122A;
 Fri, 12 Jul 2013 17:37:06 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CHb69K086893;
 Fri, 12 Jul 2013 17:37:06 GMT
 (envelope-from schweikh@svn.freebsd.org)
Received: (from schweikh@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CHb6Bx086892;
 Fri, 12 Jul 2013 17:37:06 GMT
 (envelope-from schweikh@svn.freebsd.org)
Message-Id: <201307121737.r6CHb6Bx086892@svn.freebsd.org>
From: Jens Schweikhardt 
Date: Fri, 12 Jul 2013 17:37:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253277 - head/lib/libc/stdio
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 17:37:06 -0000

Author: schweikh
Date: Fri Jul 12 17:37:05 2013
New Revision: 253277
URL: http://svnweb.freebsd.org/changeset/base/253277

Log:
  Typo corrected.

Modified:
  head/lib/libc/stdio/fwrite.c

Modified: head/lib/libc/stdio/fwrite.c
==============================================================================
--- head/lib/libc/stdio/fwrite.c	Fri Jul 12 17:22:59 2013	(r253276)
+++ head/lib/libc/stdio/fwrite.c	Fri Jul 12 17:37:05 2013	(r253277)
@@ -65,7 +65,7 @@ fwrite(const void * __restrict buf, size
 	/*
 	 * Check for integer overflow.  As an optimization, first check that
 	 * at least one of {count, size} is at least 2^16, since if both
-	 * values are less than that, their product can't possible overflow
+	 * values are less than that, their product can't possibly overflow
 	 * (size_t is always at least 32 bits on FreeBSD).
 	 */
 	if (((count | size) > 0xFFFF) &&

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 18:13:41 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id AC2998ED;
 Fri, 12 Jul 2013 18:13:41 +0000 (UTC)
 (envelope-from jimharris@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 9EEC61646;
 Fri, 12 Jul 2013 18:13:41 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CIDfHk098401;
 Fri, 12 Jul 2013 18:13:41 GMT
 (envelope-from jimharris@svn.freebsd.org)
Received: (from jimharris@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CIDfbd098400;
 Fri, 12 Jul 2013 18:13:41 GMT
 (envelope-from jimharris@svn.freebsd.org)
Message-Id: <201307121813.r6CIDfbd098400@svn.freebsd.org>
From: Jim Harris 
Date: Fri, 12 Jul 2013 18:13:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253279 - head/sbin/nvmecontrol
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 18:13:41 -0000

Author: jimharris
Date: Fri Jul 12 18:13:41 2013
New Revision: 253279
URL: http://svnweb.freebsd.org/changeset/base/253279

Log:
  %d should be used for printing int32_t instead of %zd.
  
  clang does not complain about this - only gcc.
  
  MFC after:	3 days

Modified:
  head/sbin/nvmecontrol/firmware.c

Modified: head/sbin/nvmecontrol/firmware.c
==============================================================================
--- head/sbin/nvmecontrol/firmware.c	Fri Jul 12 18:02:10 2013	(r253278)
+++ head/sbin/nvmecontrol/firmware.c	Fri Jul 12 18:13:41 2013	(r253279)
@@ -94,7 +94,7 @@ read_image_file(char *path, void **buf, 
 		    path, (intmax_t)sb.st_size);
 	filesize = (int32_t)sb.st_size;
 	if ((*buf = malloc(filesize)) == NULL)
-		errx(1, "unable to malloc %zd bytes", filesize);
+		errx(1, "unable to malloc %d bytes", filesize);
 	if ((*size = read(fd, *buf, filesize)) < 0)
 		err(1, "error reading '%s'", path);
 	/* XXX assuming no short reads */

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 18:24:12 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 9B5DAF5D;
 Fri, 12 Jul 2013 18:24:12 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com
 [IPv6:2a00:1450:400c:c00::22f])
 by mx1.freebsd.org (Postfix) with ESMTP id B605C1732;
 Fri, 12 Jul 2013 18:24:11 +0000 (UTC)
Received: by mail-wg0-f47.google.com with SMTP id l18so8520100wgh.14
 for ; Fri, 12 Jul 2013 11:24:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=LpouerqnmCVB0yQRMDIzjqh1a4K0K00A51oQxHoZO4A=;
 b=EeVcLhoysFTIiPOMO20+MUyClDbhistpqDjf5LxtS42URDRFifFwRUpOYXp2sGubmh
 L8BI67W3GvVjHbuCbcbCyHDMMdXNJ6VZiDA+lSkldB24rVhQT4O+toK4ODsNKc/R0bMi
 x8gZprAgBAGWvy7W8AXX/bWAuWbZEI4q1dADnodz+Lw1cacj8S2as+PsN8p7cAujtf3o
 gRdJWirU0e9uLPbdUUlEoxMAc9CHyPkHXlUyHR/Ca4EfwbxmgrJ4ZsnJXmwOMhUyYes5
 yNJjoIlZy7AL51lamTv7dylhvXaxKdUGxLN1WxYuQ0yHJTLLgXb4WClfU3hX+wDEaDym
 Mffg==
MIME-Version: 1.0
X-Received: by 10.180.94.67 with SMTP id da3mr2403564wib.30.1373653450568;
 Fri, 12 Jul 2013 11:24:10 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.217.94.132 with HTTP; Fri, 12 Jul 2013 11:24:10 -0700 (PDT)
In-Reply-To: <201307120803.r6C83ACp016523@svn.freebsd.org>
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
Date: Fri, 12 Jul 2013 11:24:10 -0700
X-Google-Sender-Auth: O_QhX3dlDFVqRPGW7zApcXlfjFI
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Adrian Chadd 
To: Craig Rodrigues 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 18:24:12 -0000

Hm, I just found a patch in my local collection which works for all
netgraph nodes.

Maybe we should do that instead of this?

http://people.freebsd.org/~adrian/ath/20130712-netgraph-vimage.diff

That should solve it for all dynamic netgraph stuff, rather than just bluetooth.



-adrian

On 12 July 2013 01:03, Craig Rodrigues  wrote:
> Author: rodrigc
> Date: Fri Jul 12 08:03:10 2013
> New Revision: 253255
> URL: http://svnweb.freebsd.org/changeset/base/253255
>
> Log:
>   PR: kern/168520
>   Submitted by: "YAMAMOTO, Shigeru" 
>   Reviewed by: adrian
>
>   In PC-BSD 9.1, VIMAGE is enabled in the kernel config.
>   For laptops with Bluetooth capability, such as the HP Elitebook 8460p,
>   the kernel will panic upon bootup, because curthread->td_vnet
>   is not initialized.
>
>   Properly initialize curthread->td_vnet when initializing the Bluetooth stack.
>
>   This allows laptops such as the HP Elitebook 8460p laptop
>   to properly boot with VIMAGE kernels.
>
> Modified:
>   head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
>
> Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
> ==============================================================================
> --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c    Fri Jul 12 07:43:56 2013        (r253254)
> +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c    Fri Jul 12 08:03:10 2013        (r253255)
> @@ -109,7 +109,9 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
> +#include 
>
>  #include "usbdevs.h"
>  #include 
> @@ -123,6 +125,7 @@
>  #include 
>  #include 
>
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -487,13 +490,14 @@ ubt_attach(device_t dev)
>
>         sc->sc_dev = dev;
>         sc->sc_debug = NG_UBT_WARN_LEVEL;
> -
> +       CURVNET_SET(TD_TO_VNET(curthread));
>         /*
>          * Create Netgraph node
>          */
>
>         if (ng_make_node_common(&typestruct, &sc->sc_node) != 0) {
>                 UBT_ALERT(sc, "could not create Netgraph node\n");
> +               CURVNET_RESTORE();
>                 return (ENXIO);
>         }
>
> @@ -501,10 +505,12 @@ ubt_attach(device_t dev)
>         if (ng_name_node(sc->sc_node, device_get_nameunit(dev)) != 0) {
>                 UBT_ALERT(sc, "could not name Netgraph node\n");
>                 NG_NODE_UNREF(sc->sc_node);
> +               CURVNET_RESTORE();
>                 return (ENXIO);
>         }
>         NG_NODE_SET_PRIVATE(sc->sc_node, sc);
>         NG_NODE_FORCE_WRITER(sc->sc_node);
> +       CURVNET_RESTORE();
>
>         /*
>          * Initialize device softc structure
> @@ -631,8 +637,10 @@ ubt_detach(device_t dev)
>         /* Destroy Netgraph node */
>         if (node != NULL) {
>                 sc->sc_node = NULL;
> +               CURVNET_SET(node->nd_vnet);
>                 NG_NODE_REALLY_DIE(node);
>                 ng_rmnode_self(node);
> +               CURVNET_RESTORE();
>         }
>
>         /* Make sure ubt_task in gone */

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 18:25:17 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 653D214B;
 Fri, 12 Jul 2013 18:25:17 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com
 [IPv6:2a00:1450:400c:c05::235])
 by mx1.freebsd.org (Postfix) with ESMTP id 7DC44174B;
 Fri, 12 Jul 2013 18:25:16 +0000 (UTC)
Received: by mail-wi0-f181.google.com with SMTP id hq4so993927wib.8
 for ; Fri, 12 Jul 2013 11:25:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=se+VAbCuomFiF4vr4nOfgqOJvYsSnY/gFkXejOtyAmQ=;
 b=mSiYaKsGEzi9kGRx8ncBG06lMvh0kqcz8Vf6ILZPz6xwWmSAKgpJjJ/zDlfUm0DxRP
 /tlu9CacfTszjnTZ+P9Byyv7pgWmuOTzNO5ssZadVYGJlCT8tRXFAZXnIcs6cGscDK7Z
 iPNq+b9LWn01klN7LHHBJOUF69/JsbR6IVSlgLnBeaQHR9j+yorWMYEJq++LQK+Wy04V
 oTfhkE/yjBu+jplI0xyeEj2Ei2Cyu9zA5BI7YmaQmuP02zmaSHgI1szHUwooO7rCXGX/
 e/12lRyK22ZxNV2uBdYh+iBJZqT3oUkozQy4to2ZFnkTFzuTn2bcWzF5LZGNjeOoS4mG
 Bs+Q==
MIME-Version: 1.0
X-Received: by 10.180.160.165 with SMTP id xl5mr2347061wib.46.1373653515475;
 Fri, 12 Jul 2013 11:25:15 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.217.94.132 with HTTP; Fri, 12 Jul 2013 11:25:15 -0700 (PDT)
In-Reply-To: 
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
Date: Fri, 12 Jul 2013 11:25:15 -0700
X-Google-Sender-Auth: nrSr7tk6SwxkEx56byD8yi4FDqQ
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Adrian Chadd 
To: Craig Rodrigues 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 18:25:17 -0000

.. oh, and this particular patch is for destroying netgraph nodes, not
just upon attach.



-adrian

On 12 July 2013 11:24, Adrian Chadd  wrote:
> Hm, I just found a patch in my local collection which works for all
> netgraph nodes.
>
> Maybe we should do that instead of this?
>
> http://people.freebsd.org/~adrian/ath/20130712-netgraph-vimage.diff
>
> That should solve it for all dynamic netgraph stuff, rather than just bluetooth.
>
>
>
> -adrian
>
> On 12 July 2013 01:03, Craig Rodrigues  wrote:
>> Author: rodrigc
>> Date: Fri Jul 12 08:03:10 2013
>> New Revision: 253255
>> URL: http://svnweb.freebsd.org/changeset/base/253255
>>
>> Log:
>>   PR: kern/168520
>>   Submitted by: "YAMAMOTO, Shigeru" 
>>   Reviewed by: adrian
>>
>>   In PC-BSD 9.1, VIMAGE is enabled in the kernel config.
>>   For laptops with Bluetooth capability, such as the HP Elitebook 8460p,
>>   the kernel will panic upon bootup, because curthread->td_vnet
>>   is not initialized.
>>
>>   Properly initialize curthread->td_vnet when initializing the Bluetooth stack.
>>
>>   This allows laptops such as the HP Elitebook 8460p laptop
>>   to properly boot with VIMAGE kernels.
>>
>> Modified:
>>   head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
>>
>> Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
>> ==============================================================================
>> --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c    Fri Jul 12 07:43:56 2013        (r253254)
>> +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c    Fri Jul 12 08:03:10 2013        (r253255)
>> @@ -109,7 +109,9 @@
>>  #include 
>>  #include 
>>  #include 
>> +#include 
>>  #include 
>> +#include 
>>
>>  #include "usbdevs.h"
>>  #include 
>> @@ -123,6 +125,7 @@
>>  #include 
>>  #include 
>>
>> +#include 
>>  #include 
>>  #include 
>>  #include 
>> @@ -487,13 +490,14 @@ ubt_attach(device_t dev)
>>
>>         sc->sc_dev = dev;
>>         sc->sc_debug = NG_UBT_WARN_LEVEL;
>> -
>> +       CURVNET_SET(TD_TO_VNET(curthread));
>>         /*
>>          * Create Netgraph node
>>          */
>>
>>         if (ng_make_node_common(&typestruct, &sc->sc_node) != 0) {
>>                 UBT_ALERT(sc, "could not create Netgraph node\n");
>> +               CURVNET_RESTORE();
>>                 return (ENXIO);
>>         }
>>
>> @@ -501,10 +505,12 @@ ubt_attach(device_t dev)
>>         if (ng_name_node(sc->sc_node, device_get_nameunit(dev)) != 0) {
>>                 UBT_ALERT(sc, "could not name Netgraph node\n");
>>                 NG_NODE_UNREF(sc->sc_node);
>> +               CURVNET_RESTORE();
>>                 return (ENXIO);
>>         }
>>         NG_NODE_SET_PRIVATE(sc->sc_node, sc);
>>         NG_NODE_FORCE_WRITER(sc->sc_node);
>> +       CURVNET_RESTORE();
>>
>>         /*
>>          * Initialize device softc structure
>> @@ -631,8 +637,10 @@ ubt_detach(device_t dev)
>>         /* Destroy Netgraph node */
>>         if (node != NULL) {
>>                 sc->sc_node = NULL;
>> +               CURVNET_SET(node->nd_vnet);
>>                 NG_NODE_REALLY_DIE(node);
>>                 ng_rmnode_self(node);
>> +               CURVNET_RESTORE();
>>         }
>>
>>         /* Make sure ubt_task in gone */

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 18:39:37 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 856455B4;
 Fri, 12 Jul 2013 18:39:37 +0000 (UTC)
 (envelope-from crodr001@gmail.com)
Received: from mail-la0-x230.google.com (mail-la0-x230.google.com
 [IPv6:2a00:1450:4010:c03::230])
 by mx1.freebsd.org (Postfix) with ESMTP id 59957181B;
 Fri, 12 Jul 2013 18:39:36 +0000 (UTC)
Received: by mail-la0-f48.google.com with SMTP id lx15so8006414lab.35
 for ; Fri, 12 Jul 2013 11:39:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=RSDoJCG4kNetOijkLE/tKQEfB2S0ZwaQahBWew0QeWg=;
 b=h0V1GG97OW8F/y5H0x0mS2HP4z+E7DfS0hJ8kZihlL/yUbh+fHKmlPsRgcSioGK5rF
 RkrqPPS/C7gsxdCqdeUC2Gy74w2dCybRL1gN+IKPq486lNos9E7JvIoaLgQ2nmPJ3Wm3
 yyiRzM/RduxNxn0EV3sbZiT8xMBkBzxTO+qRhW/53sparX1AAPwNq5bppP+ekY8eVdKZ
 Sk/b/ptuBnB2FrQZTt7LOiN5ebCtlQqDIP2Xt0p3Szz5r6o781zryYZZuWcCuUAkL4OH
 h8813kNabrGEC3KgRXvxvudHYjHKZ1p4DOYaBE0COOOtSRXVTVLMbQhBTN0Bbiqe4It9
 kKwQ==
MIME-Version: 1.0
X-Received: by 10.112.29.17 with SMTP id f17mr19989193lbh.20.1373654375017;
 Fri, 12 Jul 2013 11:39:35 -0700 (PDT)
Sender: crodr001@gmail.com
Received: by 10.112.149.38 with HTTP; Fri, 12 Jul 2013 11:39:34 -0700 (PDT)
In-Reply-To: 
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
Date: Fri, 12 Jul 2013 11:39:34 -0700
X-Google-Sender-Auth: XPN-FqzKBTyLYIvReG9hSo6sHlU
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Craig Rodrigues 
To: Adrian Chadd 
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 18:39:37 -0000

I like your patch.  It may be worth having one more Netgraph person review
it and give a sanity check, but
I think we should commit your patch ASAP.
I am new to VNET, but I am wondering if in your patch we can KASSERT if
node->vnet is NULL.  That would make
things easier to debug.

The part of my patch which which does CURVNET_SET is still necessary upon
attach in Bluetooth.
However, with your patch, we can get rid of the part of my patch which does
CURVNET_SET upon Bluetooth detach.

--
Craig



On Fri, Jul 12, 2013 at 11:24 AM, Adrian Chadd  wrote:

> Hm, I just found a patch in my local collection which works for all
> netgraph nodes.
>
> Maybe we should do that instead of this?
>
> http://people.freebsd.org/~adrian/ath/20130712-netgraph-vimage.diff
>
> That should solve it for all dynamic netgraph stuff, rather than just
> bluetooth.
>
>
>
> -adrian
>
> On 12 July 2013 01:03, Craig Rodrigues  wrote:
> > Author: rodrigc
> > Date: Fri Jul 12 08:03:10 2013
> > New Revision: 253255
> > URL: http://svnweb.freebsd.org/changeset/base/253255
> >
> > Log:
> >   PR: kern/168520
> >   Submitted by: "YAMAMOTO, Shigeru" 
> >   Reviewed by: adrian
> >
> >   In PC-BSD 9.1, VIMAGE is enabled in the kernel config.
> >   For laptops with Bluetooth capability, such as the HP Elitebook 8460p,
> >   the kernel will panic upon bootup, because curthread->td_vnet
> >   is not initialized.
> >
> >   Properly initialize curthread->td_vnet when initializing the Bluetooth
> stack.
> >
> >   This allows laptops such as the HP Elitebook 8460p laptop
> >   to properly boot with VIMAGE kernels.
> >
> > Modified:
> >   head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
> >
> > Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
> >
> ==============================================================================
> > --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c    Fri Jul 12
> 07:43:56 2013        (r253254)
> > +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c    Fri Jul 12
> 08:03:10 2013        (r253255)
> > @@ -109,7 +109,9 @@
> >  #include 
> >  #include 
> >  #include 
> > +#include 
> >  #include 
> > +#include 
> >
> >  #include "usbdevs.h"
> >  #include 
> > @@ -123,6 +125,7 @@
> >  #include 
> >  #include 
> >
> > +#include 
> >  #include 
> >  #include 
> >  #include 
> > @@ -487,13 +490,14 @@ ubt_attach(device_t dev)
> >
> >         sc->sc_dev = dev;
> >         sc->sc_debug = NG_UBT_WARN_LEVEL;
> > -
> > +       CURVNET_SET(TD_TO_VNET(curthread));
> >         /*
> >          * Create Netgraph node
> >          */
> >
> >         if (ng_make_node_common(&typestruct, &sc->sc_node) != 0) {
> >                 UBT_ALERT(sc, "could not create Netgraph node\n");
> > +               CURVNET_RESTORE();
> >                 return (ENXIO);
> >         }
> >
> > @@ -501,10 +505,12 @@ ubt_attach(device_t dev)
> >         if (ng_name_node(sc->sc_node, device_get_nameunit(dev)) != 0) {
> >                 UBT_ALERT(sc, "could not name Netgraph node\n");
> >                 NG_NODE_UNREF(sc->sc_node);
> > +               CURVNET_RESTORE();
> >                 return (ENXIO);
> >         }
> >         NG_NODE_SET_PRIVATE(sc->sc_node, sc);
> >         NG_NODE_FORCE_WRITER(sc->sc_node);
> > +       CURVNET_RESTORE();
> >
> >         /*
> >          * Initialize device softc structure
> > @@ -631,8 +637,10 @@ ubt_detach(device_t dev)
> >         /* Destroy Netgraph node */
> >         if (node != NULL) {
> >                 sc->sc_node = NULL;
> > +               CURVNET_SET(node->nd_vnet);
> >                 NG_NODE_REALLY_DIE(node);
> >                 ng_rmnode_self(node);
> > +               CURVNET_RESTORE();
> >         }
> >
> >         /* Make sure ubt_task in gone */
>

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 18:52:33 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 98B1AA35;
 Fri, 12 Jul 2013 18:52:33 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 8B18818C4;
 Fri, 12 Jul 2013 18:52:33 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CIqXgf009825;
 Fri, 12 Jul 2013 18:52:33 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CIqXGg009824;
 Fri, 12 Jul 2013 18:52:33 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <201307121852.r6CIqXGg009824@svn.freebsd.org>
From: Konstantin Belousov 
Date: Fri, 12 Jul 2013 18:52:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253280 - head/sys/ufs/ffs
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 18:52:33 -0000

Author: kib
Date: Fri Jul 12 18:52:33 2013
New Revision: 253280
URL: http://svnweb.freebsd.org/changeset/base/253280

Log:
  Only copy as much bytes as there in superblock, instead of the full
  block copy, when copying the superblock into the snapshot.  UFS1 does
  not align superblock on the block boundary, and bcopy runs off the end
  of the buffer.
  
  Reported by:	Andre Albsmeier 
  Reviewed by:	mckusick
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/ufs/ffs/ffs_snapshot.c

Modified: head/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- head/sys/ufs/ffs/ffs_snapshot.c	Fri Jul 12 18:13:41 2013	(r253279)
+++ head/sys/ufs/ffs/ffs_snapshot.c	Fri Jul 12 18:52:33 2013	(r253280)
@@ -792,7 +792,7 @@ out1:
 		brelse(nbp);
 	} else {
 		loc = blkoff(fs, fs->fs_sblockloc);
-		bcopy((char *)copy_fs, &nbp->b_data[loc], fs->fs_bsize);
+		bcopy((char *)copy_fs, &nbp->b_data[loc], (u_int)fs->fs_sbsize);
 		bawrite(nbp);
 	}
 	/*

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 19:08:34 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 2816BF92;
 Fri, 12 Jul 2013 19:08:34 +0000 (UTC)
 (envelope-from trociny@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 01DAD19AD;
 Fri, 12 Jul 2013 19:08:34 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CJ8XJ6013720;
 Fri, 12 Jul 2013 19:08:33 GMT (envelope-from trociny@svn.freebsd.org)
Received: (from trociny@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CJ8Xof013718;
 Fri, 12 Jul 2013 19:08:33 GMT (envelope-from trociny@svn.freebsd.org)
Message-Id: <201307121908.r6CJ8Xof013718@svn.freebsd.org>
From: Mikolaj Golub 
Date: Fri, 12 Jul 2013 19:08:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253282 - in head/sys: netinet netinet6
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 19:08:34 -0000

Author: trociny
Date: Fri Jul 12 19:08:33 2013
New Revision: 253282
URL: http://svnweb.freebsd.org/changeset/base/253282

Log:
  A complete duplication of binding should be allowed if on both new and
  duplicated sockets a multicast address is bound and either
  SO_REUSEPORT or SO_REUSEADDR is set.
  
  But actually it works for the following combinations:
  
    * SO_REUSEPORT is set for the fist socket and SO_REUSEPORT for the new;
    * SO_REUSEADDR is set for the fist socket and SO_REUSEADDR for the new;
    * SO_REUSEPORT is set for the fist socket and SO_REUSEADDR for the new;
  
  and fails for this:
  
    * SO_REUSEADDR is set for the fist socket and SO_REUSEPORT for the new.
  
  Fix the last case.
  
  PR:		179901
  MFC after:	1 month

Modified:
  head/sys/netinet/in_pcb.c
  head/sys/netinet6/in6_pcb.c

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c	Fri Jul 12 18:54:47 2013	(r253281)
+++ head/sys/netinet/in_pcb.c	Fri Jul 12 19:08:33 2013	(r253282)
@@ -554,7 +554,7 @@ in_pcbbind_setup(struct inpcb *inp, stru
 			 * and a multicast address is bound on both
 			 * new and duplicated sockets.
 			 */
-			if (so->so_options & SO_REUSEADDR)
+			if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) != 0)
 				reuseport = SO_REUSEADDR|SO_REUSEPORT;
 		} else if (sin->sin_addr.s_addr != INADDR_ANY) {
 			sin->sin_port = 0;		/* yech... */

Modified: head/sys/netinet6/in6_pcb.c
==============================================================================
--- head/sys/netinet6/in6_pcb.c	Fri Jul 12 18:54:47 2013	(r253281)
+++ head/sys/netinet6/in6_pcb.c	Fri Jul 12 19:08:33 2013	(r253282)
@@ -156,7 +156,7 @@ in6_pcbbind(register struct inpcb *inp, 
 			 * and a multicast address is bound on both
 			 * new and duplicated sockets.
 			 */
-			if (so->so_options & SO_REUSEADDR)
+			if ((so->so_options & (SO_REUSEADDR|SO_REUSEPORT)) != 0)
 				reuseport = SO_REUSEADDR|SO_REUSEPORT;
 		} else if (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
 			struct ifaddr *ifa;

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 20:27:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id BEA6074;
 Fri, 12 Jul 2013 20:27:18 +0000 (UTC)
 (envelope-from to.my.trociny@gmail.com)
Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com
 [IPv6:2a00:1450:4010:c04::236])
 by mx1.freebsd.org (Postfix) with ESMTP id 7A5F81D71;
 Fri, 12 Jul 2013 20:27:17 +0000 (UTC)
Received: by mail-lb0-f182.google.com with SMTP id r11so7993230lbv.13
 for ; Fri, 12 Jul 2013 13:27:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=8f4gDBddKqeWw+3cet36rBc1u/LgCKj2dRiWB8y04ZQ=;
 b=WkJSzphz2l39qiwYRj1urAUmyut/UlaOrj36dAhXyJ0hhd5RhfK0QFH23oIRqCGPAa
 J6QMR5nreuqSaNUzoi36CThihhqJRmmH2s53WR2wSZkgoxdiNud7PeNTw5mIWqo/fRRR
 uGmpRH5cIc7OooTo+2uDWW+QtytzjHkkwVj1N0RgR0ixiViWHpZtw9pXs5rafacL0CgW
 kwUAg0MfLcs8LQroITdFznpGB9gZ3DXNV+BY6eaCRZe5HcWZqRF2/WZtCB0FIqtPT9MU
 inTweWCzgZFm6ckI3FD4jcEoA0zNOmzGjUVI08Vq5bB53EiKiKF7mjDnYIclp+4fJccO
 Xyyg==
X-Received: by 10.152.21.99 with SMTP id u3mr20607353lae.18.1373660835579;
 Fri, 12 Jul 2013 13:27:15 -0700 (PDT)
Received: from localhost ([178.150.115.244])
 by mx.google.com with ESMTPSA id et10sm14505281lbc.6.2013.07.12.13.27.13
 for 
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Fri, 12 Jul 2013 13:27:14 -0700 (PDT)
Sender: Mikolaj Golub 
Date: Fri, 12 Jul 2013 23:27:12 +0300
From: Mikolaj Golub 
To: Craig Rodrigues 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
Message-ID: <20130712202710.GB2757@gmail.com>
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 Adrian Chadd , src-committers@freebsd.org,
 Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 20:27:18 -0000

On Fri, Jul 12, 2013 at 11:39:34AM -0700, Craig Rodrigues wrote:
> I like your patch.  It may be worth having one more Netgraph person review
> it and give a sanity check, but
> I think we should commit your patch ASAP.
> I am new to VNET, but I am wondering if in your patch we can KASSERT if
> node->vnet is NULL.  That would make
> things easier to debug.
> 
> The part of my patch which which does CURVNET_SET is still necessary upon
> attach in Bluetooth.
> However, with your patch, we can get rid of the part of my patch which does
> CURVNET_SET upon Bluetooth detach.

Some time ago there was a long discussion about VIMAGE issue with
hotplugabble network devices:

http://lists.freebsd.org/pipermail/freebsd-hackers/2012-October/040784.html

(I wander why Adrian did not mention it as he was deeply involved)

Then Marko came up with a patch that mihght fix the issue in a more
generic way:

http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041120.html

Unfortunately it was not tested. I think it would be very interesting
to try it with hotplugabble devices. (I don't have any so can't test).

-- 
Mikolaj Golub

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 21:14:43 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 6AA43C6D;
 Fri, 12 Jul 2013 21:14:43 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 5B7961F51;
 Fri, 12 Jul 2013 21:14:43 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CLEhNg051072;
 Fri, 12 Jul 2013 21:14:43 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CLEhFk051071;
 Fri, 12 Jul 2013 21:14:43 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201307122114.r6CLEhFk051071@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 12 Jul 2013 21:14:43 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253284 - head/sys/dev/ixgbe
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 21:14:43 -0000

Author: jfv
Date: Fri Jul 12 21:14:42 2013
New Revision: 253284
URL: http://svnweb.freebsd.org/changeset/base/253284

Log:
  Remove the conditional define around the option headers,
  when building the driver as a module the result of the present
  system results in INET and INET6 being undefined, and will cause
  the panic in ixgbe_tso_setup(). The Makefile in the module directory
  now renders the conditional in the source unnecessary and wrong.
  
  MFC after: ASAP - the panic as a module must not get into 9.2

Modified:
  head/sys/dev/ixgbe/ixgbe.c

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c	Fri Jul 12 20:06:52 2013	(r253283)
+++ head/sys/dev/ixgbe/ixgbe.c	Fri Jul 12 21:14:42 2013	(r253284)
@@ -33,11 +33,8 @@
 /*$FreeBSD$*/
 
 
-#ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_inet.h"
 #include "opt_inet6.h"
-#endif
-
 #include "ixgbe.h"
 
 /*********************************************************************

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 21:21:15 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id B8745EF8;
 Fri, 12 Jul 2013 21:21:15 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id AA9A81FBA;
 Fri, 12 Jul 2013 21:21:15 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CLLFKp053457;
 Fri, 12 Jul 2013 21:21:15 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CLLFus053456;
 Fri, 12 Jul 2013 21:21:15 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201307122121.r6CLLFus053456@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 12 Jul 2013 21:21:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253285 - head/sys/dev/ixgbe
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 21:21:15 -0000

Author: jfv
Date: Fri Jul 12 21:21:15 2013
New Revision: 253285
URL: http://svnweb.freebsd.org/changeset/base/253285

Log:
  Opps, need to change the VF code as well.
  
  MFC after:	ASAP

Modified:
  head/sys/dev/ixgbe/ixv.c

Modified: head/sys/dev/ixgbe/ixv.c
==============================================================================
--- head/sys/dev/ixgbe/ixv.c	Fri Jul 12 21:14:42 2013	(r253284)
+++ head/sys/dev/ixgbe/ixv.c	Fri Jul 12 21:21:15 2013	(r253285)
@@ -32,11 +32,8 @@
 ******************************************************************************/
 /*$FreeBSD$*/
 
-#ifdef HAVE_KERNEL_OPTION_HEADERS
 #include "opt_inet.h"
 #include "opt_inet6.h"
-#endif
-
 #include "ixv.h"
 
 /*********************************************************************

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 21:36:29 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id EF44E600;
 Fri, 12 Jul 2013 21:36:29 +0000 (UTC)
 (envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id E0FAF108B;
 Fri, 12 Jul 2013 21:36:29 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CLaTE9056938;
 Fri, 12 Jul 2013 21:36:29 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CLaT2D056937;
 Fri, 12 Jul 2013 21:36:29 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <201307122136.r6CLaT2D056937@svn.freebsd.org>
From: Xin LI 
Date: Fri, 12 Jul 2013 21:36:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253288 - head/sys/dev/hptnr
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 21:36:30 -0000

Author: delphij
Date: Fri Jul 12 21:36:29 2013
New Revision: 253288
URL: http://svnweb.freebsd.org/changeset/base/253288

Log:
  Merge from hpt27xx, r249468 (mav):
  
  MFprojects/camlock r248982:
  Stop abusing xpt_periph in random plases that really have no periph related
  to CCB, for example, bus scanning.  NULL value is fine in such cases and it
  is correctly logged in debug messages as "noperiph".  If at some point we
  need some real XPT periphs (alike to pmpX now), quite likely they will be
  per-bus, and not a single global instance as xpt_periph now.

Modified:
  head/sys/dev/hptnr/hptnr_osm_bsd.c

Modified: head/sys/dev/hptnr/hptnr_osm_bsd.c
==============================================================================
--- head/sys/dev/hptnr/hptnr_osm_bsd.c	Fri Jul 12 21:27:23 2013	(r253287)
+++ head/sys/dev/hptnr/hptnr_osm_bsd.c	Fri Jul 12 21:36:29 2013	(r253288)
@@ -1347,7 +1347,7 @@ static int	hpt_rescan_bus(void)
 		{
 			return(ENOMEM);
 		}
-		if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(vbus_ext->sim),
+		if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(vbus_ext->sim),
 			CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP)	
 		{
 			xpt_free_ccb(ccb);

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 22:02:12 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 15828D72;
 Fri, 12 Jul 2013 22:02:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 043FF119E;
 Fri, 12 Jul 2013 22:02:12 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CM2B9L065025;
 Fri, 12 Jul 2013 22:02:11 GMT (envelope-from gjb@svn.freebsd.org)
Received: (from gjb@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CM2BwY065024;
 Fri, 12 Jul 2013 22:02:11 GMT (envelope-from gjb@svn.freebsd.org)
Message-Id: <201307122202.r6CM2BwY065024@svn.freebsd.org>
From: Glen Barber 
Date: Fri, 12 Jul 2013 22:02:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253290 - head/share/man/man5
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 22:02:12 -0000

Author: gjb
Date: Fri Jul 12 22:02:11 2013
New Revision: 253290
URL: http://svnweb.freebsd.org/changeset/base/253290

Log:
  Document that a literal jail name of 0 (zero) is not allowed.
  
  PR:		174436
  Submitted by:	Robert Schulze
  Reviewed by:	mjg
  MFC after:	3 days

Modified:
  head/share/man/man5/rc.conf.5

Modified: head/share/man/man5/rc.conf.5
==============================================================================
--- head/share/man/man5/rc.conf.5	Fri Jul 12 22:01:18 2013	(r253289)
+++ head/share/man/man5/rc.conf.5	Fri Jul 12 22:02:11 2013	(r253290)
@@ -24,7 +24,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd July 9, 2013
+.Dd July 12, 2013
 .Dt RC.CONF 5
 .Os
 .Sh NAME
@@ -3875,6 +3875,11 @@ configure multiple jails.
 The names specified in this list will be used to
 identify settings common to an instance of a jail,
 and should contain alphanumeric characters only.
+The literal jail name of
+.Dq Li 0
+.Pq zero
+is not allowed.
+.Pp
 Assuming that the jail in question was named
 .Li vjail ,
 you would have the following dependent variables:

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 22:03:33 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 95A95FE;
 Fri, 12 Jul 2013 22:03:33 +0000 (UTC)
 (envelope-from melifaro@FreeBSD.org)
Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2])
 by mx1.freebsd.org (Postfix) with ESMTP id 5D5DA11B9;
 Fri, 12 Jul 2013 22:03:33 +0000 (UTC)
Received: from v6.mpls.in ([2a02:978:2::5] helo=ws.su29.net)
 by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256)
 (Exim 4.76 (FreeBSD)) (envelope-from )
 id 1UxlUE-000BYw-Tf; Sat, 13 Jul 2013 02:06:46 +0400
Message-ID: <51E07D20.9040309@FreeBSD.org>
Date: Sat, 13 Jul 2013 02:03:12 +0400
From: "Alexander V. Chernikov" 
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64;
 rv:9.0) Gecko/20120121 Thunderbird/9.0
MIME-Version: 1.0
To: Hiroki Sato 
Subject: Re: svn commit: r253262 - in head: lib/libc/gen sys/net
References: <201307121236.r6CCaDCW095414@svn.freebsd.org>
In-Reply-To: <201307121236.r6CCaDCW095414@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
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 22:03:33 -0000

On 12.07.2013 16:36, Hiroki Sato wrote:
> Author: hrs
> Date: Fri Jul 12 12:36:12 2013
> New Revision: 253262
> URL: http://svnweb.freebsd.org/changeset/base/253262
>
> Log:
>    Add a leaf node CTL_NET.PF_ROUTE.0.AF.NET_RT_DUMP.0.FIB.  This returns
>    routing table with the specified FIB number, not td->td_proc->p_fibnum.
Thanks! I had plans to do the same :)
>
> Modified:
>    head/lib/libc/gen/sysctl.3
>    head/sys/net/rtsock.c
>
> Modified: head/lib/libc/gen/sysctl.3
> ==============================================================================
> --- head/lib/libc/gen/sysctl.3	Fri Jul 12 12:18:07 2013	(r253261)
> +++ head/lib/libc/gen/sysctl.3	Fri Jul 12 12:36:12 2013	(r253262)
> @@ -28,7 +28,7 @@
>   .\"	@(#)sysctl.3	8.4 (Berkeley) 5/9/95
>   .\" $FreeBSD$
>   .\"
> -.Dd February 11, 2012
> +.Dd May 17, 2013
>   .Dt SYSCTL 3
>   .Os
>   .Sh NAME
> @@ -547,14 +547,14 @@ The length of each message is contained
>   The third level name is a protocol number, which is currently always 0.
>   The fourth level name is an address family, which may be set to 0 to
>   select all address families.
> -The fifth and sixth level names are as follows:
> -.Bl -column "Fifth level nameXXXXXX" "Sixth level is:XXX" -offset indent
> -.It Sy "Fifth level name	Sixth level is:"
> -.It "NET_RT_FLAGS	rtflags"
> -.It "NET_RT_DUMP	None"
> -.It "NET_RT_IFLIST	0 or if_index"
> -.It "NET_RT_IFMALIST	0 or if_index"
> -.It "NET_RT_IFLISTL	0 or if_index"
> +The fifth, sixth, and seventh level names are as follows:
> +.Bl -column "Fifth level	" "Sixth level	" -offset indent
> +.It Sy "Fifth level	Sixth level	Seventh level"
> +.It "NET_RT_FLAGS	rtflags			None"
> +.It "NET_RT_DUMP	None			None or fib number"
> +.It "NET_RT_IFLIST	0 or if_index		None"
> +.It "NET_RT_IFMALIST	0 or if_index		None"
> +.It "NET_RT_IFLISTL	0 or if_index		None"
>   .El
>   .Pp
>   The
>
> Modified: head/sys/net/rtsock.c
> ==============================================================================
> --- head/sys/net/rtsock.c	Fri Jul 12 12:18:07 2013	(r253261)
> +++ head/sys/net/rtsock.c	Fri Jul 12 12:36:12 2013	(r253262)
> @@ -1905,6 +1905,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
>   	u_int	namelen = arg2;
>   	struct radix_node_head *rnh = NULL; /* silence compiler. */
>   	int	i, lim, error = EINVAL;
> +	int	fib = 0;
>   	u_char	af;
>   	struct	walkarg w;
>
> @@ -1912,7 +1913,17 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
>   	namelen--;
>   	if (req->newptr)
>   		return (EPERM);
> -	if (namelen != 3)
> +	if (name[1] == NET_RT_DUMP) {
> +		if (namelen == 3)
> +			fib = req->td->td_proc->p_fibnum;
> +		else if (namelen == 4)
> +			fib = (name[3] == -1) ?
> +			    req->td->td_proc->p_fibnum : name[3];
> +		else
> +			return ((namelen<  3) ? EISDIR : ENOTDIR);
> +		if (fib<  0 || fib>= rt_numfibs)
> +			return (EINVAL);
> +	} else if (namelen != 3)
>   		return ((namelen<  3) ? EISDIR : ENOTDIR);
>   	af = name[0];
>   	if (af>  AF_MAX)
> @@ -1951,7 +1962,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS)
>   		 * take care of routing entries
>   		 */
>   		for (error = 0; error == 0&&  i<= lim; i++) {
> -			rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i);
> +			rnh = rt_tables_get_rnh(fib, i);
>   			if (rnh != NULL) {
>   				RADIX_NODE_HEAD_RLOCK(rnh);
>   			    	error = rnh->rnh_walktree(rnh,
>


From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 22:36:27 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id CEA077A7;
 Fri, 12 Jul 2013 22:36:27 +0000 (UTC) (envelope-from jfv@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id BFD5C1358;
 Fri, 12 Jul 2013 22:36:27 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CMaRVP075070;
 Fri, 12 Jul 2013 22:36:27 GMT (envelope-from jfv@svn.freebsd.org)
Received: (from jfv@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CMaQq4075062;
 Fri, 12 Jul 2013 22:36:26 GMT (envelope-from jfv@svn.freebsd.org)
Message-Id: <201307122236.r6CMaQq4075062@svn.freebsd.org>
From: Jack F Vogel 
Date: Fri, 12 Jul 2013 22:36:26 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253303 - in head/sys: dev/e1000 modules/em modules/igb
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 22:36:27 -0000

Author: jfv
Date: Fri Jul 12 22:36:26 2013
New Revision: 253303
URL: http://svnweb.freebsd.org/changeset/base/253303

Log:
  Change the E1000 driver option header handling to match the
  ixgbe driver. As it was, when building them as a module INET
  and INET6 are not defined. In these drivers it does not cause
  a panic, however it does result in different behavior in the
  ioctl routine when you are using a module vs static, and I
  think the behavior should be the same.
  
  MFC after: 3 days

Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_lem.c
  head/sys/modules/em/Makefile
  head/sys/modules/igb/Makefile

Modified: head/sys/dev/e1000/if_em.c
==============================================================================
--- head/sys/dev/e1000/if_em.c	Fri Jul 12 22:16:43 2013	(r253302)
+++ head/sys/dev/e1000/if_em.c	Fri Jul 12 22:36:26 2013	(r253303)
@@ -32,10 +32,11 @@
 ******************************************************************************/
 /*$FreeBSD$*/
 
-#ifdef HAVE_KERNEL_OPTION_HEADERS
-#include "opt_device_polling.h"
 #include "opt_inet.h"
 #include "opt_inet6.h"
+
+#ifdef HAVE_KERNEL_OPTION_HEADERS
+#include "opt_device_polling.h"
 #endif
 
 #include 

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c	Fri Jul 12 22:16:43 2013	(r253302)
+++ head/sys/dev/e1000/if_igb.c	Fri Jul 12 22:36:26 2013	(r253303)
@@ -33,10 +33,11 @@
 /*$FreeBSD$*/
 
 
-#ifdef HAVE_KERNEL_OPTION_HEADERS
-#include "opt_device_polling.h"
 #include "opt_inet.h"
 #include "opt_inet6.h"
+
+#ifdef HAVE_KERNEL_OPTION_HEADERS
+#include "opt_device_polling.h"
 #include "opt_altq.h"
 #endif
 

Modified: head/sys/dev/e1000/if_lem.c
==============================================================================
--- head/sys/dev/e1000/if_lem.c	Fri Jul 12 22:16:43 2013	(r253302)
+++ head/sys/dev/e1000/if_lem.c	Fri Jul 12 22:36:26 2013	(r253303)
@@ -32,10 +32,11 @@
 ******************************************************************************/
 /*$FreeBSD$*/
 
-#ifdef HAVE_KERNEL_OPTION_HEADERS
-#include "opt_device_polling.h"
 #include "opt_inet.h"
 #include "opt_inet6.h"
+
+#ifdef HAVE_KERNEL_OPTION_HEADERS
+#include "opt_device_polling.h"
 #endif
 
 #include 

Modified: head/sys/modules/em/Makefile
==============================================================================
--- head/sys/modules/em/Makefile	Fri Jul 12 22:16:43 2013	(r253302)
+++ head/sys/modules/em/Makefile	Fri Jul 12 22:36:26 2013	(r253303)
@@ -1,7 +1,10 @@
 # $FreeBSD$
+
+.include 
+
 .PATH:  ${.CURDIR}/../../dev/e1000
 KMOD    = if_em
-SRCS    = device_if.h bus_if.h pci_if.h opt_inet.h
+SRCS    = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h
 SRCS    += $(CORE_SRC) $(LEGACY_SRC)
 SRCS	+= $(COMMON_SHARED) $(LEGACY_SHARED) $(PCIE_SHARED)
 CORE_SRC = if_em.c e1000_osdep.c
@@ -18,4 +21,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000
 # DEVICE_POLLING for a non-interrupt-driven method
 #CFLAGS  += -DDEVICE_POLLING
 
+.if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
+opt_inet.h:
+	@echo "#define INET 1" > ${.TARGET}
+.endif
+
+.if ${MK_INET6_SUPPORT} != "no"
+opt_inet6.h:
+	@echo "#define INET6 1" > ${.TARGET}
+.endif
+.endif
+
 .include 

Modified: head/sys/modules/igb/Makefile
==============================================================================
--- head/sys/modules/igb/Makefile	Fri Jul 12 22:16:43 2013	(r253302)
+++ head/sys/modules/igb/Makefile	Fri Jul 12 22:36:26 2013	(r253303)
@@ -1,7 +1,10 @@
 #$FreeBSD$
+
+.include 
+
 .PATH:  ${.CURDIR}/../../dev/e1000
 KMOD    = if_igb
-SRCS    = device_if.h bus_if.h pci_if.h opt_inet.h
+SRCS    = device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h
 SRCS    += if_igb.c $(SHARED_SRCS)
 SHARED_SRCS = e1000_api.c e1000_phy.c e1000_nvm.c e1000_mac.c e1000_manage.c
 SHARED_SRCS += e1000_80003es2lan.c e1000_82542.c e1000_82541.c e1000_82543.c
@@ -20,4 +23,16 @@ CFLAGS += -I${.CURDIR}/../../dev/e1000 -
 # ALTQ. 
 #CFLAGS  += -DIGB_LEGACY_TX
 
+.if !defined(KERNBUILDDIR)
+.if ${MK_INET_SUPPORT} != "no"
+opt_inet.h:
+	@echo "#define INET 1" > ${.TARGET}
+.endif
+
+.if ${MK_INET6_SUPPORT} != "no"
+opt_inet6.h:
+	@echo "#define INET6 1" > ${.TARGET}
+.endif
+.endif
+
 .include 

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 23:08:45 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id EABDC478;
 Fri, 12 Jul 2013 23:08:45 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C120F1604;
 Fri, 12 Jul 2013 23:08:45 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CN8jia084438;
 Fri, 12 Jul 2013 23:08:45 GMT (envelope-from bapt@svn.freebsd.org)
Received: (from bapt@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CN8jZC084437;
 Fri, 12 Jul 2013 23:08:45 GMT (envelope-from bapt@svn.freebsd.org)
Message-Id: <201307122308.r6CN8jZC084437@svn.freebsd.org>
From: Baptiste Daroussin 
Date: Fri, 12 Jul 2013 23:08:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253304 - head/tools/build/options
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 23:08:46 -0000

Author: bapt
Date: Fri Jul 12 23:08:44 2013
New Revision: 253304
URL: http://svnweb.freebsd.org/changeset/base/253304

Log:
  Ensure the locale is LC_ALL=C when regenerating src.conf.5
  
  MFC after:	3 days

Modified:
  head/tools/build/options/makeman

Modified: head/tools/build/options/makeman
==============================================================================
--- head/tools/build/options/makeman	Fri Jul 12 22:36:26 2013	(r253303)
+++ head/tools/build/options/makeman	Fri Jul 12 23:08:44 2013	(r253304)
@@ -3,6 +3,7 @@
 # This file is in the public domain.
 
 set -o errexit
+LC_ALL=C
 
 ident='$FreeBSD$'
 

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 23:11:17 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id E03BE5D7;
 Fri, 12 Jul 2013 23:11:17 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id D344E161B;
 Fri, 12 Jul 2013 23:11:17 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CNBHHN086588;
 Fri, 12 Jul 2013 23:11:17 GMT (envelope-from bapt@svn.freebsd.org)
Received: (from bapt@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CNBH9V086585;
 Fri, 12 Jul 2013 23:11:17 GMT (envelope-from bapt@svn.freebsd.org)
Message-Id: <201307122311.r6CNBH9V086585@svn.freebsd.org>
From: Baptiste Daroussin 
Date: Fri, 12 Jul 2013 23:11:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253305 - in head: . tools/build/options
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 23:11:18 -0000

Author: bapt
Date: Fri Jul 12 23:11:17 2013
New Revision: 253305
URL: http://svnweb.freebsd.org/changeset/base/253305

Log:
  Disable building of pkg_install by default
  If people still want to have pkg_install they can specify WITH_PKGTOOLS when building world

Added:
  head/tools/build/options/WITH_PKGTOOLS
     - copied, changed from r253303, head/tools/build/options/WITHOUT_PKGTOOLS
Deleted:
  head/tools/build/options/WITHOUT_PKGTOOLS
Modified:
  head/UPDATING

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Fri Jul 12 23:08:44 2013	(r253304)
+++ head/UPDATING	Fri Jul 12 23:11:17 2013	(r253305)
@@ -32,6 +32,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10
 	"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
 
 20130709:
+	pkg_install has been disconnected from the build if you really need it
+	you should add WITH_PKGTOOLS in your src.conf(5).
+
+20130709:
 	Most of network statistics structures were changed to be able
 	keep 64-bits counters. Thus all tools, that work with networking
 	statistics, must be rebuilded (netstat(1), bsnmpd(1), etc.)

Copied and modified: head/tools/build/options/WITH_PKGTOOLS (from r253303, head/tools/build/options/WITHOUT_PKGTOOLS)
==============================================================================
--- head/tools/build/options/WITHOUT_PKGTOOLS	Fri Jul 12 22:36:26 2013	(r253303, copy source)
+++ head/tools/build/options/WITH_PKGTOOLS	Fri Jul 12 23:11:17 2013	(r253305)
@@ -1,4 +1,4 @@
 .\" $FreeBSD$
-Set to not build
+Set to build
 .Xr pkg_add 8
 and related programs.

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 23:11:38 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id E885A713;
 Fri, 12 Jul 2013 23:11:38 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-we0-x22a.google.com (mail-we0-x22a.google.com
 [IPv6:2a00:1450:400c:c03::22a])
 by mx1.freebsd.org (Postfix) with ESMTP id DAE851623;
 Fri, 12 Jul 2013 23:11:37 +0000 (UTC)
Received: by mail-we0-f170.google.com with SMTP id w57so8662673wes.15
 for ; Fri, 12 Jul 2013 16:11:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=9LpEtgAsF1Q3LQ6Y/k53YbSHYj5xA5d6CsHEhs+lmfg=;
 b=GPJofXN5Mjm27LwG/m2iy2SjGi3GHtZBfHT+ntLMZeVMATs5fKSgAhUvWx8XnB5xVe
 SdMwYsB1XyjSKLWeZM0uu5SEEF971nW9wluaCfrG9vF+84gvNcGF146AzpootOxjZdxW
 vLRxWKJ5Kj0eaaunXNd+6sXiS9pyDfRTxZSwXTSSdZO0qMgxIwU0XRItOOAUTn4uXLVo
 M5rbl6mkHfCeUTS+aakyG32KZJch96vHQP+gMXWsDponBI0bpPg5eCe2wfLozEv164P2
 Ey1LMOi6gFJY49VIkB2BHhkiFDUNjY3yOW9RjreaFoSzqSFtnyljMPwCNofBWo/9NWYx
 wiZw==
MIME-Version: 1.0
X-Received: by 10.180.94.67 with SMTP id da3mr2916251wib.30.1373670697071;
 Fri, 12 Jul 2013 16:11:37 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.217.94.132 with HTTP; Fri, 12 Jul 2013 16:11:37 -0700 (PDT)
In-Reply-To: <20130712202710.GB2757@gmail.com>
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
 <20130712202710.GB2757@gmail.com>
Date: Fri, 12 Jul 2013 16:11:37 -0700
X-Google-Sender-Auth: pCAzPaZDPPZ0zRceY3AEU1cj2wQ
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Adrian Chadd 
To: Mikolaj Golub 
Content-Type: text/plain; charset=ISO-8859-1
Cc: Craig Rodrigues , svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org, Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 23:11:39 -0000

Hah, because I forgot. I have a lot going on in my head. :-)

Anyway, my detach patch looks like its needed for detach (try doing an
ACPI suspend, see if you panic :-) .. this stuff for setting a default
context during device attach is needed but for attach, rather than
detach.


-adrian

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 23:12:37 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 9DDB484B;
 Fri, 12 Jul 2013 23:12:37 +0000 (UTC)
 (envelope-from bapt@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 8FC7B1629;
 Fri, 12 Jul 2013 23:12:37 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CNCbQF086827;
 Fri, 12 Jul 2013 23:12:37 GMT (envelope-from bapt@svn.freebsd.org)
Received: (from bapt@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CNCbpE086826;
 Fri, 12 Jul 2013 23:12:37 GMT (envelope-from bapt@svn.freebsd.org)
Message-Id: <201307122312.r6CNCbpE086826@svn.freebsd.org>
From: Baptiste Daroussin 
Date: Fri, 12 Jul 2013 23:12:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253306 - head/share/man/man5
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 23:12:37 -0000

Author: bapt
Date: Fri Jul 12 23:12:37 2013
New Revision: 253306
URL: http://svnweb.freebsd.org/changeset/base/253306

Log:
  Regenerate src.conf(5) after changing WITHOUT_PKGTOOLS to WITH_PKGTOOLS

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==============================================================================
--- head/share/man/man5/src.conf.5	Fri Jul 12 23:11:17 2013	(r253305)
+++ head/share/man/man5/src.conf.5	Fri Jul 12 23:12:37 2013	(r253306)
@@ -1,7 +1,7 @@
 .\" DO NOT EDIT-- this file is automatically generated.
-.\" from FreeBSD: head/tools/build/options/makeman 251685 2013-06-13 13:05:08Z emaste
+.\" from FreeBSD: head/tools/build/options/makeman 253304 2013-07-12 23:08:44Z bapt
 .\" $FreeBSD$
-.Dd July 3, 2013
+.Dd July 13, 2013
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -962,9 +962,9 @@ When set, it also enforces the following
 Set to not build
 .Xr pkg 1
 bootstrap tool
-.It Va WITHOUT_PKGTOOLS
-.\" from FreeBSD: head/tools/build/options/WITHOUT_PKGTOOLS 183242 2008-09-21 22:02:26Z sam
-Set to not build
+.It Va WITH_PKGTOOLS
+.\" from FreeBSD: head/tools/build/options/WITH_PKGTOOLS 253305 2013-07-12 23:11:17Z bapt
+Set to build
 .Xr pkg_add 8
 and related programs.
 .It Va WITHOUT_PMC

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 23:13:52 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 072549A5;
 Fri, 12 Jul 2013 23:13:52 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com
 [IPv6:2a00:1450:400c:c00::231])
 by mx1.freebsd.org (Postfix) with ESMTP id EBE87163B;
 Fri, 12 Jul 2013 23:13:50 +0000 (UTC)
Received: by mail-wg0-f49.google.com with SMTP id a12so8799456wgh.16
 for ; Fri, 12 Jul 2013 16:13:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=NcIyfHyUH3uq6vuUz2iZ9X0pFuJnCbljxEYPzBkgbTs=;
 b=ZvZB3TGZ4tySYgJqwkHWWa5N9CGq/gIl0u1OJrngWoS9Kha6s9VFU+i6zNKp4tAuMn
 a6fnDUx6H9l8Jvs+fsgcmYJM3kdhZ5PIj93bqpD8YpzfwWFEFgXaBRX6aZxNHzxkvaTy
 pEwnjBbDVmS2oJR/0fy/R0yQqa4Q+01ElKdjInNQukqtreYrDjGopLBxeH7ssNlkeJz3
 lAAtIorXpkiGSrnhkhb+LRteLLdFfNOvgKFi7HTuz/JZy5xddYUC4NclP9y4db/8oFp3
 5Hhrjek4J1r2lnpVlCpcxBXk/RSsMomGmi+Gzz8vj/sY0TlYEdtDzTzNxtxBTJcOm9gh
 bMVw==
MIME-Version: 1.0
X-Received: by 10.194.63.229 with SMTP id j5mr24773503wjs.79.1373670830107;
 Fri, 12 Jul 2013 16:13:50 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.217.94.132 with HTTP; Fri, 12 Jul 2013 16:13:50 -0700 (PDT)
In-Reply-To: 
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
 <20130712202710.GB2757@gmail.com>
 
Date: Fri, 12 Jul 2013 16:13:50 -0700
X-Google-Sender-Auth: fTwdQv2rB6Kr4626o59NCG2oKBQ
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Adrian Chadd 
To: Mikolaj Golub 
Content-Type: text/plain; charset=ISO-8859-1
Cc: Craig Rodrigues , svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org, Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 23:13:52 -0000

... and as a side-note, I am upgrading my test laptops to -HEAD very
slowly and I'll make sure one gets VIMAGE.

I'm sure I'll then find _all_ the odd crap with VIMAGE when used with
non-server hardware.


-adrian

From owner-svn-src-head@FreeBSD.ORG  Fri Jul 12 23:20:12 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 59A95CD4;
 Fri, 12 Jul 2013 23:20:12 +0000 (UTC)
 (envelope-from scottl@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 4BF651685;
 Fri, 12 Jul 2013 23:20:12 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6CNKCJj089237;
 Fri, 12 Jul 2013 23:20:12 GMT (envelope-from scottl@svn.freebsd.org)
Received: (from scottl@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6CNKCiN089236;
 Fri, 12 Jul 2013 23:20:12 GMT (envelope-from scottl@svn.freebsd.org)
Message-Id: <201307122320.r6CNKCiN089236@svn.freebsd.org>
From: Scott Long 
Date: Fri, 12 Jul 2013 23:20:12 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253307 - head/sys/cam/scsi
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Fri, 12 Jul 2013 23:20:12 -0000

Author: scottl
Date: Fri Jul 12 23:20:11 2013
New Revision: 253307
URL: http://svnweb.freebsd.org/changeset/base/253307

Log:
  Const-ify the new da_delete_functions.
  Remove a redundant sanity check
  
  Submitted by:	Steven Hartland
  Obtained from:	Netflix
  MFC after:	3 days

Modified:
  head/sys/cam/scsi/scsi_da.c

Modified: head/sys/cam/scsi/scsi_da.c
==============================================================================
--- head/sys/cam/scsi/scsi_da.c	Fri Jul 12 23:12:37 2013	(r253306)
+++ head/sys/cam/scsi/scsi_da.c	Fri Jul 12 23:20:11 2013	(r253307)
@@ -150,7 +150,7 @@ static da_delete_func_t da_delete_trim;
 static da_delete_func_t da_delete_unmap;
 static da_delete_func_t da_delete_ws;
 
-static void * da_delete_functions[] = {
+static const void * da_delete_functions[] = {
 	NULL,
 	NULL,
 	da_delete_trim,
@@ -1818,10 +1818,7 @@ dadeletemethodset(struct da_softc *softc
 
 	softc->delete_method = delete_method;
 	softc->disk->d_delmaxsize = dadeletemaxsize(softc, delete_method);
-	if (delete_method <= DA_DELETE_MAX)
-		softc->delete_func = da_delete_functions[delete_method];
-	else
-		softc->delete_func = NULL;
+	softc->delete_func = da_delete_functions[delete_method];
 
 	if (softc->delete_method > DA_DELETE_DISABLE)
 		softc->disk->d_flags |= DISKFLAG_CANDELETE;

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 00:39:07 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id B269B941;
 Sat, 13 Jul 2013 00:39:07 +0000 (UTC)
 (envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id A4A381975;
 Sat, 13 Jul 2013 00:39:07 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6D0d7NW010746;
 Sat, 13 Jul 2013 00:39:07 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6D0d7gL010745;
 Sat, 13 Jul 2013 00:39:07 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201307130039.r6D0d7gL010745@svn.freebsd.org>
From: Rui Paulo 
Date: Sat, 13 Jul 2013 00:39:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253309 - head/sys/arm/arm
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 00:39:07 -0000

Author: rpaulo
Date: Sat Jul 13 00:39:07 2013
New Revision: 253309
URL: http://svnweb.freebsd.org/changeset/base/253309

Log:
  Indent the "scp=... rlv=..." to make it easier to read the backtrace.

Modified:
  head/sys/arm/arm/db_trace.c

Modified: head/sys/arm/arm/db_trace.c
==============================================================================
--- head/sys/arm/arm/db_trace.c	Sat Jul 13 00:36:19 2013	(r253308)
+++ head/sys/arm/arm/db_trace.c	Sat Jul 13 00:39:07 2013	(r253309)
@@ -515,11 +515,11 @@ db_stack_trace_cmd(db_expr_t addr, db_ex
 		db_printsym(scp, DB_STGY_PROC);
 		db_printf("\n");
 #ifdef __PROG26
-		db_printf("scp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV] & R15_PC);
+		db_printf("\tscp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV] & R15_PC);
 		db_printsym(frame[FR_RLV] & R15_PC, DB_STGY_PROC);
 		db_printf(")\n");
 #else
-		db_printf("scp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV]);
+		db_printf("\tscp=0x%08x rlv=0x%08x (", scp, frame[FR_RLV]);
 		db_printsym(frame[FR_RLV], DB_STGY_PROC);
 		db_printf(")\n");
 #endif

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 04:25:04 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id A0460322;
 Sat, 13 Jul 2013 04:25:04 +0000 (UTC)
 (envelope-from adrian@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 82A941051;
 Sat, 13 Jul 2013 04:25:04 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6D4P4RA078647;
 Sat, 13 Jul 2013 04:25:04 GMT (envelope-from adrian@svn.freebsd.org)
Received: (from adrian@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6D4P31J078644;
 Sat, 13 Jul 2013 04:25:03 GMT (envelope-from adrian@svn.freebsd.org)
Message-Id: <201307130425.r6D4P31J078644@svn.freebsd.org>
From: Adrian Chadd 
Date: Sat, 13 Jul 2013 04:25:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253314 - head/sys/net
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 04:25:04 -0000

Author: adrian
Date: Sat Jul 13 04:25:03 2013
New Revision: 253314
URL: http://svnweb.freebsd.org/changeset/base/253314

Log:
  Bring over some link aggregation / LACP protocol improvements and debugging
  additions.
  
  * Add some new tracing events to aid in debugging.
  * Add in a debugging mode to drop transmit and received frames, specifically
    to test whether seeing or hearing heartbeats correctly cause LACP to
    drop the port.
  * Add in (and make default) a strict LACP mode, which requires the
    heartbeat on a port to be heard before it's used.  Sometimes vendor ports
    will hang but the link layer stays up, resulting in hung traffic.
  * Add logging the number of link status flaps, again to aid in debugging
    badly behaving switch ports.
  * Calculate the lagg interface port speed as the multiple of the
    configured ports, rather than the largest.
  
  Obtained from:	Netflix
  MFC after:	2 weeks

Modified:
  head/sys/net/ieee8023ad_lacp.c
  head/sys/net/if_lagg.c
  head/sys/net/if_lagg.h

Modified: head/sys/net/ieee8023ad_lacp.c
==============================================================================
--- head/sys/net/ieee8023ad_lacp.c	Sat Jul 13 01:24:16 2013	(r253313)
+++ head/sys/net/ieee8023ad_lacp.c	Sat Jul 13 04:25:03 2013	(r253314)
@@ -188,29 +188,43 @@ static void	lacp_dprintf(const struct la
 		    __attribute__((__format__(__printf__, 2, 3)));
 
 static int lacp_debug = 0;
-SYSCTL_INT(_net, OID_AUTO, lacp_debug, CTLFLAG_RW | CTLFLAG_TUN,
+SYSCTL_NODE(_net_link_lagg, OID_AUTO, lacp, CTLFLAG_RD, 0, "ieee802.3ad");
+SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN,
     &lacp_debug, 0, "Enable LACP debug logging (1=debug, 2=trace)");
-TUNABLE_INT("net.lacp_debug", &lacp_debug);
+TUNABLE_INT("net.link.lagg.lacp.debug", &lacp_debug);
 
-#define LACP_DPRINTF(a) if (lacp_debug > 0) { lacp_dprintf a ; }
-#define LACP_TRACE(a) if (lacp_debug > 1) { lacp_dprintf(a,"%s\n",__func__); }
+/* bitmap of ports */
+static int lacp_rx_test = 0;
+static int lacp_tx_test = 0;
+SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, rxtest, CTLFLAG_RW, &lacp_rx_test, 0,
+    "RXTest");
+SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, txtest, CTLFLAG_RW, &lacp_tx_test, 0,
+    "TXTest");
+
+static int lacp_strict = 1;
+SYSCTL_INT(_net_link_lagg_lacp, OID_AUTO, strict, CTLFLAG_RW, &lacp_strict,
+    0, "Strict spec compliance");
+
+#define LACP_DPRINTF(a) if (lacp_debug & 0x01) { lacp_dprintf a ; }
+#define LACP_TRACE(a) if (lacp_debug & 0x02) { lacp_dprintf(a,"%s\n",__func__); }
+#define LACP_TPRINTF(a) if (lacp_debug & 0x04) { lacp_dprintf a ; }
 
 /*
  * partner administration variables.
  * XXX should be configurable.
  */
 
-static const struct lacp_peerinfo lacp_partner_admin = {
+static const struct lacp_peerinfo lacp_partner_admin_optimistic = {
 	.lip_systemid = { .lsi_prio = 0xffff },
 	.lip_portid = { .lpi_prio = 0xffff },
-#if 1
-	/* optimistic */
 	.lip_state = LACP_STATE_SYNC | LACP_STATE_AGGREGATION |
 	    LACP_STATE_COLLECTING | LACP_STATE_DISTRIBUTING,
-#else
-	/* pessimistic */
+};
+
+static const struct lacp_peerinfo lacp_partner_admin_strict = {
+	.lip_systemid = { .lsi_prio = 0xffff },
+	.lip_portid = { .lpi_prio = 0xffff },
 	.lip_state = 0,
-#endif
 };
 
 static const lacp_timer_func_t lacp_timer_funcs[LACP_NTIMER] = {
@@ -301,6 +315,11 @@ lacp_pdu_input(struct lacp_port *lp, str
 		lacp_dump_lacpdu(du);
 	}
 
+	if ((1 << lp->lp_ifp->if_dunit) & lacp_rx_test) {
+		LACP_TPRINTF((lp, "Dropping RX PDU\n"));
+		goto bad;
+	}
+
 	LACP_LOCK(lsc);
 	lacp_sm_rx(lp, du);
 	LACP_UNLOCK(lsc);
@@ -653,6 +672,7 @@ lacp_disable_distributing(struct lacp_po
 {
 	struct lacp_aggregator *la = lp->lp_aggregator;
 	struct lacp_softc *lsc = lp->lp_lsc;
+	struct lagg_softc *sc = lsc->lsc_softc;
 	char buf[LACP_LAGIDSTR_MAX+1];
 
 	LACP_LOCK_ASSERT(lsc);
@@ -672,6 +692,7 @@ lacp_disable_distributing(struct lacp_po
 
 	TAILQ_REMOVE(&la->la_ports, lp, lp_dist_q);
 	la->la_nports--;
+	sc->sc_active = la->la_nports;
 
 	if (lsc->lsc_active_aggregator == la) {
 		lacp_suppress_distributing(lsc, la);
@@ -688,6 +709,7 @@ lacp_enable_distributing(struct lacp_por
 {
 	struct lacp_aggregator *la = lp->lp_aggregator;
 	struct lacp_softc *lsc = lp->lp_lsc;
+	struct lagg_softc *sc = lsc->lsc_softc;
 	char buf[LACP_LAGIDSTR_MAX+1];
 
 	LACP_LOCK_ASSERT(lsc);
@@ -704,6 +726,7 @@ lacp_enable_distributing(struct lacp_por
 	KASSERT(la->la_refcnt > la->la_nports, ("aggregator refcnt invalid"));
 	TAILQ_INSERT_HEAD(&la->la_ports, lp, lp_dist_q);
 	la->la_nports++;
+	sc->sc_active = la->la_nports;
 
 	lp->lp_state |= LACP_STATE_DISTRIBUTING;
 
@@ -908,7 +931,6 @@ lacp_aggregator_bandwidth(struct lacp_ag
 static void
 lacp_select_active_aggregator(struct lacp_softc *lsc)
 {
-	struct lagg_softc *sc = lsc->lsc_softc;
 	struct lacp_aggregator *la;
 	struct lacp_aggregator *best_la = NULL;
 	uint64_t best_speed = 0;
@@ -960,7 +982,6 @@ lacp_select_active_aggregator(struct lac
 	    lacp_format_lagid_aggregator(best_la, buf, sizeof(buf))));
 
 	if (lsc->lsc_active_aggregator != best_la) {
-		sc->sc_ifp->if_baudrate = best_speed;
 		lsc->lsc_active_aggregator = best_la;
 		lacp_update_portmap(lsc);
 		if (best_la) {
@@ -976,15 +997,18 @@ lacp_select_active_aggregator(struct lac
 static void
 lacp_update_portmap(struct lacp_softc *lsc)
 {
+	struct lagg_softc *sc = lsc->lsc_softc;
 	struct lacp_aggregator *la;
 	struct lacp_portmap *p;
 	struct lacp_port *lp;
+	uint64_t speed;
 	u_int newmap;
 	int i;
 
 	newmap = lsc->lsc_activemap == 0 ? 1 : 0;
 	p = &lsc->lsc_pmap[newmap];
 	la = lsc->lsc_active_aggregator;
+	speed = 0;
 	bzero(p, sizeof(struct lacp_portmap));
 
 	if (la != NULL && la->la_nports > 0) {
@@ -993,7 +1017,9 @@ lacp_update_portmap(struct lacp_softc *l
 		TAILQ_FOREACH(lp, &la->la_ports, lp_dist_q)
 			p->pm_map[i++] = lp;
 		KASSERT(i == p->pm_count, ("Invalid port count"));
+		speed = lacp_aggregator_bandwidth(la);
 	}
+	sc->sc_ifp->if_baudrate = speed;
 
 	/* switch the active portmap over */
 	atomic_store_rel_int(&lsc->lsc_activemap, newmap);
@@ -1264,6 +1290,8 @@ lacp_unselect(struct lacp_port *lp)
 static void
 lacp_sm_mux(struct lacp_port *lp)
 {
+	struct lagg_port *lgp = lp->lp_lagg;
+	struct lagg_softc *sc = lgp->lp_softc;
 	enum lacp_mux_state new_state;
 	boolean_t p_sync =
 		    (lp->lp_partner.lip_state & LACP_STATE_SYNC) != 0;
@@ -1273,7 +1301,9 @@ lacp_sm_mux(struct lacp_port *lp)
 	struct lacp_aggregator *la;
 
 	if (lacp_debug > 1)
-		lacp_dprintf(lp, "%s: state %d\n", __func__, lp->lp_mux_state);
+		lacp_dprintf(lp, "%s: state= 0x%x, selected= 0x%x, "
+		    "p_sync= 0x%x, p_collecting= 0x%x\n", __func__,
+		    lp->lp_mux_state, selected, p_sync, p_collecting);
 
 re_eval:
 	la = lp->lp_aggregator;
@@ -1313,6 +1343,8 @@ re_eval:
 	case LACP_MUX_DISTRIBUTING:
 		if (selected != LACP_SELECTED || !p_sync || !p_collecting) {
 			new_state = LACP_MUX_COLLECTING;
+			lacp_dprintf(lp, "Interface stopped DISTRIBUTING, possible flaping\n");
+			sc->sc_flapping++;
 		}
 		break;
 	default:
@@ -1561,6 +1593,10 @@ lacp_sm_rx_record_pdu(struct lacp_port *
 		    sizeof(buf))));
 	}
 
+	/* XXX Hack, still need to implement 5.4.9 para 2,3,4 */
+	if (lacp_strict)
+		lp->lp_partner.lip_state |= LACP_STATE_SYNC;
+
 	lacp_sm_ptx_update_timeout(lp, oldpstate);
 }
 
@@ -1586,7 +1622,10 @@ lacp_sm_rx_record_default(struct lacp_po
 	LACP_TRACE(lp);
 
 	oldpstate = lp->lp_partner.lip_state;
-	lp->lp_partner = lacp_partner_admin;
+	if (lacp_strict)
+		lp->lp_partner = lacp_partner_admin_strict;
+	else
+		lp->lp_partner = lacp_partner_admin_optimistic;;
 	lp->lp_state |= LACP_STATE_DEFAULTED;
 	lacp_sm_ptx_update_timeout(lp, oldpstate);
 }
@@ -1621,7 +1660,12 @@ lacp_sm_rx_update_default_selected(struc
 
 	LACP_TRACE(lp);
 
-	lacp_sm_rx_update_selected_from_peerinfo(lp, &lacp_partner_admin);
+	if (lacp_strict)
+		lacp_sm_rx_update_selected_from_peerinfo(lp,
+		    &lacp_partner_admin_strict);
+	else
+		lacp_sm_rx_update_selected_from_peerinfo(lp,
+		    &lacp_partner_admin_optimistic);
 }
 
 /* transmit machine */
@@ -1629,7 +1673,7 @@ lacp_sm_rx_update_default_selected(struc
 static void
 lacp_sm_tx(struct lacp_port *lp)
 {
-	int error;
+	int error = 0;
 
 	if (!(lp->lp_state & LACP_STATE_AGGREGATION)
 #if 1
@@ -1651,7 +1695,10 @@ lacp_sm_tx(struct lacp_port *lp)
 		return;
 	}
 
-	error = lacp_xmit_lacpdu(lp);
+	if (((1 << lp->lp_ifp->if_dunit) & lacp_tx_test) == 0)
+		error = lacp_xmit_lacpdu(lp);
+	else
+		LACP_TPRINTF((lp, "Dropping TX PDU\n"));
 
 	if (error == 0) {
 		lp->lp_flags &= ~LACP_PORT_NTT;

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Sat Jul 13 01:24:16 2013	(r253313)
+++ head/sys/net/if_lagg.c	Sat Jul 13 04:25:03 2013	(r253314)
@@ -122,6 +122,7 @@ static void	lagg_media_status(struct ifn
 static struct lagg_port *lagg_link_active(struct lagg_softc *,
 	    struct lagg_port *);
 static const void *lagg_gethdr(struct mbuf *, u_int, u_int, void *);
+static int	lagg_sysctl_active(SYSCTL_HANDLER_ARGS);
 
 /* Simple round robin */
 static int	lagg_rr_attach(struct lagg_softc *);
@@ -171,7 +172,7 @@ static const struct {
 };
 
 SYSCTL_DECL(_net_link);
-static SYSCTL_NODE(_net_link, OID_AUTO, lagg, CTLFLAG_RW, 0,
+SYSCTL_NODE(_net_link, OID_AUTO, lagg, CTLFLAG_RW, 0,
     "Link Aggregation");
 
 static int lagg_failover_rx_all = 0; /* Allow input on any failover links */
@@ -298,6 +299,12 @@ lagg_clone_create(struct if_clone *ifc, 
 	SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
 		"count", CTLTYPE_INT|CTLFLAG_RD, &sc->sc_count, sc->sc_count,
 		"Total number of ports");
+	SYSCTL_ADD_PROC(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
+		"active", CTLTYPE_INT|CTLFLAG_RD, sc, 0, lagg_sysctl_active,
+		"I", "Total number of active ports");
+	SYSCTL_ADD_INT(&sc->ctx, SYSCTL_CHILDREN(oid), OID_AUTO,
+		"flapping", CTLTYPE_INT|CTLFLAG_RD, &sc->sc_flapping,
+		sc->sc_flapping, "Total number of port change events");
 	/* Hash all layers by default */
 	sc->sc_flags = LAGG_F_HASHL2|LAGG_F_HASHL3|LAGG_F_HASHL4;
 
@@ -1488,6 +1495,27 @@ lagg_gethdr(struct mbuf *m, u_int off, u
 	return (mtod(m, char *) + off);
 }
 
+static int
+lagg_sysctl_active(SYSCTL_HANDLER_ARGS)
+{
+	struct lagg_softc *sc = (struct lagg_softc *)arg1;
+	struct lagg_port *lp;
+	int error;
+
+	/* LACP tracks active links automatically, the others do not */
+	if (sc->sc_proto != LAGG_PROTO_LACP) {
+		sc->sc_active = 0;
+		SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
+			sc->sc_active += LAGG_PORTACTIVE(lp);
+	}
+
+	error = sysctl_handle_int(oidp, &sc->sc_active, 0, req);
+	if ((error) || (req->newptr == NULL))
+		return (error);
+
+	return (0);
+}
+
 uint32_t
 lagg_hashmbuf(struct lagg_softc *sc, struct mbuf *m, uint32_t key)
 {

Modified: head/sys/net/if_lagg.h
==============================================================================
--- head/sys/net/if_lagg.h	Sat Jul 13 01:24:16 2013	(r253313)
+++ head/sys/net/if_lagg.h	Sat Jul 13 04:25:03 2013	(r253314)
@@ -190,6 +190,9 @@ struct lagg_softc {
 	struct rwlock			sc_mtx;
 	int				sc_proto;	/* lagg protocol */
 	u_int				sc_count;	/* number of ports */
+	u_int				sc_active;	/* active port count */
+	u_int				sc_flapping;	/* number of flapping
+							 * events */
 	struct lagg_port		*sc_primary;	/* primary port */
 	struct ifmedia			sc_media;	/* media config */
 	caddr_t				sc_psc;		/* protocol data */
@@ -266,6 +269,8 @@ extern void	(*lagg_linkstate_p)(struct i
 int		lagg_enqueue(struct ifnet *, struct mbuf *);
 uint32_t	lagg_hashmbuf(struct lagg_softc *, struct mbuf *, uint32_t);
 
+SYSCTL_DECL(_net_link_lagg);
+
 #endif /* _KERNEL */
 
 #endif /* _NET_LAGG_H */

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 05:40:10 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id D3605E1C;
 Sat, 13 Jul 2013 05:40:10 +0000 (UTC)
 (envelope-from adrian.chadd@gmail.com)
Received: from mail-we0-x229.google.com (mail-we0-x229.google.com
 [IPv6:2a00:1450:400c:c03::229])
 by mx1.freebsd.org (Postfix) with ESMTP id AF06F11C5;
 Sat, 13 Jul 2013 05:40:09 +0000 (UTC)
Received: by mail-we0-f169.google.com with SMTP id n57so8781272wev.14
 for ; Fri, 12 Jul 2013 22:40:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=RXarwmDKRz6RQAPWrz/drzQfP1k+IfWKRf21fLGRmWk=;
 b=pNVhoQebC/yNkUbSKCGK3q0vdsvxNXI3lD9on8bKmNzUXsZ6UoBxwB+TO0l8uH8jj3
 GinaGE+C8GNzZaTTE/94Hz0L6el52bsXj47nb69ZK3/jgiNe1eclF3Xu+JJZ9AlxL+Wx
 6oN8qMSoPpsfE1bTnlrc8z+NysEhcOlZkmBYpHtLZH7sLF6mspqMwYXT/yeQmXMpGNlS
 9OSJrJ7VW8A/G0HriOOh3y6wr/woKLNMjxfisUzAacpfaL/3unnfKOLVqp8sZlrKHeIx
 zywt6F9ed5WqveJk6q2D8gFA0x/nKpRvl4LiuJtfnRKk89NFW5oYDpWjXsXDeLSLYGrF
 oqCg==
MIME-Version: 1.0
X-Received: by 10.194.11.72 with SMTP id o8mr26565938wjb.0.1373694008866; Fri,
 12 Jul 2013 22:40:08 -0700 (PDT)
Sender: adrian.chadd@gmail.com
Received: by 10.217.94.132 with HTTP; Fri, 12 Jul 2013 22:40:08 -0700 (PDT)
In-Reply-To: 
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
 <20130712202710.GB2757@gmail.com>
 
 
Date: Fri, 12 Jul 2013 22:40:08 -0700
X-Google-Sender-Auth: SnIWEr9djNyGJl9OCLAYUmaLH9w
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Adrian Chadd 
To: Mikolaj Golub 
Content-Type: text/plain; charset=ISO-8859-1
Cc: Craig Rodrigues , svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org, Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 05:40:10 -0000

Here's what I have running on my stable/9 VIMAGE laptop.

http://people.freebsd.org/~adrian/ath/20130712-vimage-default-attach-detach.diff

How's this look to put into -HEAD?



-adrian

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 07:16:46 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 56DB8733;
 Sat, 13 Jul 2013 07:16:46 +0000 (UTC)
 (envelope-from jhibbits@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 486FC1478;
 Sat, 13 Jul 2013 07:16:46 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6D7GkI7029096;
 Sat, 13 Jul 2013 07:16:46 GMT
 (envelope-from jhibbits@svn.freebsd.org)
Received: (from jhibbits@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6D7GkAN029095;
 Sat, 13 Jul 2013 07:16:46 GMT
 (envelope-from jhibbits@svn.freebsd.org)
Message-Id: <201307130716.r6D7GkAN029095@svn.freebsd.org>
From: Justin Hibbits 
Date: Sat, 13 Jul 2013 07:16:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253315 - head/sys/modules
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 07:16:46 -0000

Author: jhibbits
Date: Sat Jul 13 07:16:45 2013
New Revision: 253315
URL: http://svnweb.freebsd.org/changeset/base/253315

Log:
  Clean up the modules list for PowerPC.  powerpc64 has MACHINE_CPUARCH of
  powerpc.  While here, sort the list.

Modified:
  head/sys/modules/Makefile

Modified: head/sys/modules/Makefile
==============================================================================
--- head/sys/modules/Makefile	Sat Jul 13 04:25:03 2013	(r253314)
+++ head/sys/modules/Makefile	Sat Jul 13 07:16:45 2013	(r253315)
@@ -808,23 +808,24 @@ _cardbus=	cardbus
 _cbb=		cbb
 _cfi=		cfi
 _cpufreq=	cpufreq
+.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
+_cyclic=	cyclic
+.endif
 _drm=		drm
+.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
+_dtrace=	dtrace
+.endif
 _exca=		exca
 _nvram=		powermac_nvram
 _pccard=	pccard
 _smbfs=		smbfs
 _sound=		sound
-_cyclic=	cyclic
-_dtrace=	dtrace
+.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
 _opensolaris=	opensolaris
 .endif
+.endif
 
 .if ${MACHINE_ARCH} == "powerpc64"
-.if ${MK_CDDL} != "no" || defined(ALL_MODULES)
-_cyclic=	cyclic
-_dtrace=	dtrace
-_opensolaris=	opensolaris
-.endif
 .if ${MK_ZFS} != "no" || defined(ALL_MODULES)
 _zfs=		zfs
 .endif

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 07:17:18 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id E7F6F864;
 Sat, 13 Jul 2013 07:17:18 +0000 (UTC)
 (envelope-from rpaulo@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id C01A3147B;
 Sat, 13 Jul 2013 07:17:18 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6D7HIwf029199;
 Sat, 13 Jul 2013 07:17:18 GMT (envelope-from rpaulo@svn.freebsd.org)
Received: (from rpaulo@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6D7HI8N029198;
 Sat, 13 Jul 2013 07:17:18 GMT (envelope-from rpaulo@svn.freebsd.org)
Message-Id: <201307130717.r6D7HI8N029198@svn.freebsd.org>
From: Rui Paulo 
Date: Sat, 13 Jul 2013 07:17:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253316 - head/sys/conf
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 07:17:19 -0000

Author: rpaulo
Date: Sat Jul 13 07:17:18 2013
New Revision: 253316
URL: http://svnweb.freebsd.org/changeset/base/253316

Log:
  Fix the urtwnfw definitions. We can now use urtwnfw in kernel config files.

Modified:
  head/sys/conf/files

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Sat Jul 13 07:16:45 2013	(r253315)
+++ head/sys/conf/files	Sat Jul 13 07:17:18 2013	(r253316)
@@ -2329,34 +2329,34 @@ dev/usb/wlan/if_upgt.c		optional upgt
 dev/usb/wlan/if_ural.c		optional ural
 dev/usb/wlan/if_urtw.c		optional urtw
 dev/usb/wlan/if_urtwn.c		optional urtwn
-urtwnrtl8192cfwT.c		optional urtwn-rtl8192cfwT | urtwnfw	\
-	compile-with	"${AWK} -f $S/tools/fw_stub.awk urtwnrtl8192cT.fw:urtwnrtl8192cfwT -murtwnrtl8192cfwT -c${.TARGET}" \
+urtwn-rtl8192cfwT.c		optional urtwn-rtl8192cfwT | urtwnfw	\
+	compile-with	"${AWK} -f $S/tools/fw_stub.awk urtwn-rtl8192cfwT.fw:urtwn-rtl8192cfwT:111 -murtwn-rtl8192cfwT -c${.TARGET}" \
 	no-implicit-rule before-depend local				\
-	clean		"urtwnrtl8192cfwT.c"
-urtwnrtl8192cfwT.fwo		optional urtwn-rtl8192cfwT | urtwnfw	\
-	dependency	"urtwnrtl8192cT.fw"				\
+	clean		"urtwn-rtl8192cfwT.c"
+urtwn-rtl8192cfwT.fwo		optional urtwn-rtl8192cfwT | urtwnfw	\
+	dependency	"urtwn-rtl8192cfwT.fw"				\
 	compile-with	"${NORMAL_FWO}"					\
 	no-implicit-rule						\
-	clean		"urtwnrtl8192cfwT.fwo"
-urtwnrtl8192cT.fw		optional urtwn-rtl8192cfwT | urtwnfw	\
+	clean		"urtwn-rtl8192cfwT.fwo"
+urtwn-rtl8192cfwT.fw		optional urtwn-rtl8192cfwT | urtwnfw	\
 	dependency	"$S/contrib/dev/urtwn/urtwn-rtl8192cfwT.fw.uu"	\
 	compile-with	"${NORMAL_FW}"					\
 	no-obj no-implicit-rule						\
-	clean		"urtwnrtl8192cT.fw"
-urtwnrtl8192cfwU.c		optional urtwn-rtl8192cfwU | urtwnfw	\
-	compile-with	"${AWK} -f $S/tools/fw_stub.awk urtwnrtl8192cU.fw:urtwnrtl8192cfwU -murtwnrtl8192cfwU -c${.TARGET}" \
+	clean		"urtwn-rtl8192cfwT.fw"
+urtwn-rtl8192cfwU.c		optional urtwn-rtl8192cfwU | urtwnfw	\
+	compile-with	"${AWK} -f $S/tools/fw_stub.awk urtwn-rtl8192cfwU.fw:urtwn-rtl8192cfwU:111 -murtwn-rtl8192cfwU -c${.TARGET}" \
 	no-implicit-rule before-depend local				\
-	clean		"urtwnrtl8192cfwU.c"
-urtwnrtl8192cfwU.fwo		optional urtwn-rtl8192cfwU | urtwnfw	\
-	dependency	"urtwnrtl8192cU.fw"				\
+	clean		"urtwn-rtl8192cfwU.c"
+urtwn-rtl8192cfwU.fwo		optional urtwn-rtl8192cfwU | urtwnfw	\
+	dependency	"urtwn-rtl8192cfwU.fw"				\
 	compile-with	"${NORMAL_FWO}"					\
 	no-implicit-rule						\
-	clean		"urtwnrtl8192cfwU.fwo"
-urtwnrtl8192cU.fw		optional urtwn-rtl8192cfwU | urtwnfw	\
+	clean		"urtwn-rtl8192cfwU.fwo"
+urtwn-rtl8192cfwU.fw		optional urtwn-rtl8192cfwU | urtwnfw	\
 	dependency	"$S/contrib/dev/urtwn/urtwn-rtl8192cfwU.fw.uu"	\
 	compile-with	"${NORMAL_FW}"					\
 	no-obj no-implicit-rule						\
-	clean		"urtwnrtl8192cU.fw"
+	clean		"urtwn-rtl8192cfwU.fw"
 
 dev/usb/wlan/if_zyd.c		optional zyd
 #

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 07:31:25 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 56D7EB03;
 Sat, 13 Jul 2013 07:31:25 +0000 (UTC)
 (envelope-from to.my.trociny@gmail.com)
Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com
 [IPv6:2a00:1450:4010:c04::233])
 by mx1.freebsd.org (Postfix) with ESMTP id 1428515EF;
 Sat, 13 Jul 2013 07:31:23 +0000 (UTC)
Received: by mail-lb0-f179.google.com with SMTP id w20so8250843lbh.10
 for ; Sat, 13 Jul 2013 00:31:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=N9MIz1E9XGwqRLjEPBBxb36I0XBI3z6EHFP2S5b6KDI=;
 b=HyIzA6aVxY0y4e/IH2J9pA9E9Q4I9dMUw7qyamlGnQbdhfbDl3A7w/wtBwNP835AIB
 lm7JcKyHjl7zg3xAR9Y6AdTNwjAFFjVhktGelIX2AP8rfSBCqxGoa9E9vr5AZvar0gAv
 Z33BTn6MbcOqrT+ZuZtjUqAGkBSRTQc/WLmmIt2pN0MiM6SkG1MagYkG16COWLx0zOxE
 UcCP+VKCK9NYYNr61zfyDPrv9qe0dN0gB14uzvedokMNtVN5Z4yzcFEX/RaBS5UHsQ0m
 OI/cn4Ct3wXd9qC+4LsX70Cfvhc9Ba+DSwLD6SAYFtJwcqjj9nZCPL0UYxLKBedXr/vC
 SD7Q==
X-Received: by 10.152.115.194 with SMTP id jq2mr20626411lab.53.1373700683001; 
 Sat, 13 Jul 2013 00:31:23 -0700 (PDT)
Received: from localhost ([178.150.115.244])
 by mx.google.com with ESMTPSA id x5sm15024221lbx.8.2013.07.13.00.31.21
 for 
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Sat, 13 Jul 2013 00:31:22 -0700 (PDT)
Sender: Mikolaj Golub 
Date: Sat, 13 Jul 2013 10:31:19 +0300
From: Mikolaj Golub 
To: Adrian Chadd 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
Message-ID: <20130713073118.GC2757@gmail.com>
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
 <20130712202710.GB2757@gmail.com>
 
 
 
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: 
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: Craig Rodrigues , svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org, Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 07:31:25 -0000

On Fri, Jul 12, 2013 at 10:40:08PM -0700, Adrian Chadd wrote:
> Here's what I have running on my stable/9 VIMAGE laptop.
> 
> http://people.freebsd.org/~adrian/ath/20130712-vimage-default-attach-detach.diff
> 
> How's this look to put into -HEAD?

Your patch looks similar to Marko's:

http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121115/0824ca85/attachment.diff

Marko took your idea of setting vnet0 context in
device_probe_and_attach(), although there is no is_default_vnet check,
and I also think it is not necessary here -- just unconditionally set
vnet0 is ok.

Also, as I understand, after handling vnet context in
device_probe_and_attach(), there is no need in curvnet setting in
kldload/kldunload, and Marko removed it.

In net/if.c, similarly to you, Marko sets vnet context in if_detach(),
but also in if_free(), so this would be good to commit too (I suppose
Marko had good reasons to do this).

I can't comment the netgraph related parts of your patch as I have no
idea what is going on here. Though I think this could be committed
separately if it is needed.

-- 
Mikolaj Golub

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 07:59:58 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id B34DDE6D;
 Sat, 13 Jul 2013 07:59:58 +0000 (UTC)
 (envelope-from crodr001@gmail.com)
Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com
 [IPv6:2a00:1450:4010:c04::236])
 by mx1.freebsd.org (Postfix) with ESMTP id 6D3551685;
 Sat, 13 Jul 2013 07:59:57 +0000 (UTC)
Received: by mail-lb0-f182.google.com with SMTP id r11so8238686lbv.13
 for ; Sat, 13 Jul 2013 00:59:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=TSvaCYG7mzyfhQrjWN9juLdvkAyMvTOQr8Q6/65lBd4=;
 b=yHShLSvPvWNxudBfiJRkdh/k4gFe4q0yRIECNQOKkyoDED4kVhNIUDLbe7NZjQt52Q
 twaQjNLCCoKuofNRdnhEmbj2dscMioGuaqXKbaZznUeIFqoJpBnAgd+X37Afh/MHzPS/
 GNf0eGCW5kyx17kt4JAy8DjMqNY2j0Uo/oApVgwhV9imKhWaij46k1T6ZwtO0zipgx4M
 7W96CDclU+9mTrCX9u0GPrE14GMMXPIif11+KqCNlksINTXG5JQ7tMY4Ilxa2C+7fxXN
 0w+lgTbWv4sKsGAO6JG21Hr7643tW5tMH9+78HnD8h1T3tCe+Gy+EU8NC4CWqie6cDWO
 2O4w==
MIME-Version: 1.0
X-Received: by 10.152.19.194 with SMTP id h2mr21170828lae.26.1373702396146;
 Sat, 13 Jul 2013 00:59:56 -0700 (PDT)
Sender: crodr001@gmail.com
Received: by 10.112.149.38 with HTTP; Sat, 13 Jul 2013 00:59:56 -0700 (PDT)
In-Reply-To: 
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
 <20130712202710.GB2757@gmail.com>
 
 
 
Date: Sat, 13 Jul 2013 00:59:56 -0700
X-Google-Sender-Auth: Q-1sNPTsD9fhAZbvW2zwdaaPbTw
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Craig Rodrigues 
To: Adrian Chadd 
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: Mikolaj Golub , svn-src-head@freebsd.org,
 svn-src-all@freebsd.org, src-committers@freebsd.org, Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 07:59:58 -0000

On Fri, Jul 12, 2013 at 10:40 PM, Adrian Chadd  wrote:

> Here's what I have running on my stable/9 VIMAGE laptop.
>
>
> http://people.freebsd.org/~adrian/ath/20130712-vimage-default-attach-detach.diff
>
> How's this look to put into -HEAD?
>
>
Your patch overlaps with a patch proposed by Marko here:
http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041120.html

Marko modified a few more places than you did in his patch, and his
kern/subr_bus.c is slightly different, but it is in the same area of code.

Are the additional places that Marko modified, like kern_linker.c necessary?

Can we come up with a combined patch between Marko's patch and your patch?
I think if a combined patch can go into HEAD, then my patch to bluetooth can
be reverted.

--
Craig

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 08:17:56 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id 378133F0;
 Sat, 13 Jul 2013 08:17:56 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id 28AFD16FE;
 Sat, 13 Jul 2013 08:17:56 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6D8HuBi046406;
 Sat, 13 Jul 2013 08:17:56 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6D8Hutd046405;
 Sat, 13 Jul 2013 08:17:56 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <201307130817.r6D8Hutd046405@svn.freebsd.org>
From: Hiroki Sato 
Date: Sat, 13 Jul 2013 08:17:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253318 - head/lib/libc/gen
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 08:17:56 -0000

Author: hrs
Date: Sat Jul 13 08:17:55 2013
New Revision: 253318
URL: http://svnweb.freebsd.org/changeset/base/253318

Log:
  Fix mdoc syntax.
  
  Pointed out by:	joeld

Modified:
  head/lib/libc/gen/sysctl.3

Modified: head/lib/libc/gen/sysctl.3
==============================================================================
--- head/lib/libc/gen/sysctl.3	Sat Jul 13 07:22:51 2013	(r253317)
+++ head/lib/libc/gen/sysctl.3	Sat Jul 13 08:17:55 2013	(r253318)
@@ -548,13 +548,13 @@ The third level name is a protocol numbe
 The fourth level name is an address family, which may be set to 0 to
 select all address families.
 The fifth, sixth, and seventh level names are as follows:
-.Bl -column "Fifth level	" "Sixth level	" -offset indent
-.It Sy "Fifth level	Sixth level	Seventh level"
-.It "NET_RT_FLAGS	rtflags			None"
-.It "NET_RT_DUMP	None			None or fib number"
-.It "NET_RT_IFLIST	0 or if_index		None"
-.It "NET_RT_IFMALIST	0 or if_index		None"
-.It "NET_RT_IFLISTL	0 or if_index		None"
+.Bl -column -offset indent "Fifth level      Sixth level" "Seventh level"
+.It Sy "Fifth level      Sixth level" Ta Sy "Seventh level"
+.It "NET_RT_FLAGS     rtflags" Ta "None"
+.It "NET_RT_DUMP      None" Ta "None or fib number"
+.It "NET_RT_IFLIST    0 or if_index" Ta None
+.It "NET_RT_IFMALIST  0 or if_index" Ta None
+.It "NET_RT_IFLISTL   0 or if_index" Ta None
 .El
 .Pp
 The

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 08:22:05 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 8E19A53A;
 Sat, 13 Jul 2013 08:22:05 +0000 (UTC)
 (envelope-from to.my.trociny@gmail.com)
Received: from mail-la0-x235.google.com (mail-la0-x235.google.com
 [IPv6:2a00:1450:4010:c03::235])
 by mx1.freebsd.org (Postfix) with ESMTP id 7E8A2170D;
 Sat, 13 Jul 2013 08:22:04 +0000 (UTC)
Received: by mail-la0-f53.google.com with SMTP id fs12so8360040lab.12
 for ; Sat, 13 Jul 2013 01:22:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:date:from:to:cc:subject:message-id:references:mime-version
 :content-type:content-disposition:in-reply-to:user-agent;
 bh=A4W4a+TP4z5DEE+fqSNuStCi4a2imz8L8mb0nlymRE4=;
 b=NJh76b9At5Vpl/7SEnXxeNc+e761Iyg98ZAhhJn2MErDBrmwajqtZicg2v/e53Hsr7
 zBPzrfs/UGu0hHI9QDgBJwVZ4XmHkfrk6j6m7vnlJHGfl/mZ/YbjnAeIcpS3QVaQmKVQ
 ZY0JL2spsIdx1B6RVQ+Pva9MS2QxLhRzs9k6wVbQCinlm9l0/ZA3ZzVxCjo0DNuLax6l
 llnm20fKLmYd0TYc6O5j7P/AYVkAbDC8+/33KpAVpCP0EvB/Qv/4Rjbehn2zcRHF6XPD
 3NCNNzjwO5zyMw9dD/v0SVCJrzkh4JrvbQipAFWA9oCaNTrEPKv9nLcUoltpSa7LtU2E
 s/mg==
X-Received: by 10.152.21.99 with SMTP id u3mr21393170lae.18.1373703723263;
 Sat, 13 Jul 2013 01:22:03 -0700 (PDT)
Received: from localhost ([178.150.115.244])
 by mx.google.com with ESMTPSA id am8sm15639863lac.1.2013.07.13.01.22.01
 for 
 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
 Sat, 13 Jul 2013 01:22:02 -0700 (PDT)
Sender: Mikolaj Golub 
Date: Sat, 13 Jul 2013 11:21:59 +0300
From: Mikolaj Golub 
To: Adrian Chadd 
Subject: Re: svn commit: r253314 - head/sys/net
Message-ID: <20130713082158.GD2757@gmail.com>
References: <201307130425.r6D4P31J078644@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <201307130425.r6D4P31J078644@svn.freebsd.org>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 src-committers@freebsd.org
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 08:22:05 -0000

On Sat, Jul 13, 2013 at 04:25:03AM +0000, Adrian Chadd wrote:

> +static int
> +lagg_sysctl_active(SYSCTL_HANDLER_ARGS)
> +{
> +	struct lagg_softc *sc = (struct lagg_softc *)arg1;
> +	struct lagg_port *lp;
> +	int error;
> +
> +	/* LACP tracks active links automatically, the others do not */
> +	if (sc->sc_proto != LAGG_PROTO_LACP) {
> +		sc->sc_active = 0;
> +		SLIST_FOREACH(lp, &sc->sc_ports, lp_entries)
> +			sc->sc_active += LAGG_PORTACTIVE(lp);

Shouldn't sc be wlocked here?

> +	}
> +
> +	error = sysctl_handle_int(oidp, &sc->sc_active, 0, req);
> +	if ((error) || (req->newptr == NULL))
> +		return (error);
> +
> +	return (0);
> +}

-- 
Mikolaj Golub

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 10:10:45 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
 by hub.freebsd.org (Postfix) with ESMTP id DC92F172;
 Sat, 13 Jul 2013 10:10:45 +0000 (UTC)
 (envelope-from theraven@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org
 [IPv6:2001:1900:2254:2068::e6a:0])
 by mx1.freebsd.org (Postfix) with ESMTP id B39C31979;
 Sat, 13 Jul 2013 10:10:45 +0000 (UTC)
Received: from svn.freebsd.org ([127.0.1.70])
 by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DAAjVp078368;
 Sat, 13 Jul 2013 10:10:45 GMT
 (envelope-from theraven@svn.freebsd.org)
Received: (from theraven@localhost)
 by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DAAjrL078366;
 Sat, 13 Jul 2013 10:10:45 GMT
 (envelope-from theraven@svn.freebsd.org)
Message-Id: <201307131010.r6DAAjrL078366@svn.freebsd.org>
From: David Chisnall 
Date: Sat, 13 Jul 2013 10:10:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
 svn-src-head@freebsd.org
Subject: svn commit: r253319 - head/lib/msun/src
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 10:10:45 -0000

Author: theraven
Date: Sat Jul 13 10:10:45 2013
New Revision: 253319
URL: http://svnweb.freebsd.org/changeset/base/253319

Log:
  Ensure that the _Generic() macro in math.h works with qualified types.
  
  tgmath.h contains the same bugs and so should be fixed in the same way.

Modified:
  head/lib/msun/src/math.h

Modified: head/lib/msun/src/math.h
==============================================================================
--- head/lib/msun/src/math.h	Sat Jul 13 08:17:55 2013	(r253318)
+++ head/lib/msun/src/math.h	Sat Jul 13 10:10:45 2013	(r253319)
@@ -83,22 +83,31 @@ extern const union __nan_un {
 
 #if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \
     __has_extension(c_generic_selections)
-#define	__fp_type_select(x, f, d, ld) _Generic((x),     \
-	float: f(x),                                    \
-	double: d(x),                                   \
-	long double: ld(x))
+#define	__fp_type_select(x, f, d, ld) _Generic((x),			\
+    float: f(x),							\
+    double: d(x),							\
+    long double: ld(x),							\
+    volatile float: f(x),						\
+    volatile double: d(x),						\
+    volatile long double: ld(x),					\
+    volatile const float: f(x),						\
+    volatile const double: d(x),					\
+    volatile const long double: ld(x),					\
+    const float: f(x),							\
+    const double: d(x),							\
+    const long double: ld(x))
 #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
-#define	__fp_type_select(x, f, d, ld) __builtin_choose_expr(              \
-	__builtin_types_compatible_p(__typeof(x), long double), ld(x),    \
-	__builtin_choose_expr(                                            \
-	__builtin_types_compatible_p(__typeof(x), double), d(x),          \
-	__builtin_choose_expr(                                            \
-	__builtin_types_compatible_p(__typeof(x), float), f(x), (void)0)))
+#define	__fp_type_select(x, f, d, ld) __builtin_choose_expr(		\
+    __builtin_types_compatible_p(__typeof(x), long double), ld(x),	\
+    __builtin_choose_expr(						\
+    __builtin_types_compatible_p(__typeof(x), double), d(x),		\
+    __builtin_choose_expr(						\
+    __builtin_types_compatible_p(__typeof(x), float), f(x), (void)0)))
 #else
-#define	 __fp_type_select(x, f, d, ld)                         \
-	((sizeof(x) == sizeof(float)) ? f(x)                   \
-	: (sizeof(x) == sizeof(double)) ? d(x)                 \
-	: ld(x))
+#define	 __fp_type_select(x, f, d, ld)					\
+    ((sizeof(x) == sizeof(float)) ? f(x)				\
+    : (sizeof(x) == sizeof(double)) ? d(x)				\
+    : ld(x))
 #endif
 
 #define	fpclassify(x) \
@@ -189,21 +198,21 @@ int	__signbitf(float) __pure2;
 int	__signbitl(long double) __pure2;
 
 static __inline int
-__inline_isnan(double __x)
+__inline_isnan(__const double __x)
 {
 
 	return (__x != __x);
 }
 
 static __inline int
-__inline_isnanf(float __x)
+__inline_isnanf(__const float __x)
 {
 
 	return (__x != __x);
 }
 
 static __inline int
-__inline_isnanl(long double __x)
+__inline_isnanl(__const long double __x)
 {
 
 	return (__x != __x);

From owner-svn-src-head@FreeBSD.ORG  Sat Jul 13 10:31:37 2013
Return-Path: 
Delivered-To: svn-src-head@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by hub.freebsd.org (Postfix) with ESMTP id 0D76B5FA;
 Sat, 13 Jul 2013 10:31:37 +0000 (UTC)
 (envelope-from crodr001@gmail.com)
Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com
 [IPv6:2a00:1450:4010:c04::22f])
 by mx1.freebsd.org (Postfix) with ESMTP id A4FED1A07;
 Sat, 13 Jul 2013 10:31:35 +0000 (UTC)
Received: by mail-lb0-f175.google.com with SMTP id r10so8118243lbi.6
 for ; Sat, 13 Jul 2013 03:31:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type;
 bh=aIebN9ihgd396g5PpZTY9O1VJ9Hd5PxGX2ia7Kzc2Ok=;
 b=tecVB6/u/Pe6mtwKPYeU0R7kd0Ilz3iSJgFyBiQ6fZEmkVF3o4BLBG/iMsolpJK92+
 J1slFiTMwPFJICngUo6RhdKKYF8CeHg+5cl5Gv3aqHQr4UG304mnoiGZ7NJg8DgbEIUl
 eMe9H8BBcHmDeMO5s5br35Dji9cvIJcMsilwRqR3n1onlp/3fvW5mQFQ6Pfm7e8nbPmo
 wmgW6fECq2zhAyGr4gtDXQg6oNg5zvppWYa+OpCThxoHL97+WhxQmUZ0GhZYFSX6QZxr
 wYfCEoi6ouGj7+yTKStjOad77hjKn3yT3F2Zc3b/YiSR1NwakKILrhiksAC3Et8zOgMj
 RwQw==
MIME-Version: 1.0
X-Received: by 10.112.172.35 with SMTP id az3mr20517896lbc.66.1373711494482;
 Sat, 13 Jul 2013 03:31:34 -0700 (PDT)
Sender: crodr001@gmail.com
Received: by 10.112.149.38 with HTTP; Sat, 13 Jul 2013 03:31:34 -0700 (PDT)
In-Reply-To: <20130713073118.GC2757@gmail.com>
References: <201307120803.r6C83ACp016523@svn.freebsd.org>
 
 
 <20130712202710.GB2757@gmail.com>
 
 
 
 <20130713073118.GC2757@gmail.com>
Date: Sat, 13 Jul 2013 03:31:34 -0700
X-Google-Sender-Auth: hL9t3BS55LyZ14BQ2E__5bsdN9Q
Message-ID: 
Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt
From: Craig Rodrigues 
To: Mikolaj Golub 
Content-Type: text/plain; charset=ISO-8859-1
X-Content-Filtered-By: Mailman/MimeDel 2.1.14
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
 Adrian Chadd , src-committers@freebsd.org,
 Marko Zec 
X-BeenThere: svn-src-head@freebsd.org
X-Mailman-Version: 2.1.14
Precedence: list
List-Id: SVN commit messages for the src tree for head/-current
 
List-Unsubscribe: ,
 
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
 
X-List-Received-Date: Sat, 13 Jul 2013 10:31:37 -0000

On Sat, Jul 13, 2013 at 12:31 AM, Mikolaj Golub  wrote:

>
> Your patch looks similar to Marko's:
>
>
> http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121115/0824ca85/attachment.diff
>
>
>


> Also, as I understand, after handling vnet context in
> device_probe_and_attach(), there is no need in curvnet setting in
> kldload/kldunload, and Marko removed it.
>

I experimented with Marko's patch, and found that the kernel crashed
inside the code which initializes PF.

(kgdb) where
#0  doadump (textdump=) at
pcpu.h:234

#1  0xffffffff80923e06 in kern_reboot
(howto=260)

    at
/usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:449

#2  0xffffffff80924307 in panic (fmt=0x1 
) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:637 #3 0xffffffff80ce9820 in trap_fatal (frame=0xc, eva=) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:879 #4 0xffffffff80ce9b81 in trap_pfault (frame=0xffffff8128845050, usermode=0) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:795 #5 0xffffffff80cea134 in trap (frame=0xffffff8128845050) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:463 #6 0xffffffff80cd3463 in calltrap () at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:228 #7 0xffffffff820a0fb4 in init_zone_var () at /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:295 #8 0xffffffff820a34db in pf_modevent (mod=, type=, data=) at /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:4342 #9 0xffffffff8090ea48 in module_register_init (arg=) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_module.c:123 #10 0xffffffff809069ce in linker_load_module (kldname=, modname=0xfffffe000730bc00 "pf", parent=0x0, verinfo=0x0, lfpp=0xffffff8128845958) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_linker.c:237 #11 0xffffffff80907008 in kern_kldload (td=0xfffffe0007e10920, file=, ---Type to continue, or q to quit--- fileid=0xffffff81288459b4) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_linker.c:1031 #12 0xffffffff80907224 in sys_kldload (td=0xfffffe0007e10920, uap=) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_linker.c:1062 #13 0xffffffff80ce8fca in amd64_syscall (td=0xfffffe0007e10920, traced=0) at subr_syscall.c:135 #14 0xffffffff80cd3747 in Xfast_syscall () at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:387 #15 0x000000080087e10c in ?? () #7 0xffffffff820a0fb4 in init_zone_var () at /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:295 295 { (kgdb) l 290 291 mtx_destroy(&pf_task_mtx); 292 } 293 void 294 init_zone_var(void) 295 { 296 V_pf_src_tree_pl = V_pf_rule_pl = NULL; 297 V_pf_state_pl = V_pf_state_key_pl = V_pf_state_item_pl = NULL; 298 V_pf_altq_pl = V_pf_pooladdr_pl = NULL; 299 V_pf_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl = NULL; In init_zone_var(), curthread->td_vnet was NULL. So, I don't think it is safe to remove the vnet stuff from kldload/kldunload just yet, without fixing some code in some kernel modules like PF. The other parts of the patch look OK. -- Craig From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 11:18:34 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9EC11EBC; Sat, 13 Jul 2013 11:18:34 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-x22b.google.com (mail-lb0-x22b.google.com [IPv6:2a00:1450:4010:c04::22b]) by mx1.freebsd.org (Postfix) with ESMTP id 5A1E11B2E; Sat, 13 Jul 2013 11:18:33 +0000 (UTC) Received: by mail-lb0-f171.google.com with SMTP id 13so8203796lba.2 for ; Sat, 13 Jul 2013 04:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Moa+Yt8826etSzMwVRCHyl7jFZ4n40T00bKxslnZMs8=; b=KaegsC3tZP9zE5c+/mJ9ngxt7Ap5ouiUxObMPck3y4BK4YfYGBixVHRomIclm1ZWy5 9eMtSzJIJWKrs6emyGRLrhMp30FXYscc5xNf+NSXQfbRjrdXZM3IHxGEukBt+tOTJmzy mZNqmMqJ7Exw9WvQWBeNHcLaGYjYjzFJiTixGUyyDC1L3jVdOCU6nudSC2GvH3iZmdqd MDs0PJpAbqMPcz6x1HhJnHTp6954SwvZD0N06kiQr88X3RoSvuYFqDZaVaKrHa8CBj2I Nws0v9j/hQXqOpaNjXNyigjs/y5D331gQPdJur7svpf8smIcHWCEE/QxFympdygQFAYP NYcQ== X-Received: by 10.112.53.10 with SMTP id x10mr21092170lbo.28.1373714310633; Sat, 13 Jul 2013 04:18:30 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id e5sm15298086lbw.3.2013.07.13.04.18.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 04:18:29 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 13 Jul 2013 14:18:26 +0300 From: Mikolaj Golub To: Craig Rodrigues Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Message-ID: <20130713111825.GE2757@gmail.com> References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130712202710.GB2757@gmail.com> <20130713073118.GC2757@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 11:18:34 -0000 On Sat, Jul 13, 2013 at 03:31:34AM -0700, Craig Rodrigues wrote: > > I experimented with Marko's patch, and found that the kernel crashed > inside the code which initializes PF. .... > /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:295 > 295 { > (kgdb) l > 290 > 291 mtx_destroy(&pf_task_mtx); > 292 } > 293 void > 294 init_zone_var(void) > 295 { > 296 V_pf_src_tree_pl = V_pf_rule_pl = NULL; > 297 V_pf_state_pl = V_pf_state_key_pl = V_pf_state_item_pl = > NULL; > 298 V_pf_altq_pl = V_pf_pooladdr_pl = NULL; > 299 V_pf_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl > = NULL; > > In init_zone_var(), curthread->td_vnet was NULL. I wonder if it fails on current too? It looks this code is not there any more. I will try. > So, I don't think it is safe to remove the vnet stuff from > kldload/kldunload just yet, > without fixing some code in some kernel modules like PF. > If you have plans to merge the changes to stable then yes, I think it is safer to commit the patch without kldload/kldunload part and commit the last separately after testing (and fixing affected modules if there are). > The other parts of the patch look OK. So it works for you with your commit reverted and without Adrians' netgraph patch? -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 11:41:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C9D83494; Sat, 13 Jul 2013 11:41:05 +0000 (UTC) (envelope-from zec@fer.hr) Received: from mail.fer.hr (mail.fer.hr [161.53.72.233]) by mx1.freebsd.org (Postfix) with ESMTP id 5FB1C1C20; Sat, 13 Jul 2013 11:41:04 +0000 (UTC) Received: from x23.lan (89.164.2.162) by MAIL.fer.hr (161.53.72.233) with Microsoft SMTP Server (TLS) id 14.2.342.3; Sat, 13 Jul 2013 13:39:50 +0200 From: Marko Zec To: Mikolaj Golub Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Date: Sat, 13 Jul 2013 13:39:52 +0200 User-Agent: KMail/1.9.10 References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130713073118.GC2757@gmail.com> In-Reply-To: <20130713073118.GC2757@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <201307131339.52599.zec@fer.hr> X-Originating-IP: [89.164.2.162] Cc: Craig Rodrigues , svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 11:41:05 -0000 On Saturday 13 July 2013 09:31:19 Mikolaj Golub wrote: > On Fri, Jul 12, 2013 at 10:40:08PM -0700, Adrian Chadd wrote: > > Here's what I have running on my stable/9 VIMAGE laptop. > > > > http://people.freebsd.org/~adrian/ath/20130712-vimage-default-attach-de > >tach.diff > > > > How's this look to put into -HEAD? > > Your patch looks similar to Marko's: > > http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121115/0 >824ca85/attachment.diff > > Marko took your idea of setting vnet0 context in > device_probe_and_attach(), although there is no is_default_vnet check, > and I also think it is not necessary here -- just unconditionally set > vnet0 is ok. > > Also, as I understand, after handling vnet context in > device_probe_and_attach(), there is no need in curvnet setting in > kldload/kldunload, and Marko removed it. > > In net/if.c, similarly to you, Marko sets vnet context in if_detach(), > but also in if_free(), so this would be good to commit too (I suppose > Marko had good reasons to do this). > > I can't comment the netgraph related parts of your patch as I have no > idea what is going on here. Though I think this could be committed > separately if it is needed. I fear both Adrian's and my patch fall short of addressing the issue of generic USB device attach handling in VIMAGE kernels, i.e. the patches discussed in this thread might be OK for preventing panics with ng_ubt, but what about USB ethernet or wifi devices? If I recall correctly the USB stack has a separate thread which handles device attach events, and IMO the curvnet context should be set there to cover a broader set of different devices. I might be able to find an USB ethernet device for testing next week, but ATM I don't have any piece of USB hardware I could experiment with... Marko From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 13:04:39 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0CFD3BA4; Sat, 13 Jul 2013 13:04:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F3ECD1FC0; Sat, 13 Jul 2013 13:04:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DD4cOC029379; Sat, 13 Jul 2013 13:04:38 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DD4cwC029378; Sat, 13 Jul 2013 13:04:38 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201307131304.r6DD4cwC029378@svn.freebsd.org> From: David Chisnall Date: Sat, 13 Jul 2013 13:04:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253321 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 13:04:39 -0000 Author: theraven Date: Sat Jul 13 13:04:38 2013 New Revision: 253321 URL: http://svnweb.freebsd.org/changeset/base/253321 Log: Cleaner support for type qualifiers. Submitted by: Pasi Parviainen Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Sat Jul 13 10:47:17 2013 (r253320) +++ head/lib/msun/src/math.h Sat Jul 13 13:04:38 2013 (r253321) @@ -83,19 +83,10 @@ extern const union __nan_un { #if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((x), \ +#define __fp_type_select(x, f, d, ld) _Generic((0,(x)), \ float: f(x), \ double: d(x), \ - long double: ld(x), \ - volatile float: f(x), \ - volatile double: d(x), \ - volatile long double: ld(x), \ - volatile const float: f(x), \ - volatile const double: d(x), \ - volatile const long double: ld(x), \ - const float: f(x), \ - const double: d(x), \ - const long double: ld(x)) + long double: ld(x)) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) #define __fp_type_select(x, f, d, ld) __builtin_choose_expr( \ __builtin_types_compatible_p(__typeof(x), long double), ld(x), \ From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 13:35:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0B632CF5; Sat, 13 Jul 2013 13:35:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E205910B3; Sat, 13 Jul 2013 13:35:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DDZALs039109; Sat, 13 Jul 2013 13:35:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DDZAQp039101; Sat, 13 Jul 2013 13:35:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307131335.r6DDZAQp039101@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Jul 2013 13:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253322 - in head/sys/cam: . scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 13:35:11 -0000 Author: mav Date: Sat Jul 13 13:35:09 2013 New Revision: 253322 URL: http://svnweb.freebsd.org/changeset/base/253322 Log: Improve handling of 0x3F/0x0E "Reported LUNs data has changed" and 0x25/0x00 "Logical unit not supported" errors. First initiates specific target rescan, second -- destroys specific LUN. That allows to automatically detect changes in list of device LUNs. This mechanism doesn't work when target is completely idle, but probably that is all what can be done without active polling. Reviewed by: ken Sponsored by: iXsystems, Inc. Modified: head/sys/cam/cam_periph.c head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Sat Jul 13 13:04:38 2013 (r253321) +++ head/sys/cam/cam_periph.c Sat Jul 13 13:35:09 2013 (r253322) @@ -75,7 +75,7 @@ static int camperiphscsistatuserror(uni int *openings, u_int32_t *relsim_flags, u_int32_t *timeout, - int *print, + u_int32_t *action, const char **action_string); static int camperiphscsisenseerror(union ccb *ccb, union ccb **orig_ccb, @@ -84,7 +84,7 @@ static int camperiphscsisenseerror(unio int *openings, u_int32_t *relsim_flags, u_int32_t *timeout, - int *print, + u_int32_t *action, const char **action_string); static int nperiph_drivers; @@ -1274,7 +1274,7 @@ static int camperiphscsistatuserror(union ccb *ccb, union ccb **orig_ccb, cam_flags camflags, u_int32_t sense_flags, int *openings, u_int32_t *relsim_flags, - u_int32_t *timeout, int *print, const char **action_string) + u_int32_t *timeout, u_int32_t *action, const char **action_string) { int error; @@ -1293,7 +1293,7 @@ camperiphscsistatuserror(union ccb *ccb, openings, relsim_flags, timeout, - print, + action, action_string); break; case SCSI_STATUS_QUEUE_FULL: @@ -1348,7 +1348,7 @@ camperiphscsistatuserror(union ccb *ccb, } *timeout = 0; error = ERESTART; - *print = 0; + *action &= ~SSQ_PRINT_SENSE; break; } /* FALLTHROUGH */ @@ -1380,7 +1380,7 @@ static int camperiphscsisenseerror(union ccb *ccb, union ccb **orig, cam_flags camflags, u_int32_t sense_flags, int *openings, u_int32_t *relsim_flags, - u_int32_t *timeout, int *print, const char **action_string) + u_int32_t *timeout, u_int32_t *action, const char **action_string) { struct cam_periph *periph; union ccb *orig_ccb = ccb; @@ -1403,7 +1403,7 @@ camperiphscsisenseerror(union ccb *ccb, * imperitive that we don't violate this assumption. */ error = ERESTART; - *print = 0; + *action &= ~SSQ_PRINT_SENSE; } else { scsi_sense_action err_action; struct ccb_getdev cgd; @@ -1575,7 +1575,7 @@ camperiphscsisenseerror(union ccb *ccb, } sense_error_done: - *print = ((err_action & SSQ_PRINT_SENSE) != 0); + *action = err_action; } return (error); } @@ -1589,32 +1589,32 @@ int cam_periph_error(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags, union ccb *save_ccb) { - union ccb *orig_ccb; + struct cam_path *newpath; + union ccb *orig_ccb, *scan_ccb; struct cam_periph *periph; const char *action_string; cam_status status; - int frozen, error, openings, print, lost_device; - int error_code, sense_key, asc, ascq; - u_int32_t relsim_flags, timeout; + int frozen, error, openings; + u_int32_t action, relsim_flags, timeout; - print = 1; + action = SSQ_PRINT_SENSE; periph = xpt_path_periph(ccb->ccb_h.path); action_string = NULL; status = ccb->ccb_h.status; frozen = (status & CAM_DEV_QFRZN) != 0; status &= CAM_STATUS_MASK; - openings = relsim_flags = timeout = lost_device = 0; + openings = relsim_flags = timeout = 0; orig_ccb = ccb; switch (status) { case CAM_REQ_CMP: error = 0; - print = 0; + action &= ~SSQ_PRINT_SENSE; break; case CAM_SCSI_STATUS_ERROR: error = camperiphscsistatuserror(ccb, &orig_ccb, camflags, sense_flags, &openings, &relsim_flags, - &timeout, &print, &action_string); + &timeout, &action, &action_string); break; case CAM_AUTOSENSE_FAIL: error = EIO; /* we have to kill the command */ @@ -1645,8 +1645,7 @@ cam_periph_error(union ccb *ccb, cam_fla /* FALLTHROUGH */ case CAM_DEV_NOT_THERE: error = ENXIO; - print = 0; - lost_device = 1; + action = SSQ_LOST; break; case CAM_REQ_INVALID: case CAM_PATH_INVALID: @@ -1677,7 +1676,7 @@ cam_periph_error(union ccb *ccb, cam_fla action_string = "Retry was blocked"; } else { error = ERESTART; - print = 0; + action &= ~SSQ_PRINT_SENSE; } break; case CAM_RESRC_UNAVAIL: @@ -1716,12 +1715,12 @@ cam_periph_error(union ccb *ccb, cam_fla if ((sense_flags & SF_PRINT_ALWAYS) || CAM_DEBUGGED(ccb->ccb_h.path, CAM_DEBUG_INFO)) - print = 1; + action |= SSQ_PRINT_SENSE; else if (sense_flags & SF_NO_PRINT) - print = 0; - if (print) + action &= ~SSQ_PRINT_SENSE; + if ((action & SSQ_PRINT_SENSE) != 0) cam_error_print(orig_ccb, CAM_ESF_ALL, CAM_EPF_ALL); - if (error != 0 && print) { + if (error != 0 && (action & SSQ_PRINT_SENSE) != 0) { if (error != ERESTART) { if (action_string == NULL) action_string = "Unretryable error"; @@ -1733,8 +1732,7 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_print(ccb->ccb_h.path, "Retrying command\n"); } - if (lost_device) { - struct cam_path *newpath; + if ((action & SSQ_LOST) != 0) { lun_id_t lun_id; /* @@ -1743,10 +1741,10 @@ cam_periph_error(union ccb *ccb, cam_fla * then we only get rid of the device(s) specified by the * path in the original CCB. */ - if (status == CAM_DEV_NOT_THERE) - lun_id = xpt_path_lun_id(ccb->ccb_h.path); - else + if (status == CAM_SEL_TIMEOUT) lun_id = CAM_LUN_WILDCARD; + else + lun_id = xpt_path_lun_id(ccb->ccb_h.path); /* Should we do more if we can't create the path?? */ if (xpt_create_path(&newpath, periph, @@ -1761,12 +1759,25 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_async(AC_LOST_DEVICE, newpath, NULL); xpt_free_path(newpath); } + } /* Broadcast UNIT ATTENTIONs to all periphs. */ - } else if (scsi_extract_sense_ccb(ccb, - &error_code, &sense_key, &asc, &ascq) && - sense_key == SSD_KEY_UNIT_ATTENTION) { + if ((action & SSQ_UA) != 0) xpt_async(AC_UNIT_ATTENTION, orig_ccb->ccb_h.path, orig_ccb); + + /* Rescan target on "Reported LUNs data has changed" */ + if ((action & SSQ_RESCAN) != 0) { + if (xpt_create_path(&newpath, NULL, + xpt_path_path_id(ccb->ccb_h.path), + xpt_path_target_id(ccb->ccb_h.path), + -1) == CAM_REQ_CMP) { + + scan_ccb = xpt_alloc_ccb_nowait(); + scan_ccb->ccb_h.path = newpath; + scan_ccb->ccb_h.func_code = XPT_SCAN_BUS; + scan_ccb->crcn.flags = 0; + xpt_rescan(scan_ccb); + } } /* Attempt a retry */ Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sat Jul 13 13:04:38 2013 (r253321) +++ head/sys/cam/scsi/scsi_all.c Sat Jul 13 13:35:09 2013 (r253322) @@ -1645,7 +1645,7 @@ static struct asc_table_entry asc_table[ { SST(0x24, 0x08, SS_RDEF, /* XXX TBD */ "Invalid XCDB") }, /* DTLPWROMAEBKVF */ - { SST(0x25, 0x00, SS_FATAL | ENXIO, + { SST(0x25, 0x00, SS_FATAL | ENXIO | SSQ_LOST, "Logical unit not supported") }, /* DTLPWROMAEBKVF */ { SST(0x26, 0x00, SS_FATAL | EINVAL, @@ -2163,7 +2163,7 @@ static struct asc_table_entry asc_table[ { SST(0x3F, 0x0D, SS_RDEF, "Volume set reassigned") }, /* DTLPWROMAE */ - { SST(0x3F, 0x0E, SS_RDEF, /* XXX TBD */ + { SST(0x3F, 0x0E, SS_RDEF | SSQ_RESCAN , "Reported LUNs data has changed") }, /* DTLPWROMAEBKVF */ { SST(0x3F, 0x0F, SS_RDEF, /* XXX TBD */ @@ -3263,6 +3263,7 @@ scsi_error_action(struct ccb_scsiio *csi action |= SS_RETRY|SSQ_DECREMENT_COUNT| SSQ_PRINT_SENSE; } + action |= SSQ_UA; } } if ((action & SS_MASK) >= SS_START && Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Sat Jul 13 13:04:38 2013 (r253321) +++ head/sys/cam/scsi/scsi_all.h Sat Jul 13 13:35:09 2013 (r253322) @@ -88,6 +88,9 @@ typedef enum { * and text. */ SSQ_PRINT_SENSE = 0x0800, + SSQ_UA = 0x1000, /* Broadcast UA. */ + SSQ_RESCAN = 0x2000, /* Rescan target for LUNs. */ + SSQ_LOST = 0x4000, /* Destroy the LUNs. */ SSQ_MASK = 0xff00 } scsi_sense_action_qualifier; From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 13:48:28 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 375A9F9A; Sat, 13 Jul 2013 13:48:28 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) by mx1.freebsd.org (Postfix) with ESMTP id EAC271102; Sat, 13 Jul 2013 13:48:26 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id d10so8393423lbj.0 for ; Sat, 13 Jul 2013 06:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=NVaEAak1XwOw04ZRDQHqXXZL7tV1BRnNDT2TbdYEPt8=; b=kNYXCoMqobhQ+nwxP88jBeH5qaHsg/DEHouJ/BzagZcY8946/jJT4qm9zf5+jQ2Ckq zIzEtK9k28sxtCbz64FyxV7NJs5og/kZaV8A+wMLEyOz7gKKyfI60YieOpv6hJfa/B+O RJO8jU9lMN6Bjw+VPVeDTuwGkpe6sjrZItYsr+1voqVrtwcQHGkC3r75MiqLDUnG5BHZ WawT/+jNwvRcTLZ5SWsfLUATwl3phEtW/l87KUnMOHpypilW/ZGfivXRy1Abk4aLU1CO SRZhDB7b4woItmxdFI3vMWK/ZBA5ZVAehGsBD8KthUgw37IKaA0hPbOhmYAxRX70JguP rfpQ== X-Received: by 10.152.5.227 with SMTP id v3mr21587060lav.31.1373723305738; Sat, 13 Jul 2013 06:48:25 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id m1sm16030446lag.3.2013.07.13.06.48.23 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 06:48:24 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 13 Jul 2013 16:48:20 +0300 From: Mikolaj Golub To: Marko Zec Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Message-ID: <20130713134819.GF2757@gmail.com> References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130713073118.GC2757@gmail.com> <201307131339.52599.zec@fer.hr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307131339.52599.zec@fer.hr> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Craig Rodrigues , svn-src-head@freebsd.org, Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 13:48:28 -0000 On Sat, Jul 13, 2013 at 01:39:52PM +0200, Marko Zec wrote: > I fear both Adrian's and my patch fall short of addressing the issue of > generic USB device attach handling in VIMAGE kernels, i.e. the patches > discussed in this thread might be OK for preventing panics with ng_ubt, but > what about USB ethernet or wifi devices? If I recall correctly the USB > stack has a separate thread which handles device attach events, and IMO the > curvnet context should be set there to cover a broader set of different > devices. You mean usb_process thread? But as I see it calls device_probe_and_attach() in usb_probe_and_attach(), which has vnet context properly set to the default vnet after your patch. So I beleive paths like these are fixed: http://lists.freebsd.org/pipermail/freebsd-virtualization/2009-May/000325.html http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/169991 Or do you mean something else? -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 14:18:08 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CFC5995E; Sat, 13 Jul 2013 14:18:08 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 8B92F11D4; Sat, 13 Jul 2013 14:18:07 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id eg20so8488246lab.19 for ; Sat, 13 Jul 2013 07:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=MEs4mvQ2tKm1fTcY3YWj01wmvzRr1CPLU5xFXXESWX8=; b=zMHtJbuft0G86PSzU/L3ApiTGmBPdA5FSq2kPkQiR4gI3Fz8Ji5vD01x8ZmPevM4mR fVOlD4NkuARJHUFtNleoCcGGQZV15xcgHL6+FvuHuVHaSZsQueJEs46zQuQF9lz6f7/W z6x1syM3QfLlse8tRf0uz4/ADFgkM8n2quGHIm0brgjq6+ho7Q81me0ZD0iqjpT9NVWk c8i/ZXsGrUWAtbNg/1U76lkSezRijbRhIw1+YeGh6w1hSU33rC8+TPYbDdH412ZsNi9G +SKW+6cOA3YpBEvzba1qhwMeyvn6qI76r7W6lBvbB0b95i06/gjQrK+gy8vPlfonRkZH k+kg== X-Received: by 10.112.135.99 with SMTP id pr3mr20887310lbb.23.1373725086422; Sat, 13 Jul 2013 07:18:06 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id n3sm16066354lag.9.2013.07.13.07.18.04 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 07:18:05 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 13 Jul 2013 17:18:03 +0300 From: Mikolaj Golub To: Craig Rodrigues Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Message-ID: <20130713141802.GG2757@gmail.com> References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130712202710.GB2757@gmail.com> <20130713073118.GC2757@gmail.com> <20130713111825.GE2757@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130713111825.GE2757@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 14:18:08 -0000 On Sat, Jul 13, 2013 at 02:18:26PM +0300, Mikolaj Golub wrote: > I wonder if it fails on current too? It looks this code is not there > any more. I will try. Yes. It crashes on current too. In pfattach(). Also, loading ipfw and ipfw_nat causes panics in ipfw_init() and ipfw_nat_init(). Although this can be easily bandaged with CURVNET_SET(vnet0), it rather reveals problems with these modules. E.g. currently in ipfw_nat_init() we lock virtualized layer3_chain in vnet0 context, I think, to restrict the access to ipfw_nat_*_ptr variables during modification. But the access is not protected from another vnets, which might already exist at the moment when ipfw_nat is loaded. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 14:46:21 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9EAA1EE4 for ; Sat, 13 Jul 2013 14:46:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by mx1.freebsd.org (Postfix) with ESMTP id 6DDD3133F for ; Sat, 13 Jul 2013 14:46:21 +0000 (UTC) Received: by mail-ie0-f169.google.com with SMTP id 10so23412101ied.0 for ; Sat, 13 Jul 2013 07:46:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=iC8/TDAXA2kZulFTaV6u6ARLtSbwIDsTC0oUZicq/RU=; b=YvUyzl9YsTlciQaUVs4wW3yY2ZOU0FHiTJQSnGVBJ53mG3Qlx4AOMZaz4fGmrJAqCT XxAnH5/hzo9uaFL3YWpxSf87GtFmNdoULmZDC6UyVYbL7BD2kFP5NdWZSi6SoDhFWE2+ +BYitZrFrTmqbaqI2reE2C6vDGZnAjutNgbKfDFRUxdi3YG49zuzgGbY6EeNLpQnT3u+ ky/zjG4KmWL+WdcDTKrlWYSTqw0K9olmXZEOOjk9NR8kIM4imUiXmUhywvw5oWIOhj3/ lGdqWfoNOlcmfB1sNnzkU6fAt+zTMj/mZFSh/nN39uwhodd20JbFrU5aVawIkEdDUYTW UYXQ== X-Received: by 10.50.129.68 with SMTP id nu4mr2998516igb.9.1373726774980; Sat, 13 Jul 2013 07:46:14 -0700 (PDT) Received: from [10.0.0.53] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id ri10sm5781253igc.1.2013.07.13.07.46.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 13 Jul 2013 07:46:14 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sat, 13 Jul 2013 08:46:10 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130712202710.GB2757@gmail.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQm2pQuiYc0ekglV+bDCWDFu5EQQzCOgR/rOKI5ht3Wf0MRGdvnN8wibCIf4r77zrwzdXQjX Cc: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, Marko Zec , Mikolaj Golub , svn-src-head@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 14:46:21 -0000 On Jul 12, 2013, at 11:40 PM, Adrian Chadd wrote: > Here's what I have running on my stable/9 VIMAGE laptop. > = http://people.freebsd.org/~adrian/ath/20130712-vimage-default-attach-detac= h.diff > How's this look to put into -HEAD? Apart from the style issues (no space after !), I wonder why newbus = needs this vnet intrusion. Seems like a needless dependency :( Warner From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 15:34:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D8793A3B; Sat, 13 Jul 2013 15:34:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C8F7E1702; Sat, 13 Jul 2013 15:34:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DFYbRs073869; Sat, 13 Jul 2013 15:34:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DFYbEr073868; Sat, 13 Jul 2013 15:34:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307131534.r6DFYbEr073868@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Jul 2013 15:34:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253323 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 15:34:37 -0000 Author: mav Date: Sat Jul 13 15:34:37 2013 New Revision: 253323 URL: http://svnweb.freebsd.org/changeset/base/253323 Log: When printing opcode description, map T_NODEVICE to Direct Access Device to handle REPORT LUNS, etc. Modified: head/sys/cam/scsi/scsi_all.c Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Sat Jul 13 13:35:09 2013 (r253322) +++ head/sys/cam/scsi/scsi_all.c Sat Jul 13 15:34:37 2013 (r253323) @@ -665,6 +665,10 @@ scsi_op_desc(u_int16_t opcode, struct sc if (pd_type == T_RBC) pd_type = T_DIRECT; + /* Map NODEVICE to Direct Access Device to handle REPORT LUNS, etc. */ + if (pd_type == T_NODEVICE) + pd_type = T_DIRECT; + opmask = 1 << pd_type; for (j = 0; j < num_tables; j++) { From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 17:44:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2531A7B2; Sat, 13 Jul 2013 17:44:35 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-pb0-x232.google.com (mail-pb0-x232.google.com [IPv6:2607:f8b0:400e:c01::232]) by mx1.freebsd.org (Postfix) with ESMTP id E5E291AA2; Sat, 13 Jul 2013 17:44:34 +0000 (UTC) Received: by mail-pb0-f50.google.com with SMTP id wz7so9887430pbc.23 for ; Sat, 13 Jul 2013 10:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=f8/afkrUHURPIS2dmewcgD4zrAPAMtYSzSOHlLDNNDg=; b=kO2i9g8V0TbAraMYyUdnl/37cUxvfDh1gibLbc7Nog2os2liY+FGeHeLcmgDr9ikUv 7IKLczbPXwzHvBp1LFF/PKLniRWZMPfOf5nl46pIRUVhiRNAPnPQl3t2MMxysuJkkcLj Ky75iuEr6QkXBS9w2BV8maVKyeeJAkGwDcRBNcXrFCL+SzCXkhDYfaZWkHarLPqkWfax PObWJKaeLDMopZzaq6IN7qcu9H8/z/2x6DCyx6WuhttPi6zGbDH3UETMm9rAkApxjfoR tbUlU10ZUo+glXEj2OCIA4hrSVuEkPbra8BsA7dhOntoZNUGuJH+V9kNRPU3/eLLzTOC ZU7A== X-Received: by 10.66.150.9 with SMTP id ue9mr44869603pab.88.1373737474688; Sat, 13 Jul 2013 10:44:34 -0700 (PDT) Received: from localhost (c-67-188-139-74.hsd1.ca.comcast.net. [67.188.139.74]) by mx.google.com with ESMTPSA id ep4sm24161846pbd.35.2013.07.13.10.44.33 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 10:44:33 -0700 (PDT) Sender: Gleb Kurtsou Date: Sat, 13 Jul 2013 10:44:55 -0700 From: Gleb Kurtsou To: "Pedro F. Giffuni" Subject: Re: svn commit: r253276 - head/sys/fs/fuse Message-ID: <20130713174455.GA1108@reks> References: <201307121722.r6CHMxAs083287@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201307121722.r6CHMxAs083287@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 17:44:35 -0000 On (12/07/2013 17:22), Pedro F. Giffuni wrote: > Author: pfg > Date: Fri Jul 12 17:22:59 2013 > New Revision: 253276 > URL: http://svnweb.freebsd.org/changeset/base/253276 > > Log: > Add creation timestamp (birthtime) support for fuse. > > This is based on similar support in MacFUSE. Looks like it breaks backward compatibility, do we want to preserve it taking into account that there was on fusefs official release as part of base but we had fuse in ports for a while? fusefs-libs seems to have its own version of fuse_kernel.h. There are fuse file system implementations that skip libfuse entirely (glusterfs? I'm not sure). At least we should have bumped fuse version.. Thanks, Gleb. > > Modified: > head/sys/fs/fuse/fuse_internal.h > head/sys/fs/fuse/fuse_kernel.h > > Modified: head/sys/fs/fuse/fuse_internal.h > ============================================================================== > --- head/sys/fs/fuse/fuse_internal.h Fri Jul 12 17:11:30 2013 (r253275) > +++ head/sys/fs/fuse/fuse_internal.h Fri Jul 12 17:22:59 2013 (r253276) > @@ -223,6 +223,8 @@ fuse_internal_attr_fat2vat(struct mount > vap->va_mtime.tv_nsec = fat->mtimensec; > vap->va_ctime.tv_sec = fat->ctime; > vap->va_ctime.tv_nsec = fat->ctimensec; > + vap->va_birthtime.tv_sec = fat->crtime; > + vap->va_birthtime.tv_nsec = fat->crtimensec; > vap->va_blocksize = PAGE_SIZE; > vap->va_type = IFTOVT(fat->mode); > > > Modified: head/sys/fs/fuse/fuse_kernel.h > ============================================================================== > --- head/sys/fs/fuse/fuse_kernel.h Fri Jul 12 17:11:30 2013 (r253275) > +++ head/sys/fs/fuse/fuse_kernel.h Fri Jul 12 17:22:59 2013 (r253276) > @@ -69,9 +69,15 @@ struct fuse_attr { > __u64 atime; > __u64 mtime; > __u64 ctime; > +#ifdef __FreeBSD__ > + __u64 crtime; > +#endif > __u32 atimensec; > __u32 mtimensec; > __u32 ctimensec; > +#ifdef __FreeBSD__ > + __u32 crtimensec; > +#endif > __u32 mode; > __u32 nlink; > __u32 uid; From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 18:04:24 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 728533AD; Sat, 13 Jul 2013 18:04:24 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-ob0-x230.google.com (mail-ob0-x230.google.com [IPv6:2607:f8b0:4003:c01::230]) by mx1.freebsd.org (Postfix) with ESMTP id 083CF1B35; Sat, 13 Jul 2013 18:04:23 +0000 (UTC) Received: by mail-ob0-f176.google.com with SMTP id v19so12599794obq.35 for ; Sat, 13 Jul 2013 11:04:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=xAvN4OKRc5slSzgTzN7VYGc9qbvCYsxpxL7HgFNaHVY=; b=ytAyReHVUpwD/4e6sZKzTJizDTQVHiWQ9/8vicnLH5wl1e/7KWSSta2CQP1NsqSTQh EGJtimz/6s9YvC/vVhXCwrRFsWK2YLz8Dk4+zHYxYeVr9kcsxFFRcCr9aK3cEKa/b0w8 aSbUz+6jRjcyzfLwzga2PYSJBqHNPC7kCTF2xSMXO9wn9rPb6QJjKDCwGbWzjO1WP7tT mjQK9ewq1iEjxzuRCJxY6FLzm04rQZ5EGI3K33B3wgg+tjzmTbdWbOUZumL8JkJmR638 WQESLa5UT0h+bqU72PUnlMWeK1BdO0eMHkMzslkpJv3ZNygswrEuTU/GgiE5R5w/vSIs CEkg== MIME-Version: 1.0 X-Received: by 10.60.173.169 with SMTP id bl9mr40187951oec.51.1373738663560; Sat, 13 Jul 2013 11:04:23 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.60.161.200 with HTTP; Sat, 13 Jul 2013 11:04:23 -0700 (PDT) In-Reply-To: <20130713141802.GG2757@gmail.com> References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130712202710.GB2757@gmail.com> <20130713073118.GC2757@gmail.com> <20130713111825.GE2757@gmail.com> <20130713141802.GG2757@gmail.com> Date: Sat, 13 Jul 2013 11:04:23 -0700 X-Google-Sender-Auth: XpaXy--kSg3Rx_U4b2nEhsYRCKs Message-ID: Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt From: Craig Rodrigues To: Mikolaj Golub Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 18:04:24 -0000 On Sat, Jul 13, 2013 at 7:18 AM, Mikolaj Golub wrote: > On Sat, Jul 13, 2013 at 02:18:26PM +0300, Mikolaj Golub wrote: > > > I wonder if it fails on current too? It looks this code is not there > > any more. I will try. > > Yes. It crashes on current too. In pfattach(). Also, loading ipfw and > ipfw_nat causes panics in ipfw_init() and ipfw_nat_init(). Although > this can be easily bandaged with CURVNET_SET(vnet0), it rather reveals > problems with these modules. > Can you try this combination of patches: (1) Combine Adrian and Marko's patches, but omit Marko's changes to kldload/kldunload: http://people.freebsd.org/~rodrigc/vnet-patch-adrian+marko.txt (2) Revert my Bluetooth patch: http://people.freebsd.org/~rodrigc/patch-revert-GRN-253255.txt This combination of patches work for me: -> Bluetooth works with ng_ubt driver -> Wireless with iwn driver -> PF works I don't have a USB Ethernet device to test. -- Craig From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 18:34:02 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 258ADCED; Sat, 13 Jul 2013 18:34:02 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com [IPv6:2a00:1450:4010:c04::236]) by mx1.freebsd.org (Postfix) with ESMTP id D294D1C38; Sat, 13 Jul 2013 18:34:00 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id r11so8461710lbv.13 for ; Sat, 13 Jul 2013 11:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=9ntxM2iTFFhuvinuR4rwUGJcJ3yNYFNnzgAVIKFf/Cg=; b=L4PK65Bkn4ON9zc8d8OQcBq1JvDYk+zUz6JKOaapB3l3xX5ftlMql8FMSXtg18oQKf n9716JwP9bDY8wsXw2xsChozaZvYHUL5Vt31Naqavj19vqA2J7VPqbvro70qyCPMGgcP B2jZv/tg3Z6y7r8iqcqH0PfkaZmj7/WxoCqScLfW5r/WzhGS6ViHWRo3rAgSBoQG2hqx 1fqeGC6L0XIQi7ASqLFbNcAuyW6TUWz6cUNwB8LmVde7yIyB1FYyc2Hb88D4BH95rdwl PQC+5EUhlvmXq6a1P/pKLgT3IoEY8r+v/uqU9FBf51X0uE6J0FX86FBZcZ/vKTLvaQ3f 1JwA== X-Received: by 10.112.11.162 with SMTP id r2mr21415316lbb.41.1373740439724; Sat, 13 Jul 2013 11:33:59 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id am8sm16369489lac.1.2013.07.13.11.33.57 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 11:33:58 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 13 Jul 2013 21:33:56 +0300 From: Mikolaj Golub To: Craig Rodrigues Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Message-ID: <20130713183354.GA2832@gmail.com> References: <20130712202710.GB2757@gmail.com> <20130713073118.GC2757@gmail.com> <20130713111825.GE2757@gmail.com> <20130713141802.GG2757@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 18:34:02 -0000 On Sat, Jul 13, 2013 at 11:04:23AM -0700, Craig Rodrigues wrote: > Can you try this combination of patches: > > (1) Combine Adrian and Marko's patches, but omit Marko's changes to > kldload/kldunload: > > http://people.freebsd.org/~rodrigc/vnet-patch-adrian+marko.txt > > (2) Revert my Bluetooth patch: > > http://people.freebsd.org/~rodrigc/patch-revert-GRN-253255.txt Currently I don't have any pluggable device so my testing would not be very useful. I tried Marko's patch to test kldload/kldunload change, which is not in your patch. Concerning your combined patch, as I said previously I don't like very much that dance with is_default_vnet. What is a purpose of it? As for me, it only makes the code less readable. I would just set curvnet to vnet0, as it is in Marko's patch. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 18:47:05 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 66E2FFD1 for ; Sat, 13 Jul 2013 18:47:05 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from nm13-vm3.bullet.mail.ne1.yahoo.com (nm13-vm3.bullet.mail.ne1.yahoo.com [98.138.91.143]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2CA1C94 for ; Sat, 13 Jul 2013 18:47:05 +0000 (UTC) Received: from [98.138.90.51] by nm13.bullet.mail.ne1.yahoo.com with NNFMP; 13 Jul 2013 18:46:58 -0000 Received: from [98.138.226.133] by tm4.bullet.mail.ne1.yahoo.com with NNFMP; 13 Jul 2013 18:46:58 -0000 Received: from [127.0.0.1] by smtp220.mail.ne1.yahoo.com with NNFMP; 13 Jul 2013 18:46:58 -0000 X-Yahoo-Newman-Id: 464791.48610.bm@smtp220.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 85Ozn3sVM1lTqkDvN_LrCSSvdewt3SwZT8uILUgY5rvk19e xk7u9yA4DdQ8QC7ezLkrU0dBSNOOnv_3.j7Qof5dNjHJXf3R7iOvVQSx_5ZE z4rBlqSKOi67HjIJoksclg10k2OyzOmj_g3MF4h2sYBtFzp58WMCC8.OoXDf 3ULP6_pj2eYsaVIZlyWqhXcHzMO9a8JIYsa9q1BAeTyu6DfAcxwQOiH_Z6rE rtQX8EXIqV5GBKW35EaGgyXCZRWCOlevmrlQSY6NY.KztffB4E6atLSS6qCp DzxIHX2q2isZ1sn0uOwfa1j1wTn5fdn5j_kJlP1xO2AS0v2t2Lqr8HmsZ8JT .WXHKUBWd19pdoicPLLy64DhJUqcNjvjxDYJadH0YwxcHRMtvYC5al_Xjwil xMfkE5EBPO2eciaUx_HvlrwUqFFdPxNMy6TEX6eZRj9OPK.npVcGGOEkMA0N pX3pFjelZaRb.tUeQVwaZfgrAYWMcIxIDimEsSIsu05KL67MsI5jD4p_BM1i zzw_WQsbqaXYNv2FvyuvI7WxfpcPN2nyguAVhRNpEsOVngIMW.EmHc58SMdv tz2l0SS_aClwXeTfhFERmtJtxQ54L1.K5qGGe0yQJrgIv2yBl4vrE0fqxlP. KVAVdYlawGHdDFqhFSRCkqFqi7cUfppAOy1Eqh9vPLgAr8GoJyvJcVM0Xo9K 1fpl6QXHKtrURmV_ZhGjr.J_nqrR2pR0NsTKNkrEJ1dIjdim7ym7Z X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf X-Rocket-Received: from [192.168.0.102] (pfg@190.157.126.109 with ) by smtp220.mail.ne1.yahoo.com with SMTP; 13 Jul 2013 11:46:58 -0700 PDT Message-ID: <51E1A09F.2060701@FreeBSD.org> Date: Sat, 13 Jul 2013 13:46:55 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130630 Thunderbird/17.0.7 MIME-Version: 1.0 To: Gleb Kurtsou Subject: Re: svn commit: r253276 - head/sys/fs/fuse References: <201307121722.r6CHMxAs083287@svn.freebsd.org> <20130713174455.GA1108@reks> In-Reply-To: <20130713174455.GA1108@reks> Content-Type: multipart/mixed; boundary="------------090907020501030505050307" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 18:47:05 -0000 This is a multi-part message in MIME format. --------------090907020501030505050307 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 13.07.2013 12:44, Gleb Kurtsou wrote: > On (12/07/2013 17:22), Pedro F. Giffuni wrote: >> Author: pfg >> Date: Fri Jul 12 17:22:59 2013 >> New Revision: 253276 >> URL: http://svnweb.freebsd.org/changeset/base/253276 >> >> Log: >> Add creation timestamp (birthtime) support for fuse. >> >> This is based on similar support in MacFUSE. > Looks like it breaks backward compatibility, do we want to preserve it > taking into account that there was on fusefs official release as part of > base but we had fuse in ports for a while? It's not really a compatibility issue, It's just a field that remains unused on most fuse implementations. For all purposes our upstream seems to be macfuse: http://code.google.com/p/macfuse/source/detail?spec=svn1686&r=1360 > fusefs-libs seems to have its own version of fuse_kernel.h. That's bad, but not really under our control. > There are fuse file system implementations that skip libfuse entirely > (glusterfs? I'm not sure). > > At least we should have bumped fuse version. Make no illusions; we have no control over what the version numbers actually mean, and the API has become dangerously linux dependent. We could apply the attached patch but I wonder if it makes any sense since we don't support the changes. Pedro. --------------090907020501030505050307 Content-Type: text/plain; charset=UTF-8; name="patch-fuse-7.9" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="patch-fuse-7.9" SW5kZXg6IGZzL2Z1c2UvZnVzZV9rZXJuZWwuaAo9PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBmcy9mdXNl L2Z1c2Vfa2VybmVsLmgJKHJldmlzaW9uIDI1MzI3NikKKysrIGZzL2Z1c2UvZnVzZV9rZXJu ZWwuaAkod29ya2luZyBjb3B5KQpAQCAtMzQsNiArMzQsMTkgQEAKICAqICRGcmVlQlNEJAog ICovCiAKKy8qCisgKiBUaGlzIGZpbGUgZGVmaW5lcyB0aGUga2VybmVsIGludGVyZmFjZSBv ZiBGVVNFCisgKgorICogUHJvdG9jb2wgY2hhbmdlbG9nOgorICoKKyAqIDcuOToKKyAqICAt IG5ldyBmdXNlX2dldGF0dHJfaW4gaW5wdXQgYXJndW1lbnQgb2YgR0VUQVRUUgorICogIC0g YWRkIGxrX2ZsYWdzIGluIGZ1c2VfbGtfaW4KKyAqICAtIGFkZCBsb2NrX293bmVyIGZpZWxk IHRvIGZ1c2Vfc2V0YXR0cl9pbiwgZnVzZV9yZWFkX2luIGFuZCBmdXNlX3dyaXRlX2luCisg KiAgLSBhZGQgYmxrc2l6ZSBmaWVsZCB0byBmdXNlX2F0dHIKKyAqICAtIGFkZCBmaWxlIGZs YWdzIGZpZWxkIHRvIGZ1c2VfcmVhZF9pbiBhbmQgZnVzZV93cml0ZV9pbgorICovCisKICNp Zm5kZWYgbGludXgKICNpbmNsdWRlIDxzeXMvdHlwZXMuaD4KICNkZWZpbmUgX191NjQgdWlu dDY0X3QKQEAgLTQ4LDcgKzYxLDcgQEAKICNkZWZpbmUgRlVTRV9LRVJORUxfVkVSU0lPTiA3 CiAKIC8qKiBNaW5vciB2ZXJzaW9uIG51bWJlciBvZiB0aGlzIGludGVyZmFjZSAqLwotI2Rl ZmluZSBGVVNFX0tFUk5FTF9NSU5PUl9WRVJTSU9OIDgKKyNkZWZpbmUgRlVTRV9LRVJORUxf TUlOT1JfVkVSU0lPTiA5CiAKIC8qKiBUaGUgbm9kZSBJRCBvZiB0aGUgcm9vdCBpbm9kZSAq LwogI2RlZmluZSBGVVNFX1JPT1RfSUQgMQpAQCAtNzAsMTkgKzgzLDIxIEBACiAJX191NjQJ bXRpbWU7CiAJX191NjQJY3RpbWU7CiAjaWZkZWYgX19GcmVlQlNEX18KLQlfX3U2NAljcnRp bWU7CisJX191NjQgICBjcnRpbWU7CiAjZW5kaWYKIAlfX3UzMglhdGltZW5zZWM7CiAJX191 MzIJbXRpbWVuc2VjOwogCV9fdTMyCWN0aW1lbnNlYzsKICNpZmRlZiBfX0ZyZWVCU0RfXwot CV9fdTMyCWNydGltZW5zZWM7CisJX191MzIgICBjcnRpbWVuc2VjOwogI2VuZGlmCiAJX191 MzIJbW9kZTsKIAlfX3UzMglubGluazsKIAlfX3UzMgl1aWQ7CiAJX191MzIJZ2lkOwogCV9f dTMyCXJkZXY7CisJX191MzIJYmxrc2l6ZTsKKwlfX3UzMglwYWRkaW5nOwogfTsKIAogc3Ry dWN0IGZ1c2Vfa3N0YXRmcyB7CkBAIC0xMTUsNiArMTMwLDkgQEAKICNkZWZpbmUgRkFUVFJf QVRJTUUJKDEgPDwgNCkKICNkZWZpbmUgRkFUVFJfTVRJTUUJKDEgPDwgNSkKICNkZWZpbmUg RkFUVFJfRkgJKDEgPDwgNikKKyNkZWZpbmUgRkFUVFJfQVRJTUVfTk9XCSgxIDw8IDcpCisj ZGVmaW5lIEZBVFRSX01USU1FX05PVwkoMSA8PCA4KQorI2RlZmluZSBGQVRUUl9MT0NLT1dO RVIJKDEgPDwgOSkKIAogLyoqCiAgKiBGbGFncyByZXR1cm5lZCBieSB0aGUgT1BFTiByZXF1 ZXN0CkBAIC0xMzAsMTIgKzE0OCwzOSBAQAogICovCiAjZGVmaW5lIEZVU0VfQVNZTkNfUkVB RAkJKDEgPDwgMCkKICNkZWZpbmUgRlVTRV9QT1NJWF9MT0NLUwkoMSA8PCAxKQorI2RlZmlu ZSBGVVNFX0ZJTEVfT1BTCQkoMSA8PCAyKQorI2RlZmluZSBGVVNFX0FUT01JQ19PX1RSVU5D CSgxIDw8IDMpCisjZGVmaW5lIEZVU0VfQklHX1dSSVRFUwkJKDEgPDwgNSkKIAogLyoqCiAg KiBSZWxlYXNlIGZsYWdzCiAgKi8KICNkZWZpbmUgRlVTRV9SRUxFQVNFX0ZMVVNICSgxIDw8 IDApCiAKKy8qKgorICogR2V0YXR0ciBmbGFncworICovCisjZGVmaW5lIEZVU0VfR0VUQVRU Ul9GSAkJKDEgPDwgMCkKKworLyoqCisgKiBMb2NrIGZsYWdzCisgKi8KKyNkZWZpbmUgRlVT RV9MS19GTE9DSwkJKDEgPDwgMCkKKworLyoqCisgKiBXUklURSBmbGFncworICoKKyAqIEZV U0VfV1JJVEVfQ0FDSEU6IGRlbGF5ZWQgd3JpdGUgZnJvbSBwYWdlIGNhY2hlLCBmaWxlIGhh bmRsZSBpcyBndWVzc2VkCisgKiBGVVNFX1dSSVRFX0xPQ0tPV05FUjogbG9ja19vd25lciBm aWVsZCBpcyB2YWxpZAorICovCisjZGVmaW5lIEZVU0VfV1JJVEVfQ0FDSEUJKDEgPDwgMCkK KyNkZWZpbmUgRlVTRV9XUklURV9MT0NLT1dORVIJKDEgPDwgMSkKKworLyoqCisgKiBSZWFk IGZsYWdzCisgKi8KKyNkZWZpbmUgRlVTRV9SRUFEX0xPQ0tPV05FUgkoMSA8PCAxKQorCiBl bnVtIGZ1c2Vfb3Bjb2RlIHsKIAlGVVNFX0xPT0tVUAkgICA9IDEsCiAJRlVTRV9GT1JHRVQJ ICAgPSAyLCAgLyogbm8gcmVwbHkgKi8KQEAgLTE3OCw2ICsyMjMsOCBAQAogLyogVGhlIHJl YWQgYnVmZmVyIGlzIHJlcXVpcmVkIHRvIGJlIGF0IGxlYXN0IDhrLCBidXQgbWF5IGJlIG11 Y2ggbGFyZ2VyICovCiAjZGVmaW5lIEZVU0VfTUlOX1JFQURfQlVGRkVSIDgxOTIKIAorI2Rl ZmluZSBGVVNFX0NPTVBBVF9FTlRSWV9PVVRfU0laRSAxMjAKKwogc3RydWN0IGZ1c2VfZW50 cnlfb3V0IHsKIAlfX3U2NAlub2RlaWQ7CQkvKiBJbm9kZSBJRCAqLwogCV9fdTY0CWdlbmVy YXRpb247CS8qIElub2RlIGdlbmVyYXRpb246IG5vZGVpZDpnZW4gbXVzdApAQCAtMTkzLDYg KzI0MCwxNCBAQAogCV9fdTY0CW5sb29rdXA7CiB9OwogCitzdHJ1Y3QgZnVzZV9nZXRhdHRy X2luIHsKKwlfX3UzMglnZXRhdHRyX2ZsYWdzOworCV9fdTMyCWR1bW15OworCV9fdTY0CWZo OworfTsKKworI2RlZmluZSBGVVNFX0NPTVBBVF9BVFRSX09VVF9TSVpFIDk2CisKIHN0cnVj dCBmdXNlX2F0dHJfb3V0IHsKIAlfX3U2NAlhdHRyX3ZhbGlkOwkvKiBDYWNoZSB0aW1lb3V0 IGZvciB0aGUgYXR0cmlidXRlcyAqLwogCV9fdTMyCWF0dHJfdmFsaWRfbnNlYzsKQEAgLTIw MCw2ICsyNTUsMTEgQEAKIAlzdHJ1Y3QgZnVzZV9hdHRyIGF0dHI7CiB9OwogCitzdHJ1Y3Qg ZnVzZV9ta25vZF9pbiB7CisJX191MzIJbW9kZTsKKwlfX3UzMglyZGV2OworfTsKKwogc3Ry dWN0IGZ1c2VfbWtkaXJfaW4gewogCV9fdTMyCW1vZGU7CiAJX191MzIJcGFkZGluZzsKQEAg LTIxOCw3ICsyNzgsNyBAQAogCV9fdTMyCXBhZGRpbmc7CiAJX191NjQJZmg7CiAJX191NjQJ c2l6ZTsKLQlfX3U2NAl1bnVzZWQxOworCV9fdTY0CWxvY2tfb3duZXI7CiAJX191NjQJYXRp bWU7CiAJX191NjQJbXRpbWU7CiAJX191NjQJdW51c2VkMjsKQEAgLTI2MSwxNCArMzIxLDIy IEBACiAJX191NjQJZmg7CiAJX191NjQJb2Zmc2V0OwogCV9fdTMyCXNpemU7CisJX191MzIJ cmVhZF9mbGFnczsKKwlfX3U2NAlsb2NrX293bmVyOworCV9fdTMyCWZsYWdzOwogCV9fdTMy CXBhZGRpbmc7CiB9OwogCisjZGVmaW5lIEZVU0VfQ09NUEFUX1dSSVRFX0lOX1NJWkUgMjQK Kwogc3RydWN0IGZ1c2Vfd3JpdGVfaW4gewogCV9fdTY0CWZoOwogCV9fdTY0CW9mZnNldDsK IAlfX3UzMglzaXplOwogCV9fdTMyCXdyaXRlX2ZsYWdzOworCV9fdTY0CWxvY2tfb3duZXI7 CisJX191MzIJZmxhZ3M7CisJX191MzIJcGFkZGluZzsKIH07CiAKIHN0cnVjdCBmdXNlX3dy aXRlX291dCB7CkBAIC0zMDcsNiArMzc1LDggQEAKIAlfX3U2NAlmaDsKIAlfX3U2NAlvd25l cjsKIAlzdHJ1Y3QgZnVzZV9maWxlX2xvY2sgbGs7CisJX191MzIJbGtfZmxhZ3M7CisJX191 MzIJcGFkZGluZzsKIH07CiAKIHN0cnVjdCBmdXNlX2xrX291dCB7Cg== --------------090907020501030505050307-- From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:32:51 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 808976BB; Sat, 13 Jul 2013 19:32:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 731641DC9; Sat, 13 Jul 2013 19:32:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DJWp95011006; Sat, 13 Jul 2013 19:32:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DJWpAS011005; Sat, 13 Jul 2013 19:32:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307131932.r6DJWpAS011005@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 13 Jul 2013 19:32:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253325 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:32:51 -0000 Author: kib Date: Sat Jul 13 19:32:50 2013 New Revision: 253325 URL: http://svnweb.freebsd.org/changeset/base/253325 Log: Allow to call clock_gettime() on the clock id for zombie process. Reported by: Petr Salinger PR: threads/180496 Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_time.c Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Sat Jul 13 18:09:42 2013 (r253324) +++ head/sys/kern/kern_time.c Sat Jul 13 19:32:50 2013 (r253325) @@ -297,14 +297,9 @@ get_cputime(struct thread *td, clockid_t PROC_UNLOCK(td2->td_proc); } else { pid = clock_id & CPUCLOCK_ID_MASK; - p2 = pfind(pid); - if (p2 == NULL) - return (EINVAL); - error = p_cansee(td, p2); - if (error) { - PROC_UNLOCK(p2); + error = pget(pid, PGET_CANSEE, &p2); + if (error != 0) return (EINVAL); - } get_process_cputime(p2, ats); PROC_UNLOCK(p2); } From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:34:35 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 266CE812; Sat, 13 Jul 2013 19:34:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 190E81DDD; Sat, 13 Jul 2013 19:34:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DJYYsx011283; Sat, 13 Jul 2013 19:34:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DJYYw1011282; Sat, 13 Jul 2013 19:34:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307131934.r6DJYYw1011282@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 13 Jul 2013 19:34:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253326 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:34:35 -0000 Author: kib Date: Sat Jul 13 19:34:34 2013 New Revision: 253326 URL: http://svnweb.freebsd.org/changeset/base/253326 Log: There is no need to count waiters for the runningbufspace. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Jul 13 19:32:50 2013 (r253325) +++ head/sys/kern/vfs_bio.c Sat Jul 13 19:34:34 2013 (r253326) @@ -561,7 +561,7 @@ waitrunningbufspace(void) mtx_lock(&rbreqlock); while (runningbufspace > hirunningspace) { - ++runningbufreq; + runningbufreq = 1; msleep(&runningbufreq, &rbreqlock, PVM, "wdrain", 0); } mtx_unlock(&rbreqlock); From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:36:19 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1A085954; Sat, 13 Jul 2013 19:36:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8DE1DE6; Sat, 13 Jul 2013 19:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DJaIAI011535; Sat, 13 Jul 2013 19:36:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DJaIZa011534; Sat, 13 Jul 2013 19:36:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307131936.r6DJaIZa011534@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 13 Jul 2013 19:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253327 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:36:19 -0000 Author: kib Date: Sat Jul 13 19:36:18 2013 New Revision: 253327 URL: http://svnweb.freebsd.org/changeset/base/253327 Log: Assert that runningbufspace does not underflow. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sat Jul 13 19:34:34 2013 (r253326) +++ head/sys/kern/vfs_bio.c Sat Jul 13 19:36:18 2013 (r253327) @@ -474,10 +474,12 @@ runningbufwakeup(struct buf *bp) { long space, bspace; - if (bp->b_runningbufspace == 0) - return; - space = atomic_fetchadd_long(&runningbufspace, -bp->b_runningbufspace); bspace = bp->b_runningbufspace; + if (bspace == 0) + return; + space = atomic_fetchadd_long(&runningbufspace, -bspace); + KASSERT(space >= bspace, ("runningbufspace underflow %ld %ld", + space, bspace)); bp->b_runningbufspace = 0; /* * Only acquire the lock and wakeup on the transition from exceeding From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:42:52 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D4CE1BCE; Sat, 13 Jul 2013 19:42:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C5B711E0B; Sat, 13 Jul 2013 19:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DJgq9R013955; Sat, 13 Jul 2013 19:42:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DJgq0C013954; Sat, 13 Jul 2013 19:42:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307131942.r6DJgq0C013954@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 13 Jul 2013 19:42:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253328 - head/sys/i386/i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:42:52 -0000 Author: kib Date: Sat Jul 13 19:42:52 2013 New Revision: 253328 URL: http://svnweb.freebsd.org/changeset/base/253328 Log: Create a proper stack frame for i386 version of bcopy(), despite the function is leaf. The frame allows ddb to not loose the direct caller of bcopy() in backtrace. Other functions from support.s would benefit from the same change as well, but for now bcopy() is the most frequent offender. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/i386/i386/support.s Modified: head/sys/i386/i386/support.s ============================================================================== --- head/sys/i386/i386/support.s Sat Jul 13 19:36:18 2013 (r253327) +++ head/sys/i386/i386/support.s Sat Jul 13 19:42:52 2013 (r253328) @@ -181,11 +181,13 @@ END(bcopyb) * ws@tools.de (Wolfgang Solfrank, TooLs GmbH) +49-228-985800 */ ENTRY(bcopy) + pushl %ebp + movl %esp,%ebp pushl %esi pushl %edi - movl 12(%esp),%esi - movl 16(%esp),%edi - movl 20(%esp),%ecx + movl 8(%ebp),%esi + movl 12(%ebp),%edi + movl 16(%ebp),%ecx movl %edi,%eax subl %esi,%eax @@ -196,12 +198,13 @@ ENTRY(bcopy) cld /* nope, copy forwards */ rep movsl - movl 20(%esp),%ecx + movl 16(%ebp),%ecx andl $3,%ecx /* any bytes left? */ rep movsb popl %edi popl %esi + popl %ebp ret ALIGN_TEXT @@ -214,7 +217,7 @@ ENTRY(bcopy) std rep movsb - movl 20(%esp),%ecx /* copy remainder by 32-bit words */ + movl 16(%ebp),%ecx /* copy remainder by 32-bit words */ shrl $2,%ecx subl $3,%esi subl $3,%edi @@ -223,6 +226,7 @@ ENTRY(bcopy) popl %edi popl %esi cld + popl %ebp ret END(bcopy) From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:45:15 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7F208DE8; Sat, 13 Jul 2013 19:45:15 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-ob0-x231.google.com (mail-ob0-x231.google.com [IPv6:2607:f8b0:4003:c01::231]) by mx1.freebsd.org (Postfix) with ESMTP id 149041E15; Sat, 13 Jul 2013 19:45:15 +0000 (UTC) Received: by mail-ob0-f177.google.com with SMTP id ta17so12474831obb.36 for ; Sat, 13 Jul 2013 12:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=C6dburt0aDMtlmRXKORZMh4gQJf8ttE4vTMCDMP2GBw=; b=Q9z7RtWWl6KtcriAq4GIIxXWVAFzKi56h1WOUOHIpOGRfUFo5uLOeGJRqDv85KrTA1 Neeedk0o/lUG2aHaTgjTbkVi3G5LNCgo783lAUdhnAKeJndZ8zgTZwKPDKMQMObIh7Y/ YugPTV3/UipABwxW8fKco0IImagTkbFPz5MHM0qdMd3dZF9Jsu7EPyGwznrt0NyLAJak jo+EtuAwkoxNXoegmC+PgcC60t/g9zz8Q0nkxs0/LEu0y9xzgENqtYDd28T6HADivuvN aLMhGJLqWUDuat+qdxsPEM98Mq+i3otLrfwcBGcpkrWpgd5g90+W4aC4OUr/kqi/UMzw WocQ== MIME-Version: 1.0 X-Received: by 10.182.87.170 with SMTP id az10mr39823287obb.10.1373744713402; Sat, 13 Jul 2013 12:45:13 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.60.161.200 with HTTP; Sat, 13 Jul 2013 12:45:13 -0700 (PDT) In-Reply-To: <20130713183354.GA2832@gmail.com> References: <20130712202710.GB2757@gmail.com> <20130713073118.GC2757@gmail.com> <20130713111825.GE2757@gmail.com> <20130713141802.GG2757@gmail.com> <20130713183354.GA2832@gmail.com> Date: Sat, 13 Jul 2013 12:45:13 -0700 X-Google-Sender-Auth: SCFUEGGHaNEmR9w3Xe3D8blQaDU Message-ID: Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt From: Craig Rodrigues To: Mikolaj Golub Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:45:15 -0000 On Sat, Jul 13, 2013 at 11:33 AM, Mikolaj Golub wrote: > > Currently I don't have any pluggable device so my testing would not be > very useful. I tried Marko's patch to test kldload/kldunload change, > which is not in your patch. OK, just to double check, based on reading your post: http://lists.freebsd.org/pipermail/svn-src-all/2013-July/071848.html , with Marko's kldload/kldunload change, you encountered kernel panics in PF and IPFW? I also encountered kernel panics in PF with that patch. Maybe we can clean up those modules in a separate pass, and apply the kldload/kldunload fix some time in the future. > > > Concerning your combined patch, as I said previously I don't like very > much that dance with is_default_vnet. What is a purpose of it? As for > me, it only makes the code less readable. I would just set curvnet to > vnet0, as it is in Marko's patch. > Fine by me. I have re-rolled my combined patch to remove the is_default_vnet check and go with Marko's code to set curvnet to vnet0: (1) Combine Adrian and Marko's patches, but omit Marko's changes to kldload/kldunload: http://people.freebsd.org/~rodrigc/vnet-patch-adrian+marko-p2.txt (2) Revert my Bluetooth patch: http://people.freebsd.org/~rodrigc/patch-revert-GRN-253255.txt -- Craig From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 19:54:44 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 90424EF; Sat, 13 Jul 2013 19:54:44 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay006.isp.belgacom.be (mailrelay006.isp.belgacom.be [195.238.6.172]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2B61E41; Sat, 13 Jul 2013 19:54:43 +0000 (UTC) X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmEGADyw4VFR8aPm/2dsb2JhbABagwbCYIEIF3SCIwEBBAFWIgEFCwsOCgkWDwkDAgECASceBg0BBQIBAYgGCrYaj2QHg3gDkA+BLZdtgxQ6 Received: from 230.163-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.163.230]) by relay.skynet.be with ESMTP; 13 Jul 2013 21:54:30 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r6DJsSDs003538; Sat, 13 Jul 2013 21:54:29 +0200 (CEST) (envelope-from tijl@coosemans.org) Message-ID: <51E1B06E.2010300@coosemans.org> Date: Sat, 13 Jul 2013 21:54:22 +0200 From: Tijl Coosemans User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:17.0) Gecko/20130701 Thunderbird/17.0.7 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r253215 - head/lib/msun/src References: <201307111741.r6BHf5gQ060844@svn.freebsd.org> <51DEFEF7.4080709@coosemans.org> <7D521907-4802-4141-9A5E-40EB157A5AEF@FreeBSD.org> <51DF0FA5.4050106@coosemans.org> <51DF14F9.50001@coosemans.org> <20130712180753.E5131@besplex.bde.org> In-Reply-To: <20130712180753.E5131@besplex.bde.org> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2AURBEBSHXJSPFJCLLSSL" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David Chisnall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 19:54:44 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2AURBEBSHXJSPFJCLLSSL Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-07-12 11:14, Bruce Evans wrote: > On Thu, 11 Jul 2013, Tijl Coosemans wrote: >> On 2013-07-11 22:03, Tijl Coosemans wrote: >>> On 2013-07-11 21:36, David Chisnall wrote: >>>> On 11 Jul 2013, at 19:52, Tijl Coosemans wrote:= >>>>>> @@ -227,8 +250,6 @@ double expm1(double); >>>>>> double fma(double, double, double); >>>>>> double hypot(double, double); >>>>>> int ilogb(double) __pure2; >>>>>> -int (isinf)(double) __pure2; >>>>>> -int (isnan)(double) __pure2; >>>>> >>>>> I think they should stay for the C90 case. >>>> >>>> That would completely defeat the point of this entire exercise and b= e >>>> redundant unless we aim to support a compiler that only supports C90= >>>> and no GNU extensions, in which case you'll hit errors in cdefs.h, >>>> long before you get to this point in an include. >>> >>> isnan(double) is part of SUSv2. It should be visible when compiling w= ith >>> -D_XOPEN_SOURCE=3D500. I think you need something like this: >>>=20 >>> #if (__BSD_VISIBLE || __XSI_VISIBLE <=3D 500) && __ISO_C_VISIBLE < 19= 99 >>> int isinf(double) __pure2; >>> int isnan(double) __pure2; >>> #endif >> >> Actually this: >> >> #if (__BSD_VISIBLE || (defined(__XSI_VISIBLE) && __XSI_VISIBLE <=3D 50= 0)) >> && __ISO_C_VISIBLE < 1999 >=20 > Remove the __ISO_C_VISIBLE part, since this is not in C90. This also > fixes a style bug (long line). I shouldn't have mentioned C90. What I meant to say is the not-C99-or-higher case which is further restricted by __BSD_VISIBLE and __XSI_VISIBLE, but where the macros aren't defined. These two symbols are the cause for the original problem report about clang's cmath header (in C++11 isnan/isinf are functions returning bool not int). Their visibility had to be constrained somehow and that cascaded into redefining the isnan and isinf macros because they were implemented using these functions. I think completely removing these symbols is wrong however because it breaks the API in the specific case of the #if above. If __ISO_C_VISIBLE < 1999 isn't correct then maybe __cplusplus < 201103L?= > How can that work? Even you forgot to restore the parentheses around > the functions, so the above has syntax errors. The macros aren't there for __ISO_C_VISIBLE < 1999. > I noticed some more problems in the implementation of these macros > and others: > - many or all of the __pure2's in the prototypes are wrong, since even > the classification functions can have side effects for signaling > NaNs. It is impossible to avoid these side effects for extern > functions in some cases, since the ABI gives them. I think static > inline functions must have the same results as extern functions, > so compilers should pessimize inline functions as necessary to > get the same bad results, but compilers don't do that. Apparently, in the 2008 version of IEEE 754 they are considered non-computational and never generate exceptions, even for sNaN. The old IEEE 754-1985 only mentions isfinite and isnan and says implementations may consider them non-arithmetic. > - classification functions are specified to convert to the semantic > type (remove any extra precision or exponent range) before classifyin= g. Yes, it makes the macros more function-like. > For example, if x is a double slightly larger than sqrt(DBL_MAX), and= > if double expressions are evaluated in extra exponent range, then x*x= > is finite with the extra range but infinite in the semantic type. So= > isinf(x*x) is true, and the implementation > #define isinf(x) (fabs(x) =3D=3D INFINITY) is invalid. clang on x86 = gets > __builtin_isinf(x*x) this right as a side effect of its pessimization= > of fabs() to non-inline -- parameter passing to the extern fabs() > converts to the semantic type. Sometimes the arg is known not to hav= e > extra range, so no conversion is needed. If isinf isn't supposed to generate exceptions then it cannot use a floating point comparison either. That would only leave bit operations. > I think C11 has new mistakes for extra precision. It specifies that > return reduces to the semantic type, like the classification macros > are required to do for their arg. clang -std=3Dc11 doesn't implement > this bug for at least: >=20 > #include > double sq(double x) { return (x*x); } > double sq2(double x) { return (fabs(x*x); } >=20 > On i386 without SSE2 (so extra precision), this generates the same code= > as with -std=3Dc99. Squaring x gives extra precision and exponent rang= e. > This is not destroyed on return, so extra precision is not defeated by > writing the squaring operation as a function. fabs() is inlined in bot= h > cases, so it has little effect here (no effect unless x is NaN), but I > think even C99 doesn't permit this. If fabs() were not inline, then > the ABI would force destruction of the extra precision and range when > it is called, and I think C99 requires conversion to the semantic type > for calls. For function parameters both C99 and C11 state that they are converted as if by assignment meaning extra precision should be removed. This is also required by IEEE 754-2008. Both C99 and C11 state that making a function inline suggests calls to the function should be as fast as possible, but I don't think this allows skipping any conversions so even if a function is inlined the compiler should remove extra precision. If a floating point value already has the right precision then assignment and as-if-by-assignment may be seen as copy operations that don't raise any exceptions even for sNaN. I suppose this means math functions must always use each argument in at least one arithmetic operation to trigger sNaNs. For return statements both C99 and C11 state that it's not an assignment. Only if the type of the return expression differs from the return type is the result converted as if by assignment. There's a footnote that says this allows floating point values to be returned with extra precision if there's no conversion. The extra precision can be removed with a cast. IEEE 754-2008 requires that extra precision is removed. Also, fabs is somewhat special. In IEEE 754-1985 it's considered equal to copysign(x, 1.0) which may but doesn't have to raise exceptions even for sNaN. In IEEE 754-2008, operations that only affect the sign, like fabs, don't raise exceptions. ------enig2AURBEBSHXJSPFJCLLSSL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iF4EAREIAAYFAlHhsHQACgkQfoCS2CCgtitQAQD+JsZOKK4gl9sxZg+Yd/rkPw21 7+7O07oJ+IcNPo0VEJUBAIMLkZUomXOFd0te6ScwU3qMi9Zrk5WPOqZZE/zeDXpE =1iBY -----END PGP SIGNATURE----- ------enig2AURBEBSHXJSPFJCLLSSL-- From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 20:27:48 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3804C6EE; Sat, 13 Jul 2013 20:27:48 +0000 (UTC) (envelope-from to.my.trociny@gmail.com) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) by mx1.freebsd.org (Postfix) with ESMTP id E6CF41EE4; Sat, 13 Jul 2013 20:27:46 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id w20so8512786lbh.10 for ; Sat, 13 Jul 2013 13:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=SOhl3HR5RaWQyAodkD7rJ8u6JalJJuUILTV4jJJvv5k=; b=m4S3udELA2SeUOx5y6j1z3b5CxCW91fjnX9jybfjtmv6CYkbb9ebKJQt+DWlLnUxlk YvtOAmRjFN7+nfHN7o7ZVpMvk0et9ddxF5kYjD9dRiQm1VKpvM1w5445wz6zxqS8ne8m Zp+FdOIHTyxcZXURm0EWMxsHbdNoN1YTWgbfsJw55v3PaZK91CMajtRRnnpl7xBhW06e SDG2C3u8k3duDPZlsHyMnbBdxRMHkyiK/mLXslXc3eXBPCvm/8YPHVBiBM1MC2eM9djI jnCb69y0u8JxyybNwQgz+vyDbSRD/40fwjcgfhEG77ql2/1M+d9GAvNJ2/YhxKFdLp7X 0kdw== X-Received: by 10.112.180.164 with SMTP id dp4mr21661574lbc.68.1373747265719; Sat, 13 Jul 2013 13:27:45 -0700 (PDT) Received: from localhost ([178.150.115.244]) by mx.google.com with ESMTPSA id e5sm15907388lbw.3.2013.07.13.13.27.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 13:27:44 -0700 (PDT) Sender: Mikolaj Golub Date: Sat, 13 Jul 2013 23:27:42 +0300 From: Mikolaj Golub To: Craig Rodrigues Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt Message-ID: <20130713202741.GB2832@gmail.com> References: <20130713073118.GC2757@gmail.com> <20130713111825.GE2757@gmail.com> <20130713141802.GG2757@gmail.com> <20130713183354.GA2832@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 20:27:48 -0000 On Sat, Jul 13, 2013 at 12:45:13PM -0700, Craig Rodrigues wrote: > OK, just to double check, based on reading your post: > http://lists.freebsd.org/pipermail/svn-src-all/2013-July/071848.html , > with Marko's kldload/kldunload change, you encountered kernel panics in PF > and IPFW? Yes. Also in lagg :( > I also encountered kernel panics in PF with that patch. > Maybe we can clean up those modules in a separate pass, > and apply the kldload/kldunload fix some time in the future. > > > > > > > > Concerning your combined patch, as I said previously I don't like very > > much that dance with is_default_vnet. What is a purpose of it? As for > > me, it only makes the code less readable. I would just set curvnet to > > vnet0, as it is in Marko's patch. > > > > Fine by me. I have re-rolled my combined patch to remove the > is_default_vnet check > and go with Marko's code to set curvnet to vnet0: > > (1) Combine Adrian and Marko's patches, but omit Marko's changes to > kldload/kldunload: > > http://people.freebsd.org/~rodrigc/vnet-patch-adrian+marko-p2.txt > > (2) Revert my Bluetooth patch: > > http://people.freebsd.org/~rodrigc/patch-revert-GRN-253255.txt Thanks. -- Mikolaj Golub From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 21:24:26 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CDD7D210; Sat, 13 Jul 2013 21:24:26 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A5F291083; Sat, 13 Jul 2013 21:24:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DLOQPY073278; Sat, 13 Jul 2013 21:24:26 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DLOQEX073276; Sat, 13 Jul 2013 21:24:26 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201307132124.r6DLOQEX073276@svn.freebsd.org> From: Matt Jacob Date: Sat, 13 Jul 2013 21:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253330 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 21:24:26 -0000 Author: mjacob Date: Sat Jul 13 21:24:25 2013 New Revision: 253330 URL: http://svnweb.freebsd.org/changeset/base/253330 Log: When fiddling with options of which registers to copy out for a mailbox command and which registers to copy back in when the command completes, the bits being set need to not only specify what bits you want to add from the default from the table but also what bits you want *subtract* (mask) from the default from the table. A failing ISP2200 command pointed this out. Much appreciation to: marius, who persisted and narrowed down what the failure delta was, and shamed me into actually fixing it. MFC after: 1 week Modified: head/sys/dev/isp/isp.c head/sys/dev/isp/ispreg.h Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Sat Jul 13 20:56:09 2013 (r253329) +++ head/sys/dev/isp/isp.c Sat Jul 13 21:24:25 2013 (r253330) @@ -2589,7 +2589,7 @@ isp_get_wwn(ispsoftc_t *isp, int chan, i } mbs.param[9] = chan; } else { - mbs.ibits = 3; + mbs.ibitm = 3; mbs.param[1] = loopid << 8; if (nodename) { mbs.param[1] |= 1; @@ -7363,6 +7363,13 @@ isp_mboxcmd(ispsoftc_t *isp, mbreg_t *mb ibits |= mbp->ibits; obits |= mbp->obits; + /* + * Mask any bits that the caller wants us to mask + */ + ibits &= mbp->ibitm; + obits &= mbp->obitm; + + if (ibits == 0 && obits == 0) { mbp->param[0] = MBOX_COMMAND_PARAM_ERROR; isp_prt(isp, ISP_LOGERR, "no parameters for 0x%x", opcode); Modified: head/sys/dev/isp/ispreg.h ============================================================================== --- head/sys/dev/isp/ispreg.h Sat Jul 13 20:56:09 2013 (r253329) +++ head/sys/dev/isp/ispreg.h Sat Jul 13 21:24:25 2013 (r253330) @@ -464,8 +464,10 @@ #define MBCMD_DEFAULT_TIMEOUT 100000 /* 100 ms */ typedef struct { uint16_t param[MAX_MAILBOX]; - uint32_t ibits; - uint32_t obits; + uint32_t ibits; /* bits to add for register copyin */ + uint32_t obits; /* bits to add for register copyout */ + uint32_t ibitm; /* bits to mask for register copyin */ + uint32_t obitm; /* bits to mask for register copyout */ uint32_t lineno : 16, : 12, @@ -475,6 +477,8 @@ typedef struct { } mbreg_t; #define MBSINIT(mbxp, code, loglev, timo) \ ISP_MEMZERO((mbxp), sizeof (mbreg_t)); \ + (mbxp)->ibitm = ~0; \ + (mbxp)->obitm = ~0; \ (mbxp)->param[0] = code; \ (mbxp)->lineno = __LINE__; \ (mbxp)->func = __func__; \ From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 22:06:42 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 290469F5; Sat, 13 Jul 2013 22:06:42 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1B39A1181; Sat, 13 Jul 2013 22:06:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DM6fWe087187; Sat, 13 Jul 2013 22:06:41 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DM6f8t087186; Sat, 13 Jul 2013 22:06:41 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201307132206.r6DM6f8t087186@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sat, 13 Jul 2013 22:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253331 - head/sys/fs/fuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 22:06:42 -0000 Author: pfg Date: Sat Jul 13 22:06:41 2013 New Revision: 253331 URL: http://svnweb.freebsd.org/changeset/base/253331 Log: Add creation timestamp (birthtime) support for fuse. I was keeping this #ifdef'd for reference with the MacFUSE change[1] but on second thought, this is a FreeBSD-only header so the SVN history should be enough. Add missing padding while here. Reference [1]: http://code.google.com/p/macfuse/source/detail?spec=svn1686&r=1360 Modified: head/sys/fs/fuse/fuse_kernel.h Modified: head/sys/fs/fuse/fuse_kernel.h ============================================================================== --- head/sys/fs/fuse/fuse_kernel.h Sat Jul 13 21:24:25 2013 (r253330) +++ head/sys/fs/fuse/fuse_kernel.h Sat Jul 13 22:06:41 2013 (r253331) @@ -69,20 +69,17 @@ struct fuse_attr { __u64 atime; __u64 mtime; __u64 ctime; -#ifdef __FreeBSD__ __u64 crtime; -#endif __u32 atimensec; __u32 mtimensec; __u32 ctimensec; -#ifdef __FreeBSD__ __u32 crtimensec; -#endif __u32 mode; __u32 nlink; __u32 uid; __u32 gid; __u32 rdev; + __u32 padding; }; struct fuse_kstatfs { From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 22:39:57 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E908FB4; Sat, 13 Jul 2013 22:39:57 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E9D79124E; Sat, 13 Jul 2013 22:39:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6DMduQY098701; Sat, 13 Jul 2013 22:39:56 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6DMduZn098699; Sat, 13 Jul 2013 22:39:56 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201307132239.r6DMduZn098699@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 13 Jul 2013 22:39:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253332 - head/sys/dev/usb/input X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 22:39:57 -0000 Author: hselasky Date: Sat Jul 13 22:39:56 2013 New Revision: 253332 URL: http://svnweb.freebsd.org/changeset/base/253332 Log: Allow regular off-the-shelf keyboards to be overclocked like so-called "Gamers Keyboards" by adding a tunable, "hw.usb.ukbd.pollrate", which can fix the polling rate of the attached USB keyboards in the range 1..1000Hz. A similar feature already exists in the USB mouse driver. Use with care! Might leave you without keyboard input. This feature is only available when the USB_DEBUG option is set in the kernel configuration file. Correct "unit" type to "int" while at it. Modified: head/sys/dev/usb/input/ukbd.c Modified: head/sys/dev/usb/input/ukbd.c ============================================================================== --- head/sys/dev/usb/input/ukbd.c Sat Jul 13 22:06:41 2013 (r253331) +++ head/sys/dev/usb/input/ukbd.c Sat Jul 13 22:39:56 2013 (r253332) @@ -92,14 +92,18 @@ __FBSDID("$FreeBSD$"); #ifdef USB_DEBUG static int ukbd_debug = 0; static int ukbd_no_leds = 0; +static int ukbd_pollrate = 0; -static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB ukbd"); +static SYSCTL_NODE(_hw_usb, OID_AUTO, ukbd, CTLFLAG_RW, 0, "USB keyboard"); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, debug, CTLFLAG_RW | CTLFLAG_TUN, &ukbd_debug, 0, "Debug level"); TUNABLE_INT("hw.usb.ukbd.debug", &ukbd_debug); SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, no_leds, CTLFLAG_RW | CTLFLAG_TUN, &ukbd_no_leds, 0, "Disables setting of keyboard leds"); TUNABLE_INT("hw.usb.ukbd.no_leds", &ukbd_no_leds); +SYSCTL_INT(_hw_usb_ukbd, OID_AUTO, pollrate, CTLFLAG_RW | CTLFLAG_TUN, + &ukbd_pollrate, 0, "Force this polling rate, 1-1000Hz"); +TUNABLE_INT("hw.usb.ukbd.pollrate", &ukbd_pollrate); #endif #define UKBD_EMULATE_ATSCANCODE 1 @@ -1165,13 +1169,15 @@ ukbd_attach(device_t dev) { struct ukbd_softc *sc = device_get_softc(dev); struct usb_attach_arg *uaa = device_get_ivars(dev); - int32_t unit = device_get_unit(dev); + int unit = device_get_unit(dev); keyboard_t *kbd = &sc->sc_kbd; void *hid_ptr = NULL; usb_error_t err; uint16_t n; uint16_t hid_len; - +#ifdef USB_DEBUG + int rate; +#endif UKBD_LOCK_ASSERT(); kbd_init_struct(kbd, UKBD_DRIVER_NAME, KB_OTHER, unit, 0, 0, 0); @@ -1272,6 +1278,19 @@ ukbd_attach(device_t dev) genkbd_diag(kbd, bootverbose); } +#ifdef USB_DEBUG + /* check for polling rate override */ + rate = ukbd_pollrate; + if (rate > 0) { + if (rate > 1000) + rate = 1; + else + rate = 1000 / rate; + + /* set new polling interval in ms */ + usbd_xfer_set_interval(sc->sc_xfer[UKBD_INTR_DT], rate); + } +#endif /* start the keyboard */ usbd_transfer_start(sc->sc_xfer[UKBD_INTR_DT]);